Prerequisites
- Access to the TSN TypeScript workspace SDK.
- A Solana RPC connection and TIP program ID for the deployment where the TIN was registered.
- The issuer’s high-entropy lookup secret, available only to your trusted backend. Keep it out of browser bundles, wallet prompts, and public configuration.
1. Resolve the TIN on your backend
Use the typed resolver example in a trusted backend handler. Pass the TIN as a string so any leading zero is preserved. The example callsresolveTinV1Identity from @trustlink/tsn-sdk/tins and returns only the fields needed for recipient review and payment preparation.
null. An invalid account or envelope throws an error. Keep the payment action unavailable until lookup succeeds, and use your application’s access controls and rate limits for callers.
2. Show the recipient before requesting approval
Display the resolved TIN anddisplayName together. The SDK returns displayNameSource as owner-provided or not provided, and verifiedCredentials is currently empty. Treat the display name as a review aid. When the sender confirms the recipient, use ownerPubkeyHash as the recipientHash in the wallet payment guide.