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

# client 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/client.ts). See the [reference index](https://trust-link-tsn.mintlify.site/sdk/api-reference.md) for package import boundaries and verification scope.

## TsnHttpClient

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/client`. [Implementation, line 7](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L7).

```ts theme={null}
new TsnHttpClient(options: TsnHttpClientOptions): TsnHttpClient
```

### TsnHttpClient.post

[Source, line 26](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L26).

```ts theme={null}
post<TRequest, TResponse>(path: string, body: TRequest): Promise<TResponse>
```

### TsnHttpClient.get

[Source, line 40](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L40).

```ts theme={null}
get<TResponse>(path: string): Promise<TResponse>
```

### TsnHttpClient.patch

[Source, line 52](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L52).

```ts theme={null}
patch<TRequest, TResponse>(path: string, body: TRequest): Promise<TResponse>
```

### TsnHttpClient.postIntent

[Source, line 66](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L66).

```ts theme={null}
postIntent<TRequest, TResponse>(body: TRequest): Promise<TResponse>
```

### TsnHttpClient.listPendingIntentWork

[Source, line 71](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L71).

```ts theme={null}
listPendingIntentWork<TResponse>(limit?: number): Promise<TResponse>
```

### TsnHttpClient.updateIntentStatus

[Source, line 75](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L75).

```ts theme={null}
updateIntentStatus<TRequest, TResponse>(id: string, body: TRequest): Promise<TResponse>
```

Direct failure expressions:

```text theme={null}
new Error(`TSN request failed (${response.status}): ${await response.text()}`)
```

## TsnHttpClientOptions

Import from `@trustlink/tsn-sdk` or `@trustlink/tsn-sdk/client`. [Implementation, line 1](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L1).

```ts theme={null}
export type TsnHttpClientOptions = {
  baseUrl: string;
  fetchImpl?: typeof fetch;
  apiKey?: string | null;
};
```


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