Skip to content

Payments: preview a stablecoin payment to another chain (NEAR Intents dry quote) #273

Closed

Description

@Lexirieru

Axel's request (12 Nov): a Payments Mind that can pay stablecoins from NEAR to any chain NEAR Intents supports.

Constraint

  • NEAR Intents has no testnet and none is planned (docs.near-intents.org FAQ; HACKATHON.md Q-007, which suggests dry: true quotes).
  • HelloNear runs on testnet only (HACKATHON.md Q-010 says that's eligible for every track).
  • So for the hackathon this is a preview only: no deposit address, no transaction, no funds. Real sending needs a mainnet wallet and a policy change for deposit addresses. That is after the hackathon and needs Axel's approval (rule 3: anything on mainnet).

Engine (branch feat/engine-crosschain-quote)

crosschain_quote is read only, with no approval, in the payments skill.

  • Input: token (USDC or USDT on NEAR), amount, toChain (base, arbitrum, solana, ethereum, polygon, tron…), recipient (only an address the owner typed), optional toToken.
  • Call: POST https://1click.chaindefuser.com/v0/quote with dry: true, EXACT_INPUT and 1% slippage. Refunds point at the Mind's own wallet; 1Click requires the field even on a dry quote.
    • No API key is needed (HACKATHON.md Q-006).
    • Asset ids come from GET /v0/tokens, cached 10 minutes; amounts are converted in BigInt.
  • Output: status: "quote_only", the recipient's amount and minimum, cost, seconds, quoteId and a note saying nothing was sent.
  • Live check, 12 Nov (dry): 10 USDC on NEAR → 9.99558 USDC on Base, ~22 s, answered in ~1 s.

FE (optional, @AncungAulia)

Nothing breaks without FE work: the step shows "Using a tool" and the Mind writes the preview in its reply. If there's time before the freeze:

  • an entry in runs/data/tools.ts, e.g. crosschain_quote: { doing: "Getting a cross-chain quote", done: "Got a cross-chain quote", orb: "searching", node: "Cross-chain quote" };
  • optionally a small card from the result: amount → recipient's amount on to.chain, cost, time, and "Preview only, nothing sent". No pay button.

Not doing now

  • Live quotes (dry: false) or deposits.
  • Mainnet wallets.
  • The NEAR Intents Agent API, which needs a partner key and is mainnet only.

🤖 Generated with Claude Code

Activity

  1. Lexirieru commented on Nov 12, 2026

    @Lexirieru
    ContributorAuthor

    Engine update (branch feat/engine-crosschain-quote, not a PR yet):

    • crosschain_quote now also returns proof: { signedBy1Click, signature, quoteHash, publicKey }.
    • 1Click signs every quote, dry ones too. The engine checks it with the official verifyQuoteSignature (@defuse-protocol/one-click-sdk-typescript 0.1.26, pinned). Checked live: a real quote verifies, and the same quote with amountOut changed does not.
    • The Mind says it unasked: "NEAR Intents signed these exact numbers and the signature checked out".
    • The Mind must not retype the values. When it tried, it dropped characters from the 88-character signature, and the hash was missing or wrong in 3 of 6 runs. A shown proof would then not verify.

    @AncungAulia this is the one FE piece that makes the proof exact. When you have time before the freeze:

    • On the tool.result of crosschain_quote, show a small card from result:
      • from.amount from.token → to.amount to.token on to.chain, then cost and seconds;
      • "Preview only, nothing sent";
      • when proof.signedBy1Click is true, a "Signed by NEAR Intents" line that opens quoteHash, publicKey and signature, copied straight from result.proof.
    • No pay button.
    • Words for runs/data/tools.ts: crosschain_quote: { doing: "Getting a cross-chain quote", done: "Got a cross-chain quote", orb: "searching", node: "Cross-chain quote" }.
  2. Lexirieru commented on Nov 12, 2026

    @Lexirieru
    ContributorAuthor

    @AncungAulia heads-up: besides the NEAR Intents quote (PR coming as soon as the full local suite finishes), we're also working on #277, opening the TEE Explorer report already verified.

    • Today: "Paste the quote in TEE Explorer" makes people paste. Pasting "Copy the proof" fails with "The quote is invalid", because the Explorer wants only the Intel quote hex.
    • Plan: a backend route uploads the run's Intel quote to proof.t16z.com's own /api/upload and returns the report URL. The link then opens a page that already reads VERIFIED.
      • Checked live: it matched the nonce and compose hash in our proof.
      • The Explorer sends no CORS headers, so the upload must go through the backend.
    • Your part, once the route is in: the link calls it and opens the URL in a new tab. Open the tab on the click, then set its location, so popup blockers don't stop it. Details on View proof: open the TEE Explorer report already verified, no pasting #277.
  3. added a commit that references this issue on Nov 12, 2026
  4. Lexirieru commented on Nov 12, 2026

    @Lexirieru
    ContributorAuthor

    Done: engine #278 (crosschain_quote, 1Click signature checked) and the step words #282 are merged and live. The optional FE card showing the proof values was not built; the Mind states the proof in its reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions