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

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

## estimateTsnSendCostFromChain

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

```ts theme={null}
estimateTsnSendCostFromChain(params: { senderWallet: string; amountUi: number; tokenDecimals?: number; tokenSymbol: string; tokenUsd?: number | null; solUsd?: number | null; rpcUrl?: string; timeoutMs?: number; }): Promise<{ tokenSymbol: string; senderFeeAmountUi: number; senderFeeAmountUsd: number; recipientFeeAmountUi: number; recipientFeeAmountUsd: number; recipientPayoutAmountUi: number; totalTokenRequiredUi: number; networkFeeSol: number; networkFeeUsd: number; debug: { programId: string; sendFeeBps: number; recipientFeeBps: number; feeCoverageTxCount: number; feeSplitLpBps: unknown; feeSplitTreasuryBps: unknown; estimatedNetworkFeeLamports: number; rpcUrl: string; solUsd: number; tokenUsd: number; priceSource: string; }; }>
```

Direct failure expressions:

```text theme={null}
lastRpcError instanceof Error ? lastRpcError : new Error("TSN RPC gateway request failed")
new Error("Sender fee not fetched: missing price feed")
```


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