Skip to content

TSN: add settlement-token/OTDT, claim-lease & recovery runtime + Python cranker daemon; frontend send refactor and Vercel build fixes#22

Open
bigdreamsweb3 wants to merge 1 commit into
mainfrom
codex/explain-codebase-structure-and-pointers-ygtsrl
Open

TSN: add settlement-token/OTDT, claim-lease & recovery runtime + Python cranker daemon; frontend send refactor and Vercel build fixes#22
bigdreamsweb3 wants to merge 1 commit into
mainfrom
codex/explain-codebase-structure-and-pointers-ygtsrl

Conversation

@bigdreamsweb3

Copy link
Copy Markdown
Owner

Motivation

  • Introduce a privacy-preserving TSN control plane that supports encrypted settlement tokens, One-Time Decryption Tokens (OTDT), claim points / claim leases, and smart recovery so transfers are auditable and recoverable without storing PII or wallets in public registry state.
  • Provide an operator-facing Python cranker daemon to automate intent work, lease acquisition, OTDT issuance, in-memory decryption, proof submission, and recovery jobs for easier local operator validation and testing.
  • Modularize the frontend send flow for maintainability and prepare monorepo Vercel deployments by fixing Next.js trace/transpile boundaries.

Description

  • TSN SDK: added settlement-token primitives (tsn-sdk/src/settlement-token.ts) and integrated them end-to-end into the mempool runtime and HTTP server (tsn-sdk/src/mempool.ts, tsn-sdk/src/server.ts), including commitment registry, claim-point ledger, claim leases, recovery queue, and liquidity metrics; extended contracts/types and built dist artifacts.
  • Cranker daemon & operator tooling: added Python scheduler tsn-cranker-op-daemon/scripts/cranker_daemon.py, updated package scripts and .env.example entries for TSN_SETTLEMENT_TOKEN_MASTER_KEY, TSN_CRANKER_DNA, TSN_LOW_LIQUIDITY_THRESHOLD, and TSN_RECOVERY_REWARD_BPS; README updated with run examples.
  • Frontend refactor: extracted send experience subcomponents and libs (confirm-send-modal, token-picker-modal, country-search-modal, recipient-resolution, recipient-lookup-service, send-formatters, tin) and updated frontend/src/components/experiences/send-experience.tsx to use the modular pieces.
  • Vercel / Next.js build fixes: updated frontend/next.config.mjs and backend/next.config.mjs to compute repository root via fileURLToPath, set outputFileTracingRoot, add transpilePackages for @trustlink/tsn-sdk and required browser packages, add browser webpack fallbacks to avoid bundling Node-only modules.
  • Docs & examples: added protocol/operator docs (OTDT-SMART-RECOVERY.md, CRANKER.md updates, DEVELOPER.md updates), frontend architecture doc, Vercel deployment notes, and updated docs/README.md links.

Testing

  • Built TSN SDK with TSN_SETTLEMENT_TOKEN_MASTER_KEY=<secret> npm --prefix tsn-sdk run build and the TypeScript dist artifacts were produced successfully. (succeeded)
  • Performed backend type checks with npm --prefix backend run typecheck to ensure server types and new mempool surface compile cleanly. (succeeded)
  • Verified Python daemon syntax with python -m py_compile tsn-cranker-op-daemon/scripts/cranker_daemon.py. (succeeded)
  • Ran frontend type checks / smoke npm --prefix frontend run typecheck and validated the new send components integrate without type errors in a dependency-complete environment. (succeeded)

Codex Task

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trustlink-pay Ready Ready Preview, Comment Jun 11, 2026 6:08am
trustlink-pay-backend Ready Ready Preview, Comment Jun 11, 2026 6:08am

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant