> ## Documentation Index
> Fetch the complete documentation index at: https://trust-link-tsn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Entrypoints — TSN protocol instructions

> Reference the Solana program entrypoints that create TIN state, authorize settlement, manage Crankers, and preserve TSN accounting boundaries.

Solana programs are the settlement authority for TSN. The Node and SDK prepare evidence and signed requests; only the deployed program can apply the resulting state transition.

## TIN registrar

The TIN registrar source contains public instruction builders for TIN creation and resolution, verification-platform registry changes, social identity links, and sensitive-field links.

| Instruction family          | Source entrypoint                                                                              | Inputs and result                                                                          |
| --------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| TIN creation and resolution | `create_tin`, `resolve_tin`, `create_tin_v1`, `resolve_tin_v1`                                 | Account metas plus serialized registry/identity parameters; creates or resolves TIN state. |
| Platform registry           | `initialize_platform_registry`, `upsert_verification_platform`, `remove_verification_platform` | Authority accounts and platform metadata.                                                  |
| Identity links              | `link_social_identity`, `link_sensitive_field`, `link_verified_social_identity`                | Owner, registry, proof, and encrypted field accounts as defined in the source contexts.    |

## TSN settlement program

The TSN program exposes instruction entrypoints for Mother escrow, Cranker registration and vault state, accepted intents, funding, claims, epoch accounting, and the TCap settlement boundary. Exact Anchor account contexts belong to the deployed IDL.

| Instruction family       | Source entrypoint                                                                                                                                                                                                                                                                           | Failure boundary                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Mother escrow and epochs | `tsn_initialize_mother_escrow`, `tsn_migrate_mother_escrow`, `tsn_close_epoch_treasury`                                                                                                                                                                                                     | Authority, epoch, and account-state validation.                                   |
| Cranker admission        | `tsn_register_cranker`, `tsn_set_cranker_funding_policy`, `tsn_initialize_cranker_vault`                                                                                                                                                                                                    | Mother-DNA and operator account validation.                                       |
| Cranker liquidity        | `tsn_fund_cranker`, `tsn_withdraw_cranker_funds`, `tsn_fund_epoch_treasury`                                                                                                                                                                                                                 | Token-account ownership, mint, and amount validation.                             |
| Intent settlement        | `tsn_accept_intent`, `tsn_create_settlement_dna`, `tsn_execute_private_payout`, `tsn_refund_epoch_claim`                                                                                                                                                                                    | Signed intent, replay, lease, and commitment checks.                              |
| TCap settlement boundary | `tsn_register_tcap_credit_authorization`, `tsn_register_tcap_credit_authorization_v2`, `tsn_register_tcap_debit_authorization_v2`, `tsn_register_tcap_exit_debit_v1`, `tsn_register_tcap_exit_payout_v1`, `tsn_register_tcap_one_time_credit`, `tsn_register_tcap_one_time_transfer_credit` | Authorization, liability, exit, and replay checks defined by the Anchor contexts. |

<CodeGroup>
  ```bash Inspect theme={null}
  anchor idl fetch <TSN_PROGRAM_ID> --provider.cluster devnet
  ```

  ```ts TypeScript theme={null}
  import { Connection, PublicKey } from "@solana/web3.js";

  const connection = new Connection(process.env.TSN_RPC_GATEWAY_URL!, "confirmed");
  const programId = new PublicKey(process.env.TSN_PROGRAM_ID!);
  console.log(await connection.getAccountInfo(programId));
  ```
</CodeGroup>

TODO: publish generated IDL-derived account and argument tables for each deployed program after the current reorganized Anchor workspaces are synchronized. The source filenames and public instruction names above are confirmed; this page does not invent a positional account list.

Source: [`TIN instruction builder`](https://github.com/Trustlink-Labs/TSN-Protocol/blob/main/tsn-protocol/programs/transfer-identity-protocol/tin-registrar/program/src/instruction_auto.rs#L281-L451), [`TSN Anchor entrypoints`](https://github.com/Trustlink-Labs/TSN-Protocol/blob/main/tsn-protocol/programs/tsn/protocol/programs/trustlink-escrow/src/lib.rs#L10-L180), [`TSN instruction modules`](https://github.com/Trustlink-Labs/TSN-Protocol/tree/main/tsn-protocol/programs/tsn/protocol/programs/trustlink-escrow/src/tsn/instructions), [`Cranker Solana helpers`](https://github.com/Trustlink-Labs/TSN-Protocol/blob/main/tsn-protocol/sdks/tsn-sdk/src/blockchain/solana-tsn.ts)
