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

# buildCreateTinInstruction — disabled direct TIN builder

> Checks the direct TIN creation boundary and currently fails closed so applications cannot bypass TSN Node and Cranker authorization.

## What it does

This exported SDK function is a deliberate fail-closed boundary. It accepts the
legacy direct-creation shape, but does not construct or submit a Solana
transaction. The implementation throws before touching accounts or the network;
TIN creation must travel through a signed TSN creation intent and an eligible
Cranker.

## How the flow works

<Steps>
  <Step title="Caller invokes the function">
    The caller provides a payer, identity account, display name, encrypted
    master seed, and optional TIN program ID.
  </Step>

  <Step title="Validation">
    The function does not validate or derive these values. It immediately
    rejects direct TIP creation.
  </Step>

  <Step title="Main work">
    No instruction is assembled and no RPC request is made.
  </Step>

  <Step title="Result">
    The function throws `Direct TIP create is disabled; submit a TSN TIN
            creation intent and let a Cranker call tin_creation_registry.`
  </Step>
</Steps>

## Signature

```ts theme={null}
export function buildCreateTinInstruction(params: {
  payer: PublicKey;
  identity: PublicKey;
  displayName: string;
  encryptedMasterSeed: Uint8Array;
  programId?: PublicKey | string | null;
}): never;
```

## Errors

| Error                              | When it occurs                                                |
| ---------------------------------- | ------------------------------------------------------------- |
| `Direct TIP create is disabled...` | Every invocation; direct creation is not an application path. |

## Example

```ts theme={null}
try {
  buildCreateTinInstruction({
    payer: wallet.publicKey,
    identity: identityPda,
    displayName: "Daniel TrustLINK LABS",
    encryptedMasterSeed,
  });
} catch (error) {
  // Submit a signed TSN TIN creation intent instead.
}
```

## Source

[tins.ts:836](https://github.com/Trustlink-Labs/TSN-Protocol/blob/main/tsn-protocol/sdks/tsn-sdk/src/tins.ts#L836)
