9 Commits

Author SHA1 Message Date
e169731b42 chore: merge feat/solana-colosseum into feat/x402-multichain
Brings in packages/routing, packages/hyperliquid (hypercore network), checkout
AnyTokenPay/HyperCorePay, Node 22 pins, tenant-ownership guards and the zcash
tag lock. Only conflict: drizzle _journal.json (kept 0010_onchain_billing and
0011_coupons_organization in order).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:39:32 +03:00
ef35154de3 feat(routing): any-token routing via Relay with LI.FI fallback
New @settlekit/routing: RouteProvider interface; hand-written Relay REST
client (EXACT_OUTPUT quote to the merchant payTo, refundTo = buyer, app fees,
strict deposit addresses, /intents/status/v3); LI.FI fallback (quote/toAmount,
status by origin tx); policy (max fee bps, max slippage, origin allowlist,
quote TTL, guaranteed destination amount, recipient/token/chain match);
PaymentNetwork -> destination map (Solana/Base/Arbitrum/Ethereum/HyperEVM
USDC, Robinhood USDG, Tempo USDC.e or pathUSD, HyperCore 1337 perps USDC);
session route record helpers; ROUTING_* env. Tests replay Relay/LI.FI
responses recorded live on 2026-09-29 (no network).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:56:28 +03:00
88e842f39d chore(deps): add x402-foundation @x402/* 2.27 and mppx for agent payments
@x402/core, evm, svm, hono, fetch 2.27 (Apache-2.0) and mppx 0.11 (MIT)
for x402 v2 on every chain and MPP on Tempo. Scaffolds the
@settlekit/x402-facilitator package manifest. Lockfile peer churn in
unrelated importers (checkout, app-kit-viem) reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:55:31 +03:00
015899f2c3 feat(chains): add multi-chain registry and fail-closed EVM verifier
@settlekit/chains carries the verified EVM registry (Ethereum, Base,
Arbitrum, Robinhood Chain, HyperEVM, Tempo, Arc; mainnet + testnet), a
generic stablecoin verifier over the arc EvmRpc seam (chain-id assertion,
receipt status, token/payTo/amount, confirmations, block time vs session,
payer binding, Tempo TIP-20 memo), CAIP-2 ids, network-aware tx-hash and
payTo rules, env loaders (SETTLEKIT_CHAIN_ENV, ENABLED_EVM_CHAINS, per-chain
overrides, Zcash) and the settlement-verifier contract. Tests replay
receipts recorded from each chain's public RPC.

PaymentNetwork widens to solana|base|arc|ethereum|arbitrum|robinhood|
hyperevm|tempo|zcash and CheckoutSession gains settlementQuote,
payerAddress, acceptedNetworks and payToByNetwork. The hosted checkout
fails closed on the new networks until its wave-2 UI lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:52:34 +03:00
ca4567dea6 feat: add @settlekit/solana package
Solana USDC settlement mirroring @settlekit/arc's injectable RPC seam:
- clusters: mainnet/devnet USDC mints, CAIP-2 ids, public RPCs
- rpc: SolanaRpc interface + createKitSolanaRpc over @solana/kit 5.5.1
- verify: verifySplTransfer balance-delta rules (mint+owner, bigint,
  meta.err, reference in account keys, payer detection)
- pay-url: Solana Pay transfer/transaction request encode + parse
- reference / find-reference: Solana Pay reference keys and lookup
- tx-builder: unsigned v0 buyer-pays tx (idempotent ATA create,
  optional memo, TransferChecked with read-only reference)
- settlement-provider: hot-wallet SolanaSettlementProvider with
  reserve/release idempotency; settlement-core gains the "solana"
  provider name and an injected-provider config variant (no dep cycle)
- x402-verifier: PaymentVerifier adapter enforcing session references

API and worker declare the dependency (filtered lockfile update).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 06:15:50 +03:00
3853551433 asad 2026-06-17 02:09:36 +03:00
598cd03f05 feat: implement all 8 SettleKit apps + fix x402 nonce round-trip
apps:
- api: Hono REST server, all §26 endpoints, 14 tests
- worker: delivery runner + payment-confirm + access-sync + renewal + webhook-retry jobs wired to real package clients
- dashboard: Next.js merchant dashboard, full §16/§27 sections + §28 product builder
- checkout: Next.js hosted USDC checkout with real delivery materialization
- marketplace: Next.js public marketplace + agent metadata.json route
- admin: Next.js risk/ops console wired to @settlekit/risk + database
- docs: Next.js docs site (9 static routes)
- examples: 5 runnable end-to-end examples

fix(x402): support pinned config.nonce so a stateless verifier can confirm
the challenge nonce round-trips (default stays random; package tests intact).

Full workspace: 590 tests passing (122 files), tsc green for all packages +
api/worker/examples, all 5 Next apps typecheck clean, docs next build green.
2026-06-15 10:49:14 +03:00
3fe0c88942 feat: implement all 77 SettleKit packages with real code
Core engine: entitlements (§14), delivery action runner (§21).
Payment rails: arc (viem USDC verify), circle (REST), x402 middleware, payments, webhooks (HMAC), notifications (Resend).
Integrations: github (Octokit App), discord (REST v10).
Commerce: saas billing, bundles, license-keys, api-keys, file-delivery (signed URLs + SigV4), usage/credits, agent-services, escrow, marketplace-core, risk.
Persistence: database (Drizzle/Postgres, 48 tables §25).
Plus supporting domain packages.

561 tests passing across 117 files; tsc -b green for every package.
2026-06-15 03:24:19 +03:00
4afda54455 feat: monorepo scaffold + @settlekit/common contract package
- pnpm workspace, shared tsconfig, vitest
- common: ids, money (USDC base-unit math), Result/SettleKitError, time
- domain types: product, customer, payment, entitlement, delivery, integration
- 13 passing contract tests
2026-06-15 02:55:22 +03:00