> ## 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 8](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L8).

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

### TsnHttpClient.post

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

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

### TsnHttpClient.get

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

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

### TsnHttpClient.patch

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

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

### TsnHttpClient.postIntent

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

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

### TsnHttpClient.listPendingIntentWork

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

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

### TsnHttpClient.updateIntentStatus

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

```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 2](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/client.ts#L2).

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