Skip to content

Phase 3: integrations (1Click, NEAR, DB) - #111

Merged
MFrancis-dev merged 1 commit into
mainfrom
feat/integrations
Nov 4, 2026
Merged

MFrancis-dev merged 1 commit into
mainfrom
feat/integrations

Conversation

@MFrancis-dev

Copy link
Copy Markdown
Owner

Implements the integration layer (ARCHITECTURE §3–5, §12).

What changed

  • 1Click (lib/oneclick): token list with 10-min cache (stale on outage), funding and buy EXACT_INPUT requests (refunds: user origin / vault), longer deadline for Bitcoin, status polling + deposit submit, readable errors for 1Click's misleading messages. Real fixtures from today's dry quotes.
  • Signatures (fail closed): SDK 0.1.26 verifyQuoteSignature() does not verify real unauthenticated dry quotes. Real quotes are rejected unless the signature verifies; dry previews are display-only. Tracked as new task K3.5 ([K3.5] Verify 1Click quote signatures on real quotes (with partner JWT) #110), blocked on the partner JWT.
  • NEAR (lib/near): RPC views, NEP-297 event parsing, vault + factory bindings (execute_buy attaches the deposit-address storage), keeper signer (server-only), NEP-413 sign-in verification (tested with a real signature; rejects changed message, wrong recipient, function-call keys), VaultClient adapter.
  • DB (lib/db): first migration, db.migrate() for PGlite and Postgres, queries for users / funding attempts / buys, terminal-status sets.

Closes #39
Closes #40
Closes #41
Closes #42

Roadmap

  • ROADMAP.md updated: K3.1–K3.4 done, K3.5 added (blocked), Phase 3 at 80%

Checks

  • 66 tests, pnpm typecheck, pnpm lint, pnpm build

NEAR HACKATHON rules

  • No secrets; fixtures are public dry quotes (example addresses only)
  • No funds moved, nothing signed with real keys

Not done

  • K3.5 needs the partner JWT (K0.8) to confirm signature verification on a real quote.

- lib/oneclick: SDK config, token cache, funding and buy quote requests
  with per-chain deadlines, fail-closed signature check for real quotes,
  status polling, deposit submit, readable errors; real dry-quote fixtures
- lib/near: RPC views, NEP-297 event parsing, vault and factory bindings,
  keeper signer, NEP-413 sign-in verification, VaultClient adapter
- lib/db: first migration, migrate() for PGlite and Postgres, queries for
  users, funding attempts and buys
- 66 TS tests; new task K3.5 (#110) for signature verification, blocked
  on the partner JWT
@MFrancis-dev
MFrancis-dev merged commit b10a2ac into main Nov 4, 2026
3 checks passed
@MFrancis-dev
MFrancis-dev deleted the feat/integrations branch November 4, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants