> ## 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.

# resolveTinRoute — Read a TIN payment route

> Resolve a TIN through the SDK and return the route commitments that a signed payment must bind before authorization and submission.

## What it does

`resolveTinRoute` creates a confirmed Solana connection through the supplied RPC URL and delegates TIN resolution to `resolveTIN`. It returns the identity route data used by an application to build a payment authorization; it does not submit a payment.

## How the flow works

<Steps>
  <Step title="Caller invokes the function">The caller supplies a ten-digit TIN, an RPC URL, and optionally the TIN program ID.</Step>
  <Step title="Validation">The underlying resolver reads the TIN registry and rejects malformed, missing, legacy, or unavailable identity state.</Step>
  <Step title="Main work">The SDK derives the registry address, fetches the account, decodes it, and exposes the current route commitments.</Step>
  <Step title="Result">The caller receives `TinResolvedIdentity` and can bind its route commitment and version into a signed payment intent.</Step>
</Steps>

## Signature

```ts theme={null}
export async function resolveTinRoute(params: {
  tin: bigint | number | string;
  rpcUrl: string;
  programId?: PublicKey | string | null;
}): Promise<TinResolvedIdentity>
```

<ParamField path="tin" type="bigint | number | string" required>Ten-digit TIN lookup value.</ParamField>
<ParamField path="rpcUrl" type="string" required>Solana RPC endpoint used for the account read.</ParamField>
<ParamField path="programId" type="PublicKey | string | null" required={false}>TIN program override. Defaults to the SDK program ID.</ParamField>

## Result and errors

The result includes the resolved registry identity and route fields such as `tcapRouteVersion`, `tcapRelationshipCommitment`, and `tcapPolicyCommitment`. Errors from the connection, account lookup, decoding, or legacy-route checks are propagated.

```ts theme={null}
const route = await resolveTinRoute({ tin: "1234567890", rpcUrl: process.env.TSN_RPC_URL! });
```

Source: [`tins.ts:1687-1696`](https://github.com/Trustlink-Labs/TSN-Protocol/blob/main/tsn-protocol/sdks/tsn-sdk/src/tins.ts#L1687-L1696)
