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

# tin-threshold-nonce-receipt API

> Source-derived exports, parameter and result types, public methods and source links.

This reference is generated from the checked-out TypeScript exports. Types and signatures describe the package contract; source presence does not establish deployment or service availability. Error expressions below are direct throws, not an exhaustive list of failures from dependencies.

[Source module](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/tin-threshold-nonce-receipt.ts). See the [reference index](https://trust-link-tsn.mintlify.site/sdk/api-reference.md) for package import boundaries and verification scope.

## serializeTinThresholdNonceReceipt

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/tin-threshold-nonce-receipt`. [Implementation, line 24](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/tin-threshold-nonce-receipt.ts#L24).

```ts theme={null}
serializeTinThresholdNonceReceipt(receipt: Omit<TinThresholdNonceReceipt, "signatureBase64Url">): Uint8Array<ArrayBufferLike>
```

## TIN\_THRESHOLD\_NONCE\_RECEIPT\_DOMAIN

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/tin-threshold-nonce-receipt`. [Implementation, line 8](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/tin-threshold-nonce-receipt.ts#L8).

```ts theme={null}
"TSN_TIN_THRESHOLD_NONCE_RECEIPT"
```

## TinThresholdNonceReceipt

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/tin-threshold-nonce-receipt`. [Implementation, line 11](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/tin-threshold-nonce-receipt.ts#L11).

```ts theme={null}
export type TinThresholdNonceReceipt = {
  domain: typeof TIN_THRESHOLD_NONCE_RECEIPT_DOMAIN;
  operation: "PROTECT_KEY" | "RELEASE_KEY";
  tin: string;
  ownerPublicKey: string;
  resourceCommitment: string;
  requestNonce: string;
  consumedAt: string;
  expiresAt: string;
  verifierPublicKeyBase64Url: string;
  signatureBase64Url: string;
};
```

## verifyTinThresholdNonceReceipt

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/tin-threshold-nonce-receipt`. [Implementation, line 40](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/tin-threshold-nonce-receipt.ts#L40).

```ts theme={null}
verifyTinThresholdNonceReceipt(params: { receipt: TinThresholdNonceReceipt; proof: TinDeviceAccessProof; expectedVerifierPublicKeyBase64Url: string; now?: Date; }): Promise<TinThresholdNonceReceipt>
```

Direct failure expressions:

```text theme={null}
new Error("TIN threshold nonce receipt does not match the access proof")
new Error("TIN threshold nonce receipt is expired or has an invalid time")
new Error("TIN threshold nonce verifier public key is invalid")
new Error("TIN threshold nonce receipt signature is invalid")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.