Skip to main content

What it does

resolveTIN reads the requested TIN from the configured Solana connection. It first checks the current TIN registry PDA, then falls back to scanning the program for the legacy account layout when no current registry exists. The result includes the display name, account kind, route commitments, status, and whether the stored encrypted material requires an upgrade.

How the flow works

1

Caller invokes the function

The caller supplies a TIN, a Solana Connection, and optionally the TIN program ID. A lookup secret can be supplied for the private resolver path.
2

Validation

The SDK derives the current registry PDA and requests the account. If the account is absent, it searches the program for a matching legacy TIN account. If neither exists, it throws a not-found error.
3

Main work

The SDK decodes the account, checks the stored route and encrypted master-seed envelope, and maps the on-chain fields into a resolved identity object. A supplied lookupSecret selects the private resolution path.
4

Result

The promise resolves with the TIN, display name, authority account, account kind, readiness flags, and route commitments. No account is modified.

Signature

Errors

Example

Source

tins.ts:1484