7Block Labs
Blockchain Technology

ByAUJay

NEAR Intents as a Dev Primitive: Routing, Signing, and Execution Without UX Friction

Intents turn “what the user wants” into cross‑chain settlement in seconds using standardized routing, flexible signing, and atomic execution on NEAR—without forcing users to manage chains, gas, or wallets. This post distills the newest moving parts (solvers, signatures, bridges) into concrete patterns you can ship now. (docs.near.org)

Why Intents, Why Now

  • NEAR’s “AI‑native transaction layer” reduces multi‑chain UX to one signed outcome: Express → Solve → Settle. Users or agents sign a single payload; a solver network finds best execution; NEAR finalizes and co‑signs all required txs across chains. (docs.near.org)
  • Performance makes the UX click: since May 13, 2025 NEAR produces ~600 ms blocks with ~1.2 s finality—critical when an intent fans out into multiple on‑/off‑chain steps. (pages.near.org)
  • Chain Signatures let a NEAR account (even a smart contract) sign Bitcoin, Ethereum, Cosmos, XRP—and since April 2025, EdDSA chains like Solana and TON—so settlement doesn’t stall at chain boundaries. (pages.near.org)

The upshot for product leaders: you ship “swap X→Y” or “pay invoice Z” while the protocol handles routes, signatures, and atomicity—no chain selectors, no gas prompts, no bridge UIs. (docs.near.org)


The Three Primitives: Route, Sign, Execute

1) Route with a solver bus (quote → publish → status)

NEAR Intents exposes a Message Bus that:

  • broadcasts user requests to connected solvers,
  • gathers quotes for up to 3000 ms,
  • validates AML in the distribution channels,
  • and tracks settlement status end‑to‑end. (docs.near-intents.org)

Key endpoints and fields:

  • quote (JSON‑RPC): defuse_asset_identifier_in/out, exact_amount_in or exact_amount_out, min_deadline_ms (offer TTL). Returned quote_hash binds execution. (docs.near-intents.org)
  • publish_intent: attach quote_hashes + signed_data using NEP‑413, ERC‑191, or raw_ed25519. Returns intent_hash. (docs.near-intents.org)
  • get_status: PENDING → TX_BROADCASTED → SETTLED, or NOT_FOUND_OR_NOT_VALID. (docs.near-intents.org)

For turnkey distribution, 1Click provides REST + SDKs (TS, Go, Rust) with deposit addresses, lifecycle statuses, and optional JWT to reduce fees. Use it to embed “Swap in one click” without touching the raw solver bus. (docs.near-intents.org)

Compliance is in the loop: 1Click quote requests are screened (TRM, Binance AML, AMLBot/PureFi); high‑risk flows are blocked before execution. (docs.near-intents.org)

2) Sign once (wallets you already support)

Intents standardize off‑chain signatures so your current auth surface works:

Verifier encoding rules (what your backend must validate):

  • Curves: Ed25519 (32/64 bytes), Secp256k1 (uncompressed 64‑byte pubkey, 65‑byte r||s||v), P256 (uncompressed). No DER. No compressed ECDSA keys. (docs.near-intents.org)

FastAuth + passkeys (NEAR’s MPC‑backed, email‑recoverable flow) helps you onboard non‑crypto users and still produce NEP‑413 signatures—ideal for intents UX without seed phrases. NEAR is actively moving FastAuth into a more decentralized, multi‑team roadmap (FastAuth 2.0 RFP) and already powers >800k users in production. (pages.near.org)

3) Execute atomically on NEAR

All actual state changes happen in the Verifier contract via execute_intents(intents[]). You can bundle multiple intents—e.g., swap then withdraw—and NEAR settles them atomically from escrowed balances. Note: NEAR is asynchronous; calls spawned during execution may complete out‑of‑order, but the contract preserves the ordered evaluation of the provided intents. (docs.near-intents.org)

Common intent types you’ll use first:

  • token_diff: “I’ll give -X to receive +Y.” Foundation of swaps and multi‑leg nets.
  • transfer: move balances between Intents accounts (fees, referrals).
  • ft_withdraw: withdraw to an external chain address (bridge handles egress).
  • add_public_key / remove_public_key: manage allowed signers for an Intents account. (docs.near-intents.org)

Settlement and Bridges: What Actually Moves the Coins

Intents relies on locked funds inside NEAR for atomic settlement, then uses bridges to move assets to/from origin/destination chains:

  • Omni Bridge (primary): hybrid design with Chain Signatures + light clients/Wormhole depending on the chain; currently supports Ethereum, Bitcoin, Solana, Base, BNB, Arbitrum. Average NEAR→other settlement ~30s (MPC signatures); inbound finality varies by chain (e.g., Ethereum ~960s, Base ~1026s, Arbitrum ~1066s). (docs.near.org)
  • PoA Bridge: alternative bridge with JSON‑RPC (supported_tokens, deposit address, deposit/withdraw status). Useful for assets not yet on Omni. (docs.near.org)

Chain Signatures are the glue: a decentralized MPC network, staked by NEAR/EigenLayer restakers, co‑signs destination‑chain transactions so a NEAR contract can originate valid Bitcoin/EVM/Solana/TON operations. EdDSA support (Apr 30, 2025) unlocks native signing for Solana, TON, Stellar, Sui, Aptos. (pages.near.org)


Practical Build Patterns (copy‑paste friendly)

Pattern A: Best‑price cross‑chain swap in one user action

  1. Quote with solver bus (or 1Click). Specify min_deadline_ms to let solvers price tighter.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "quote",
  "params": [{
    "defuse_asset_identifier_in": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near", // USDC (Arbitrum) mirrored on NEAR
    "defuse_asset_identifier_out": "nep141:sol-<token-id>.omft.near", // SOL-mirrored token on NEAR
    "exact_amount_in": "100000000", // 100 USDC (6 decimals)
    "min_deadline_ms": 30000
  }]
}

The UI receives multiple quotes (quote_hash, amount_out, expiration_time). Show best price with ETA and fee breakdown. (docs.near-intents.org)

  1. User signs a single NEP‑413 payload with token_diff (+ optional referral transfer). Publish with quote_hashes:
{
  "id": 2,
  "jsonrpc": "2.0",
  "method": "publish_intent",
  "params": [{
    "quote_hashes": ["<best-quote-hash>"],
    "signed_data": {
      "standard": "nep413",
      "payload": {
        "recipient": "intents.near",
        "nonce": "base64-unique",
        "message": "{\"signer_id\":\"alice.near\",\"deadline\":\"2025-12-01T12:00:00Z\",\"intents\":[{\"intent\":\"token_diff\",\"diff\":{\"nep141:arb-...usdc.omft.near\":\"-100000000\",\"nep141:sol-...omft.near\":\"<minOut>\"}}]}"
      },
      "public_key": "ed25519:...",
      "signature": "ed25519:..."
    }
  }]
}
  1. Withdraw to destination chain (optional inline or via a second intent):
{
  "intent": "ft_withdraw",
  "token": "sol-...omft.near",
  "receiver_id": "F84x...h7Y (Solana address)",
  "amount": "<received-amount>"
}

Observe status until SETTLED; display the NEAR tx hash and destination chain tx link when available. (docs.near-intents.org)

Why this wins:

  • One signature, no gas popups, atomic settlement on NEAR, and fast finality shortens the whole flow to seconds for many routes. (pages.near.org)
  • Thanks to Chain Signatures, the protocol co‑signs and submits the Solana leg—no user wallet switch. (pages.near.org)

Pattern B: OTC stablecoin P2P netting (zero price impact)

Two parties post offsetting token_diff intents and execute atomically:

[
  {
    "standard": "nep413",
    "payload": {
      "message": "{\"signer_id\":\"maker.near\",\"deadline\":\"2025-12-01T12:00:00Z\",\"intents\":[{\"intent\":\"token_diff\",\"diff\":{\"nep141:usdc.near\":\"-1000000000\",\"nep141:usdt.near\":\"1000000000\"}}]}",
      "nonce": "...",
      "recipient": "intents.near"
    },
    "public_key": "ed25519:...",
    "signature": "ed25519:..."
  },
  {
    "standard": "nep413",
    "payload": {
      "message": "{\"signer_id\":\"taker.near\",\"deadline\":\"2025-12-01T12:00:00Z\",\"intents\":[{\"intent\":\"token_diff\",\"diff\":{\"nep141:usdc.near\":\"1000000000\",\"nep141:usdt.near\":\"-1000000000\"}}]}",
      "nonce": "...",
      "recipient": "intents.near"
    },
    "public_key": "ed25519:...",
    "signature": "ed25519:..."
  }
]

