Prerequisites
Before you start, make sure you have:- Solana CLI installed and configured for Devnet
- A Solana wallet with Devnet SOL
- The canonical
@trustlink/tsn-sdkpackage - A browser wallet that supports message signing
Step-by-step
1
Install tooling and set environment variables
The TSN SDK is currently a private workspace package; it is not published to the public npm registry. From the repository root, install and build the canonical SDK:Configure the Devnet endpoints for your integration:
Install the local SDK
Environment variables
2
Check the TSN network before signing
Let the SDK select local services first and live services second. Do this
before preparing a payment and again before requesting a wallet signature.Cranker availability comes from the Node heartbeat-backed route response;
a Cranker is a worker, not a public application HTTP service.
SDK service gate
3
Obtain or register a TIN
A TIN is a portable 10-digit identity issued by the Transfer Identity Protocol (TIP). Resolve its public payment route through the SDK.The registry returns the active route commitment, route version, and policy commitment. Your device never shares the privacy-receiving root with the registry or the Node.
Resolve a TIN
4
Construct and sign a payment intent locally
Build the canonical payment message on your authorized device. The intent binds amount, mint, fee limits, expiry, a one-time nonce, sender authorization, transaction commitment, recipient route commitment, and route version.Use the GPRU helpers to derive the authorization scope:
Conceptual intent fields
Derive GPRU identity
5
Submit to the TSN Receiver
Submit the signed intent through the SDK. The SDK sends the request to the configured TSN service boundary; the browser must never hold a Node or Receiver API key.The Receiver records the work as
Submit authorized funding work
RECEIVED. The response uses id as the stable work/payment identifier. The Node then verifies the signed authorization before a Cranker can lease it.6
Observe the work lifecycle
The internal Receiver state machine is:Node services can list payment work with authenticated
GET /intents. The public view maps active internal states to pending, REJECTED to canceled, and CONFIRMED to executed; use receiverStatus when you need the raw state. There is no public GET /intents/:id endpoint in the current Receiver.7
Confirm on Solana
Once The on-chain program enforces the commitment, lease, nullifier, and expiry.
receiverStatus reaches CONFIRMED, read the returned transaction signature and verify it on Solana Explorer (Devnet cluster):Devnet program IDs
The Stable-TCAP faucet is Devnet-only and valueless. It is not USDC or any
production stablecoin. Historical TCAP ID placeholders are not valid Solana
public keys; obtain the deployed ID before constructing TCAP instructions.
Next steps
Intent Lifecycle
Understand how intents move from signed message to on-chain settlement.
Funding & Acceptance
Learn how epoch treasury funding and the AcceptedIntent PDA work.
Confidential Settlement
Explore the TCAP credit-only settlement path and the ConfidentialSettlement
ABI.
Security Invariants
Review the safety properties enforced by the TSN protocol.