43 Commits

Author SHA1 Message Date
6922d273ff docs: record the live Tameion operator console service
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:48:54 +03:00
a9cc50524c feat(contracts): one-command Arc mainnet deploy and verify for OperatorVault and escrow
Adds DeployArcMainnet.s.sol and deploy-arc-mainnet.sh. The script checks the
chain id (5042) and USDC, simulates, prints the cost in USDC, asks for
confirmation, then verifies on Sourcify and Blockscout. Also adds the
bounty runbook. SettleKitCctpHook is excluded: it is not called by CCTP V2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:33:07 +03:00
d68a5b25ce docs: record the live Render deployment of main (testnet mode)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:05:50 +03:00
8eb0f49d27 docs: record parity build status per gap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:44:07 +03:00
c724bf1700 feat: conversion, per-link, churn and LTV metrics (G14, part 1)
GET /v1/analytics/metrics computes, from live sessions, payments,
subscriptions and catalog: checkout conversion, per-payment-link opened /
paid / conversion / revenue, repeat customers, average revenue per
customer, subscription churn, ARPU and an estimated lifetime value, with
exact bigint money. Checkout repositories gain listCreatedSince
(in-memory and Postgres). The dashboard Analytics page shows the new
cards and a payment-link table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:37:57 +03:00
35563d758d chore: prepare SDK releases at 0.1.0 with a publish workflow (G13)
@settlekit/common, @settlekit/sdk and @settlekit/react move to 0.1.0 with
publish metadata (description, MIT licence, repository, public access,
LICENSE and README in the tarball; verified with npm pack --dry-run).
.github/workflows/release-sdks.yml publishes npm, PyPI (trusted
publishing) and crates.io on an sdk-v* tag or as a manual dry run.
docs/RELEASING-SDKS.md lists the owner-only registry setup. Nothing is
published from here. The Python, Go and Rust webhook verifiers already
accept rotated secrets (G8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:34:16 +03:00
1d92fa23f2 feat: branded hosted storefront per merchant (G12)
Merchants can publish a store (slug, title, tagline, https logo, accent
colour, search description, optional custom domain) through settings or
the dashboard. The checkout app serves it at /store/<slug> with SEO and
Open Graph metadata, listing active products (invoice products hidden)
that each open their payment link, and a middleware rewrites '/' on a
merchant's custom domain to its store when CHECKOUT_PRIMARY_HOSTS is set.
Slugs and domains are unique; public data at /v1/public/stores. Carts of
several products stay out of scope because hosted checkout fulfils one
product per session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:32:06 +03:00
132efd87b3 feat: cash-out hand-off to off-ramp partners (G11)
GET /v1/merchant/offramp builds sell links for Transak, MoonPay (signed
server-side with the secret key) and Ramp with the amount, network and
the merchant's own receiving wallet prefilled. SettleKit takes no
custody; partners appear only once the owner configures their keys
(TRANSAK_API_KEY, MOONPAY_PUBLISHABLE_KEY/MOONPAY_SECRET_KEY,
RAMP_HOST_API_KEY). The dashboard Balances page gets a Cash out action per
mainnet network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:24:40 +03:00
6ba53b7a92 feat: refund to payer with prepared transfers verified onchain (G10)
Refunds no longer depend on a pasted hash alone. POST
/v1/merchant/payments/:id/refund/prepare creates a pending refund and
returns the exact transfer back to the buyer: ERC-20 transfer calldata,
token, chain id and an EIP-681 link on EVM networks, or a Solana Pay
transfer request with a unique reference. The destination is the wallet
that paid when known, else the merchant enters it (validated per chain).
POST /v1/merchant/refunds/:id/confirm verifies the signed transfer
onchain with the payment verifiers (destination, amount, time, Solana
reference, one refund per tx) and only then settles: access revoked,
payment refunded once fully refunded, refund.succeeded with source
wallet. Pending refunds can be canceled. Dashboard refund form gets a
'Send from my wallet' mode (browser wallet or mobile link, auto-verify).
apps/refund-protocol stays unwired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:21:27 +03:00
c14d0ab735 feat: team roles with invitations and enforced API key scopes (G9)
Security fix plus team access. Before this change any valid API key,
including access keys the delivery system hands to BUYERS, authenticated
as the merchant on the whole management API, and GET /v1/api-keys listed
every organization's keys. Now only platform keys (issued at sign-up or
via POST /v1/api-keys/platform, marked with the platform product id) can
call the API, and each request needs its resource scope
(<resource>:read|write, write implies read; platform:admin or * for
full access), answered with 403 and details.requiredScope otherwise.
Keys cannot mint broader keys, customer keys cannot carry management
scopes, key listing is tenant-scoped and keys can be revoked by id.

Dashboard sessions get team roles (owner, admin, developer, support,
viewer) mapped to scopes. /v1/team manages members and email
invitations (packages/invitations, token hash only, 7-day expiry);
/v1/auth/invitations/accept joins the org and creates the account. The
last owner is protected and only owners grant owner. Dashboard: Team
page, invite accept page, and an API keys page that creates restricted
keys and shows the secret once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:09:06 +03:00
40f90f1c5a feat: webhook event log with resend, test events, secret rotation and auto-disable (G8)
Every seller webhook delivery now keeps an attempt log (status code,
error, time, next retry) in the worker queue (Postgres) or in memory.
New routes: GET /v1/webhooks/deliveries(/:id), POST
/v1/webhooks/events/:id/resend, POST /v1/webhooks/endpoints/:id/test
(signed webhook.test event), rotate-secret with a 0-168h grace window
(both secrets sign as two v1 values, verified by @settlekit/webhooks, the
TS/Python/Go/Rust SDKs and the WooCommerce plugin), and disable/enable.
The worker retries on a 1m..6h exponential schedule instead of every tick,
signs with the live endpoint secret, skips disabled endpoints and
auto-disables one after 100 failed attempts in a row
(WEBHOOK_DISABLE_AFTER_FAILURES). Outbound requests get a 10s timeout.
The dashboard Webhooks page shows the event log with Resend and endpoint
actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 05:34:39 +03:00
330d111510 feat: fiat pricing with live ECB rates locked per checkout (G7)
Prices can now be set in EUR, GBP and other ECB reference currencies
(displayCurrency + displayAmount, or currency on quick products). Each
checkout converts them to USDC at the live rate from a frankfurter
service (MIT, FX_RATES_URL), rounded half-up to the cent with exact
bigint math, and locks the quote on the session (fxQuote) until it
expires, so onchain verification expects exactly the quoted USDC. Promo,
tax, receipts and the hosted checkout lines use the locked rate; the
payment link page shows the fiat price and today's USDC amount. Missing
or implausible rates fail closed (503); fiat subscriptions and mixed
fiat currencies are refused. Dashboard product form gets a currency
picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 05:13:37 +03:00
91c637a470 feat: WooCommerce gateway ported from the BTCPay Greenfield plugin (G6, part 2)
plugins/woocommerce/settlekit-for-woocommerce charges WooCommerce orders
in USDC: checkout creates a SettleKit payment request for the order total
(no email, return to the order received page) and redirects to the hosted
pay page, reusing an open payment when the buyer comes back. The signed
invoice.paid webhook (?wc-api=settlekit) completes the order after
checking invoice id and amount, and the thank-you page double-checks the
status. Structure ported from btcpayserver/woocommerce-greenfield-plugin
(MIT, 371ebfc) with LICENSE and NOTICE kept. A standalone PHP suite runs
under plain PHP CLI and from vitest, including a cross-check of the PHP
signature verifier against @settlekit/webhooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:55:31 +03:00
22c3208b60 feat: merchant accounting exports with Xero and QuickBooks imports (G5)
New tenant-scoped /v1/exports routes: payments, refunds, invoices and
payouts CSVs, a full USDC ledger, and bank statement files that Xero
(DD/MM/YYYY statement import) and QuickBooks Online (three-column bank
upload) import directly, with optional date ranges. packages/exports
gains a formula-injection guard (opt-in, admin unchanged) and the
accounting formatters. The dashboard Payments page links every export
through a session-authenticated download route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:35:58 +03:00
a4d0f3f5cb feat: tax at checkout and tax-grade receipts (G4)
Sellers can turn on checkout tax in settings (label, own country and tax
ID, legal name, per-country rates, default rate, EU reverse charge).
Sessions add tax on top of the net price after any promo, so onchain
verification expects the tax-inclusive total. Buyers set billing country
and VAT ID via the API (billingCountry, vatId) or on the hosted checkout
until a payment is recorded; EU cross-border B2B with a VAT ID of the
right shape is zero-rated. Settled checkouts get a PDF receipt (pdfkit)
with the seller's tax ID, buyer country / VAT ID, tax rate and the
settlement transaction, linked from the success page, the receipt email
and the customer portal. packages/tax calculateTax is now used at
checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:30:53 +03:00
4e97fcc409 feat: promo codes at checkout (G3)
Coupons now reach checkout. POST /v1/checkout-sessions takes an optional
couponCode, payment links accept ?promo=CODE (a refused code falls back to
full price with a notice), and the hosted checkout gets a promo field
while the session is open and unpaid. The discounted total becomes the
session amount before network bindings, so onchain verification expects
the discounted amount and a locked Zcash quote is re-priced. Codes are
tenant-scoped, product-scoped codes discount only their products, and
free-trial or 100% codes are refused. The redemption is counted once
after the payment confirms (API confirm and hosted checkout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:09:54 +03:00
e0caf4bace feat: monthly platform fee statements with plan limits after grace (G1)
SettleKit's advertised per-payment fee was never collected because buyers
pay merchants' wallets directly. When PLATFORM_BILLING_ORG_ID is set, the
API now issues each merchant a monthly statement (confirmed payments x the
fee schedule) as an invoice from SettleKit's own org, paid through the
hosted checkout on the G2 payable-invoice path. Totals below the minimum
carry forward, test accounts are skipped, runs are idempotent and happen
automatically every six hours (or via POST /v1/billing/statements/run).
A statement unpaid past due + grace restricts new products to the free
plan limit from packages/pricing (402 with the pay link). Merchants see
accrued fees, statements and a Pay button on the Balances page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 03:50:08 +03:00
466c662ac3 feat: payable invoices and payment requests (G2)
Invoices can now be paid onchain. POST /v1/invoices/:id/send issues the
invoice, binds a public pay page (/i/<token> on the hosted checkout),
opens a checkout session for the invoice total on the merchant's
networks and emails the link. POST /v1/invoices/requests sends an
ad-hoc amount + memo to an email. The invoice turns paid only when a
confirmed onchain payment exists for one of its sessions (on read in the
API and in the new worker invoice-settle job) and emits invoice.paid.
Invoice and receipt PDFs render with pdfkit (MIT). Voiding cancels open
sessions. Dashboard gets a request-a-payment form, send buttons, pay
links and PDF downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 03:35:06 +03:00
d04b79d5d9 docs: parity audit vs stablecoin checkout competitors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 02:30:20 +03:00
2b2c8b471d chore: merge Tameion operator into main alongside multi-chain SettleKit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:43:33 +03:00
9ac5202d60 docs: draft Circle grant update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:32:20 +03:00
b16aead3bf docs: Colosseum submission pack (submission, pitch, demo, launch checklist)
Adds docs/colosseum/SUBMISSION.md (chain matrix with honest labels,
architecture, OSS composed, security model, 1% fee, GTM, traction template
and pre-existing code disclosure with in-window stats against
pre-colosseum-baseline), PITCH-SCRIPT.md, DEMO-SCRIPT.md and
LAUNCH-CHECKLIST.md, and leads the README with the multi-chain product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:52:58 +03:00
39b29903b2 fix(pricing): default platform fee to 1% with no fixed fee to match the landing page
DEFAULT_FEE_SCHEDULE in packages/platform-billing is the single source of truth;
.env.example documents how the API and web env mirror it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:11:28 +03:00
ed7a2d10ae docs: chain-support matrix, checkout env example and worker retry env
Honest labels: Robinhood Chain settles USDG, Tempo settles bridged USDC.e,
Arc is testnet only, Zcash is transparent (not shielded) and mainnet only.
Adds apps/checkout/.env.example, the checkout routes and OSS licenses, and
the next-waves composition plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:16:40 +03:00
59ab7ccba9 docs: add multi-chain payments plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:18:23 +03:00
6972e6bafb docs: add Colosseum Solana plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:09:58 +03:00
e646e1286d docs: add Tameion operator plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 14:56:08 +03:00
e366c842e7 docs: SettleKit app suite catalog + integration roadmap
Catalogs all 10 adopted Arc/Circle apps (purpose, branding) plus the per-app
rewire roadmap onto @settlekit/* packages (from the integration workflow), and
lists the core apps + adopted contracts. Source of truth for the suite.
2026-06-21 23:00:20 +03:00
874fa3a08a feat(apps): Phase 7 — escrow lifecycle, portal P2P send, checkout crosschain bridge
- dashboard: escrow detail lifecycle actions (assign/fund/submit/approve/refund) via server actions + api.escrow.* client methods.
- portal: P2P 'send USDC on Arc' page + nav (offline App Kit send, live swap documented); +@settlekit/app-kit dep.
- checkout: 'pay from another chain' crosschain bridge option (App Kit bridge, offline) next to wallet-pay.
- Built inline (subagent limit hit). Phase 7 complete. 1308 tests / 213 suites, typecheck + builds green.
2026-06-21 17:44:20 +03:00
f9d2a49145 docs(roadmap): add Phase 7 (port vendored Circle sample flows: escrow, P2P send, crosschain bridge) 2026-06-21 15:55:51 +03:00
ca14bbe7e0 feat(circle): real Circle SDK deepening (Phase 6.4)
- @settlekit/app-kit-viem: createCircleViemAdapterFromPrivateKey/FromProvider via @circle-fin/adapter-viem-v2 — the live App Kit signer (pair with @circle-fin/app-kit for true on-chain send).
- @settlekit/circle-wallets: createDcwSdkClient via @circle-fin/developer-controlled-wallets — real DCW client alongside the raw-HTTP one.
- Both heavy SDKs dynamic-imported so default/offline builds stay lean; keys from config/env.
- Phase 6 complete. 1308 tests / 213 suites, typecheck + full build green; frozen-lockfile verified.
2026-06-21 12:44:43 +03:00
ed0100a7d7 feat(apps): Phase 6.1-6.3 — agent-console live API, dashboard notifications+webhooks, admin analytics
- agent-console: /agents + /jobs now call the real /v1/agents + /v1/jobs API (server reads + register/create/advance actions), graceful demo fallback; +server-only dep.
- dashboard: webhook endpoint management + recent deliveries; in-app Notification Center (header bell) over delivery runs.
- admin: analytics/reporting page (summary cards + CSS bar charts, no new dep) + CSV export route.
- roadmap 6.1-6.3 checked. 1308 tests / 213 suites, typecheck + builds green.
2026-06-21 12:36:36 +03:00
b0e360b05c docs(roadmap): add Phase 6 (live wiring, notifications, analytics, real Circle SDKs) 2026-06-21 12:25:31 +03:00
286ae8c8fc feat(api): agent + job registry — full Pg persistence (Phase 2.1/2.2)
- database: agent_registry + agent_jobs tables, migration 0008 (verified on Postgres: tables + indexes).
- persistence: AgentRegistryStore/AgentJobStore + InMemory + Pg impls (document-projection, org-scoped).
- api: org-scoped /v1/agents (register/list/get/feedback) + /v1/jobs (create/list/get/transition) with a forward-only lifecycle guard; wired into context (pick Pg/InMemory) + mounted under the api-key guard.
- Roadmap Phase 2 complete — all 5 phases shipped. 1308 tests / 213 suites, typecheck + build green; migrations 0006–0008 verified on a throwaway Postgres.
2026-06-21 12:22:44 +03:00
b73437be14 feat(auth): active sessions — list + revoke (Phase 1.3)
- AuthService.listSessions (marks current) + revokeSessionById (account-scoped, not_found if not owned).
- store: listSessionsByAccount + deleteSessionById (InMemory + Pg).
- API: GET /v1/auth/sessions, DELETE /v1/auth/sessions/:id (bearer).
- dashboard: Security card — SessionList client + /api/sessions(+/[id]) routes (cookie->bearer, same-origin guard).
- Phase 1 complete. 1308 tests / 213 suites, typecheck + builds green.
2026-06-21 11:59:20 +03:00
1a401122cc feat(apps): attribution Prove&sign UI, admin webhooks+risk, portal profile+unlink
- creator-dashboard: /api/prove + ProofSigner — issue & verify a proof-of-citation (Phase 3.3).
- admin: webhook delivery log + risk review queue console pages (Phase 5.2/5.3).
- portal: EditProfile (PATCH /v1/auth/account via /api/account) + wallet Unlink — dashboard parity.
- roadmap boxes checked. 1308 tests / 213 suites, typecheck + builds green.
2026-06-21 11:51:58 +03:00
9ed86fa715 feat(apps): roadmap batch — agent-console, creator-dashboard, marketplace, admin, dashboard
- agent-console: Agents (ERC-8004 identity/reputation) + Jobs (ERC-8183 lifecycle timeline) pages via Local ports; 'Agent economy' nav group.
- creator-dashboard: per-source detail + per-payout royalty-split breakdown pages (stable slug/settlementId routing).
- marketplace: listing/service detail page + tag/search filtering.
- admin: settlements console.
- dashboard: Profile card (EditProfile) wired to PATCH /v1/auth/account.
- 1308 tests / 213 suites, typecheck + all app builds green.
2026-06-21 02:04:43 +03:00
7f3f850104 feat(auth): wallet unlink + development roadmap (continuous loop)
- AuthService.unlinkWallet — clears the linked wallet, refusing to strand a
  wallet-only account (no password) from its only sign-in method.
- DELETE /v1/auth/wallet (bearer); dashboard Unlink button + /api/wallet/link DELETE.
- InMemoryAuthStore.saveAccount removes the stale wallet index on unlink (Pg: column→NULL).
- docs/DEVELOPMENT_ROADMAP.md: phased feature plan driving the continuous loop.
- 1308 tests / 213 suites, typecheck + builds green.
2026-06-21 01:51:48 +03:00
e89d5d86fd docs: document attribution package + creator-dashboard, refresh Lepton status
- Add README for @settlekit/attribution (reuse-detection, lineage, proofs)
- Add README for apps/creator-dashboard (real-domain-logic earnings view)
- Move attribution + creator-dashboard from 'not yet built' to 'built & green'
  in docs/LEPTON_REMAINING.md; bump health to 948 tests + 27 contract tests
- List creator-dashboard in the README apps tree
2026-06-20 12:02:33 +03:00
4d21827898 docs: add Lepton "what's left" status + remaining-work map
Capture the verified submission status ordered by judging impact: the live-Arc
traction blocker (the spine runs on the local provider; worker lepton jobs no-op
until a provider + Arc-indexer confirmation source are injected), the built-and-
green inventory, the planned-but-absent components (attribution, lepton CLI,
creator-dashboard, agent-console, stream-meter, payouts-cpn, agent-run Pg store),
submission deliverables, and a recommended order. Companion to
LEPTON_PRODUCTION_PLAN.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 23:19:14 +03:00
99db203c70 fix(deploy): boot API from root pnpm start; add Vercel configs for all Next apps
Render's default Web Service runs `pnpm start` at the repo root, which had no
script — deploys failed with ERR_PNPM_NO_SCRIPT_OR_SERVER and "no open ports".
Add a root `start` that boots the API (@hono/node-server binds 0.0.0.0:$PORT),
so a plain root-level Render service now works (build = full workspace, start =
API). For API + worker + Postgres together, the render.yaml Blueprint still applies.

Add per-app vercel.json (web/dashboard/marketplace/checkout/docs) with the
pnpm-workspace install + filtered build and the correct package names
(marketplace-app / checkout-app / docs-app). Document the Render-API +
Vercel-frontends split in DEPLOYMENT.md.
2026-06-17 16:54:17 +03:00
3a52b61096 adas 2026-06-17 03:02:36 +03:00
3853551433 asad 2026-06-17 02:09:36 +03:00