The Verifier nets balances in one transaction; neither side bears counterparty or fill risk. (docs.near-intents.org)

Pattern C: One‑click checkout via 1Click API (no wallet UX)

For Web2‑style checkout or custodial flows, use 1Click:

  1. Request quote + deposit address (JWT avoids extra fee):
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer <JWT>

{
  "dry": false,
  "swapType": "EXACT_INPUT",
  "slippageTolerance": 100,             // 1%
  "originAsset": "btc:<chain-id>...",   // user pays in BTC
  "destinationAsset": "nep141:usdc.near",
  "amount": "100000",                   // sats or smallest unit
  "depositType": "ORIGIN_CHAIN",
  "recipientType": "DESTINATION_CHAIN",
  "recipient": "0x...",                 // or chain address
  "refundType": "ORIGIN_CHAIN",
  "refundTo": "bc1q...",
  "deadline": "2025-12-01T12:45:00Z"
}
  1. Show user the deposit address and ETA; optionally POST /v0/deposit/submit with tx hash; poll /v0/status until SUCCESS or REFUNDED. (docs.near-intents.org)

Signing Deep‑Dive: Keys, Curves, and Account Abstraction

  • Intents accounts identify users by NEAR AccountId (named or implicit). You can add multiple public keys (full‑control) via on‑chain tx or an intent. Keep this mapping fresh; rotate keys if a wallet rotates. (docs.near-intents.org)
  • Enforce the Verifier’s raw encoding: uncompressed ECDSA pubkeys, concatenated signatures (no DER). Many libs default to compressed/DER—configure explicitly. (docs.near-intents.org)
  • Multi‑payload signatures let the same app accept NEP‑413, ERC‑191, and raw Ed25519 without custom codepaths per wallet vendor. (docs.near-intents.org)
  • For simple auth on your backend (e.g., gating price‑impacting flows), NEP‑413 verification libraries are available; require Full Access Keys to match spec guidance. (socket.dev)

Passkeys and FastAuth reduce friction for newcomers and AI agents alike: passwordless, recoverable accounts can sign NEP‑413 while remaining non‑custodial; the ecosystem is actively decentralizing the infra via open RFPs. (pages.near.org)


Execution Deep‑Dive: Atomicity, Bridges, and Time

  • Atomicity: execute_intents processes your list in order and settles balances within the same NEAR tx; spawned async calls may resolve out of order—design idempotent off‑chain orchestrations. (docs.near-intents.org)
  • Fees: the protocol fee is 0.0001% (1 pip) on every transfer/swap. near‑intents.org adds 0.2% if you use their UI; 1Click adds 0.1% without an API key (0 with JWT). You can append your own app fee via appFees. (docs.near-intents.org)
  • Bridge times: plan UX around asymmetry—NEAR→other is MPC‑fast (~30s), inbound depends on source chain finality (see current durations). Show reliable ETAs and refresh quotes if deadlines near. (github.com)
  • Message format: Omni Bridge uses Borsh‑encoded payloads, signed by the MPC, verified on destination chains with native signature precompiles—cleaner than optimistic challenge periods. (docs.near.org)

Emerging Best Practices (what’s working in production)

Routing

  • Request multiple quotes; use min_deadline_ms to trade price vs certainty. Reject quotes near expiry; re‑request automatically. (docs.near-intents.org)
  • Keep a persistent WS connection to the solver bus; backoff on disconnects; correlate on quote_id. (docs.near-intents.org)

Signing

  • Prefer NEP‑413 for NEAR wallets, ERC‑191 for EVM, raw_ed25519 for Solana; normalize to the Verifier’s raw formats; reject compressed keys/DER signatures. (docs.near-intents.org)
  • Manage Intents account keys: add_public_key on first connect, rotate when wallets rotate, remove stale keys to reduce attack surface. (docs.near-intents.org)

Execution

  • Compose intents: token_diff + ft_withdraw + transfer (for app/referral fees) in one bundle—one signature, one settlement. (docs.near-intents.org)
  • Surface status transitions in UI (PENDING, TX_BROADCASTED, SETTLED). Time out gracefully and offer a one‑tap retry. (docs.near-intents.org)

Bridging

  • Prefer Omni where available; fall back to PoA for unsupported assets. Use supported_tokens before displaying choices. (docs.near.org)
  • Warn users against CEX deposit addresses; some exchanges won’t credit per‑user bridge deposits—use test amounts. (docs.near-intents.org)

Compliance & Risk

  • Use 1Click’s built‑in screening or replicate with the same vendors (TRM, AMLBot/PureFi) if you run your own distribution. (docs.near-intents.org)
  • Track official audits and bug bounties; route disclosures through the published program. (docs.near-intents.org)

Performance & UX

  • Rely on NEAR’s 1.2 s finality to collapse multi‑leg flows into “instant enough” UX; render “Done” on SETTLED with a subtle “receiving chain pending” badge if an external tx hash isn’t posted yet. (pages.near.org)

What’s New and What’s Next

  • EdDSA in Chain Signatures (Apr 30, 2025) added native signing for Solana/TON and more—removing a common last‑mile blocker for multichain intents. (pages.near.org)
  • Chain Signatures throughput and latency have been under active optimization in 2025; roadmap updates signaled major gains to support higher solver volume and more chains. (pages.near.org)
  • Omni Bridge is migrating from a hybrid model to full Chain Signatures verification, aiming to phase out Wormhole dependencies over time. (docs.near.org)

Implementation Checklist (enterprise‑ready)

  • Business logic
    • Define allowable origin/destination assets and min/max sizes; validate against supported_tokens at runtime. (docs.near-intents.org)
    • Encode your fee policy: protocol fee + distribution fee + app fee via appFees. (docs.near-intents.org)
  • Integration
    • Choose 1Click for fastest path; otherwise integrate quote/publish/status directly. (docs.near-intents.org)
    • Normalize wallet signatures to NEP‑413/ ERC‑191/ raw_ed25519; unit test curve/encoding rules. (docs.near-intents.org)
  • Security & Compliance
    • Register and rotate Intents keys; monitor AML responses; block deposits from flagged sources. (docs.near-intents.org)
    • Monitor the bug bounty and audit threads; pin bridge versions and chainlists. (docs.near-intents.org)
  • Observability
    • Correlate quote_hash ↔ intent_hash ↔ NEAR tx hash ↔ destination tx; expose a “Details” drawer with all IDs. (docs.near-intents.org)

How 7Block Labs Can Help

We’ve shipped intent‑driven flows end‑to‑end—from quoting to multi‑curve signing to atomic settlement—across wallets and chains. Typical engagement:

  • 2–3 weeks: discovery, asset policy, KYC/AML integration, 1Click pilot in staging.
  • 3–6 weeks: direct solver bus integration, custom fee logic, OTC P2P patterns, observability dashboards.
  • Ongoing: bridge expansions (Omni/PoA), Chain Signatures onboarding for new chains, key rotation automation.

If you want “route, sign, execute” to feel like one click for your users, we’ll make it production‑grade.


Appendix: Reference Snippets

Supported signature object (NEP‑413):

{
  "standard": "nep413",
  "payload": {
    "message": "{\"signer_id\":\"alice.near\",\"deadline\":\"2025-12-01T12:00:00Z\",\"intents\":[{\"intent\":\"transfer\",\"receiver_id\":\"merchant.near\",\"tokens\":{\"nep141:usdc.near\":\"100000000\"}}]}",
    "nonce": "base64...",
    "recipient": "intents.near"
  },
  "public_key": "ed25519:...",
  "signature": "ed25519:..."
}

EVM wallet (ERC‑191) variant:

{
  "standard": "erc191",
  "payload": "{\"signer_id\":\"0xCcAa...\",\"verifying_contract\":\"intents.near\",\"deadline\":\"2025-12-01T12:00:00Z\",\"nonce\":\"base64...\",\"intents\":[{\"intent\":\"token_diff\",\"diff\":{\"nep141:usdc.near\":\"-100000000\",\"nep141:usdt.near\":\"99800000\"}}]}",
  "signature": "secp256k1:base58..."
}

Both verify under the same Verifier rules; keep public keys uncompressed and signatures non‑DER. (docs.near-intents.org)


By treating NEAR Intents as a first‑class primitive—route with the solver bus or 1Click, sign with the wallets you already support, execute atomically on NEAR—you remove the UX friction that keeps multi‑chain products from scaling. The protocol’s latest speed, signature coverage, and bridge stack mean you can ship it now. (pages.near.org)

Like what you're reading? Let's build together.

Get a free 30‑minute consultation with our engineering team.

Related Posts

7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.