# `@ton/appkit-react` reference (https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit-react/content.md)



## Hook [#hook]

### Balances [#balances]

#### `useBalance` [#usebalance]

React hook reading the Gram balance of the currently selected wallet through TanStack Query — auto-resolves the wallet address (use [`useBalanceByAddress`](#usebalancebyaddress) for an arbitrary address).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseBalanceParameters`](#usebalanceparameters)                                                                     | TanStack Query overrides (`select`, `enabled`, `staleTime`, …) and an optional network override.                                                                            |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Wallet address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

Returns: <code><a href="#usebalancereturntype">UseBalanceReturnType</a>\<selectData = GetBalanceByAddressData></code> — TanStack Query result for the balance read.

**Example**

```tsx
const { data: balance, isLoading, error } = useBalance();

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return <div>Balance: {balance}</div>;
```

#### `useBalanceByAddress` [#usebalancebyaddress]

React hook reading the Gram balance of an arbitrary address through TanStack Query — useful for addresses that aren't tied to the selected wallet (use [`useBalance`](#usebalance) for the selected wallet).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseBalanceByAddressParameters`](#usebalancebyaddressparameters)                                                   | Target address, optional network override, and TanStack Query overrides.                                                                                                    |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Wallet address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

Returns: <code><a href="#usebalancebyaddressreturntype">UseBalanceByAddressReturnType</a>\<selectData = GetBalanceByAddressData></code> — TanStack Query result for the balance read.

**Example**

```tsx
const {
    data: balance,
    isLoading,
    error,
} = useBalanceByAddress({
    address: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return <div>Balance: {balance}</div>;
```

#### `useWatchBalance` [#usewatchbalance]

Subscribe to Gram balance updates for the currently selected wallet. Updates flow into the TanStack Query cache so [`useBalance`](#usebalance) picks up the new data automatically (use [`useWatchBalanceByAddress`](#usewatchbalancebyaddress) for a fixed address). Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                           | Description                                                                                                                                                    |
| --------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseWatchBalanceParameters`](#usewatchbalanceparameters)                                                      | Update callback and optional network override.                                                                                                                 |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#balanceupdate">BalanceUpdate</a>) => void</code> | Callback fired on every balance update from the streaming provider.                                                                                            |
| `parameters.network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                               | Network to watch on. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |

Returns: `void`.

**Example**

```tsx
const { data: balance } = useBalance();

useWatchBalance();

return <div>Current balance: {balance}</div>;
```

#### `useWatchBalanceByAddress` [#usewatchbalancebyaddress]

Subscribe to Gram balance updates for an arbitrary address — updates flow into the TanStack Query cache so [`useBalanceByAddress`](#usebalancebyaddress) picks up the new data automatically. Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                                | Description                                                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`\*        | [`UseWatchBalanceByAddressParameters`](#usewatchbalancebyaddressparameters)                                         | Address, update callback and optional network override.                                                                                                        |
| `parameters.address`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Wallet address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.   |
| `parameters.network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to watch on. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#balanceupdate">BalanceUpdate</a>) => void</code>      | Callback fired on every balance update from the streaming provider.                                                                                            |

Returns: `void`.

**Example**

```tsx
const address = 'UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ';
const network = Network.mainnet();
const { data: balance } = useBalanceByAddress({ address, network });

useWatchBalanceByAddress({ address, network });

return <div>Current balance: {balance}</div>;
```

### Connectors [#connectors]

#### `useConnectorById` [#useconnectorbyid]

Look up a connector by its ID and stay subscribed to its registration lifecycle — updates when a connector with that ID is registered (via AppKit's constructor or [`addConnector`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)) or unregistered. Returns the matching [`Connector`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), or `undefined` when none with that ID is currently registered. Use [`useConnectedWallets`](#useconnectedwallets) if you want to react to wallet connect/disconnect events instead.

| Parameter | Type     | Description                     |
| --------- | -------- | ------------------------------- |
| `id`\*    | `string` | ID of the connector to look up. |

Returns: <code><a href="/applications/appkit/reference/appkit#connector">Connector</a> | undefined</code> — The matching [`Connector`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), or `undefined` if none with that ID is registered.

#### `useConnectors` [#useconnectors]

Read the list of connectors registered on this AppKit instance. Updates when a connector is registered or unregistered (use [`useConnectedWallets`](#useconnectedwallets) to react to wallet connect/disconnect events).

Returns: <code><a href="#useconnectorsreturntype">UseConnectorsReturnType</a></code> — Read-only array of registered [`Connector`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)s.

### Crypto on-ramp [#crypto-on-ramp]

#### `useCreateCryptoOnrampDeposit` [#usecreatecryptoonrampdeposit]

Create a crypto-onramp deposit from a quote previously obtained via [`useCryptoOnrampQuote`](#usecryptoonrampquote). Call `mutate(options)` where `options` matches [`CreateCryptoOnrampDepositOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (quote, refund address, optional provider override). On success, `data` is the [`CryptoOnrampDeposit`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) carrying the address and amount the user must send on the source chain to complete the onramp. Pair with [`useCryptoOnrampStatus`](#usecryptoonrampstatus) to poll the deposit until it settles.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseCreateCryptoOnrampDepositParameters`](#usecreatecryptoonrampdepositparameters)        | TanStack Query mutation overrides (`parameters.mutation`).                                                                                                                              |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usecreatecryptoonrampdepositreturntype">UseCreateCryptoOnrampDepositReturnType</a>\<context = unknown></code> — Mutation result for the deposit call.

#### `useCryptoOnrampContext` [#usecryptoonrampcontext]

Reads the `CryptoOnrampContext` populated by [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider) — returns the widget's selection state, quote/deposit data and actions ([`CryptoOnrampContextType`](#cryptoonrampcontexttype)).

Returns: <code><a href="#cryptoonrampcontexttype">CryptoOnrampContextType</a></code>.

#### `useCryptoOnrampProvider` [#usecryptoonrampprovider]

Read and change the default crypto-onramp provider. The hook takes no parameters and returns a `[provider, setProviderId]` tuple. `provider` is `undefined` when no default provider is registered.

Returns: <code><a href="#usecryptoonrampproviderreturntype">UseCryptoOnrampProviderReturnType</a></code>.

#### `useCryptoOnrampProviders` [#usecryptoonrampproviders]

List every crypto-onramp provider registered on the AppKit instance (both those passed via [`AppKitConfig`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)'s `providers` and those added later through [`registerProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)). Subscribes to [`watchCryptoOnrampProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and re-reads via [`getCryptoOnrampProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) so the array stays in sync.

Returns: <code><a href="#usecryptoonrampprovidersreturntype">UseCryptoOnrampProvidersReturnType</a></code> — Array of registered crypto-onramp providers.

#### `useCryptoOnrampQuote` [#usecryptoonrampquote]

Quote a crypto-to-TON onramp — given a source asset/chain and the target TON asset, returns the rate, expected amount and the provider-specific metadata required to feed [`useCreateCryptoOnrampDeposit`](#usecreatecryptoonrampdeposit). `data` is the [`CryptoOnrampQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) payload.

| Parameter                          | Type                                                                                 | Description                                                                                                                                                                         |
| ---------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`                       | [`UseCryptoOnrampQuoteParameters`](#usecryptoonrampquoteparameters)                  | Quote inputs and TanStack Query overrides.                                                                                                                                          |
| `parameters.amount`                | `string`                                                                             | Amount to onramp (either source or target crypto, depending on isSourceAmount)                                                                                                      |
| `parameters.sourceCurrencyAddress` | `string`                                                                             | Source crypto currency address (contract address or 0x0... for native)                                                                                                              |
| `parameters.sourceChain`           | `string`                                                                             | Source chain identifier in CAIP-2 format (e.g. `'eip155:1'` for Ethereum mainnet, `'eip155:42161'` for Arbitrum One). Providers map this to their own chain identifiers internally. |
| `parameters.targetCurrencyAddress` | `string`                                                                             | Target crypto currency address on TON (contract address or 0x0... for native)                                                                                                       |
| `parameters.recipientAddress`      | `string`                                                                             | TON address that will receive the target crypto.                                                                                                                                    |
| `parameters.refundAddress`         | `string`                                                                             | Refund address for the source crypto.                                                                                                                                               |
| `parameters.isSourceAmount`        | `boolean`                                                                            | If true, `amount` is the source amount to spend. If false, `amount` is the target amount to receive. Defaults to true when omitted.                                                 |
| `parameters.providerOptions`       | `TProviderOptions = unknown`                                                         | Provider-specific options.                                                                                                                                                          |
| `parameters.providerId`            | `string`                                                                             | Provider to quote against. Defaults to the registered default provider.                                                                                                             |
| `parameters.query`                 | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                       |

Returns: <code><a href="#usecryptoonrampquotereturntype">UseCryptoOnrampQuoteReturnType</a>\<selectData = GetCryptoOnrampQuoteData></code> — TanStack Query result for the quote read.

#### `useCryptoOnrampStatus` [#usecryptoonrampstatus]

Read the current status of a crypto-onramp deposit previously created via [`useCreateCryptoOnrampDeposit`](#usecreatecryptoonrampdeposit). Typically polled via `refetchInterval` until `data` reaches a terminal state — `'success'` (delivered to the recipient) or `'failed'` (provider could not complete the deposit).

| Parameter               | Type                                                                                 | Description                                                                                                                                                   |
| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`            | [`UseCryptoOnrampStatusParameters`](#usecryptoonrampstatusparameters)                | Deposit ID, originating provider ID and TanStack Query overrides.                                                                                             |
| `parameters.depositId`  | `string`                                                                             | Deposit ID.                                                                                                                                                   |
| `parameters.providerId` | `string`                                                                             | Identifier of the provider that issued this deposit.                                                                                                          |
| `parameters.query`      | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: <code><a href="#usecryptoonrampstatusreturntype">UseCryptoOnrampStatusReturnType</a>\<selectData = GetCryptoOnrampStatusData></code> — TanStack Query result for the status read.

### Jettons [#jettons]

#### `useJettonBalanceByAddress` [#usejettonbalancebyaddress]

React hook reading a jetton balance for a given owner through TanStack Query — derives the owner's jetton-wallet address from the master and formats the balance using the supplied decimals.

| Parameter                   | Type                                                                                                     | Description                                                                                                                                                                 |
| --------------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`                | [`UseJettonBalanceByAddressParameters`](#usejettonbalancebyaddressparameters)                            | Jetton master, owner address, decimals, optional network override and TanStack Query overrides.                                                                             |
| `parameters.jettonAddress`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address (the token, not the user's wallet for it).                                                                                                   |
| `parameters.ownerAddress`   | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner of the jetton wallet — typically the connected user's address.                                                                                                        |
| `parameters.jettonDecimals` | `number`                                                                                                 | Decimals declared by the jetton master. Used to format the raw balance into a human-readable string.                                                                        |
| `parameters.network`        | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.query`          | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

Returns: <code><a href="#usejettonbalancebyaddressreturntype">UseJettonBalanceByAddressReturnType</a>\<selectData = GetJettonBalanceByAddressData></code> — TanStack Query result for the jetton balance read.

**Example**

```tsx
const {
    data: balance,
    isLoading,
    error,
} = useJettonBalanceByAddress({
    ownerAddress: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
    jettonAddress: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiXme1Xc56Iwobkzgnjj',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return <div>Jetton Balance: {balance}</div>;
```

#### `useJettonInfo` [#usejettoninfo]

React hook reading jetton-master metadata (name, symbol, decimals, image, description) through TanStack Query.

| Parameter            | Type                                                                                                     | Description                                                                                                                                                   |
| -------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseJettonInfoParameters`](#usejettoninfoparameters)                                                    | Jetton master address, optional network override and TanStack Query overrides.                                                                                |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address whose metadata is being fetched.                                                                                               |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: <code><a href="#usejettoninforeturntype">UseJettonInfoReturnType</a>\<selectData = GetJettonInfoData></code> — TanStack Query result for the jetton info read.

**Example**

```tsx
const {
    data: info,
    isLoading,
    error,
} = useJettonInfo({
    address: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiXme1Xc56Iwobkzgnjj',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>Jetton Info</h3>
        <p>Name: {info?.name}</p>
        <p>Symbol: {info?.symbol}</p>
        <p>Decimals: {info?.decimals}</p>
    </div>
);
```

#### `useJettonWalletAddress` [#usejettonwalletaddress]

React hook deriving the owner's jetton-wallet address — the per-owner contract that actually holds the jetton balance for a given master — through TanStack Query.

| Parameter                  | Type                                                                                                     | Description                                                                                                                                                   |
| -------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`               | [`UseJettonWalletAddressParameters`](#usejettonwalletaddressparameters)                                  | Jetton master, owner address, optional network override and TanStack Query overrides.                                                                         |
| `parameters.jettonAddress` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address.                                                                                                                               |
| `parameters.ownerAddress`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner whose jetton wallet should be derived.                                                                                                                  |
| `parameters.network`       | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `parameters.query`         | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: `UseQueryReturnType<selectData, Error>` — TanStack Query result for the jetton-wallet address read.

**Example**

```tsx
const {
    data: walletAddress,
    isLoading,
    error,
} = useJettonWalletAddress({
    ownerAddress: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
    jettonAddress: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiXme1Xc56Iwobkzgnjj',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return <div>Jetton Wallet Address: {walletAddress}</div>;
```

#### `useJettons` [#usejettons]

React hook listing jettons held by the currently selected wallet through TanStack Query — auto-resolves the wallet address (use [`useJettonsByAddress`](#usejettonsbyaddress) for an arbitrary address).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseJettonsParameters`](#usejettonsparameters)                                                                     | TanStack Query overrides (`select`, `enabled`, `staleTime`, …), pagination and an optional network override.                                                                |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                 |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the jettons from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.limit`   | `number`                                                                                                            | Maximum number of jettons to return.                                                                                                                                        |
| `parameters.offset`  | `number`                                                                                                            | Number of jettons to skip before returning results — used for pagination.                                                                                                   |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

Returns: <code><a href="#usejettonsreturntype">UseJettonsReturnType</a>\<selectData = GetJettonsByAddressData></code> — TanStack Query result for the jettons list.

**Example**

```tsx
const { data: jettons, isLoading, error } = useJettons();

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>Jettons</h3>
        <ul>
            {jettons?.jettons.map((jetton) => (
                <li key={jetton.walletAddress}>
                    {jetton.info.name}: {jetton.balance}
                </li>
            ))}
        </ul>
    </div>
);
```

#### `useJettonsByAddress` [#usejettonsbyaddress]

React hook listing jettons held by an arbitrary address through TanStack Query — useful for wallets that aren't selected in AppKit (use [`useJettons`](#usejettons) for the selected wallet).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseJettonsByAddressParameters`](#usejettonsbyaddressparameters)                                                   | Owner address, optional network override, pagination and TanStack Query overrides.                                                                                          |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                 |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the jettons from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.limit`   | `number`                                                                                                            | Maximum number of jettons to return.                                                                                                                                        |
| `parameters.offset`  | `number`                                                                                                            | Number of jettons to skip before returning results — used for pagination.                                                                                                   |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

Returns: <code><a href="#usejettonsbyaddressreturntype">UseJettonsByAddressReturnType</a>\<selectData = GetJettonsByAddressData></code> — TanStack Query result for the jettons list.

**Example**

```tsx
const {
    data: jettons,
    isLoading,
    error,
} = useJettonsByAddress({
    address: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>Jettons</h3>
        <ul>
            {jettons?.jettons.map((jetton) => (
                <li key={jetton.walletAddress}>
                    {jetton.info.name}: {jetton.balance}
                </li>
            ))}
        </ul>
    </div>
);
```

#### `useTransferJetton` [#usetransferjetton]

Transfer a jetton from the selected wallet in one step — derives the owner's jetton-wallet from the master address, builds the transfer message, signs it through the wallet and broadcasts it. Call `mutate` with the `jettonAddress` (master), the `recipientAddress`, an `amount` (in jetton units as a human-readable decimal — converted into raw smallest units using `jettonDecimals`), the `jettonDecimals` itself and an optional `comment`. On success, `data` carries the BoC and normalized hash of the broadcast transaction. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseTransferJettonParameters`](#usetransferjettonparameters)                              | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usetransferjettonreturntype">UseTransferJettonReturnType</a>\<context = unknown></code> — Mutation result for the jetton transfer call.

**Example**

```tsx
const { mutate: transfer, isPending, error } = useTransferJetton();

const handleTransfer = () => {
    transfer({
        recipientAddress: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
        amount: '100', // 100 USDT
        jettonAddress: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs',
        jettonDecimals: 6,
    });
};

return (
    <div>
        <button onClick={handleTransfer} disabled={isPending}>
            {isPending ? 'Transferring...' : 'Transfer Jetton'}
        </button>
        {error && <div>Error: {error.message}</div>}
    </div>
);
```

#### `useWatchJettons` [#usewatchjettons]

Subscribe to jetton-balance updates for the currently selected wallet. Updates flow into the TanStack Query cache so [`useJettons`](#usejettons) picks up the new data automatically (use [`useWatchJettonsByAddress`](#usewatchjettonsbyaddress) for a fixed address). Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                         | Description                                                                |
| --------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| `parameters`          | [`UseWatchJettonsParameters`](#usewatchjettonsparameters)                                                    | Update callback and optional network override.                             |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#jettonupdate">JettonUpdate</a>) => void</code> | Callback fired on every jetton-balance update from the streaming provider. |
| `parameters.network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                             | Network to watch on. Defaults to the selected wallet's network.            |

Returns: `void`.

**Example**

```tsx
const { data: jettons } = useJettons();

useWatchJettons();

return (
    <div>
        <h3>Your Jettons:</h3>
        <ul>
            {jettons?.jettons.map((j) => (
                <li key={j.walletAddress}>
                    {j.info.name}: {j.balance}
                </li>
            ))}
        </ul>
    </div>
);
```

#### `useWatchJettonsByAddress` [#usewatchjettonsbyaddress]

Subscribe to jetton-balance updates for an arbitrary owner address. Updates flow into the TanStack Query cache so [`useJettonsByAddress`](#usejettonsbyaddress) and [`useJettonBalanceByAddress`](#usejettonbalancebyaddress) pick up the new data automatically. Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                                | Description                                                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`\*        | [`UseWatchJettonsByAddressParameters`](#usewatchjettonsbyaddressparameters)                                         | Owner address, update callback and optional network override.                                                                                                  |
| `parameters.address`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.    |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#jettonupdate">JettonUpdate</a>) => void</code>        | Callback fired on every jetton-balance update from the streaming provider.                                                                                     |
| `parameters.network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to watch on. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |

Returns: `void`.

**Example**

```tsx
const address = 'UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ';
const { data: jettons } = useJettonsByAddress({ address });

useWatchJettonsByAddress({ address });

return (
    <div>
        <h3>Jettons for {address}:</h3>
        <ul>
            {jettons?.jettons.map((j) => (
                <li key={j.walletAddress}>
                    {j.info.name}: {j.balance}
                </li>
            ))}
        </ul>
    </div>
);
```

### NFTs [#nfts]

#### `useNft` [#usenft]

React hook reading metadata and ownership for a single NFT through TanStack Query, keyed by its contract address. `data` is `null` when the indexer has no record.

| Parameter            | Type                                                                                                                | Description                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `parameters`         | [`UseNftParameters`](#usenftparameters)                                                                             | NFT address, optional network override, and TanStack Query overrides.                                                                                              |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | NFT contract address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`. |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.        |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.      |

Returns: <code><a href="#usenftreturntype">UseNftReturnType</a>\<selectData = GetNftData></code> — TanStack Query result for the NFT read.

**Example**

```tsx
const {
    data: nft,
    isLoading,
    error,
} = useNft({
    address: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>NFT Details</h3>
        <p>Name: {nft?.info?.name}</p>
        <p>Collection: {nft?.collection?.name}</p>
        <p>Owner: {nft?.ownerAddress}</p>
    </div>
);
```

#### `useNfts` [#usenfts]

React hook that reads NFTs held by the currently selected wallet through TanStack Query — auto-resolves the wallet address (use [`useNftsByAddress`](#usenftsbyaddress) for an arbitrary address).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                          |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseNFTsParameters`](#usenftsparameters)                                                                           | Optional pagination, network override, and TanStack Query overrides.                                                                                                 |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.          |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read NFTs from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.limit`   | `number`                                                                                                            | Maximum number of NFTs to return.                                                                                                                                    |
| `parameters.offset`  | `number`                                                                                                            | Number of NFTs to skip before returning results — used for pagination.                                                                                               |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.        |

Returns: <code><a href="#usenftsreturntype">UseNFTsReturnType</a>\<selectData = GetNFTsData></code> — TanStack Query result for the NFTs read.

**Example**

```tsx
const {
    data: nfts,
    isLoading,
    error,
} = useNfts({
    limit: 10,
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>My NFTs</h3>
        <ul>
            {nfts?.nfts.map((nft) => (
                <li key={nft.address}>
                    {nft.info?.name} ({nft.collection?.name})
                </li>
            ))}
        </ul>
    </div>
);
```

#### `useNftsByAddress` [#usenftsbyaddress]

React hook that reads NFTs held by an arbitrary address through TanStack Query — useful for wallets that aren't selected in AppKit (use [`useNfts`](#usenfts) for the selected wallet).

| Parameter            | Type                                                                                                                | Description                                                                                                                                                          |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseNFTsByAddressParameters`](#usenftsbyaddressparameters)                                                         | Owner address, optional pagination and network override, plus TanStack Query overrides.                                                                              |
| `parameters.address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.          |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read NFTs from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.limit`   | `number`                                                                                                            | Maximum number of NFTs to return.                                                                                                                                    |
| `parameters.offset`  | `number`                                                                                                            | Number of NFTs to skip before returning results — used for pagination.                                                                                               |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.        |

Returns: <code><a href="#usenftsbyaddressreturntype">UseNFTsByAddressReturnType</a>\<selectData = GetNFTsData></code> — TanStack Query result for the NFTs read.

**Example**

```tsx
const {
    data: nfts,
    isLoading,
    error,
} = useNftsByAddress({
    address: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
    limit: 10,
});

if (isLoading) {
    return <div>Loading...</div>;
}

if (error) {
    return <div>Error: {error.message}</div>;
}

return (
    <div>
        <h3>NFTs</h3>
        <ul>
            {nfts?.nfts.map((nft) => (
                <li key={nft.address}>
                    {nft.info?.name} ({nft.collection?.name})
                </li>
            ))}
        </ul>
    </div>
);
```

#### `useTransferNft` [#usetransfernft]

Transfer an NFT from the selected wallet in one step — builds the ownership-transfer message and broadcasts it. Call `mutate` with an `nftAddress`, the `recipientAddress`, an optional `amount` (the Gram attached for gas — defaults to AppKit's NFT gas-fee constant when omitted) and an optional `comment`. On success, `data` carries the BoC and normalized hash of the broadcast transaction. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseTransferNftParameters`](#usetransfernftparameters)                                    | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usetransfernftreturntype">UseTransferNftReturnType</a>\<context = unknown></code> — Mutation result for the transfer call.

**Example**

```tsx
const { mutate: transfer, isPending, error } = useTransferNft();

const handleTransfer = () => {
    transfer({
        nftAddress: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
        recipientAddress: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c',
        comment: 'Gift for you',
    });
};

return (
    <div>
        <button onClick={handleTransfer} disabled={isPending}>
            {isPending ? 'Transferring...' : 'Transfer NFT'}
        </button>
        {error && <div>Error: {error.message}</div>}
    </div>
);
```

### Networks [#networks]

#### `useBlockNumber` [#useblocknumber]

React hook reading the latest masterchain seqno through TanStack Query — useful for freshness checks and pagination cursors.

| Parameter            | Type                                                                                 | Description                                                                                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`         | [`UseBlockNumberParameters`](#useblocknumberparameters)                              | TanStack Query overrides and optional network.                                                                                                                |
| `parameters.network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network to query. Defaults to mainnet when omitted.                                                                                                           |
| `parameters.query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: <code><a href="#useblocknumberreturntype">UseBlockNumberReturnType</a>\<selectData = GetBlockNumberData></code> — TanStack Query result for the seqno read.

#### `useDefaultNetwork` [#usedefaultnetwork]

Read and write AppKit's default network — the network connectors use for new wallet connections. Returns a `useState`-style tuple. The read side updates when the default changes through any source (this hook, [`setDefaultNetwork`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), manager events).

Returns: <code><a href="#usedefaultnetworkreturntype">UseDefaultNetworkReturnType</a></code> — Tuple `[network, setNetwork]`.

#### `useNetwork` [#usenetwork]

Read the [`Network`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) the selected wallet is connected to. Updates when the wallet's network changes (e.g. user switches mainnet/testnet inside the wallet).

Returns: <code><a href="#usenetworkreturntype">UseNetworkReturnType</a></code> — Selected wallet's network, or `undefined` when no wallet is selected.

#### `useNetworks` [#usenetworks]

Read the list of networks configured on AppKit. Updates when [`AppKitNetworkManager`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) adds, replaces or drops a network.

Returns: <code><a href="#usenetworksreturntype">UseNetworksReturnType</a></code> — Array of configured [`Network`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)s.

### Settings [#settings]

#### `useAppKit` [#useappkit]

Read the [`AppKit`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) instance hosted by [`AppKitProvider`](#appkitprovider). Throws when the hook is rendered outside the provider tree.

Returns: <code><a href="/applications/appkit/reference/appkit#appkit">AppKit</a></code> — The AppKit instance shared with descendant hooks/components.

#### `useAppKitTheme` [#useappkittheme]

State hook that mirrors the active `@ton/appkit-react` theme to `document.body[data-ta-theme]` — returns a `[theme, setTheme]` tuple just like `useState`.

Returns: `readonly [string, Dispatch<SetStateAction<string>>]` — Tuple `[theme, setTheme]` for reading and switching the active theme.

#### `useI18n` [#usei18n]

Read the i18n context published by [`I18nProvider`](#i18nprovider) (or the wrapping [`AppKitProvider`](#appkitprovider)). Returns the active locale, translation function and helpers to switch locales or merge dictionaries. Throws when rendered outside the provider tree.

Returns: <code><a href="#i18ncontexttype">I18nContextType</a></code> — The i18n context ([`I18nContextType`](#i18ncontexttype)) with `activeLocale`, `t`, `locale` and `addDict`.

### Signing [#signing]

#### `useSignBinary` [#usesignbinary]

Ask the selected wallet to sign an opaque binary blob (Base64-encoded), without on-chain structure. Call `mutate` from an event handler with the `bytes` to sign and an optional `network` override. On success, `data` carries the signature plus the signer address, timestamp and dApp domain the wallet bound to the signature. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseSignBinaryParameters`](#usesignbinaryparameters)                                      | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usesignbinaryreturntype">UseSignBinaryReturnType</a>\<context = unknown></code> — Mutation result for the signing call.

#### `useSignCell` [#usesigncell]

Ask the selected wallet to sign a TON cell — typically so the signature can later be verified on-chain by a contract. Call `mutate` from an event handler with the `cell` content, a TL-B-style `schema` (used by the wallet to render the payload to the user before signing) and an optional `network` override. On success, `data` carries the signature plus the signer address, timestamp and dApp domain. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseSignCellParameters`](#usesigncellparameters)                                          | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usesigncellreturntype">UseSignCellReturnType</a>\<context = unknown></code> — Mutation result for the signing call.

#### `useSignText` [#usesigntext]

Ask the selected wallet to sign a plain-text message — useful for off-chain login proofs and signed challenges. Call `mutate` from an event handler with the `text` to sign and an optional `network` override. On success, `data` carries the signature plus the canonicalized signer address, timestamp and dApp domain the wallet bound to the signature. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseSignTextParameters`](#usesigntextparameters)                                          | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usesigntextreturntype">UseSignTextReturnType</a>\<context = unknown></code> — Mutation result for the signing call.

### Staking [#staking]

#### `useBuildStakeTransaction` [#usebuildstaketransaction]

Build a stake/unstake [`TransactionRequest`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) from a [`StakingQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (obtained via [`useStakingQuote`](#usestakingquote)) without sending it — lets the UI inspect, batch, or pass the request to [`useSendTransaction`](#usesendtransaction) separately. Call `mutate(params)` where `params` matches [`BuildStakeTransactionOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (quote + user address, optional provider override). The resulting `TransactionRequest` is in `data` once the mutation resolves.

Returns: <code><a href="#usebuildstaketransactionreturntype">UseBuildStakeTransactionReturnType</a>\<context = unknown></code> — Mutation result for the build call.

#### `useStakedBalance` [#usestakedbalance]

React hook reading a user's staked balance from a staking provider through TanStack Query — total staked plus, depending on the provider, any instant-unstake balance available right now. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Parameter                | Type                                                                                                     | Description                                                                                                                                                   |
| ------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`             | [`UseStakedBalanceParameters`](#usestakedbalanceparameters)                                              | Owner address, optional `providerId`, optional network override, and TanStack Query overrides.                                                                |
| `parameters.userAddress` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner whose staked balance should be read.                                                                                                                    |
| `parameters.network`     | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `parameters.providerId`  | `string`                                                                                                 | Provider to query. Defaults to the registered default staking provider.                                                                                       |
| `parameters.query`       | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: <code><a href="#usestakedbalancereturntype">UseStakedBalanceReturnType</a>\<selectData = GetStakedBalanceData></code> — TanStack Query result for the staked-balance read.

#### `useStakingContext` [#usestakingcontext]

Reads the [`StakingContextType`](#stakingcontexttype) from the nearest [`StakingWidgetProvider`](#stakingwidgetprovider) (or [`StakingWidget`](#stakingwidget)). Outside a provider, returns the default context (empty inputs, no-op actions) so a custom UI can still mount without crashing.

Returns: <code><a href="#stakingcontexttype">StakingContextType</a></code>.

#### `useStakingProvider` [#usestakingprovider]

React hook returning a registered staking provider. Subscribes to provider-registry changes via [`watchStakingProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and looks up by `id`, or returns the registered default when no ID is given. Returns `undefined` when no provider matches and no default has been registered (where the underlying [`getStakingProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) action would throw).

| Parameter       | Type                                                                                           | Description                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `parameters`    | [`GetStakingProviderOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | Optional provider ID.                                                                  |
| `parameters.id` | `string`                                                                                       | Provider ID to look up. When omitted, returns the registered default staking provider. |

Returns: <code><a href="#usestakingproviderreturntype">UseStakingProviderReturnType</a></code> — Matching staking provider instance, or `undefined` when none resolves.

#### `useStakingProviderInfo` [#usestakingproviderinfo]

React hook reading live staking-pool info for a provider through TanStack Query — APY, instant-unstake liquidity and (for liquid staking) the current exchange rate. Use [`useStakingProviderMetadata`](#usestakingprovidermetadata) for static metadata (name, stake/receive tokens, supported unstake modes). Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Parameter               | Type                                                                                 | Description                                                                                                                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`            | [`UseStakingProviderInfoParameters`](#usestakingproviderinfoparameters)              | Optional `providerId`, network override, and TanStack Query overrides.                                                                                                                    |
| `parameters.network`    | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network whose staking pool should be inspected. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.providerId` | `string`                                                                             | Provider to query. Defaults to the registered default staking provider.                                                                                                                   |
| `parameters.query`      | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                             |

Returns: <code><a href="#usestakingproviderinforeturntype">UseStakingProviderInfoReturnType</a>\<selectData = GetStakingProviderInfoData></code> — TanStack Query result for the live provider info.

#### `useStakingProviderMetadata` [#usestakingprovidermetadata]

Read static metadata for a staking provider — display name, stake/receive tokens, supported unstake modes and contract address. Returns `undefined` when no provider matches and no default is registered. Use [`useStakingProviderInfo`](#usestakingproviderinfo) for live values (APY, instant-unstake liquidity, exchange rate). Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Parameter               | Type                                                                             | Description                                                                                                                                                                               |
| ----------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`            | [`UseStakingProviderMetadataParameters`](#usestakingprovidermetadataparameters)  | Optional `providerId` and network override.                                                                                                                                               |
| `parameters.network`    | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | Network whose provider metadata should be read. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `parameters.providerId` | `string`                                                                         | Provider to query. Defaults to the registered default staking provider.                                                                                                                   |

Returns: <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> | undefined</code> — Static [`StakingProviderMetadata`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), or `undefined` when the provider can't be resolved.

#### `useStakingProviders` [#usestakingproviders]

React hook returning every staking provider registered on the AppKit instance (both those passed via config and those added later). Subscribes to provider-registry changes via [`watchStakingProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

Returns: <code><a href="#usestakingprovidersreturntype">UseStakingProvidersReturnType</a></code> — Array of registered staking providers.

#### `useStakingQuote` [#usestakingquote]

Quote a stake or unstake — given an amount, direction (`'stake'` / `'unstake'`) and the target asset, returns the rate, expected output and the provider-specific metadata required to feed [`useBuildStakeTransaction`](#usebuildstaketransaction). `data` is the [`StakingQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) payload. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Parameter                    | Type                                                                                                         | Description                                                                                                                                                                                                                                                                                                  |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `parameters`                 | [`UseStakingQuoteParameters`](#usestakingquoteparameters)                                                    | Quote parameters, optional `providerId`, optional network override, and TanStack Query overrides.                                                                                                                                                                                                            |
| `parameters.direction`       | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code> | Direction of the quote (stake or unstake)                                                                                                                                                                                                                                                                    |
| `parameters.amount`          | `string`                                                                                                     | Amount of tokens to stake or unstake.                                                                                                                                                                                                                                                                        |
| `parameters.userAddress`     | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code>     | Address of the user.                                                                                                                                                                                                                                                                                         |
| `parameters.network`         | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                             | Network on which the staking will be executed.                                                                                                                                                                                                                                                               |
| `parameters.unstakeMode`     | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                   | Unstake-timing mode the quote should target — see [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) for the supported flavours (`'INSTANT'`, `'WHEN_AVAILABLE'`, `'ROUND_END'`). Only meaningful when `direction === 'unstake'` and the provider lists the mode in `supportedUnstakeModes`. |
| `parameters.isReversed`      | `boolean`                                                                                                    | If true, for unstake requests the amount is specified in the staking coin (e.g. GRAM) instead of the Liquid Staking Token (e.g. tsTON).                                                                                                                                                                      |
| `parameters.providerOptions` | `TProviderOptions = unknown`                                                                                 | Provider-specific options.                                                                                                                                                                                                                                                                                   |
| `parameters.providerId`      | `string`                                                                                                     | Provider to quote against. Defaults to the registered default staking provider.                                                                                                                                                                                                                              |
| `parameters.query`           | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                         | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                                                                                                                                                |

Returns: <code><a href="#usestakingquotereturntype">UseStakingQuoteReturnType</a>\<selectData = GetStakingQuoteData></code> — TanStack Query result for the quote read.

### Swap [#swap]

#### `useBuildSwapTransaction` [#usebuildswaptransaction]

Build a swap [`TransactionRequest`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) from a [`SwapQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (obtained via [`useSwapQuote`](#useswapquote)) without sending it — lets the UI inspect, batch, or pass the request to [`useSendTransaction`](#usesendtransaction) separately. Call `mutate(params)` where `params` matches [`BuildSwapTransactionOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (quote, user address, optional slippage/deadline overrides). The resulting `TransactionRequest` is in `data` once the mutation resolves.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseBuildSwapTransactionParameters`](#usebuildswaptransactionparameters)                  | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usebuildswaptransactionreturntype">UseBuildSwapTransactionReturnType</a>\<context = unknown></code> — Mutation result for the build call.

#### `useSwapContext` [#useswapcontext]

Reads the [`SwapContextType`](#swapcontexttype) populated by the nearest [`SwapWidgetProvider`](#swapwidgetprovider) (or the [`SwapWidget`](#swapwidget) that mounts one). Outside a provider it returns the no-op default value.

Returns: <code><a href="#swapcontexttype">SwapContextType</a></code>.

#### `useSwapProvider` [#useswapprovider]

Read and switch the default swap provider — subscribes to [`watchSwapProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and re-reads via [`getSwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). Returns a `useState`-style tuple. The read swallows the throw from [`getSwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (which throws when no provider matches — or when no ID is passed and no default has been registered) and yields `undefined` instead.

Returns: <code><a href="#useswapproviderreturntype">UseSwapProviderReturnType</a></code> — Tuple `[provider, setProviderId]`.

#### `useSwapProviders` [#useswapproviders]

List every swap provider registered on the AppKit instance (both those passed via [`AppKitConfig`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)'s `providers` and those added later through [`registerProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)). Subscribes to [`watchSwapProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and re-reads via [`getSwapProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) so the array stays in sync.

Returns: <code><a href="#useswapprovidersreturntype">UseSwapProvidersReturnType</a></code> — Array of registered swap providers.

#### `useSwapQuote` [#useswapquote]

Quote a swap — given source/target tokens and an amount, returns the rate, expected output and the provider-specific metadata required to feed [`useBuildSwapTransaction`](#usebuildswaptransaction). `data` is the [`SwapQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) payload. The `network` field defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Parameter                        | Type                                                                                 | Description                                                                                                                                                   |
| -------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`                     | [`UseSwapQuoteParameters`](#useswapquoteparameters)                                  | Source and target tokens, amount, optional network/provider override, and TanStack Query overrides.                                                           |
| `parameters.amount`              | `string`                                                                             | Amount of tokens to swap (incoming or outgoing depending on isReverseSwap)                                                                                    |
| `parameters.from`                | <code><a href="/applications/appkit/reference/appkit#swaptoken">SwapToken</a></code> | Token to swap from.                                                                                                                                           |
| `parameters.to`                  | <code><a href="/applications/appkit/reference/appkit#swaptoken">SwapToken</a></code> | Token to swap to.                                                                                                                                             |
| `parameters.network`             | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network on which the swap will be executed.                                                                                                                   |
| `parameters.slippageBps`         | `number`                                                                             | Slippage tolerance in basis points (1 `bp` = 0.01%)                                                                                                           |
| `parameters.maxOutgoingMessages` | `number`                                                                             | Maximum number of outgoing messages                                                                                                                           |
| `parameters.providerOptions`     | `TProviderOptions = unknown`                                                         | Provider-specific options.                                                                                                                                    |
| `parameters.isReverseSwap`       | `boolean`                                                                            | If true, amount is the amount to receive (buy). If false, amount is the amount to spend (sell).                                                               |
| `parameters.providerId`          | `string`                                                                             | Provider to quote against. Defaults to the registered default swap provider.                                                                                  |
| `parameters.query`               | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

Returns: <code><a href="#useswapquotereturntype">UseSwapQuoteReturnType</a>\<selectData = GetSwapQuoteData></code> — TanStack Query result for the swap quote.

### Transactions [#transactions]

#### `useSendTransaction` [#usesendtransaction]

Hand a pre-built [`TransactionRequest`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) to the selected wallet for signing and broadcast — typically the second step after a `buildX` / `createX` action (e.g. [`useBuildSwapTransaction`](#usebuildswaptransaction), [`useBuildStakeTransaction`](#usebuildstaketransaction)) produces the request. Call `mutate(request)`. On success, `data` carries the BoC and normalized hash of the broadcast transaction. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseSendTransactionParameters`](#usesendtransactionparameters)                            | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usesendtransactionreturntype">UseSendTransactionReturnType</a>\<context = unknown></code> — Mutation result for the send call.

#### `useTransactionStatus` [#usetransactionstatus]

Poll the status of a sent transaction by its BoC or normalized hash. In TON, a single external message triggers a tree of internal messages, so the transaction is `'completed'` only once the entire trace finishes — pair with `refetchInterval` to keep polling until `data.status` is `'completed'` or `'failed'`. Pass either `boc` or `normalizedHash` (not both). The underlying action throws `Error('Either boc or normalizedHash must be provided')` when neither is supplied — TanStack Query surfaces it via the query's `error`.

| Parameter      | Type                                                                | Description                                                                |
| -------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `parameters`\* | [`UseTransactionStatusParameters`](#usetransactionstatusparameters) | `boc` xor `normalizedHash`, optional network and TanStack Query overrides. |

Returns: <code><a href="#usetransactionstatusreturntype">UseTransactionStatusReturnType</a>\<selectData = GetTransactionStatusData></code> — TanStack Query result for the status read.

#### `useTransferTon` [#usetransferton]

Send Gram from the selected wallet in one step — builds the transfer message, hands it to the wallet for signing and broadcasts it. Call `mutate` with a `recipientAddress`, an `amount` (in Gram as a human-readable decimal, converted to nanograms internally) and any of the optional `comment` / `payload` / `stateInit` fields. On success, `data` carries the BoC and normalized hash of the broadcast transaction — pair with [`useTransactionStatus`](#usetransactionstatus) to poll the trace to completion. Throws `Error('Wallet not connected')` if no wallet is currently selected — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseTransferTonParameters`](#usetransfertonparameters)                                    | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usetransfertonreturntype">UseTransferTonReturnType</a>\<context = unknown></code> — Mutation result for the transfer call.

#### `useWatchTransactions` [#usewatchtransactions]

Subscribe to incoming-transaction events for the currently selected wallet (use [`useWatchTransactionsByAddress`](#usewatchtransactionsbyaddress) for a fixed address). Auto-rebinds when the user connects, switches or disconnects. Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                                     | Description                                                              |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `parameters`          | [`UseWatchTransactionsParameters`](#usewatchtransactionsparameters)                                                      | Update callback.                                                         |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#transactionsupdate">TransactionsUpdate</a>) => void</code> | Callback fired on every transactions update from the streaming provider. |

Returns: `void`.

**Example**

```tsx
const [lastUpdate, setLastUpdate] = useState<TransactionsUpdate | null>(null);

useWatchTransactions({
    onChange: (update) => {
        setLastUpdate(update);
    },
});

return (
    <div>
        {lastUpdate ? (
            <div>
                Last update for: {lastUpdate.address}
                <br />
                Transactions count: {lastUpdate.transactions.length}
            </div>
        ) : (
            'Waiting for transactions...'
        )}
    </div>
);
```

#### `useWatchTransactionsByAddress` [#usewatchtransactionsbyaddress]

Subscribe to incoming-transaction events for an arbitrary address (use [`useWatchTransactions`](#usewatchtransactions) for the selected wallet). Requires a streaming provider registered for the network — the hook exits silently with a console warning when none is configured.

| Parameter             | Type                                                                                                                     | Description                                                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`\*        | [`UseWatchTransactionsByAddressParameters`](#usewatchtransactionsbyaddressparameters)                                    | Address, update callback and optional network override.                                                                                                        |
| `parameters.address`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code>      | Address to watch — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`. |
| `parameters.onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#transactionsupdate">TransactionsUpdate</a>) => void</code> | Callback fired on every transactions update from the streaming provider.                                                                                       |
| `parameters.network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                         | Network to watch on. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |

Returns: `void`.

**Example**

```tsx
const address = 'UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ';
const [lastUpdate, setLastUpdate] = useState<TransactionsUpdate | null>(null);

useWatchTransactionsByAddress({
    address,
    onChange: (update) => {
        setLastUpdate(update);
    },
});

return (
    <div>
        {lastUpdate ? (
            <div>
                New transactions for: {lastUpdate.address}
                <br />
                Count: {lastUpdate.transactions.length}
            </div>
        ) : (
            'Waiting for transactions...'
        )}
    </div>
);
```

### Wallets [#wallets]

#### `useAddress` [#useaddress]

Read the user-friendly address of the currently selected wallet. Updates when the selection changes.

Returns: <code><a href="#useaddressreturntype">UseAddressReturnType</a></code> — Selected wallet's address, or `undefined` when none is selected.

#### `useConnect` [#useconnect]

Open a registered connector's connection flow (e.g., the TON Connect modal) and await its completion. Call `mutate` from a Connect button with the `connectorId` of the connector to drive. Once the user finishes the flow the new wallet becomes available via [`useSelectedWallet`](#useselectedwallet) / [`useConnectedWallets`](#useconnectedwallets). Throws `Error('Connector with ID "<ID>" not found')` when no connector with that ID is registered — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseConnectParameters`](#useconnectparameters)                                            | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#useconnectreturntype">UseConnectReturnType</a>\<context = unknown></code> — Mutation result for the connect call.

#### `useConnectedWallets` [#useconnectedwallets]

Read the list of currently connected wallets across all registered connectors. Updates when a wallet connects or disconnects.

Returns: <code><a href="#useconnectedwalletsreturntype">UseConnectedWalletsReturnType</a></code> — Read-only array of [`WalletInterface`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)s.

#### `useDisconnect` [#usedisconnect]

Tear down the session on a registered connector, disconnecting whichever wallet it currently holds. Call `mutate` from a Log out / Disconnect button with the `connectorId` of the connector to tear down. Once it resolves the wallet drops out of [`useSelectedWallet`](#useselectedwallet) / [`useConnectedWallets`](#useconnectedwallets). Throws `Error('Connector with ID "<ID>" not found')` when no connector with that ID is registered — TanStack Query surfaces it via the mutation's `error`.

| Parameter             | Type                                                                                       | Description                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`          | [`UseDisconnectParameters`](#usedisconnectparameters)                                      | TanStack Query mutation overrides.                                                                                                                                                      |
| `parameters.mutation` | [`MutationOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query mutation options forwarded to `useMutation` (`onSuccess`, `onError`, `onMutate`, `retry`, …). `mutationFn`, `mutationKey` and `throwOnError` are managed by the wrapper. |

Returns: <code><a href="#usedisconnectreturntype">UseDisconnectReturnType</a>\<context = unknown></code> — Mutation result for the disconnect call.

#### `useSelectedWallet` [#useselectedwallet]

Read and switch the wallet that AppKit treats as active — most action hooks ([`useBalance`](#usebalance), [`useSignText`](#usesigntext), [`useTransferTon`](#usetransferton)) target this wallet implicitly. Returns a `useState`-style tuple.

Returns: <code><a href="#useselectedwalletreturntype">UseSelectedWalletReturnType</a></code> — Tuple `[wallet, setWalletId]`.

## Component [#component]

### Balances [#balances-1]

#### `SendJettonButton` [#sendjettonbutton]

Pre-wired button that builds a jetton transfer with [`createTransferJettonTransaction`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and dispatches it through the standard `Send` flow on click — disabled until `recipientAddress`, `amount`, `jetton.address` and `jetton.decimals` are all set. Throws inside the click handler when `jetton.address` or `jetton.decimals` is missing.

| Prop                 | Type                                                                                                                                     | Description                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipientAddress`\* | `string`                                                                                                                                 | Recipient address.                                                                                                                                                                                                                             |
| `amount`\*           | `string`                                                                                                                                 | Amount in jetton units as a human-readable decimal string. Converted to raw smallest units via `jetton.decimals`.                                                                                                                              |
| `jetton`\*           | `{ address: string; symbol: string; decimals: number; }`                                                                                 | Jetton master metadata — `address` (master contract), `symbol` (rendered in the button label) and `decimals` (used to format `amount`).                                                                                                        |
| `comment`            | `string`                                                                                                                                 | Optional human-readable comment attached to the transfer.                                                                                                                                                                                      |
| `text`               | `ReactNode`                                                                                                                              | Override the button label. Defaults to "Send".                                                                                                                                                                                                 |
| `size`               | `ButtonSize`                                                                                                                             | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius`       | `ButtonBorderRadius`                                                                                                                     | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`            | `ButtonVariant`                                                                                                                          | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`            | `boolean`                                                                                                                                | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`          | `boolean`                                                                                                                                | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`               | `ReactNode`                                                                                                                              | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |
| `children`           | `(props: SendRenderProps) => ReactNode`                                                                                                  | Custom render function — replaces the default button with the caller's UI. Receives the current send state and click handler via [`SendRenderProps`](#sendrenderprops).                                                                        |
| `onError`            | `(error: Error) => void`                                                                                                                 | Called when the wallet rejects the request or the send fails. Receives the raised `Error`.                                                                                                                                                     |
| `onSuccess`          | <code>(response: <a href="/applications/appkit/reference/appkit#sendtransactionreturntype">SendTransactionReturnType</a>) => void</code> | Called once the transaction is broadcast. Receives the wallet's [`SendTransactionReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (BoC + normalized hash).                                                        |

**Example**

```tsx
return (
    <SendJettonButton
        recipientAddress="EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c"
        amount="5" // 5 USDT (human-readable format)
        comment="Payment for services"
        jetton={{
            address: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', // USDT
            symbol: 'USDT',
            decimals: 6,
        }}
        onSuccess={(result) => console.log('Transaction sent:', result)}
        onError={(error) => console.error('Transaction failed:', error)}
    />
);
```

#### `SendTonButton` [#sendtonbutton]

Pre-wired button that builds a Gram transfer with [`createTransferTonTransaction`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and dispatches it through the standard `Send` flow on click — disabled until both `recipientAddress` and `amount` are set.

| Prop                 | Type                                                                                                                                     | Description                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipientAddress`\* | `string`                                                                                                                                 | Recipient address.                                                                                                                                                                                                                             |
| `amount`\*           | `string`                                                                                                                                 | Amount in Gram as a human-readable decimal string (e.g., `"1.5"`). Converted to nanograms internally.                                                                                                                                          |
| `comment`            | `string`                                                                                                                                 | Optional human-readable comment attached to the transfer.                                                                                                                                                                                      |
| `text`               | `ReactNode`                                                                                                                              | Override the button label. Defaults to "Send".                                                                                                                                                                                                 |
| `size`               | `ButtonSize`                                                                                                                             | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius`       | `ButtonBorderRadius`                                                                                                                     | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`            | `ButtonVariant`                                                                                                                          | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`            | `boolean`                                                                                                                                | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`          | `boolean`                                                                                                                                | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`               | `ReactNode`                                                                                                                              | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |
| `children`           | `(props: SendRenderProps) => ReactNode`                                                                                                  | Custom render function — replaces the default button with the caller's UI. Receives the current send state and click handler via [`SendRenderProps`](#sendrenderprops).                                                                        |
| `onError`            | `(error: Error) => void`                                                                                                                 | Called when the wallet rejects the request or the send fails. Receives the raised `Error`.                                                                                                                                                     |
| `onSuccess`          | <code>(response: <a href="/applications/appkit/reference/appkit#sendtransactionreturntype">SendTransactionReturnType</a>) => void</code> | Called once the transaction is broadcast. Receives the wallet's [`SendTransactionReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (BoC + normalized hash).                                                        |

**Example**

```tsx
return (
    <SendTonButton
        recipientAddress="EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c"
        amount="1" // 1 Gram (human-readable format)
        comment="Hello from AppKit"
        onSuccess={(result) => console.log('Transaction sent:', result)}
        onError={(error) => console.error('Transaction failed:', error)}
    />
);
```

### Crypto on-ramp [#crypto-on-ramp-1]

#### `CryptoOnrampWidget` [#cryptoonrampwidget]

Drop-in widget for buying TON-side tokens with a crypto payment from another chain — wraps [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider) (which drives token/method selection, quote fetching, deposit creation and status polling) around [`CryptoOnrampWidgetUI`](#cryptoonrampwidgetui). Pass a `children` render function to swap in a fully custom UI while keeping the same provider state.

| Prop              | Type                                                                                                          | Description                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children`        | <code>(props: <a href="#cryptoonrampwidgetrenderprops">CryptoOnrampWidgetRenderProps</a>) => ReactNode</code> | Custom render function. When provided, replaces the default [`CryptoOnrampWidgetUI`](#cryptoonrampwidgetui) and is called with the full [`CryptoOnrampWidgetRenderProps`](#cryptoonrampwidgetrenderprops) (context state, actions and forwarded `<div>` props), so callers can build a fully custom UI on top of the same provider. |
| `tokens`          | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                                            | Target tokens (what the user buys on TON). Defaults to a built-in list.                                                                                                                                                                                                                                                             |
| `tokenSections`   | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code>                  | Optional section configs grouping `tokens` in the picker.                                                                                                                                                                                                                                                                           |
| `paymentMethods`  | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                                        | Source crypto payment methods (what the user pays with on another chain). Defaults to a built-in list.                                                                                                                                                                                                                              |
| `methodSections`  | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>                          | Optional section configs grouping `paymentMethods` in the picker.                                                                                                                                                                                                                                                                   |
| `chains`          | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                                              | Custom CAIP-2 → chain display info overrides. Merged on top of the built-in defaults, so consumers only need to provide what they want to override or add — for example, a single entry keyed by `'eip155:42161'` with a `name` of `'Arbitrum'` and a `logo` URL.                                                                   |
| `defaultTokenId`  | `string`                                                                                                      | ID of the target token pre-selected on mount.                                                                                                                                                                                                                                                                                       |
| `defaultMethodId` | `string`                                                                                                      | ID of the source payment method pre-selected on mount.                                                                                                                                                                                                                                                                              |

**Example**

```tsx
// Uses built-in defaults for tokens, payment methods and chain display info.
// Make sure a crypto-onramp provider (Layerswap / swaps.xyz) is registered on AppKit.
return <CryptoOnrampWidget defaultTokenId="gram" />;
```

#### `CryptoOnrampWidgetProvider` [#cryptoonrampwidgetprovider]

Context provider that powers the crypto-to-TON onramp widget — wires together token/method selection state, quote fetching ([`useCryptoOnrampQuote`](#usecryptoonrampquote)), deposit creation ([`useCreateCryptoOnrampDeposit`](#usecreatecryptoonrampdeposit)), deposit status polling ([`useCryptoOnrampStatus`](#usecryptoonrampstatus)), the target-token balance and validation. Consumers read the state via [`useCryptoOnrampContext`](#usecryptoonrampcontext).

| Prop              | Type                                                                                         | Description                                                                                                                                                                                                                                                       |
| ----------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tokens`          | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                           | Target tokens (what the user buys on TON). Defaults to a built-in list.                                                                                                                                                                                           |
| `tokenSections`   | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code> | Optional section configs grouping `tokens` in the picker.                                                                                                                                                                                                         |
| `paymentMethods`  | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                       | Source crypto payment methods (what the user pays with on another chain). Defaults to a built-in list.                                                                                                                                                            |
| `methodSections`  | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>         | Optional section configs grouping `paymentMethods` in the picker.                                                                                                                                                                                                 |
| `chains`          | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                             | Custom CAIP-2 → chain display info overrides. Merged on top of the built-in defaults, so consumers only need to provide what they want to override or add — for example, a single entry keyed by `'eip155:42161'` with a `name` of `'Arbitrum'` and a `logo` URL. |
| `defaultTokenId`  | `string`                                                                                     | ID of the target token pre-selected on mount.                                                                                                                                                                                                                     |
| `defaultMethodId` | `string`                                                                                     | ID of the source payment method pre-selected on mount.                                                                                                                                                                                                            |

#### `CryptoOnrampWidgetUI` [#cryptoonrampwidgetui]

Presentational UI for the crypto-to-TON onramp widget — renders the from/to selectors, amount input with presets, continue button, info block (you-get / balance / provider) and the token-pick / method-pick / refund-address / deposit modals. All state and actions come from props ([`CryptoOnrampWidgetRenderProps`](#cryptoonrampwidgetrenderprops)). Typically rendered inside [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider) via [`CryptoOnrampWidget`](#cryptoonrampwidget).

| Prop                          | Type                                                                                                             | Description                                                                                     |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `tokens`\*                    | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                                               | Full list of target tokens the user can buy.                                                    |
| `tokenSections`               | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code>                     | Optional section configs grouping `tokens` in the picker.                                       |
| `selectedToken`\*             | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a> \| null</code>                                          | Currently selected target token to buy. `null` until tokens load.                               |
| `setSelectedToken`\*          | <code>(token: <a href="#cryptoonramptoken">CryptoOnrampToken</a>) => void</code>                                 | Updates `selectedToken`.                                                                        |
| `paymentMethods`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                                           | Available source crypto payment methods.                                                        |
| `methodSections`              | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>                             | Optional section configs grouping `paymentMethods` in the picker.                               |
| `selectedMethod`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a></code>                                              | Currently selected source payment method.                                                       |
| `setSelectedMethod`\*         | <code>(method: <a href="#cryptopaymentmethod">CryptoPaymentMethod</a>) => void</code>                            | Updates `selectedMethod`.                                                                       |
| `chains`\*                    | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                                                 | CAIP-2 → chain display info map (built-in defaults merged with consumer overrides).             |
| `amount`\*                    | `string`                                                                                                         | Current amount input value as a decimal string.                                                 |
| `setAmount`\*                 | `(value: string) => void`                                                                                        | Updates `amount`.                                                                               |
| `amountInputMode`\*           | <code><a href="#cryptoamountinputmode">CryptoAmountInputMode</a></code>                                          | Which side `amount` is denominated in — see [`CryptoAmountInputMode`](#cryptoamountinputmode).  |
| `setAmountInputMode`\*        | <code>(mode: <a href="#cryptoamountinputmode">CryptoAmountInputMode</a>) => void</code>                          | Updates `amountInputMode`.                                                                      |
| `convertedAmount`\*           | `string`                                                                                                         | Other side of `amount` after applying the current quote's rate.                                 |
| `presetAmounts`\*             | <code><a href="#onrampamountpreset">OnrampAmountPreset</a>\[]</code>                                             | Quick-pick amount buttons rendered in the widget.                                               |
| `quote`\*                     | <code><a href="/applications/appkit/reference/appkit#cryptoonrampquote">CryptoOnrampQuote</a> \| null</code>     | Current quote, or `null` if not yet fetched / invalidated.                                      |
| `isLoadingQuote`\*            | `boolean`                                                                                                        | Whether a quote is in flight (includes the input-debounce window).                              |
| `quoteError`\*                | `string \| null`                                                                                                 | Quote-side validation/fetch error as an i18n key, or `null`.                                    |
| `quoteProviderName`\*         | `string \| null`                                                                                                 | Display name of the provider behind the current quote, when available.                          |
| `deposit`\*                   | <code><a href="/applications/appkit/reference/appkit#cryptoonrampdeposit">CryptoOnrampDeposit</a> \| null</code> | Current deposit returned by the provider once `createDeposit` succeeded.                        |
| `isCreatingDeposit`\*         | `boolean`                                                                                                        | Whether `createDeposit` is in flight.                                                           |
| `depositError`\*              | `string \| null`                                                                                                 | Deposit-side error as an i18n key, or `null`.                                                   |
| `depositAmount`\*             | `string`                                                                                                         | Formatted deposit amount the user must send on the source chain.                                |
| `createDeposit`\*             | `() => void`                                                                                                     | Triggers deposit creation from the current quote.                                               |
| `depositStatus`\*             | <code><a href="/applications/appkit/reference/appkit#cryptoonrampstatus">CryptoOnrampStatus</a> \| null</code>   | Latest deposit status polled via [`useCryptoOnrampStatus`](#usecryptoonrampstatus), or `null`.  |
| `isRefundAddressRequired`\*   | `boolean`                                                                                                        | Whether the current quote provider requires a refund address before deposit.                    |
| `isReversedAmountSupported`\* | `boolean`                                                                                                        | Whether the current quote provider supports reversed (target-amount) input.                     |
| `refundAddress`\*             | `string`                                                                                                         | Refund address the user typed, if `isRefundAddressRequired`.                                    |
| `setRefundAddress`\*          | `(address: string) => void`                                                                                      | Updates `refundAddress`.                                                                        |
| `targetBalance`\*             | `string`                                                                                                         | Connected wallet's balance of the selected target token (formatted, token units).               |
| `isLoadingTargetBalance`\*    | `boolean`                                                                                                        | Whether the target token balance is being fetched.                                              |
| `isWalletConnected`\*         | `boolean`                                                                                                        | Whether a GRAM wallet is currently connected.                                                   |
| `canContinue`\*               | `boolean`                                                                                                        | Whether the user can proceed — valid amount, quote available, and wallet connected.             |
| `onReset`\*                   | `() => void`                                                                                                     | Invalidates the active quote and clears the deposit, returning the widget to its initial state. |

### NFTs [#nfts-1]

#### `NftItem` [#nftitem]

Card-style button rendering an NFT's image, name and collection name with an "On Sale" badge when applicable — falls back to a placeholder icon when the image is missing or fails to load.

| Prop    | Type                                                                     | Description                                                                                           |
| ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `nft`\* | <code><a href="/applications/appkit/reference/appkit#nft">NFT</a></code> | NFT to render — name, collection name, image and on-sale state are derived via `getFormattedNftInfo`. |

**Example**

```tsx
return <NftItem nft={sampleNft} onClick={() => console.log('NFT clicked')} />;
```

### Providers [#providers]

#### `AppKitProvider` [#appkitprovider]

Top-level React provider that wires AppKit, the TON Connect bridge and i18n into the component tree — wrap your app once near the root so descendant hooks ([`useAppKit`](#useappkit), [`useBalance`](#usebalance), …) and components can resolve their context.

| Prop       | Type                                                                           | Description                                                                                              |
| ---------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
| `appKit`\* | <code><a href="/applications/appkit/reference/appkit#appkit">AppKit</a></code> | Runtime instance constructed at app startup. Shared across every `@ton/appkit-react` hook and component. |

**Example**

```tsx
return (
    <AppKitProvider appKit={appKit}>
        <h1>My App</h1>
        {/* Your App Content */}
    </AppKitProvider>
);
```

#### `I18nProvider` [#i18nprovider]

React provider that mounts the i18n context for [`useI18n`](#usei18n) and child components — already wrapped by [`AppKitProvider`](#appkitprovider), so apps usually only render it directly when they need to override the locale or dictionaries.

| Prop       | Type                   | Description                                                                                  |
| ---------- | ---------------------- | -------------------------------------------------------------------------------------------- |
| `locale`   | `string`               | Initial locale code. Defaults to the i18n library's default when omitted.                    |
| `lngDicts` | `Record<string, Dict>` | Translation dictionaries keyed by locale. Loaded into the underlying i18n instance on mount. |

**Example**

```tsx
// Override the locale. Pass `lngDicts` with your own translations when you need them.
return (
    <I18nProvider locale="en">
        <div>My App</div>
    </I18nProvider>
);
```

### Shared [#shared]

#### `AmountPresets` [#amountpresets]

Horizontal row of preset amount buttons — typically used next to an amount input to offer quick fills.

| Prop               | Type                                                     | Description                                                                              |
| ------------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `presets`\*        | <code><a href="#amountpreset">AmountPreset</a>\[]</code> | Preset buttons to render, in order.                                                      |
| `currencySymbol`   | `string`                                                 | Optional symbol (e.g., `"$"`) prepended to each preset label.                            |
| `onPresetSelect`\* | `(value: string) => void`                                | Called with the selected preset's `amount` unless the preset defines its own `onSelect`. |

**Example**

```tsx
return (
    <div>
        <input value={amount} onChange={(e) => setAmount(e.target.value)} placeholder="Amount" />
        <AmountPresets presets={presets} currencySymbol="$" onPresetSelect={setAmount} />
    </div>
);
```

#### `CopyButton` [#copybutton]

Icon-only button that copies `value` to the clipboard on click and flips its icon to a checkmark for a short confirmation window.

| Prop           | Type     | Description                                               |
| -------------- | -------- | --------------------------------------------------------- |
| `value`\*      | `string` | Text written to the clipboard when the button is clicked. |
| `aria-label`\* | `string` | Accessible label for screen readers.                      |

**Example**

```tsx
return <CopyButton value="EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c" aria-label="Copy wallet address" />;
```

#### `CurrencyItem` [#currencyitem]

Compound row used inside currency/token select lists: shows a token logo, name + ticker, optional verified badge, and an optional balance / under-balance on the right. Pass top-level props for the default layout, or pass `children` made of the sub-components for full control.

**Members**

| Member                       | Description                                                                                                            |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `CurrencyItem.Container`     | Root `<button>` wrapper — receives all native button props.                                                            |
| `CurrencyItem.Logo`          | Token logo cell rendered as a 40px [`Logo`](#logo).                                                                    |
| `CurrencyItem.Info`          | Vertical block holding the [`CurrencyItem.Header`](#currencyitem) and [`CurrencyItem.Ticker`](#currencyitem).          |
| `CurrencyItem.VerifiedBadge` | Verified checkmark badge — rendered next to the name when `isVerified` is set.                                         |
| `CurrencyItem.Header`        | Top line of `Info` (name + verified badge).                                                                            |
| `CurrencyItem.Name`          | Primary text line — defaults to the token name, falling back to the ticker when no name is provided.                   |
| `CurrencyItem.Ticker`        | Secondary text line — renders the ticker, and when both ticker and name are present appends `• ` followed by the name. |
| `CurrencyItem.RightSide`     | Right-aligned column for balance values.                                                                               |
| `CurrencyItem.MainBalance`   | Primary balance number (top of `RightSide`).                                                                           |
| `CurrencyItem.UnderBalance`  | Secondary balance value (e.g., fiat) shown under `MainBalance`.                                                        |

**Example**

```tsx
// Top-level props give you the default layout in one line.
return (
    <CurrencyItem
        ticker="USDT"
        name="Tether USD"
        icon="https://cdn.example.com/usdt.png"
        balance="1,234.56"
        underBalance="≈ $1,234.56"
        isVerified
        onClick={() => console.log('Picked USDT')}
    />
);
```

#### `CurrencySelect` [#currencyselect]

Compound currency-select primitives — compose [`CurrencySelect.Modal`](#currencyselect) with a [`CurrencySelect.Search`](#currencyselect) and [`CurrencySelect.ListContainer`](#currencyselect) of [`CurrencySelect.Section`](#currencyselect) rows to build a custom token picker. For a ready-made implementation see [`TokenSelectModal`](#tokenselectmodal).

**Members**

| Member                         | Description                                     |
| ------------------------------ | ----------------------------------------------- |
| `CurrencySelect.Modal`         | Modal wrapper.                                  |
| `CurrencySelect.Search`        | Auto-focused search input row.                  |
| `CurrencySelect.ListContainer` | Scrollable list area with built-in empty state. |
| `CurrencySelect.SectionHeader` | Header label rendered above a section.          |
| `CurrencySelect.Section`       | Container for a group of currency rows.         |

#### `LowBalanceModal` [#lowbalancemodal]

Modal shown when a transaction would leave insufficient Gram to cover fees — adapts its body and buttons to the [`LowBalanceMode`](#lowbalancemode).

| Prop            | Type                                                      | Description                                                                                                                                         |
| --------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `open`\*        | `boolean`                                                 | Controls visibility of the modal.                                                                                                                   |
| `mode`\*        | <code><a href="#lowbalancemode">LowBalanceMode</a></code> | `reduce` — user can fix it by reducing the amount (shows Change/Cancel). `topup` — reducing doesn't help, user must top up Gram (shows Close only). |
| `requiredTon`\* | `string`                                                  | Required amount in Gram, formatted as a decimal string (e.g. `"0.423"`).                                                                            |
| `onChange`\*    | `() => void`                                              | Called when the user clicks the primary "Change" action (only in `reduce` mode).                                                                    |
| `onCancel`\*    | `() => void`                                              | Called when the user dismisses the modal (Cancel, Close, or backdrop click).                                                                        |

**Example**

```tsx
return (
    <LowBalanceModal
        open={open}
        mode="reduce"
        requiredTon="0.423"
        onChange={() => {
            console.log('Reduce amount to fit balance');
            setOpen(false);
        }}
        onCancel={() => setOpen(false)}
    />
);
```

#### `OptionSwitcher` [#optionswitcher]

Compact dropdown selector — renders the current option's label and a chevron, opening a [`Select`](#select) popover with the remaining choices. Falls back to the raw `value` or `"—"` when no option matches.

| Prop         | Type                                                                     | Description                                           |
| ------------ | ------------------------------------------------------------------------ | ----------------------------------------------------- |
| `value`\*    | `string \| undefined`                                                    | Currently selected option value.                      |
| `options`\*  | <code><a href="#optionswitcheroption">OptionSwitcherOption</a>\[]</code> | Available options.                                    |
| `onChange`\* | `(value: string) => void`                                                | Called when the user picks an option.                 |
| `disabled`   | `boolean`                                                                | When true, the trigger is non-interactive and dimmed. |
| `className`  | `string`                                                                 | Extra class applied to the trigger button.            |

**Example**

```tsx
return <OptionSwitcher value={value} options={options} onChange={setValue} />;
```

#### `SettingsButton` [#settingsbutton]

Icon-only secondary button with a sliders icon — drop-in trigger for opening settings panels.

| Prop           | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `onClick`      | `() => void`         | Click handler — typically used to open a settings modal.                                                                                                                                                                                       |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`         | `ReactNode`          | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |

**Example**

```tsx
return <SettingsButton onClick={() => console.log('Open settings')} />;
```

#### `TokenSelectModal` [#tokenselectmodal]

Ready-made token picker modal — renders a search field and a sectioned list of [`CurrencyItem`](#currencyitem) rows backed by [`CurrencySelect`](#currencyselect). Search matches by symbol, name, or exact address. Selecting a row fires `onSelect`, closes the modal, and resets the search.

| Prop                | Type                                                                         | Description                                                                              |
| ------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `open`\*            | `boolean`                                                                    | Controls modal visibility.                                                               |
| `onClose`\*         | `() => void`                                                                 | Called when the modal is dismissed (selection, backdrop click, or escape).               |
| `tokens`\*          | <code>T = <a href="#appkituitoken">AppkitUIToken</a>\[]</code>               | Full set of tokens available for selection and search.                                   |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>         | Optional sectioning rules. When omitted, all tokens render as a single untitled section. |
| `onSelect`\*        | <code>(token: T = <a href="#appkituitoken">AppkitUIToken</a>) => void</code> | Called with the picked token. The modal closes and resets its search on selection.       |
| `title`\*           | `string`                                                                     | Modal header title.                                                                      |
| `searchPlaceholder` | `string`                                                                     | Placeholder shown inside the search input.                                               |

**Example**

```tsx
return (
    <TokenSelectModal
        open={open}
        onClose={() => setOpen(false)}
        tokens={tokens}
        title="Select a token"
        searchPlaceholder="Search by name or address"
        onSelect={(token) => {
            console.log('Picked:', token.symbol);
            setOpen(false);
        }}
    />
);
```

#### `TokenSelector` [#tokenselector]

Compact pill button used as the trigger for a token picker — shows the token icon (optionally with a network badge), its symbol, and a chevron unless `readOnly` is set.

| Prop           | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`\*      | `string`             | Label shown next to the icon — typically the token symbol.                                                                                                                                                                                     |
| `icon`         | `string`             | Token logo URL.                                                                                                                                                                                                                                |
| `iconFallback` | `string`             | Single-character fallback used when `icon` fails to load. Defaults to the first character of `title`.                                                                                                                                          |
| `networkIcon`  | `string`             | When provided, renders a network badge overlay on the icon.                                                                                                                                                                                    |
| `readOnly`     | `boolean`            | Hide chevron and suppress click handling — use when there's nothing to pick.                                                                                                                                                                   |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |

**Example**

```tsx
return (
    <TokenSelector
        title="GRAM"
        icon="https://cdn.example.com/gram_symbol.png"
        iconFallback="G"
        onClick={() => console.log('Open token picker')}
    />
);
```

### Staking [#staking-1]

#### `SelectUnstakeMode` [#selectunstakemode]

Collapsible selector for the unstake mode (instant / round-end / when-available). Filters options by `providerMetadata.supportedUnstakeModes` and renders nothing when only one mode is supported. Annotates the instant option with the provider's current instant-unstake limit.

| Prop                 | Type                                                                                                                          | Description                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `value`\*            | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                                    | Currently selected unstake mode (see [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)). |
| `onValueChange`\*    | <code>(mode: <a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a>) => void</code>                    | Called when the user picks a different mode.                                                              |
| `providerInfo`\*     | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>         | Dynamic provider info — used to show the instant-unstake limit when available.                            |
| `providerMetadata`\* | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Static provider metadata — supplies `supportedUnstakeModes` and stake-token formatting.                   |

**Example**

```tsx
return (
    <SelectUnstakeMode
        value={mode}
        onValueChange={setMode}
        providerMetadata={tonstakersMetadata}
        providerInfo={undefined}
    />
);
```

#### `StakingBalanceBlock` [#stakingbalanceblock]

Row showing the user's relevant balance for the current direction: wallet balance of the stake token when staking, staked balance when unstaking. Renders a token icon (native Gram when the token address is `'gram'`, otherwise a jetton icon resolved via [`useJettonInfo`](#usejettoninfo)), a label, the formatted amount with ticker, and an optional `MAX` button.

| Prop                     | Type                                                                                                                          | Description                                                                        |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `providerMetadata`\*     | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Provider metadata — supplies the stake/receive tokens (address, ticker, decimals). |
| `direction`\*            | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                  | Operation direction. Selects which token and balance to render.                    |
| `stakedBalance`          | `string`                                                                                                                      | User's currently staked amount, used when `direction === 'unstake'`.               |
| `isStakedBalanceLoading` | `boolean`                                                                                                                     | True while the staked balance is being fetched.                                    |
| `balance`                | `string`                                                                                                                      | User's wallet balance of the stake token, used when `direction === 'stake'`.       |
| `isBalanceLoading`       | `boolean`                                                                                                                     | True while the wallet balance is being fetched.                                    |
| `onMaxClick`             | `() => void`                                                                                                                  | When provided, renders a `MAX` button that invokes this callback.                  |

**Example**

```tsx
return (
    <StakingBalanceBlock
        providerMetadata={tonstakersMetadata}
        direction="stake"
        balance="12.5"
        onMaxClick={() => console.log('Use max balance')}
    />
);
```

#### `StakingInfo` [#stakinginfo]

Summary block rendered below the staking input. Shows the amount the user will receive, the provider's current APY, the stake-token to receive-token exchange rate (only when the provider has a receive token), and the provider name. The exchange-rate row always reads as `1 stakeToken = X receiveToken`, regardless of `direction`.

| Prop                      | Type                                                                                                                          | Description                                                                                                     |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `quote`\*                 | <code><a href="/applications/appkit/reference/appkit#stakingquote">StakingQuote</a> \| undefined</code>                       | Current staking quote — its `amountOut` is rendered in the "You get" row.                                       |
| `isQuoteLoading`\*        | `boolean`                                                                                                                     | True while the quote is being fetched. Swaps the "You get" value for a skeleton.                                |
| `providerInfo`\*          | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>         | Dynamic provider info — supplies APY and exchange rate.                                                         |
| `providerMetadata`\*      | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Static provider metadata — supplies token tickers/decimals and the provider name.                               |
| `isProviderInfoLoading`\* | `boolean`                                                                                                                     | True while provider info is being fetched.                                                                      |
| `direction`               | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                  | Operation direction — controls which token's decimals/ticker label the "You get" amount. Defaults to `'stake'`. |

#### `StakingSettingsModal` [#stakingsettingsmodal]

Modal that lets the user pick the active staking provider. The selection is staged locally and only committed via `onProviderChange` when the user presses `Save`. Closing the modal otherwise discards the change. Each option is labeled with the provider's metadata `name`, falling back to its `providerId` if metadata is unavailable on the given network.

| Prop                 | Type                                                                                                          | Description                                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `open`\*             | `boolean`                                                                                                     | Controls modal visibility.                                                             |
| `onClose`\*          | `() => void`                                                                                                  | Called when the user dismisses the modal or after a successful save.                   |
| `provider`\*         | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a> \| undefined</code> | Currently active staking provider — used to preselect the option when the modal opens. |
| `providers`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a>\[]</code>           | All registered staking providers to choose from.                                       |
| `onProviderChange`\* | `(providerId: string) => void`                                                                                | Invoked with the chosen `providerId` when the user saves a different selection.        |
| `network`            | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                              | Network used to resolve each provider's display name via its metadata.                 |

**Example**

```tsx
// Source `provider` and `providers` from `useStakingProvider` and
// `useStakingProviders` in real usage — they refresh as providers register
// through AppKit.
const provider: StakingProvider | undefined = undefined;
const providers: StakingProvider[] = [];
return (
    <StakingSettingsModal
        open={open}
        onClose={() => setOpen(false)}
        provider={provider}
        providers={providers}
        onProviderChange={(id) => console.log('Switch to', id)}
        network={Network.mainnet()}
    />
);
```

#### `StakingWidget` [#stakingwidget]

High-level staking widget that wires the full stake/unstake flow: pick a provider, enter an amount (with optional reverse input on supported providers), review the quote (APY, exchange rate, "you get"), then submit the transaction. Internally wraps [`StakingWidgetProvider`](#stakingwidgetprovider) around [`StakingWidgetUI`](#stakingwidgetui). Consumers can replace the UI by passing a render-prop `children` while keeping the widget's state, quoting, balance checks, and submission logic.

| Prop       | Type                                                                                                | Description                                                                                                                                                                                                                                                                                                                |
| ---------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children` | <code>(props: <a href="#stakingwidgetrenderprops">StakingWidgetRenderProps</a>) => ReactNode</code> | Optional render-prop. When provided, the default [`StakingWidgetUI`](#stakingwidgetui) is bypassed and this function is called with the full [`StakingWidgetRenderProps`](#stakingwidgetrenderprops) (context state + forwarded `<div>` props), letting consumers build a custom UI on top of the widget's internal logic. |
| `network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                    | Network used for quote fetching, balance reads, and transactions. Falls back to the connected wallet's network when omitted.                                                                                                                                                                                               |

**Example**

```tsx
// Falls back to the connected wallet's network when `network` is omitted.
// Make sure a staking provider (e.g. Tonstakers) is registered on AppKit.
return <StakingWidget />;
```

#### `StakingWidgetProvider` [#stakingwidgetprovider]

Headless provider that drives the staking-widget flow — owns the input state (amount, direction, unstake mode, reverse-input toggle), fetches quotes and balances, validates the input, and builds + submits the transaction with a low-balance guard. Children read everything through [`useStakingContext`](#usestakingcontext); pair with [`StakingWidgetUI`](#stakingwidgetui) (or pass a custom UI to [`StakingWidget`](#stakingwidget)'s `children`).

| Prop      | Type                                                                             | Description                                                                                                                  |
| --------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | Network used for quote fetching, balance reads, and transactions. Falls back to the connected wallet's network when omitted. |

#### `StakingWidgetUI` [#stakingwidgetui]

Default staking-widget UI. Renders a stake/unstake tabbed layout: a centered amount input with optional reversed input, a [`StakingBalanceBlock`](#stakingbalanceblock) for the relevant balance, the submit button (wired through `ButtonWithConnect` so a disconnected user is prompted to connect first), a settings button that opens [`StakingSettingsModal`](#stakingsettingsmodal), the unstake-mode picker ([`SelectUnstakeMode`](#selectunstakemode), unstake tab only), and a [`StakingInfo`](#stakinginfo) summary. A [`LowBalanceModal`](#lowbalancemodal) surfaces when the built transaction would exceed the user's Gram balance. All state is consumed from props — typically supplied by [`StakingWidgetProvider`](#stakingwidgetprovider).

| Prop                        | Type                                                                                                                              | Description                                                                                                                                               |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`\*                  | `string`                                                                                                                          | Amount the user wants to stake (string to preserve input UX)                                                                                              |
| `canSubmit`\*               | `boolean`                                                                                                                         | Whether the user can proceed with staking (checks balance, amount validity, etc.)                                                                         |
| `quote`\*                   | <code><a href="/applications/appkit/reference/appkit#stakingquote">StakingQuote</a> \| undefined</code>                           | Raw staking quote from the provider                                                                                                                       |
| `isQuoteLoading`\*          | `boolean`                                                                                                                         | True while the stake quote is being fetched                                                                                                               |
| `error`\*                   | `string \| null`                                                                                                                  | Current validation/fetch error for staking, null when everything is ok                                                                                    |
| `providerInfo`\*            | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>             | Staking provider dynamic info (APY, instant unstake availability, etc.)                                                                                   |
| `providerMetadata`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code>     | Staking provider static metadata                                                                                                                          |
| `stakingProvider`\*         | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a> \| undefined</code>                     | Currently selected staking provider (defaults to the first registered one)                                                                                |
| `stakingProviders`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a>\[]</code>                               | All registered staking providers                                                                                                                          |
| `setStakingProviderId`\*    | `(providerId: string) => void`                                                                                                    | Updates the selected staking provider                                                                                                                     |
| `network`\*                 | <code><a href="/applications/appkit/reference/appkit#network">Network</a> \| undefined</code>                                     | Network the widget is operating on (resolved from prop or wallet)                                                                                         |
| `direction`\*               | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                      | Current operation direction: 'stake' or 'unstake'                                                                                                         |
| `isProviderInfoLoading`\*   | `boolean`                                                                                                                         | True while provider info is being fetched                                                                                                                 |
| `balance`\*                 | `string \| undefined`                                                                                                             | Base balance (native or jetton) available for staking                                                                                                     |
| `isBalanceLoading`\*        | `boolean`                                                                                                                         | True while base balance is being fetched                                                                                                                  |
| `stakedBalance`\*           | <code><a href="/applications/appkit/reference/appkit#stakingbalance">StakingBalance</a> \| undefined</code>                       | User's currently staked balance                                                                                                                           |
| `isStakedBalanceLoading`\*  | `boolean`                                                                                                                         | True while staked balance is being fetched                                                                                                                |
| `unstakeMode`\*             | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                                        | Selected unstake-timing mode — `'INSTANT'`, `'WHEN_AVAILABLE'`, or `'ROUND_END'`. See [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). |
| `setAmount`\*               | `(amount: string) => void`                                                                                                        | Sets the input amount                                                                                                                                     |
| `setUnstakeMode`\*          | <code>(mode: <a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a>) => void</code>                        | Sets the unstake mode                                                                                                                                     |
| `sendTransaction`\*         | `() => Promise<void>`                                                                                                             | Triggers the staking/unstaking transaction                                                                                                                |
| `onChangeDirection`\*       | <code>(direction: <a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a>) => void</code> | Changes the direction (stake/unstake)                                                                                                                     |
| `isSendingTransaction`\*    | `boolean`                                                                                                                         | True while a transaction is being processed                                                                                                               |
| `isReversed`\*              | `boolean`                                                                                                                         | True if the user is inputting the output amount ("I want to get X")                                                                                       |
| `toggleReversed`\*          | `() => void`                                                                                                                      | Toggles between inputting from amount and output amount                                                                                                   |
| `reversedAmount`\*          | `string`                                                                                                                          | Amount displayed in the reversed (bottom) input                                                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                                                      | Sets the input amount to the maximum available balance (leaves room for Gram gas on native stake)                                                         |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                                                         | True when the built transaction outflow exceeds the user's Gram balance                                                                                   |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                                             | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.                                                            |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                                          | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op.                                                  |
| `onLowBalanceChange`\*      | `() => void`                                                                                                                      | Replace the input with a value that fits within the current Gram balance and close the warning.                                                           |
| `onLowBalanceCancel`\*      | `() => void`                                                                                                                      | Dismiss the low-balance warning without changing the input.                                                                                               |

### Swap [#swap-1]

#### `SwapField` [#swapfield]

One row of the swap form. Renders the amount input, fiat conversion, balance line, and a token-selector chip. The `pay` variant is editable and exposes a "max" shortcut. The `receive` variant is read-only and shows the quote result.

| Prop                   | Type                                                    | Description                                                                                                                             |     |                           |
| ---------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------- |
| `type`\*               | `'pay' \| 'receive'`                                    | `pay` renders the editable source row with a "max" shortcut. `receive` renders the read-only target row.                                |     |                           |
| `amount`\*             | `string`                                                | Current amount shown in the input as a human-readable decimal string.                                                                   |     |                           |
| `fiatSymbol`           | `string`                                                | Fiat currency symbol displayed in front of the converted value. Defaults to `"$"`.                                                      |     |                           |
| `token`                | <code><a href="#appkituitoken">AppkitUIToken</a></code> | Currently selected token. Controls the token selector label, balance formatting and fiat conversion.                                    |     |                           |
| `onAmountChange`       | `(value: string) => void`                               | Called with the raw input value when the user edits the amount. Only fired for `type: "pay"`.                                           |     |                           |
| `balance`              | `string`                                                | Formatted balance of `token` for the active wallet, as a human-readable decimal string. Rendered in the balance line beneath the input. |     |                           |
| `isBalanceLoading`     | `boolean`                                               | When true, the balance area renders a skeleton placeholder instead of the value.                                                        |     |                           |
| `loading`              | `boolean`                                               | When true, the underlying input renders its loading state — used while a fresh quote is in flight.                                      |     |                           |
| `onMaxClick`           | `() => void`                                            | Called when the user clicks the "max" shortcut to fill the maximum spendable amount.                                                    |     |                           |
| `onTokenSelectorClick` | `() => void`                                            | Called when the user clicks the token selector chip — typically opens a `SwapTokenSelectModal`.                                         |     |                           |
| `size`                 | `InputSize`                                             | Size token applied to the input control(s) inside: \`'s'                                                                                | 'm' | 'l'`. Defaults to `'m'\`. |
| `variant`              | `InputVariant`                                          | Visual variant: `'default'` paints a filled field. `'unstyled'` drops the chrome.                                                       |     |                           |
| `disabled`             | `boolean`                                               | When true, descendant input controls are disabled.                                                                                      |     |                           |
| `error`                | `boolean`                                               | When true, the field renders in error styling and [`Input.Caption`](#input) switches to error text.                                     |     |                           |
| `resizable`            | `boolean`                                               | When true, [`Input.Input`](#input) scales its font down to fit the available width as the user types.                                   |     |                           |

**Example**

```tsx
return (
    <SwapField
        type="pay"
        amount={amount}
        onAmountChange={setAmount}
        token={ton}
        balance="12.5"
        onMaxClick={() => setAmount('12.5')}
        onTokenSelectorClick={() => console.log('Open token picker')}
    />
);
```

#### `SwapFlipButton` [#swapflipbutton]

Round button rendered between the source and target [`SwapField`](#swapfield) rows. Clicking it flips the selected tokens. Visual rotation is driven by `rotated`.

| Prop      | Type         | Description                                                                                                                               |
| --------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `onClick` | `() => void` | Called when the user clicks the button. Wire this to a handler that swaps the source/target tokens (e.g. `onFlip` from the swap context). |
| `rotated` | `boolean`    | When true, the icon is drawn in its rotated state — used to animate between flips.                                                        |

**Example**

```tsx
// Drop it between the source and target `SwapField` rows. Wire `onClick` to your token-flip handler.
return <SwapFlipButton rotated={rotated} onClick={() => setRotated((prev) => !prev)} />;
```

#### `SwapInfo` [#swapinfo]

Summary block rendered under the swap form. Shows the minimum amount the user is guaranteed to receive after slippage, the configured slippage tolerance, and the active [`SwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

| Prop             | Type                                                                                       | Description                                                                                                                      |
| ---------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `toToken`\*      | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                            | Target token the user is receiving. Used to format `minReceived` with the right decimals and symbol.                             |
| `slippage`\*     | `number`                                                                                   | Slippage tolerance in basis points (`100` = 1%). Rendered as a percentage.                                                       |
| `provider`       | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a></code> | Current [`SwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). Its display name is shown in the provider row.     |
| `quote`          | <code><a href="/applications/appkit/reference/appkit#swapquote">SwapQuote</a></code>       | Quote whose `minReceived` value is displayed. When undefined the value falls back to `0` (still suffixed with the token symbol). |
| `isQuoteLoading` | `boolean`                                                                                  | When true, the minimum-received value renders a skeleton placeholder instead of the formatted number.                            |

**Example**

```tsx
// In the swap widget `quote` and `provider` come from `useSwapContext`; until
// those resolve the min-received row shows `0 USDT` and the provider row a
// skeleton placeholder.
return <SwapInfo toToken={toToken} slippage={100} />;
```

#### `SwapWidget` [#swapwidget]

Drop-in swap UI that walks the user through picking the source/target tokens, entering an amount, reviewing the quote (rate, min-received, slippage, provider), and confirming the swap — which builds the transaction via [`useBuildSwapTransaction`](#usebuildswaptransaction) and dispatches it through the standard send flow. Internally mounts a [`SwapWidgetProvider`](#swapwidgetprovider) so the rendered UI (default [`SwapWidgetUI`](#swapwidgetui) or a custom `children` render-prop) can read state through [`useSwapContext`](#useswapcontext).

| Prop                | Type                                                                                          | Description                                                                                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children`          | <code>(props: <a href="#swapwidgetrenderprops">SwapWidgetRenderProps</a>) => ReactNode</code> | Optional render-prop receiving the full swap context plus the forwarded `<div>` props. When supplied it replaces the default [`SwapWidgetUI`](#swapwidgetui). |
| `network`           | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>              | Network used for quote fetching and balance reads. When omitted, falls back to the selected wallet's network via [`useNetwork`](#usenetwork).                 |
| `tokens`\*          | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                                    | Full list of tokens available for swapping in the UI. Filtered to the active network internally.                                                              |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>                          | Optional section configs for grouping tokens inside the `SwapTokenSelectModal`.                                                                               |
| `defaultFromSymbol` | `string`                                                                                      | Symbol of the token pre-selected as the source on first mount (e.g. `"GRAM"`).                                                                                |
| `defaultToSymbol`   | `string`                                                                                      | Symbol of the token pre-selected as the target on first mount.                                                                                                |
| `fiatSymbol`        | `string`                                                                                      | Fiat currency symbol displayed next to converted amounts. Defaults to `"$"`.                                                                                  |
| `defaultSlippage`   | `number`                                                                                      | Initial slippage tolerance in basis points (`100` = 1%). Defaults to `100`.                                                                                   |

**Example**

```tsx
// Make sure a swap provider (e.g. DeDust / Omniston) is registered on AppKit.
return <SwapWidget tokens={tokens} defaultFromSymbol="GRAM" defaultToSymbol="USDT" defaultSlippage={100} />;
```

#### `SwapWidgetProvider` [#swapwidgetprovider]

Provider that wires up the full swap state machine — debounces the entered amount, fetches the quote via [`useSwapQuote`](#useswapquote), reads source/target balances, validates the input, exposes the active [`SwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), and offers `sendSwapTransaction` which builds the transaction with [`useBuildSwapTransaction`](#usebuildswaptransaction) and sends it (raising the low-balance warning when the outflow exceeds the user's Gram balance). Children read everything through [`useSwapContext`](#useswapcontext).

| Prop                | Type                                                                             | Description                                                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `tokens`\*          | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                       | Full list of tokens available for swapping in the UI. Filtered to the active network internally.                                              |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>             | Optional section configs for grouping tokens inside the `SwapTokenSelectModal`.                                                               |
| `defaultFromSymbol` | `string`                                                                         | Symbol of the token pre-selected as the source on first mount (e.g. `"GRAM"`).                                                                |
| `defaultToSymbol`   | `string`                                                                         | Symbol of the token pre-selected as the target on first mount.                                                                                |
| `network`           | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | Network used for quote fetching and balance reads. When omitted, falls back to the selected wallet's network via [`useNetwork`](#usenetwork). |
| `fiatSymbol`        | `string`                                                                         | Fiat currency symbol displayed next to converted amounts. Defaults to `"$"`.                                                                  |
| `defaultSlippage`   | `number`                                                                         | Initial slippage tolerance in basis points (`100` = 1%). Defaults to `100`.                                                                   |

#### `SwapWidgetUI` [#swapwidgetui]

Default visual implementation of the swap widget — composes [`SwapField`](#swapfield) (source, then target), a [`SwapFlipButton`](#swapflipbutton) between them, the submit button (auto-prompts wallet connect when no wallet is selected), the settings trigger that opens `SwapSettingsModal`, a `SwapTokenSelectModal` for picking source/target tokens, the [`SwapInfo`](#swapinfo) summary, and a low-balance warning. Drives all state from the swap context props it receives — pair with [`SwapWidgetProvider`](#swapwidgetprovider), or use [`SwapWidget`](#swapwidget) which mounts both.

| Prop                        | Type                                                                                                    | Description                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `tokens`\*                  | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                                              | Full list of available tokens for swapping                                                               |
| `tokenSections`             | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>                                    | Optional section configs for grouping tokens in the selector                                             |
| `fromToken`\*               | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected source token                                                                          |
| `toToken`\*                 | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected target token                                                                          |
| `fromAmount`\*              | `string`                                                                                                | Amount the user wants to swap (string to preserve input UX)                                              |
| `toAmount`\*                | `string`                                                                                                | Calculated receive amount from the current quote                                                         |
| `fiatSymbol`\*              | `string`                                                                                                | Fiat currency symbol for price display, e.g. "\$"                                                        |
| `fromBalance`\*             | `string \| undefined`                                                                                   | User's balance of the "from" token                                                                       |
| `toBalance`\*               | `string \| undefined`                                                                                   | User's balance of the "to" token                                                                         |
| `isFromBalanceLoading`\*    | `boolean`                                                                                               | True while the "from" balance is being fetched                                                           |
| `isToBalanceLoading`\*      | `boolean`                                                                                               | True while the "to" balance is being fetched                                                             |
| `canSubmit`\*               | `boolean`                                                                                               | Whether the user can proceed with the swap (checks balance, amount, quote)                               |
| `quote`\*                   | `GetSwapQuoteData \| undefined`                                                                         | Raw swap quote from the provider                                                                         |
| `isQuoteLoading`\*          | `boolean`                                                                                               | True while the quote is being fetched from the API                                                       |
| `error`\*                   | `string \| null`                                                                                        | Current validation or fetch error, null when everything is ok                                            |
| `slippage`\*                | `number`                                                                                                | Slippage tolerance in basis points (100 = 1%)                                                            |
| `swapProvider`\*            | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a> \| undefined</code> | Currently selected swap provider (defaults to the first registered one)                                  |
| `swapProviders`\*           | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a>\[]</code>           | All registered swap providers                                                                            |
| `setSwapProviderId`\*       | `(providerId: string) => void`                                                                          | Updates the selected swap provider                                                                       |
| `setFromToken`\*            | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the source token                                                                                 |
| `setToToken`\*              | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the target token                                                                                 |
| `setFromAmount`\*           | `(amount: string) => void`                                                                              | Updates the swap amount                                                                                  |
| `setSlippage`\*             | `(slippage: number) => void`                                                                            | Updates the slippage tolerance                                                                           |
| `onFlip`\*                  | `() => void`                                                                                            | Swaps source and target tokens                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                            | Sets the "from" amount to the maximum available balance                                                  |
| `sendSwapTransaction`\*     | `() => Promise<void>`                                                                                   | Executes the swap transaction                                                                            |
| `isSendingTransaction`\*    | `boolean`                                                                                               | True while a transaction is being built or sent                                                          |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                               | True when the built transaction outflow exceeds the user's Gram balance                                  |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                   | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.           |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op. |
| `onLowBalanceChange`\*      | `() => void`                                                                                            | Replace the input with a value that fits within the current Gram balance and close the warning.          |
| `onLowBalanceCancel`\*      | `() => void`                                                                                            | Dismiss the low-balance warning without changing the input.                                              |

### UI [#ui]

#### `Block` [#block]

Flex container primitive — renders a `<div>` that lays its children out vertically (`'column'`) or horizontally (`'row'`).

| Prop        | Type                | Description                                          |
| ----------- | ------------------- | ---------------------------------------------------- |
| `direction` | `'row' \| 'column'` | Flex direction of the block. Defaults to `'column'`. |

**Example**

```tsx
return (
    <Block direction="row">
        <span>Left</span>
        <span>Right</span>
    </Block>
);
```

#### `Button` [#button]

Themed `<button>` with size, border-radius, and variant tokens. Renders an optional leading `icon`, swaps content for a spinner while `loading`, and is disabled whenever `disabled` or `loading` is true.

| Prop           | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`         | `ReactNode`          | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |

**Example**

```tsx
return (
    <Button size="m" variant="fill" onClick={() => console.log('Clicked')}>
        Send transaction
    </Button>
);
```

#### `CenteredAmountInput` [#centeredamountinput]

Center-aligned, auto-resizing amount input with optional leading symbol and trailing ticker. Scales the font down to fit the container when the rendered text overflows, and clicking the wrapper focuses the input.

| Prop              | Type                      | Description                                                   |
| ----------------- | ------------------------- | ------------------------------------------------------------- |
| `value`\*         | `string`                  | Controlled input value (decimal string).                      |
| `onValueChange`\* | `(value: string) => void` | Called with the new string whenever the user edits the input. |
| `ticker`          | `string`                  | Optional trailing ticker label (e.g., `'GRAM'`).              |
| `symbol`          | `string`                  | Optional leading currency symbol (e.g., `'$'`).               |
| `placeholder`     | `string`                  | Placeholder shown when `value` is empty. Defaults to `'0'`.   |
| `disabled`        | `boolean`                 | When true, the underlying `<input>` is disabled.              |

**Example**

```tsx
return <CenteredAmountInput value={amount} onValueChange={setAmount} ticker="GRAM" placeholder="0" />;
```

#### `Collapsible` [#collapsible]

Animated collapsible container — transitions its height between `0` and the content's natural height when `open` toggles. Sets `aria-hidden` to mirror the open state.

| Prop     | Type      | Description                                                                     |
| -------- | --------- | ------------------------------------------------------------------------------- |
| `open`\* | `boolean` | When true, the content is expanded. When false, it is collapsed to zero height. |

**Example**

```tsx
return (
    <div>
        <button onClick={() => setOpen((prev) => !prev)}>{open ? 'Hide details' : 'Show details'}</button>
        <Collapsible open={open}>
            <p>Hidden details about the transaction.</p>
        </Collapsible>
    </div>
);
```

#### `InfoBlock` [#infoblock]

Compound component for rendering a stacked list of label/value rows (e.g., transaction details, settings summaries). Sub-components forward extra props to the underlying DOM element so callers can layer custom classes and handlers.

**Members**

| Member                    | Description                                                                                                               |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `InfoBlock.Container`     | Outer wrapper — vertical container that hosts the rows.                                                                   |
| `InfoBlock.Row`           | Horizontal row that pairs a label with a value.                                                                           |
| `InfoBlock.Label`         | Label cell — typically the muted descriptor on the left.                                                                  |
| `InfoBlock.Value`         | Value cell — typically the emphasized content on the right.                                                               |
| `InfoBlock.LabelSkeleton` | Skeleton placeholder for a [`InfoBlock.Label`](#infoblock) while data is loading. Defaults to `width=64`, `height='1lh'`. |
| `InfoBlock.ValueSkeleton` | Skeleton placeholder for a [`InfoBlock.Value`](#infoblock) while data is loading. Defaults to `width=80`, `height='1lh'`. |

**Example**

```tsx
return (
    <InfoBlock.Container>
        <InfoBlock.Row>
            <InfoBlock.Label>Rate</InfoBlock.Label>
            <InfoBlock.Value>1 GRAM ≈ $5.43</InfoBlock.Value>
        </InfoBlock.Row>
        <InfoBlock.Row>
            <InfoBlock.Label>Network fee</InfoBlock.Label>
            <InfoBlock.Value>0.01 GRAM</InfoBlock.Value>
        </InfoBlock.Row>
    </InfoBlock.Container>
);
```

#### `Input` [#input]

Compound text-input component. Use the default export as the outer wrapper (it is the [`Input.Container`](#input)) and compose sub-components for the header, field, slots, control, and caption. State flags (`disabled`, `error`, `loading`, `resizable`, `size`) live on the container and are read by the inner control via context.

**Members**

| Member            | Description                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------------- |
| `Input.Container` | Outer wrapper that provides input context (size, variant, disabled, error, loading, resizable).                   |
| `Input.Header`    | Header row above the field — holds the title and optional trailing controls.                                      |
| `Input.Title`     | Title text shown inside [`Input.Header`](#input).                                                                 |
| `Input.Field`     | Horizontal row that holds slots and the input control.                                                            |
| `Input.Slot`      | Side-anchored slot used for adornments such as icons or buttons.                                                  |
| `Input.Input`     | The actual `<input>` control. Respects context flags and reads its size/variant from [`Input.Container`](#input). |
| `Input.Caption`   | Caption / helper text below the field. Switches to error styling when the container has `error` set.              |

**Example**

```tsx
return (
    <Input size="m">
        <Input.Header>
            <Input.Title>Recipient</Input.Title>
        </Input.Header>
        <Input.Field>
            <Input.Input value={value} onChange={(event) => setValue(event.target.value)} placeholder="EQ..." />
        </Input.Field>
        <Input.Caption>Paste a GRAM wallet address.</Input.Caption>
    </Input>
);
```

#### `Logo` [#logo]

Square logo / avatar primitive — renders an `<img>` when `src` loads successfully, otherwise shows a text fallback (after a brief delay to avoid flicker). Useful for token icons, wallet avatars, and project logos.

| Prop       | Type     | Description                                                                                                                                                             |
| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `size`     | `number` | Square size in pixels for the rendered logo. Defaults to `30`.                                                                                                          |
| `src`      | `string` | Image URL to render. While loading or on failure, the fallback is shown.                                                                                                |
| `alt`      | `string` | Alt text passed to the underlying `<img>`. When `fallback` is not provided, its first character is shown as the fallback. If both are missing, no fallback is rendered. |
| `fallback` | `string` | Text shown in place of the image when `src` fails or is missing (defaults to the first character of `alt`).                                                             |

**Example**

```tsx
return <Logo size={48} src="https://cdn.example.com/gram_symbol.png" alt="GRAM" fallback="G" />;
```

#### `LogoWithNetwork` [#logowithnetwork]

Token logo with an overlaid network badge — wraps [`Logo`](#logo) and renders a smaller secondary logo as a corner badge to indicate which network the asset belongs to.

| Prop         | Type     | Description                                                                                    |
| ------------ | -------- | ---------------------------------------------------------------------------------------------- |
| `size`       | `number` | Size of the main logo in pixels. Defaults to `30`. The network badge is sized to `size * 0.4`. |
| `src`        | `string` | Image source for the main logo.                                                                |
| `alt`        | `string` | Alt text for the main logo.                                                                    |
| `fallback`   | `string` | Fallback text shown when the main logo image fails or is missing.                              |
| `networkSrc` | `string` | Image source for the network badge overlay. When omitted, the badge is not rendered.           |
| `networkAlt` | `string` | Alt text for the network badge.                                                                |

**Example**

```tsx
return (
    <LogoWithNetwork
        size={48}
        src="https://cdn.example.com/usdt.png"
        alt="USDT"
        fallback="U"
        networkSrc="https://cdn.example.com/gram_symbol.png"
        networkAlt="GRAM"
    />
);
```

#### `Modal` [#modal]

Centered modal dialog with a header (optional title + close button) and a scrollable body. Clicking the overlay closes the modal. Clicks on the content do not bubble through.

| Prop            | Type                      | Description                                                                                      |
| --------------- | ------------------------- | ------------------------------------------------------------------------------------------------ |
| `open`          | `boolean`                 | Controlled open state.                                                                           |
| `onOpenChange`  | `(open: boolean) => void` | Called whenever the open state changes (e.g., via the close button, overlay click, or `Escape`). |
| `title`         | `string`                  | Optional title rendered in the modal header.                                                     |
| `children`      | `ReactNode`               | Modal body content.                                                                              |
| `className`     | `string`                  | Additional class name applied to the content container.                                          |
| `bodyClassName` | `string`                  | Additional class name applied to the body container.                                             |

**Example**

```tsx
return (
    <div>
        <button onClick={() => setOpen(true)}>Open modal</button>
        <Modal open={open} onOpenChange={setOpen} title="Confirm action">
            <p>Are you sure you want to proceed?</p>
        </Modal>
    </div>
);
```

#### `Select` [#select]

Compound select / dropdown component with controlled or uncontrolled state. The content is portaled to `document.body` and positioned relative to the trigger. Closes on outside click, `Escape`, or item selection.

**Members**

| Member           | Description                                                                                               |
| ---------------- | --------------------------------------------------------------------------------------------------------- |
| `Select.Root`    | Provider that owns the selected value and open state, controlled or uncontrolled.                         |
| `Select.Trigger` | [`Button`](#button)-based trigger that toggles the popover and exposes `aria-expanded`.                   |
| `Select.Content` | Portaled popover that renders the list of items. Positioned under the trigger with optional `sideOffset`. |
| `Select.Item`    | Selectable option row. Commits its `value` to the root on click.                                          |

**Example**

```tsx
return (
    <Select.Root value={value} onValueChange={setValue}>
        <Select.Trigger>{value === 'mainnet' ? 'Mainnet' : 'Testnet'}</Select.Trigger>
        <Select.Content>
            <Select.Item value="mainnet">Mainnet</Select.Item>
            <Select.Item value="testnet">Testnet</Select.Item>
        </Select.Content>
    </Select.Root>
);
```

#### `Skeleton` [#skeleton]

Animated placeholder block used while data is loading. Supply `width` / `height` to match the dimensions of the eventual content.

| Prop     | Type               | Description                                                                                  |
| -------- | ------------------ | -------------------------------------------------------------------------------------------- |
| `width`  | `string \| number` | Width of the placeholder. Accepts any valid CSS length or a number (interpreted as pixels).  |
| `height` | `string \| number` | Height of the placeholder. Accepts any valid CSS length or a number (interpreted as pixels). |

**Example**

```tsx
return <Skeleton width={120} height="1.2em" />;
```

#### `Tabs` [#tabs]

Root tabs container — owns the active value (controlled or uncontrolled) and shares it with descendant [`TabsList`](#tabslist), [`TabsTrigger`](#tabstrigger), and [`TabsContent`](#tabscontent) via context.

| Prop            | Type                      | Description                                                                                                                                   |
| --------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`         | `string`                  | Controlled active tab value.                                                                                                                  |
| `defaultValue`  | `string`                  | Initial active tab when uncontrolled. Defaults to `''`.                                                                                       |
| `onValueChange` | `(value: string) => void` | Called whenever the active tab changes.                                                                                                       |
| `children`\*    | `ReactNode`               | Compound sub-components — typically [`TabsList`](#tabslist) (with [`TabsTrigger`](#tabstrigger)s) followed by [`TabsContent`](#tabscontent)s. |

**Example**

```tsx
return (
    <Tabs value={tab} onValueChange={setTab}>
        <TabsList>
            <TabsTrigger value="stake">Stake</TabsTrigger>
            <TabsTrigger value="unstake">Unstake</TabsTrigger>
        </TabsList>
        <TabsContent value="stake">
            <p>Stake your GRAM to earn rewards.</p>
        </TabsContent>
        <TabsContent value="unstake">
            <p>Withdraw your staked GRAM.</p>
        </TabsContent>
    </Tabs>
);
```

#### `TabsContent` [#tabscontent]

Tab panel rendered with `role="tabpanel"`. Returns `null` unless its `value` matches the active [`Tabs`](#tabs) value.

| Prop         | Type        | Description                                                                                           |
| ------------ | ----------- | ----------------------------------------------------------------------------------------------------- |
| `value`\*    | `string`    | Value this panel is associated with — rendered only when the parent [`Tabs`](#tabs) is on this value. |
| `children`\* | `ReactNode` | Panel content.                                                                                        |

#### `TabsList` [#tabslist]

Horizontal list of tab triggers with `role="tablist"`.

| Prop         | Type        | Description                                                          |
| ------------ | ----------- | -------------------------------------------------------------------- |
| `children`\* | `ReactNode` | Tab triggers — typically one or more [`TabsTrigger`](#tabstrigger)s. |

#### `TabsTrigger` [#tabstrigger]

Tab trigger button with `role="tab"`. Activates its `value` on click and reflects active state via `aria-selected` and `data-state`.

| Prop         | Type        | Description                                                                   |
| ------------ | ----------- | ----------------------------------------------------------------------------- |
| `value`\*    | `string`    | Value committed to the parent [`Tabs`](#tabs) when this trigger is activated. |
| `children`\* | `ReactNode` | Trigger label / content.                                                      |

#### `TonIcon` [#tonicon]

TON brand diamond glyph — solid, inherits color from `currentColor`.

| Prop   | Type     | Description                                                                               |
| ------ | -------- | ----------------------------------------------------------------------------------------- |
| `size` | `number` | Square size of the icon in pixels. Defaults to [`DEFAULT_ICON_SIZE`](#default_icon_size). |

#### `TonIconCircle` [#toniconcircle]

TON brand glyph rendered inside a filled circle, using the TON brand color token.

| Prop   | Type     | Description                                                                               |
| ------ | -------- | ----------------------------------------------------------------------------------------- |
| `size` | `number` | Square size of the icon in pixels. Defaults to [`DEFAULT_ICON_SIZE`](#default_icon_size). |

## Type [#type]

### Balances [#balances-2]

#### `SendJettonButtonProps` [#sendjettonbuttonprops]

Props accepted by [`SendJettonButton`](#sendjettonbutton) — extends the base `Send` button props (button text, sizing, callbacks) with the jetton-transfer details.

| Field                | Type                                                                                                                                     | Description                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipientAddress`\* | `string`                                                                                                                                 | Recipient address.                                                                                                                                                                                                                             |
| `amount`\*           | `string`                                                                                                                                 | Amount in jetton units as a human-readable decimal string. Converted to raw smallest units via `jetton.decimals`.                                                                                                                              |
| `jetton`\*           | `{ address: string; symbol: string; decimals: number; }`                                                                                 | Jetton master metadata — `address` (master contract), `symbol` (rendered in the button label) and `decimals` (used to format `amount`).                                                                                                        |
| `comment`            | `string`                                                                                                                                 | Optional human-readable comment attached to the transfer.                                                                                                                                                                                      |
| `text`               | `ReactNode`                                                                                                                              | Override the button label. Defaults to "Send".                                                                                                                                                                                                 |
| `size`               | `ButtonSize`                                                                                                                             | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius`       | `ButtonBorderRadius`                                                                                                                     | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`            | `ButtonVariant`                                                                                                                          | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`            | `boolean`                                                                                                                                | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`          | `boolean`                                                                                                                                | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`               | `ReactNode`                                                                                                                              | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |
| `children`           | `(props: SendRenderProps) => ReactNode`                                                                                                  | Custom render function — replaces the default button with the caller's UI. Receives the current send state and click handler via [`SendRenderProps`](#sendrenderprops).                                                                        |
| `onError`            | `(error: Error) => void`                                                                                                                 | Called when the wallet rejects the request or the send fails. Receives the raised `Error`.                                                                                                                                                     |
| `onSuccess`          | <code>(response: <a href="/applications/appkit/reference/appkit#sendtransactionreturntype">SendTransactionReturnType</a>) => void</code> | Called once the transaction is broadcast. Receives the wallet's [`SendTransactionReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (BoC + normalized hash).                                                        |

#### `SendTonButtonProps` [#sendtonbuttonprops]

Props accepted by [`SendTonButton`](#sendtonbutton) — extends the base `Send` button props (button text, sizing, callbacks) with the Gram transfer details.

| Field                | Type                                                                                                                                     | Description                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `recipientAddress`\* | `string`                                                                                                                                 | Recipient address.                                                                                                                                                                                                                             |
| `amount`\*           | `string`                                                                                                                                 | Amount in Gram as a human-readable decimal string (e.g., `"1.5"`). Converted to nanograms internally.                                                                                                                                          |
| `comment`            | `string`                                                                                                                                 | Optional human-readable comment attached to the transfer.                                                                                                                                                                                      |
| `text`               | `ReactNode`                                                                                                                              | Override the button label. Defaults to "Send".                                                                                                                                                                                                 |
| `size`               | `ButtonSize`                                                                                                                             | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius`       | `ButtonBorderRadius`                                                                                                                     | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`            | `ButtonVariant`                                                                                                                          | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`            | `boolean`                                                                                                                                | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`          | `boolean`                                                                                                                                | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`               | `ReactNode`                                                                                                                              | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |
| `children`           | `(props: SendRenderProps) => ReactNode`                                                                                                  | Custom render function — replaces the default button with the caller's UI. Receives the current send state and click handler via [`SendRenderProps`](#sendrenderprops).                                                                        |
| `onError`            | `(error: Error) => void`                                                                                                                 | Called when the wallet rejects the request or the send fails. Receives the raised `Error`.                                                                                                                                                     |
| `onSuccess`          | <code>(response: <a href="/applications/appkit/reference/appkit#sendtransactionreturntype">SendTransactionReturnType</a>) => void</code> | Called once the transaction is broadcast. Receives the wallet's [`SendTransactionReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (BoC + normalized hash).                                                        |

#### `UseBalanceByAddressParameters` [#usebalancebyaddressparameters]

Parameters accepted by [`useBalanceByAddress`](#usebalancebyaddress) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the target address and optional network override.

| Field     | Type                                                                                                                | Description                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Wallet address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

#### `UseBalanceByAddressReturnType` [#usebalancebyaddressreturntype]

Return type of [`useBalanceByAddress`](#usebalancebyaddress) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseBalanceByAddressReturnType = UseQueryReturnType<
    selectData,
    GetBalanceErrorType
>;
```

#### `UseBalanceParameters` [#usebalanceparameters]

Parameters accepted by [`useBalance`](#usebalance) — same shape as [`UseBalanceByAddressParameters`](#usebalancebyaddressparameters). The hook resolves `address` from the selected wallet and overrides any value supplied here.

| Field     | Type                                                                                                                | Description                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Wallet address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

#### `UseBalanceReturnType` [#usebalancereturntype]

Return type of [`useBalance`](#usebalance) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseBalanceReturnType = UseBalanceByAddressReturnType<selectData>;
```

#### `UseWatchBalanceByAddressParameters` [#usewatchbalancebyaddressparameters]

Parameters accepted by [`useWatchBalanceByAddress`](#usewatchbalancebyaddress) — same fields as [`WatchBalanceByAddressOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), all optional so callers can render the hook before the address is known.

```ts
type UseWatchBalanceByAddressParameters = Partial<WatchBalanceByAddressOptions>;
```

#### `UseWatchBalanceParameters` [#usewatchbalanceparameters]

Parameters accepted by [`useWatchBalance`](#usewatchbalance) — same fields as [`UseWatchBalanceByAddressParameters`](#usewatchbalancebyaddressparameters) minus `address`, which the hook resolves from the selected wallet.

```ts
type UseWatchBalanceParameters = Omit<UseWatchBalanceByAddressParameters, 'address'>;
```

### Connectors [#connectors-1]

#### `UseConnectorsReturnType` [#useconnectorsreturntype]

Return type of [`useConnectors`](#useconnectors) — same shape as [`GetConnectorsReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseConnectorsReturnType = GetConnectorsReturnType;
```

### Crypto on-ramp [#crypto-on-ramp-2]

#### `ChainInfo` [#chaininfo]

Display info for a CAIP-2 chain — used by the crypto onramp widget to render chain names and logos.

| Field    | Type     | Description                                                      |
| -------- | -------- | ---------------------------------------------------------------- |
| `name`\* | `string` | Human-readable chain name (e.g. `"Ethereum"`, `"Arbitrum One"`). |
| `logo`   | `string` | Optional logo URL for the chain.                                 |

#### `CryptoAmountInputMode` [#cryptoamountinputmode]

Which side the amount input is currently denominated in — `token` means the user is entering the target-token amount, `method` means they are entering the source payment-method amount.

```ts
type CryptoAmountInputMode = 'token' | 'method';
```

#### `CryptoOnrampContextType` [#cryptoonrampcontexttype]

Shape of the `CryptoOnrampContext` value — selection state, quote/deposit data and actions exposed by [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider) to the widget UI (and to custom render callbacks passed to [`CryptoOnrampWidget`](#cryptoonrampwidget)).

| Field                         | Type                                                                                                             | Description                                                                                     |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `tokens`\*                    | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                                               | Full list of target tokens the user can buy.                                                    |
| `tokenSections`               | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code>                     | Optional section configs grouping `tokens` in the picker.                                       |
| `selectedToken`\*             | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a> \| null</code>                                          | Currently selected target token to buy. `null` until tokens load.                               |
| `setSelectedToken`\*          | <code>(token: <a href="#cryptoonramptoken">CryptoOnrampToken</a>) => void</code>                                 | Updates `selectedToken`.                                                                        |
| `paymentMethods`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                                           | Available source crypto payment methods.                                                        |
| `methodSections`              | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>                             | Optional section configs grouping `paymentMethods` in the picker.                               |
| `selectedMethod`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a></code>                                              | Currently selected source payment method.                                                       |
| `setSelectedMethod`\*         | <code>(method: <a href="#cryptopaymentmethod">CryptoPaymentMethod</a>) => void</code>                            | Updates `selectedMethod`.                                                                       |
| `chains`\*                    | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                                                 | CAIP-2 → chain display info map (built-in defaults merged with consumer overrides).             |
| `amount`\*                    | `string`                                                                                                         | Current amount input value as a decimal string.                                                 |
| `setAmount`\*                 | `(value: string) => void`                                                                                        | Updates `amount`.                                                                               |
| `amountInputMode`\*           | <code><a href="#cryptoamountinputmode">CryptoAmountInputMode</a></code>                                          | Which side `amount` is denominated in — see [`CryptoAmountInputMode`](#cryptoamountinputmode).  |
| `setAmountInputMode`\*        | <code>(mode: <a href="#cryptoamountinputmode">CryptoAmountInputMode</a>) => void</code>                          | Updates `amountInputMode`.                                                                      |
| `convertedAmount`\*           | `string`                                                                                                         | Other side of `amount` after applying the current quote's rate.                                 |
| `presetAmounts`\*             | <code><a href="#onrampamountpreset">OnrampAmountPreset</a>\[]</code>                                             | Quick-pick amount buttons rendered in the widget.                                               |
| `quote`\*                     | <code><a href="/applications/appkit/reference/appkit#cryptoonrampquote">CryptoOnrampQuote</a> \| null</code>     | Current quote, or `null` if not yet fetched / invalidated.                                      |
| `isLoadingQuote`\*            | `boolean`                                                                                                        | Whether a quote is in flight (includes the input-debounce window).                              |
| `quoteError`\*                | `string \| null`                                                                                                 | Quote-side validation/fetch error as an i18n key, or `null`.                                    |
| `quoteProviderName`\*         | `string \| null`                                                                                                 | Display name of the provider behind the current quote, when available.                          |
| `deposit`\*                   | <code><a href="/applications/appkit/reference/appkit#cryptoonrampdeposit">CryptoOnrampDeposit</a> \| null</code> | Current deposit returned by the provider once `createDeposit` succeeded.                        |
| `isCreatingDeposit`\*         | `boolean`                                                                                                        | Whether `createDeposit` is in flight.                                                           |
| `depositError`\*              | `string \| null`                                                                                                 | Deposit-side error as an i18n key, or `null`.                                                   |
| `depositAmount`\*             | `string`                                                                                                         | Formatted deposit amount the user must send on the source chain.                                |
| `createDeposit`\*             | `() => void`                                                                                                     | Triggers deposit creation from the current quote.                                               |
| `depositStatus`\*             | <code><a href="/applications/appkit/reference/appkit#cryptoonrampstatus">CryptoOnrampStatus</a> \| null</code>   | Latest deposit status polled via [`useCryptoOnrampStatus`](#usecryptoonrampstatus), or `null`.  |
| `isRefundAddressRequired`\*   | `boolean`                                                                                                        | Whether the current quote provider requires a refund address before deposit.                    |
| `isReversedAmountSupported`\* | `boolean`                                                                                                        | Whether the current quote provider supports reversed (target-amount) input.                     |
| `refundAddress`\*             | `string`                                                                                                         | Refund address the user typed, if `isRefundAddressRequired`.                                    |
| `setRefundAddress`\*          | `(address: string) => void`                                                                                      | Updates `refundAddress`.                                                                        |
| `targetBalance`\*             | `string`                                                                                                         | Connected wallet's balance of the selected target token (formatted, token units).               |
| `isLoadingTargetBalance`\*    | `boolean`                                                                                                        | Whether the target token balance is being fetched.                                              |
| `isWalletConnected`\*         | `boolean`                                                                                                        | Whether a GRAM wallet is currently connected.                                                   |
| `canContinue`\*               | `boolean`                                                                                                        | Whether the user can proceed — valid amount, quote available, and wallet connected.             |
| `onReset`\*                   | `() => void`                                                                                                     | Invalidates the active quote and clears the deposit, returning the widget to its initial state. |

#### `CryptoOnrampProviderProps` [#cryptoonrampproviderprops]

Props for [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider) — configures the target tokens and payment methods exposed to the widget, plus optional chain display overrides.

| Field             | Type                                                                                         | Description                                                                                                                                                                                                                                                       |
| ----------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tokens`          | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                           | Target tokens (what the user buys on TON). Defaults to a built-in list.                                                                                                                                                                                           |
| `tokenSections`   | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code> | Optional section configs grouping `tokens` in the picker.                                                                                                                                                                                                         |
| `paymentMethods`  | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                       | Source crypto payment methods (what the user pays with on another chain). Defaults to a built-in list.                                                                                                                                                            |
| `methodSections`  | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>         | Optional section configs grouping `paymentMethods` in the picker.                                                                                                                                                                                                 |
| `chains`          | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                             | Custom CAIP-2 → chain display info overrides. Merged on top of the built-in defaults, so consumers only need to provide what they want to override or add — for example, a single entry keyed by `'eip155:42161'` with a `name` of `'Arbitrum'` and a `logo` URL. |
| `defaultTokenId`  | `string`                                                                                     | ID of the target token pre-selected on mount.                                                                                                                                                                                                                     |
| `defaultMethodId` | `string`                                                                                     | ID of the source payment method pre-selected on mount.                                                                                                                                                                                                            |

#### `CryptoOnrampToken` [#cryptoonramptoken]

Target token (what the user is buying on TON) in the crypto onramp widget. Kept separate from `AppkitUIToken` because `address` is the raw form expected by the onramp provider (e.g. `"0x0000000000000000000000000000000000000000"` for native Gram, `"EQCx..."` for USDT jetton master).

| Field        | Type     | Description                                                        |
| ------------ | -------- | ------------------------------------------------------------------ |
| `id`\*       | `string` | Stable identifier used by section configs and pre-selection props. |
| `symbol`\*   | `string` | Token symbol, e.g. `"GRAM"`, `"USDT"`.                             |
| `name`\*     | `string` | Full token name, e.g. `"Gram"`, `"Tether"`.                        |
| `decimals`\* | `number` | Number of decimals for the token.                                  |
| `address`\*  | `string` | Address as the onramp provider expects it.                         |
| `logo`       | `string` | Optional logo URL.                                                 |

#### `CryptoOnrampTokenSectionConfig` [#cryptoonramptokensectionconfig]

Section configuration grouping [`CryptoOnrampToken`](#cryptoonramptoken) entries by ID in a picker.

| Field     | Type       | Description                                                                                    |
| --------- | ---------- | ---------------------------------------------------------------------------------------------- |
| `title`\* | `string`   | Section header (typically already localized by the caller).                                    |
| `ids`\*   | `string[]` | IDs of [`CryptoOnrampToken`](#cryptoonramptoken) entries to include in this section, in order. |

#### `CryptoOnrampWidgetProps` [#cryptoonrampwidgetprops]

Props for [`CryptoOnrampWidget`](#cryptoonrampwidget) — extends [`CryptoOnrampProviderProps`](#cryptoonrampproviderprops) (tokens, payment methods, defaults, chain overrides) plus the native `<div>` props the widget root forwards.

| Field             | Type                                                                                                          | Description                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children`        | <code>(props: <a href="#cryptoonrampwidgetrenderprops">CryptoOnrampWidgetRenderProps</a>) => ReactNode</code> | Custom render function. When provided, replaces the default [`CryptoOnrampWidgetUI`](#cryptoonrampwidgetui) and is called with the full [`CryptoOnrampWidgetRenderProps`](#cryptoonrampwidgetrenderprops) (context state, actions and forwarded `<div>` props), so callers can build a fully custom UI on top of the same provider. |
| `tokens`          | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                                            | Target tokens (what the user buys on TON). Defaults to a built-in list.                                                                                                                                                                                                                                                             |
| `tokenSections`   | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code>                  | Optional section configs grouping `tokens` in the picker.                                                                                                                                                                                                                                                                           |
| `paymentMethods`  | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                                        | Source crypto payment methods (what the user pays with on another chain). Defaults to a built-in list.                                                                                                                                                                                                                              |
| `methodSections`  | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>                          | Optional section configs grouping `paymentMethods` in the picker.                                                                                                                                                                                                                                                                   |
| `chains`          | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                                              | Custom CAIP-2 → chain display info overrides. Merged on top of the built-in defaults, so consumers only need to provide what they want to override or add — for example, a single entry keyed by `'eip155:42161'` with a `name` of `'Arbitrum'` and a `logo` URL.                                                                   |
| `defaultTokenId`  | `string`                                                                                                      | ID of the target token pre-selected on mount.                                                                                                                                                                                                                                                                                       |
| `defaultMethodId` | `string`                                                                                                      | ID of the source payment method pre-selected on mount.                                                                                                                                                                                                                                                                              |

#### `CryptoOnrampWidgetRenderProps` [#cryptoonrampwidgetrenderprops]

Props for [`CryptoOnrampWidgetUI`](#cryptoonrampwidgetui) (and for the custom render callback on [`CryptoOnrampWidget`](#cryptoonrampwidget)) — the full [`CryptoOnrampContextType`](#cryptoonrampcontexttype) state and actions, plus the native `<div>` props the widget root forwards (`className`, `style`, etc.).

| Field                         | Type                                                                                                             | Description                                                                                     |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `tokens`\*                    | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a>\[]</code>                                               | Full list of target tokens the user can buy.                                                    |
| `tokenSections`               | <code><a href="#cryptoonramptokensectionconfig">CryptoOnrampTokenSectionConfig</a>\[]</code>                     | Optional section configs grouping `tokens` in the picker.                                       |
| `selectedToken`\*             | <code><a href="#cryptoonramptoken">CryptoOnrampToken</a> \| null</code>                                          | Currently selected target token to buy. `null` until tokens load.                               |
| `setSelectedToken`\*          | <code>(token: <a href="#cryptoonramptoken">CryptoOnrampToken</a>) => void</code>                                 | Updates `selectedToken`.                                                                        |
| `paymentMethods`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a>\[]</code>                                           | Available source crypto payment methods.                                                        |
| `methodSections`              | <code><a href="#paymentmethodsectionconfig">PaymentMethodSectionConfig</a>\[]</code>                             | Optional section configs grouping `paymentMethods` in the picker.                               |
| `selectedMethod`\*            | <code><a href="#cryptopaymentmethod">CryptoPaymentMethod</a></code>                                              | Currently selected source payment method.                                                       |
| `setSelectedMethod`\*         | <code>(method: <a href="#cryptopaymentmethod">CryptoPaymentMethod</a>) => void</code>                            | Updates `selectedMethod`.                                                                       |
| `chains`\*                    | <code>Record\<string, <a href="#chaininfo">ChainInfo</a>></code>                                                 | CAIP-2 → chain display info map (built-in defaults merged with consumer overrides).             |
| `amount`\*                    | `string`                                                                                                         | Current amount input value as a decimal string.                                                 |
| `setAmount`\*                 | `(value: string) => void`                                                                                        | Updates `amount`.                                                                               |
| `amountInputMode`\*           | <code><a href="#cryptoamountinputmode">CryptoAmountInputMode</a></code>                                          | Which side `amount` is denominated in — see [`CryptoAmountInputMode`](#cryptoamountinputmode).  |
| `setAmountInputMode`\*        | <code>(mode: <a href="#cryptoamountinputmode">CryptoAmountInputMode</a>) => void</code>                          | Updates `amountInputMode`.                                                                      |
| `convertedAmount`\*           | `string`                                                                                                         | Other side of `amount` after applying the current quote's rate.                                 |
| `presetAmounts`\*             | <code><a href="#onrampamountpreset">OnrampAmountPreset</a>\[]</code>                                             | Quick-pick amount buttons rendered in the widget.                                               |
| `quote`\*                     | <code><a href="/applications/appkit/reference/appkit#cryptoonrampquote">CryptoOnrampQuote</a> \| null</code>     | Current quote, or `null` if not yet fetched / invalidated.                                      |
| `isLoadingQuote`\*            | `boolean`                                                                                                        | Whether a quote is in flight (includes the input-debounce window).                              |
| `quoteError`\*                | `string \| null`                                                                                                 | Quote-side validation/fetch error as an i18n key, or `null`.                                    |
| `quoteProviderName`\*         | `string \| null`                                                                                                 | Display name of the provider behind the current quote, when available.                          |
| `deposit`\*                   | <code><a href="/applications/appkit/reference/appkit#cryptoonrampdeposit">CryptoOnrampDeposit</a> \| null</code> | Current deposit returned by the provider once `createDeposit` succeeded.                        |
| `isCreatingDeposit`\*         | `boolean`                                                                                                        | Whether `createDeposit` is in flight.                                                           |
| `depositError`\*              | `string \| null`                                                                                                 | Deposit-side error as an i18n key, or `null`.                                                   |
| `depositAmount`\*             | `string`                                                                                                         | Formatted deposit amount the user must send on the source chain.                                |
| `createDeposit`\*             | `() => void`                                                                                                     | Triggers deposit creation from the current quote.                                               |
| `depositStatus`\*             | <code><a href="/applications/appkit/reference/appkit#cryptoonrampstatus">CryptoOnrampStatus</a> \| null</code>   | Latest deposit status polled via [`useCryptoOnrampStatus`](#usecryptoonrampstatus), or `null`.  |
| `isRefundAddressRequired`\*   | `boolean`                                                                                                        | Whether the current quote provider requires a refund address before deposit.                    |
| `isReversedAmountSupported`\* | `boolean`                                                                                                        | Whether the current quote provider supports reversed (target-amount) input.                     |
| `refundAddress`\*             | `string`                                                                                                         | Refund address the user typed, if `isRefundAddressRequired`.                                    |
| `setRefundAddress`\*          | `(address: string) => void`                                                                                      | Updates `refundAddress`.                                                                        |
| `targetBalance`\*             | `string`                                                                                                         | Connected wallet's balance of the selected target token (formatted, token units).               |
| `isLoadingTargetBalance`\*    | `boolean`                                                                                                        | Whether the target token balance is being fetched.                                              |
| `isWalletConnected`\*         | `boolean`                                                                                                        | Whether a GRAM wallet is currently connected.                                                   |
| `canContinue`\*               | `boolean`                                                                                                        | Whether the user can proceed — valid amount, quote available, and wallet connected.             |
| `onReset`\*                   | `() => void`                                                                                                     | Invalidates the active quote and clears the deposit, returning the widget to its initial state. |

#### `CryptoPaymentMethod` [#cryptopaymentmethod]

Source crypto payment method (what the user pays with on another chain) in the crypto onramp widget.

| Field        | Type     | Description                                                                                                                                                                                                                      |
| ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`\*       | `string` | Stable identifier for the method — used for selection state and `methodSections.ids`                                                                                                                                             |
| `symbol`\*   | `string` | Token symbol, e.g. "USDC", "USDT".                                                                                                                                                                                               |
| `name`\*     | `string` | Full token name shown in the picker, e.g. "USD Coin", "Tether".                                                                                                                                                                  |
| `chain`\*    | `string` | Source chain in CAIP-2 format, e.g. `'eip155:8453'`, `'eip155:56'` — passed as `sourceChain` to the onramp provider. The widget resolves a display name and logo for it via the `chains` map (see `CryptoOnrampWidgetProvider`). |
| `decimals`\* | `number` | Number of decimals for the token (used to convert between display and base units)                                                                                                                                                |
| `address`\*  | `string` | Token contract address on the source network (empty string / zero address for native)                                                                                                                                            |
| `logo`       | `string` | Token logo URL shown in the picker and selectors.                                                                                                                                                                                |

#### `OnrampAmountPreset` [#onrampamountpreset]

Quick-pick amount button shown above the crypto-onramp input (carried on [`CryptoOnrampContextType`](#cryptoonrampcontexttype)'s `presetAmounts`).

| Field      | Type     | Description                                             |
| ---------- | -------- | ------------------------------------------------------- |
| `amount`\* | `string` | Amount value the preset sets on click (decimal string). |
| `label`\*  | `string` | Button label shown to the user.                         |

#### `PaymentMethodSectionConfig` [#paymentmethodsectionconfig]

Section configuration grouping [`CryptoPaymentMethod`](#cryptopaymentmethod) entries by ID in a picker.

| Field     | Type       | Description                                                                                        |
| --------- | ---------- | -------------------------------------------------------------------------------------------------- |
| `title`\* | `string`   | Section header (typically already localized by the caller).                                        |
| `ids`\*   | `string[]` | IDs of [`CryptoPaymentMethod`](#cryptopaymentmethod) entries to include in this section, in order. |

#### `UseCreateCryptoOnrampDepositParameters` [#usecreatecryptoonrampdepositparameters]

Parameters accepted by [`useCreateCryptoOnrampDeposit`](#usecreatecryptoonrampdeposit) — TanStack Query mutation options forwarded via `parameters.mutation`.

```ts
type UseCreateCryptoOnrampDepositParameters = CreateCryptoOnrampDepositMutationOptions<context>;
```

#### `UseCreateCryptoOnrampDepositReturnType` [#usecreatecryptoonrampdepositreturntype]

Return type of [`useCreateCryptoOnrampDeposit`](#usecreatecryptoonrampdeposit) — TanStack Query mutation result.

```ts
type UseCreateCryptoOnrampDepositReturnType = UseMutationResult<
    CreateCryptoOnrampDepositData,
    CreateCryptoOnrampDepositErrorType,
    CreateCryptoOnrampDepositVariables,
    context
>;
```

#### `UseCryptoOnrampProviderParameters` [#usecryptoonrampproviderparameters]

Parameters accepted by [`useCryptoOnrampProvider`](#usecryptoonrampprovider) — optional provider ID forwarded to [`getCryptoOnrampProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseCryptoOnrampProviderParameters = GetCryptoOnrampProviderOptions;
```

#### `UseCryptoOnrampProviderReturnType` [#usecryptoonrampproviderreturntype]

Return type of [`useCryptoOnrampProvider`](#usecryptoonrampprovider) — the matching [`CryptoOnrampProviderInterface`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), or `undefined` when none is registered (the hook swallows the throw from [`getCryptoOnrampProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)).

```ts
type UseCryptoOnrampProviderReturnType = GetCryptoOnrampProviderReturnType | undefined;
```

#### `UseCryptoOnrampProvidersReturnType` [#usecryptoonrampprovidersreturntype]

Return type of [`useCryptoOnrampProviders`](#usecryptoonrampproviders) — array of every [`CryptoOnrampProviderInterface`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) currently registered on the AppKit instance.

```ts
type UseCryptoOnrampProvidersReturnType = GetCryptoOnrampProvidersReturnType;
```

#### `UseCryptoOnrampQuoteParameters` [#usecryptoonrampquoteparameters]

Parameters accepted by [`useCryptoOnrampQuote`](#usecryptoonrampquote) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the source/target assets, amount and optional provider override forwarded to [`getCryptoOnrampQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

| Field                   | Type                                                                                 | Description                                                                                                                                                                         |
| ----------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`                | `string`                                                                             | Amount to onramp (either source or target crypto, depending on isSourceAmount)                                                                                                      |
| `sourceCurrencyAddress` | `string`                                                                             | Source crypto currency address (contract address or 0x0... for native)                                                                                                              |
| `sourceChain`           | `string`                                                                             | Source chain identifier in CAIP-2 format (e.g. `'eip155:1'` for Ethereum mainnet, `'eip155:42161'` for Arbitrum One). Providers map this to their own chain identifiers internally. |
| `targetCurrencyAddress` | `string`                                                                             | Target crypto currency address on TON (contract address or 0x0... for native)                                                                                                       |
| `recipientAddress`      | `string`                                                                             | TON address that will receive the target crypto.                                                                                                                                    |
| `refundAddress`         | `string`                                                                             | Refund address for the source crypto.                                                                                                                                               |
| `isSourceAmount`        | `boolean`                                                                            | If true, `amount` is the source amount to spend. If false, `amount` is the target amount to receive. Defaults to true when omitted.                                                 |
| `providerOptions`       | `TProviderOptions = unknown`                                                         | Provider-specific options.                                                                                                                                                          |
| `providerId`            | `string`                                                                             | Provider to quote against. Defaults to the registered default provider.                                                                                                             |
| `query`                 | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                       |

#### `UseCryptoOnrampQuoteReturnType` [#usecryptoonrampquotereturntype]

Return type of [`useCryptoOnrampQuote`](#usecryptoonrampquote) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseCryptoOnrampQuoteReturnType = UseQueryReturnType<
    selectData,
    GetCryptoOnrampQuoteErrorType
>;
```

#### `UseCryptoOnrampStatusParameters` [#usecryptoonrampstatusparameters]

Parameters accepted by [`useCryptoOnrampStatus`](#usecryptoonrampstatus) — TanStack Query options (`select`, `enabled`, `refetchInterval`, …) plus the deposit ID, originating provider ID and optional provider override forwarded to [`getCryptoOnrampStatus`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

| Field        | Type                                                                                 | Description                                                                                                                                                   |
| ------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `depositId`  | `string`                                                                             | Deposit ID.                                                                                                                                                   |
| `providerId` | `string`                                                                             | Identifier of the provider that issued this deposit.                                                                                                          |
| `query`      | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseCryptoOnrampStatusReturnType` [#usecryptoonrampstatusreturntype]

Return type of [`useCryptoOnrampStatus`](#usecryptoonrampstatus) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseCryptoOnrampStatusReturnType = UseQueryReturnType<
    selectData,
    GetCryptoOnrampStatusErrorType
>;
```

### Jettons [#jettons-1]

#### `UseJettonBalanceByAddressParameters` [#usejettonbalancebyaddressparameters]

Parameters accepted by [`useJettonBalanceByAddress`](#usejettonbalancebyaddress) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the jetton master, owner address, decimals and optional network override.

| Field            | Type                                                                                                     | Description                                                                                                                                                                 |
| ---------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `jettonAddress`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address (the token, not the user's wallet for it).                                                                                                   |
| `ownerAddress`   | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner of the jetton wallet — typically the connected user's address.                                                                                                        |
| `jettonDecimals` | `number`                                                                                                 | Decimals declared by the jetton master. Used to format the raw balance into a human-readable string.                                                                        |
| `network`        | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to read the balance from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `query`          | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

#### `UseJettonBalanceByAddressReturnType` [#usejettonbalancebyaddressreturntype]

Return type of [`useJettonBalanceByAddress`](#usejettonbalancebyaddress) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseJettonBalanceByAddressReturnType = UseQueryReturnType<
    selectData,
    GetJettonBalanceErrorType
>;
```

#### `UseJettonInfoParameters` [#usejettoninfoparameters]

Parameters accepted by [`useJettonInfo`](#usejettoninfo) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the jetton master address and optional network override.

| Field     | Type                                                                                                     | Description                                                                                                                                                   |
| --------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address whose metadata is being fetched.                                                                                               |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseJettonInfoReturnType` [#usejettoninforeturntype]

Return type of [`useJettonInfo`](#usejettoninfo) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions. `data` is `null` when the indexer has no record for that master address.

```ts
type UseJettonInfoReturnType = UseQueryReturnType<
    selectData,
    GetJettonInfoErrorType
>;
```

#### `UseJettonWalletAddressParameters` [#usejettonwalletaddressparameters]

Parameters accepted by [`useJettonWalletAddress`](#usejettonwalletaddress) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the jetton master, owner address and optional network override.

| Field           | Type                                                                                                     | Description                                                                                                                                                   |
| --------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `jettonAddress` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Jetton master contract address.                                                                                                                               |
| `ownerAddress`  | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner whose jetton wallet should be derived.                                                                                                                  |
| `network`       | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `query`         | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseJettonWalletAddressReturnType` [#usejettonwalletaddressreturntype]

Return type of [`useJettonWalletAddress`](#usejettonwalletaddress) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseJettonWalletAddressReturnType = UseQueryReturnType<
    selectData,
    GetJettonWalletAddressErrorType
>;
```

#### `UseJettonsByAddressParameters` [#usejettonsbyaddressparameters]

Parameters accepted by [`useJettonsByAddress`](#usejettonsbyaddress) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the owner address, optional network override and pagination.

| Field     | Type                                                                                                                | Description                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                 |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the jettons from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `limit`   | `number`                                                                                                            | Maximum number of jettons to return.                                                                                                                                        |
| `offset`  | `number`                                                                                                            | Number of jettons to skip before returning results — used for pagination.                                                                                                   |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

#### `UseJettonsByAddressReturnType` [#usejettonsbyaddressreturntype]

Return type of [`useJettonsByAddress`](#usejettonsbyaddress) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseJettonsByAddressReturnType = UseQueryReturnType<
    selectData,
    GetJettonsErrorType
>;
```

#### `UseJettonsParameters` [#usejettonsparameters]

Parameters accepted by [`useJettons`](#usejettons) — same shape as [`UseJettonsByAddressParameters`](#usejettonsbyaddressparameters). The hook resolves `address` from the selected wallet and overrides any value supplied here.

| Field     | Type                                                                                                                | Description                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.                 |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read the jettons from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `limit`   | `number`                                                                                                            | Maximum number of jettons to return.                                                                                                                                        |
| `offset`  | `number`                                                                                                            | Number of jettons to skip before returning results — used for pagination.                                                                                                   |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.               |

#### `UseJettonsReturnType` [#usejettonsreturntype]

Return type of [`useJettons`](#usejettons) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseJettonsReturnType = UseJettonsByAddressReturnType<selectData>;
```

#### `UseTransferJettonParameters` [#usetransferjettonparameters]

Parameters accepted by [`useTransferJetton`](#usetransferjetton) — TanStack Query mutation options.

```ts
type UseTransferJettonParameters = TransferJettonOptions<context>;
```

#### `UseTransferJettonReturnType` [#usetransferjettonreturntype]

Return type of [`useTransferJetton`](#usetransferjetton) — TanStack Query mutation result.

```ts
type UseTransferJettonReturnType = UseMutationReturnType<
    TransferJettonData,
    TransferJettonErrorType,
    TransferJettonVariables,
    context,
    (
        variables: TransferJettonVariables,
        options?: MutateOptions<TransferJettonData, TransferJettonErrorType, TransferJettonVariables, context>,
    ) => void,
    MutateFunction<TransferJettonData, TransferJettonErrorType, TransferJettonVariables, context>
>;
```

#### `UseWatchJettonsByAddressParameters` [#usewatchjettonsbyaddressparameters]

Parameters accepted by [`useWatchJettonsByAddress`](#usewatchjettonsbyaddress) — same fields as [`WatchJettonsByAddressOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), all optional so callers can render the hook before the address is known.

```ts
type UseWatchJettonsByAddressParameters = Partial<WatchJettonsByAddressOptions>;
```

#### `UseWatchJettonsParameters` [#usewatchjettonsparameters]

Parameters accepted by [`useWatchJettons`](#usewatchjettons) — update callback and optional network override. The hook resolves the address from the selected wallet.

```ts
type UseWatchJettonsParameters = Partial<WatchJettonsOptions>;
```

### NFTs [#nfts-2]

#### `NftItemProps` [#nftitemprops]

Props accepted by [`NftItem`](#nftitem) — extends the native `<button>` props (`onClick`, `disabled`, `className`, …) with the NFT to render.

| Field   | Type                                                                     | Description                                                                                           |
| ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `nft`\* | <code><a href="/applications/appkit/reference/appkit#nft">NFT</a></code> | NFT to render — name, collection name, image and on-sale state are derived via `getFormattedNftInfo`. |

#### `UseNFTsByAddressParameters` [#usenftsbyaddressparameters]

Parameters accepted by [`useNftsByAddress`](#usenftsbyaddress) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the owner address, optional pagination (`limit`, `offset`) and network override.

The `network` field defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Field     | Type                                                                                                                | Description                                                                                                                                                          |
| --------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.          |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read NFTs from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `limit`   | `number`                                                                                                            | Maximum number of NFTs to return.                                                                                                                                    |
| `offset`  | `number`                                                                                                            | Number of NFTs to skip before returning results — used for pagination.                                                                                               |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.        |

#### `UseNFTsByAddressReturnType` [#usenftsbyaddressreturntype]

Return type of [`useNftsByAddress`](#usenftsbyaddress) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseNFTsByAddressReturnType = UseQueryReturnType<selectData, GetNFTsErrorType>;
```

#### `UseNFTsParameters` [#usenftsparameters]

Parameters accepted by [`useNfts`](#usenfts) — same shape as [`UseNFTsByAddressParameters`](#usenftsbyaddressparameters). The hook resolves `address` from the selected wallet and overrides any value supplied here.

| Field     | Type                                                                                                                | Description                                                                                                                                                          |
| --------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | Owner address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`.          |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to read NFTs from. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `limit`   | `number`                                                                                                            | Maximum number of NFTs to return.                                                                                                                                    |
| `offset`  | `number`                                                                                                            | Number of NFTs to skip before returning results — used for pagination.                                                                                               |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.        |

#### `UseNFTsReturnType` [#usenftsreturntype]

Return type of [`useNfts`](#usenfts) — TanStack Query result carrying `data`, `isLoading`, `error` and the standard companions.

```ts
type UseNFTsReturnType = UseNFTsByAddressReturnType<selectData>;
```

#### `UseNftParameters` [#usenftparameters]

Parameters accepted by [`useNft`](#usenft) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the NFT contract address and optional network override.

The `network` field defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.

| Field     | Type                                                                                                                | Description                                                                                                                                                        |
| --------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `address` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a> \| Address</code> | NFT contract address — pass a [`UserFriendlyAddress`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) string or an `Address` instance from `@ton/core`. |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                                    | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.        |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                                | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.      |

#### `UseNftReturnType` [#usenftreturntype]

Return type of [`useNft`](#usenft) — TanStack Query result carrying `data` (the NFT or `null` when the indexer has no record), `isLoading`, `error` and the standard companions.

```ts
type UseNftReturnType = UseQueryReturnType<selectData, GetNftErrorType>;
```

#### `UseTransferNftParameters` [#usetransfernftparameters]

Parameters accepted by [`useTransferNft`](#usetransfernft) — TanStack Query mutation options.

```ts
type UseTransferNftParameters = TransferNftOptions<context>;
```

#### `UseTransferNftReturnType` [#usetransfernftreturntype]

Return type of [`useTransferNft`](#usetransfernft) — TanStack Query mutation result.

```ts
type UseTransferNftReturnType = UseMutationReturnType<
    TransferNftData,
    TransferNftErrorType,
    TransferNftVariables,
    context,
    (
        variables: TransferNftVariables,
        options?: MutateOptions<TransferNftData, TransferNftErrorType, TransferNftVariables, context>,
    ) => void,
    MutateFunction<TransferNftData, TransferNftErrorType, TransferNftVariables, context>
>;
```

### Networks [#networks-1]

#### `UseBlockNumberParameters` [#useblocknumberparameters]

Parameters accepted by [`useBlockNumber`](#useblocknumber) — TanStack Query options plus an optional network override. Defaults to the selected wallet's network. If no wallet is selected, falls back to mainnet.

| Field     | Type                                                                                 | Description                                                                                                                                                   |
| --------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network to query. Defaults to mainnet when omitted.                                                                                                           |
| `query`   | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseBlockNumberReturnType` [#useblocknumberreturntype]

Return type of [`useBlockNumber`](#useblocknumber) — TanStack Query result.

```ts
type UseBlockNumberReturnType = UseQueryReturnType<
    selectData,
    GetBlockNumberErrorType
>;
```

#### `UseDefaultNetworkReturnType` [#usedefaultnetworkreturntype]

Return type of [`useDefaultNetwork`](#usedefaultnetwork) — `[network, setNetwork]` tuple. `network` is the current default (or `undefined`). `setNetwork` calls [`setDefaultNetwork`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and emits `networks:default-changed`.

```ts
type UseDefaultNetworkReturnType = [
    network: GetDefaultNetworkReturnType,
    setNetwork: (network: Network | undefined) => void,
];
```

#### `UseNetworkReturnType` [#usenetworkreturntype]

Return type of [`useNetwork`](#usenetwork) — `undefined` when no wallet is currently selected.

```ts
type UseNetworkReturnType = Network | undefined;
```

#### `UseNetworksReturnType` [#usenetworksreturntype]

Return type of [`useNetworks`](#usenetworks) — same shape as [`GetNetworksReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseNetworksReturnType = GetNetworksReturnType;
```

### Providers [#providers-1]

#### `I18nContextType` [#i18ncontexttype]

Shape returned by [`useI18n`](#usei18n) — current locale, translation function and helpers to switch locales or merge new dictionaries at runtime.

| Field            | Type                                  | Description                                                                                      |
| ---------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `activeLocale`\* | `string`                              | Currently active locale code (e.g., `"en"`, `"ru"`).                                             |
| `t`\*            | `I18n['t']`                           | Translation function — accepts a key plus interpolation values and returns the localized string. |
| `locale`\*       | `(lang: string, dict?: Dict) => void` | Switch to a new locale. Pass an optional `dict` to install translations alongside the switch.    |
| `addDict`\*      | `(lang: string, dict: Dict) => void`  | Merge a translation dictionary for `lang` without changing the active locale.                    |

#### `I18nProviderProps` [#i18nproviderprops]

Props accepted by [`I18nProvider`](#i18nprovider).

| Field      | Type                   | Description                                                                                  |
| ---------- | ---------------------- | -------------------------------------------------------------------------------------------- |
| `locale`   | `string`               | Initial locale code. Defaults to the i18n library's default when omitted.                    |
| `lngDicts` | `Record<string, Dict>` | Translation dictionaries keyed by locale. Loaded into the underlying i18n instance on mount. |

### Settings [#settings-1]

#### `AppKitTheme` [#appkittheme]

Theme value accepted by [`useAppKitTheme`](#useappkittheme) — `'light'`, `'dark'`, or any custom string mapped to a `data-ta-theme` token in the host's CSS.

```ts
type AppKitTheme = 'light' | 'dark' | string;
```

### Shared [#shared-1]

#### `AmountPreset` [#amountpreset]

Single preset entry rendered as a button in [`AmountPresets`](#amountpresets).

| Field      | Type         | Description                                                                                            |
| ---------- | ------------ | ------------------------------------------------------------------------------------------------------ |
| `label`\*  | `string`     | Text shown inside the button (e.g., `"25%"`, `"Max"`, `"100"`).                                        |
| `amount`\* | `string`     | Value passed to [`AmountPresetsProps.onPresetSelect`](#amountpresetsprops) when the button is clicked. |
| `onSelect` | `() => void` | Optional custom click handler — when set, it runs instead of `onPresetSelect`.                         |

#### `AmountPresetsProps` [#amountpresetsprops]

Props accepted by [`AmountPresets`](#amountpresets).

| Field              | Type                                                     | Description                                                                              |
| ------------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `presets`\*        | <code><a href="#amountpreset">AmountPreset</a>\[]</code> | Preset buttons to render, in order.                                                      |
| `currencySymbol`   | `string`                                                 | Optional symbol (e.g., `"$"`) prepended to each preset label.                            |
| `onPresetSelect`\* | `(value: string) => void`                                | Called with the selected preset's `amount` unless the preset defines its own `onSelect`. |

#### `AppkitUIToken` [#appkituitoken]

UI-side token descriptor consumed by `@ton/appkit-react` widgets ([`SwapWidget`](#swapwidget), [`SwapField`](#swapfield), currency selectors, etc.) — identifies the token in the picker UI and carries display + on-chain fields the widget needs to render and quote.

| Field        | Type                                                                             | Description                                                                                                                               |
| ------------ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `id`\*       | `string`                                                                         | Stable ID used for picker selection state and section grouping.                                                                           |
| `symbol`\*   | `string`                                                                         | Ticker symbol shown in the picker and selector chip (e.g., `"GRAM"`, `"USDT"`).                                                           |
| `name`\*     | `string`                                                                         | Full token name shown in the picker (e.g., `"Gram"`).                                                                                     |
| `decimals`\* | `number`                                                                         | Number of decimal places used to format raw amounts.                                                                                      |
| `address`\*  | `string`                                                                         | Token contract address. Pass `'gram'` for native Gram; otherwise the jetton master's user-friendly address.                               |
| `logo`       | `string`                                                                         | Optional URL of the token logo shown in the picker and selector chip.                                                                     |
| `rate`       | `string`                                                                         | Optional fiat exchange rate (`1 token = rate fiat units`). Used by widgets to render fiat conversions next to amounts.                    |
| `network`\*  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | [`Network`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) the token lives on. Widgets filter their token universe by the active network. |

#### `CopyButtonProps` [#copybuttonprops]

Props accepted by [`CopyButton`](#copybutton).

| Field          | Type     | Description                                               |
| -------------- | -------- | --------------------------------------------------------- |
| `value`\*      | `string` | Text written to the clipboard when the button is clicked. |
| `aria-label`\* | `string` | Accessible label for screen readers.                      |

#### `CurrencyItemProps` [#currencyitemprops]

Props accepted by [`CurrencyItem`](#currencyitem) when used as a single-shot button. Passing `children` switches it into compound mode and bypasses these fields.

| Field          | Type      | Description                                                                                        |
| -------------- | --------- | -------------------------------------------------------------------------------------------------- |
| `ticker`       | `string`  | Token symbol (e.g., `"GRAM"`) — also used as the icon fallback and rendered in the secondary line. |
| `name`         | `string`  | Human-readable token name shown as the primary line. Falls back to `ticker` when absent.           |
| `balance`      | `string`  | Main balance value shown on the right side (already-formatted string).                             |
| `underBalance` | `string`  | Optional secondary value (e.g., fiat equivalent) shown beneath the main balance.                   |
| `icon`         | `string`  | URL of the token logo.                                                                             |
| `isVerified`   | `boolean` | When true, renders a verified checkmark badge next to the name.                                    |

#### `CurrencySelectListContainerProps` [#currencyselectlistcontainerprops]

Props accepted by [`CurrencySelect.ListContainer`](#currencyselect).

| Field       | Type      | Description                                                        |
| ----------- | --------- | ------------------------------------------------------------------ |
| `isEmpty`\* | `boolean` | When true, renders the built-in empty state instead of `children`. |

#### `CurrencySelectSearchProps` [#currencyselectsearchprops]

Props accepted by [`CurrencySelect.Search`](#currencyselect).

| Field              | Type                      | Description                                                                                           |     |                           |
| ------------------ | ------------------------- | ----------------------------------------------------------------------------------------------------- | --- | ------------------------- |
| `searchValue`\*    | `string`                  | Current search query.                                                                                 |     |                           |
| `onSearchChange`\* | `(value: string) => void` | Called whenever the user types in the search input.                                                   |     |                           |
| `placeholder`      | `string`                  | Placeholder text shown when the input is empty.                                                       |     |                           |
| `size`             | `InputSize`               | Size token applied to the input control(s) inside: \`'s'                                              | 'm' | 'l'`. Defaults to `'m'\`. |
| `variant`          | `InputVariant`            | Visual variant: `'default'` paints a filled field. `'unstyled'` drops the chrome.                     |     |                           |
| `loading`          | `boolean`                 | When true, [`Input.Input`](#input) renders a skeleton placeholder instead of an `<input>`.            |     |                           |
| `disabled`         | `boolean`                 | When true, descendant input controls are disabled.                                                    |     |                           |
| `error`            | `boolean`                 | When true, the field renders in error styling and [`Input.Caption`](#input) switches to error text.   |     |                           |
| `resizable`        | `boolean`                 | When true, [`Input.Input`](#input) scales its font down to fit the available width as the user types. |     |                           |

#### `LowBalanceModalProps` [#lowbalancemodalprops]

Props accepted by [`LowBalanceModal`](#lowbalancemodal).

| Field           | Type                                                      | Description                                                                                                                                         |
| --------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `open`\*        | `boolean`                                                 | Controls visibility of the modal.                                                                                                                   |
| `mode`\*        | <code><a href="#lowbalancemode">LowBalanceMode</a></code> | `reduce` — user can fix it by reducing the amount (shows Change/Cancel). `topup` — reducing doesn't help, user must top up Gram (shows Close only). |
| `requiredTon`\* | `string`                                                  | Required amount in Gram, formatted as a decimal string (e.g. `"0.423"`).                                                                            |
| `onChange`\*    | `() => void`                                              | Called when the user clicks the primary "Change" action (only in `reduce` mode).                                                                    |
| `onCancel`\*    | `() => void`                                              | Called when the user dismisses the modal (Cancel, Close, or backdrop click).                                                                        |

#### `LowBalanceMode` [#lowbalancemode]

Behavior mode for [`LowBalanceModal`](#lowbalancemodal) — see [`LowBalanceModalProps.mode`](#lowbalancemodalprops).

```ts
type LowBalanceMode = 'reduce' | 'topup';
```

#### `OptionSwitcherOption` [#optionswitcheroption]

Single entry rendered as an item inside [`OptionSwitcher`](#optionswitcher).

| Field     | Type     | Description                                                                                       |
| --------- | -------- | ------------------------------------------------------------------------------------------------- |
| `value`\* | `string` | Stable value passed back to [`OptionSwitcherProps.onChange`](#optionswitcherprops) when selected. |
| `label`\* | `string` | Human-readable label shown in the trigger and dropdown item.                                      |

#### `OptionSwitcherProps` [#optionswitcherprops]

Props accepted by [`OptionSwitcher`](#optionswitcher).

| Field        | Type                                                                     | Description                                           |
| ------------ | ------------------------------------------------------------------------ | ----------------------------------------------------- |
| `value`\*    | `string \| undefined`                                                    | Currently selected option value.                      |
| `options`\*  | <code><a href="#optionswitcheroption">OptionSwitcherOption</a>\[]</code> | Available options.                                    |
| `onChange`\* | `(value: string) => void`                                                | Called when the user picks an option.                 |
| `disabled`   | `boolean`                                                                | When true, the trigger is non-interactive and dimmed. |
| `className`  | `string`                                                                 | Extra class applied to the trigger button.            |

#### `SettingsButtonProps` [#settingsbuttonprops]

Props accepted by [`SettingsButton`](#settingsbutton) — extends the base [`Button`](#button) props.

| Field          | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `onClick`      | `() => void`         | Click handler — typically used to open a settings modal.                                                                                                                                                                                       |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`         | `ReactNode`          | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |

#### `TokenBase` [#tokenbase]

Minimal shape every token in [`TokenSelectModal`](#tokenselectmodal) must satisfy. Callers may use richer types (e.g., `AppkitUIToken`) — `TokenBase` only fixes the fields the modal reads.

| Field       | Type     | Description                                                                                     |
| ----------- | -------- | ----------------------------------------------------------------------------------------------- |
| `id`\*      | `string` | Stable identifier used to match tokens against [`TokenSectionConfig.ids`](#tokensectionconfig). |
| `symbol`\*  | `string` | Ticker (e.g., `"GRAM"`) — used for display and search matching.                                 |
| `name`\*    | `string` | Human-readable name — used for display and search matching.                                     |
| `address`\* | `string` | Token contract address — used for exact-address search matching and as the React `key`.         |
| `logo`      | `string` | Optional logo URL.                                                                              |

#### `TokenSectionConfig` [#tokensectionconfig]

Configuration that maps token `id`s to a named section in [`TokenSelectModal`](#tokenselectmodal). Tokens not covered are placed in an "Other tokens" trailing section.

| Field     | Type       | Description                                                                      |
| --------- | ---------- | -------------------------------------------------------------------------------- |
| `title`\* | `string`   | Section header label.                                                            |
| `ids`\*   | `string[]` | [`TokenBase.id`](#tokenbase) values to include in this section, in render order. |

#### `TokenSelectModalProps` [#tokenselectmodalprops]

Props accepted by [`TokenSelectModal`](#tokenselectmodal).

| Field               | Type                                                                         | Description                                                                              |
| ------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `open`\*            | `boolean`                                                                    | Controls modal visibility.                                                               |
| `onClose`\*         | `() => void`                                                                 | Called when the modal is dismissed (selection, backdrop click, or escape).               |
| `tokens`\*          | <code>T = <a href="#appkituitoken">AppkitUIToken</a>\[]</code>               | Full set of tokens available for selection and search.                                   |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>         | Optional sectioning rules. When omitted, all tokens render as a single untitled section. |
| `onSelect`\*        | <code>(token: T = <a href="#appkituitoken">AppkitUIToken</a>) => void</code> | Called with the picked token. The modal closes and resets its search on selection.       |
| `title`\*           | `string`                                                                     | Modal header title.                                                                      |
| `searchPlaceholder` | `string`                                                                     | Placeholder shown inside the search input.                                               |

#### `TokenSelectorProps` [#tokenselectorprops]

Props accepted by [`TokenSelector`](#tokenselector) — extends the base [`Button`](#button) props.

| Field          | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`\*      | `string`             | Label shown next to the icon — typically the token symbol.                                                                                                                                                                                     |
| `icon`         | `string`             | Token logo URL.                                                                                                                                                                                                                                |
| `iconFallback` | `string`             | Single-character fallback used when `icon` fails to load. Defaults to the first character of `title`.                                                                                                                                          |
| `networkIcon`  | `string`             | When provided, renders a network badge overlay on the icon.                                                                                                                                                                                    |
| `readOnly`     | `boolean`            | Hide chevron and suppress click handling — use when there's nothing to pick.                                                                                                                                                                   |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |

### Signing [#signing-1]

#### `UseSignBinaryParameters` [#usesignbinaryparameters]

Parameters accepted by [`useSignBinary`](#usesignbinary) — TanStack Query mutation options.

```ts
type UseSignBinaryParameters = SignBinaryOptions<context>;
```

#### `UseSignBinaryReturnType` [#usesignbinaryreturntype]

Return type of [`useSignBinary`](#usesignbinary) — TanStack Query mutation result.

```ts
type UseSignBinaryReturnType = UseMutationResult<
    SignBinaryData,
    SignBinaryErrorType,
    SignBinaryVariables,
    context
>;
```

#### `UseSignCellParameters` [#usesigncellparameters]

Parameters accepted by [`useSignCell`](#usesigncell) — TanStack Query mutation options.

```ts
type UseSignCellParameters = SignCellOptions<context>;
```

#### `UseSignCellReturnType` [#usesigncellreturntype]

Return type of [`useSignCell`](#usesigncell) — TanStack Query mutation result.

```ts
type UseSignCellReturnType = UseMutationResult<
    SignCellData,
    SignCellErrorType,
    SignCellVariables,
    context
>;
```

#### `UseSignTextParameters` [#usesigntextparameters]

Parameters accepted by [`useSignText`](#usesigntext) — TanStack Query mutation options.

```ts
type UseSignTextParameters = SignTextOptions<context>;
```

#### `UseSignTextReturnType` [#usesigntextreturntype]

Return type of [`useSignText`](#usesigntext) — TanStack Query mutation result.

```ts
type UseSignTextReturnType = UseMutationResult<
    SignTextData,
    SignTextErrorType,
    SignTextVariables,
    context
>;
```

### Staking [#staking-2]

#### `SelectUnstakeModeProps` [#selectunstakemodeprops]

Props accepted by [`SelectUnstakeMode`](#selectunstakemode).

| Field                | Type                                                                                                                          | Description                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `value`\*            | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                                    | Currently selected unstake mode (see [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)). |
| `onValueChange`\*    | <code>(mode: <a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a>) => void</code>                    | Called when the user picks a different mode.                                                              |
| `providerInfo`\*     | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>         | Dynamic provider info — used to show the instant-unstake limit when available.                            |
| `providerMetadata`\* | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Static provider metadata — supplies `supportedUnstakeModes` and stake-token formatting.                   |

#### `StakingBalanceBlockProps` [#stakingbalanceblockprops]

Props accepted by [`StakingBalanceBlock`](#stakingbalanceblock).

| Field                    | Type                                                                                                                          | Description                                                                        |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `providerMetadata`\*     | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Provider metadata — supplies the stake/receive tokens (address, ticker, decimals). |
| `direction`\*            | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                  | Operation direction. Selects which token and balance to render.                    |
| `stakedBalance`          | `string`                                                                                                                      | User's currently staked amount, used when `direction === 'unstake'`.               |
| `isStakedBalanceLoading` | `boolean`                                                                                                                     | True while the staked balance is being fetched.                                    |
| `balance`                | `string`                                                                                                                      | User's wallet balance of the stake token, used when `direction === 'stake'`.       |
| `isBalanceLoading`       | `boolean`                                                                                                                     | True while the wallet balance is being fetched.                                    |
| `onMaxClick`             | `() => void`                                                                                                                  | When provided, renders a `MAX` button that invokes this callback.                  |

#### `StakingContextType` [#stakingcontexttype]

Shape of the staking context exposed by [`StakingWidgetProvider`](#stakingwidgetprovider) and read via [`useStakingContext`](#usestakingcontext). Aggregates inputs (amount, direction, unstake mode), fetched data (balances, quote, provider info/metadata), derived flags (`canSubmit`, `error`, loading states), and the actions used by [`StakingWidgetUI`](#stakingwidgetui) (send transaction, switch provider, max, low-balance handling).

| Field                       | Type                                                                                                                              | Description                                                                                                                                               |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`\*                  | `string`                                                                                                                          | Amount the user wants to stake (string to preserve input UX)                                                                                              |
| `canSubmit`\*               | `boolean`                                                                                                                         | Whether the user can proceed with staking (checks balance, amount validity, etc.)                                                                         |
| `quote`\*                   | <code><a href="/applications/appkit/reference/appkit#stakingquote">StakingQuote</a> \| undefined</code>                           | Raw staking quote from the provider                                                                                                                       |
| `isQuoteLoading`\*          | `boolean`                                                                                                                         | True while the stake quote is being fetched                                                                                                               |
| `error`\*                   | `string \| null`                                                                                                                  | Current validation/fetch error for staking, null when everything is ok                                                                                    |
| `providerInfo`\*            | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>             | Staking provider dynamic info (APY, instant unstake availability, etc.)                                                                                   |
| `providerMetadata`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code>     | Staking provider static metadata                                                                                                                          |
| `stakingProvider`\*         | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a> \| undefined</code>                     | Currently selected staking provider (defaults to the first registered one)                                                                                |
| `stakingProviders`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a>\[]</code>                               | All registered staking providers                                                                                                                          |
| `setStakingProviderId`\*    | `(providerId: string) => void`                                                                                                    | Updates the selected staking provider                                                                                                                     |
| `network`\*                 | <code><a href="/applications/appkit/reference/appkit#network">Network</a> \| undefined</code>                                     | Network the widget is operating on (resolved from prop or wallet)                                                                                         |
| `direction`\*               | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                      | Current operation direction: 'stake' or 'unstake'                                                                                                         |
| `isProviderInfoLoading`\*   | `boolean`                                                                                                                         | True while provider info is being fetched                                                                                                                 |
| `balance`\*                 | `string \| undefined`                                                                                                             | Base balance (native or jetton) available for staking                                                                                                     |
| `isBalanceLoading`\*        | `boolean`                                                                                                                         | True while base balance is being fetched                                                                                                                  |
| `stakedBalance`\*           | <code><a href="/applications/appkit/reference/appkit#stakingbalance">StakingBalance</a> \| undefined</code>                       | User's currently staked balance                                                                                                                           |
| `isStakedBalanceLoading`\*  | `boolean`                                                                                                                         | True while staked balance is being fetched                                                                                                                |
| `unstakeMode`\*             | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                                        | Selected unstake-timing mode — `'INSTANT'`, `'WHEN_AVAILABLE'`, or `'ROUND_END'`. See [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). |
| `setAmount`\*               | `(amount: string) => void`                                                                                                        | Sets the input amount                                                                                                                                     |
| `setUnstakeMode`\*          | <code>(mode: <a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a>) => void</code>                        | Sets the unstake mode                                                                                                                                     |
| `sendTransaction`\*         | `() => Promise<void>`                                                                                                             | Triggers the staking/unstaking transaction                                                                                                                |
| `onChangeDirection`\*       | <code>(direction: <a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a>) => void</code> | Changes the direction (stake/unstake)                                                                                                                     |
| `isSendingTransaction`\*    | `boolean`                                                                                                                         | True while a transaction is being processed                                                                                                               |
| `isReversed`\*              | `boolean`                                                                                                                         | True if the user is inputting the output amount ("I want to get X")                                                                                       |
| `toggleReversed`\*          | `() => void`                                                                                                                      | Toggles between inputting from amount and output amount                                                                                                   |
| `reversedAmount`\*          | `string`                                                                                                                          | Amount displayed in the reversed (bottom) input                                                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                                                      | Sets the input amount to the maximum available balance (leaves room for Gram gas on native stake)                                                         |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                                                         | True when the built transaction outflow exceeds the user's Gram balance                                                                                   |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                                             | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.                                                            |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                                          | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op.                                                  |
| `onLowBalanceChange`\*      | `() => void`                                                                                                                      | Replace the input with a value that fits within the current Gram balance and close the warning.                                                           |
| `onLowBalanceCancel`\*      | `() => void`                                                                                                                      | Dismiss the low-balance warning without changing the input.                                                                                               |

#### `StakingInfoProps` [#stakinginfoprops]

Props accepted by [`StakingInfo`](#stakinginfo).

| Field                     | Type                                                                                                                          | Description                                                                                                     |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `quote`\*                 | <code><a href="/applications/appkit/reference/appkit#stakingquote">StakingQuote</a> \| undefined</code>                       | Current staking quote — its `amountOut` is rendered in the "You get" row.                                       |
| `isQuoteLoading`\*        | `boolean`                                                                                                                     | True while the quote is being fetched. Swaps the "You get" value for a skeleton.                                |
| `providerInfo`\*          | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>         | Dynamic provider info — supplies APY and exchange rate.                                                         |
| `providerMetadata`\*      | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code> | Static provider metadata — supplies token tickers/decimals and the provider name.                               |
| `isProviderInfoLoading`\* | `boolean`                                                                                                                     | True while provider info is being fetched.                                                                      |
| `direction`               | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                  | Operation direction — controls which token's decimals/ticker label the "You get" amount. Defaults to `'stake'`. |

#### `StakingProviderProps` [#stakingproviderprops]

Props accepted by [`StakingWidgetProvider`](#stakingwidgetprovider).

| Field     | Type                                                                             | Description                                                                                                                  |
| --------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `network` | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | Network used for quote fetching, balance reads, and transactions. Falls back to the connected wallet's network when omitted. |

#### `StakingSettingsModalProps` [#stakingsettingsmodalprops]

Props accepted by [`StakingSettingsModal`](#stakingsettingsmodal).

| Field                | Type                                                                                                          | Description                                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `open`\*             | `boolean`                                                                                                     | Controls modal visibility.                                                             |
| `onClose`\*          | `() => void`                                                                                                  | Called when the user dismisses the modal or after a successful save.                   |
| `provider`\*         | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a> \| undefined</code> | Currently active staking provider — used to preselect the option when the modal opens. |
| `providers`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a>\[]</code>           | All registered staking providers to choose from.                                       |
| `onProviderChange`\* | `(providerId: string) => void`                                                                                | Invoked with the chosen `providerId` when the user saves a different selection.        |
| `network`            | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                              | Network used to resolve each provider's display name via its metadata.                 |

#### `StakingWidgetProps` [#stakingwidgetprops]

Props accepted by [`StakingWidget`](#stakingwidget). Extends [`StakingProviderProps`](#stakingproviderprops) (e.g. `network`) and standard `<div>` props forwarded to the default UI.

| Field      | Type                                                                                                | Description                                                                                                                                                                                                                                                                                                                |
| ---------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children` | <code>(props: <a href="#stakingwidgetrenderprops">StakingWidgetRenderProps</a>) => ReactNode</code> | Optional render-prop. When provided, the default [`StakingWidgetUI`](#stakingwidgetui) is bypassed and this function is called with the full [`StakingWidgetRenderProps`](#stakingwidgetrenderprops) (context state + forwarded `<div>` props), letting consumers build a custom UI on top of the widget's internal logic. |
| `network`  | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                    | Network used for quote fetching, balance reads, and transactions. Falls back to the connected wallet's network when omitted.                                                                                                                                                                                               |

#### `StakingWidgetRenderProps` [#stakingwidgetrenderprops]

Props accepted by [`StakingWidgetUI`](#stakingwidgetui) (also the argument type for the `StakingWidget` render-prop). Combines the full [`StakingContextType`](#stakingcontexttype) with standard `<div>` props forwarded to the outer wrapper.

| Field                       | Type                                                                                                                              | Description                                                                                                                                               |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`\*                  | `string`                                                                                                                          | Amount the user wants to stake (string to preserve input UX)                                                                                              |
| `canSubmit`\*               | `boolean`                                                                                                                         | Whether the user can proceed with staking (checks balance, amount validity, etc.)                                                                         |
| `quote`\*                   | <code><a href="/applications/appkit/reference/appkit#stakingquote">StakingQuote</a> \| undefined</code>                           | Raw staking quote from the provider                                                                                                                       |
| `isQuoteLoading`\*          | `boolean`                                                                                                                         | True while the stake quote is being fetched                                                                                                               |
| `error`\*                   | `string \| null`                                                                                                                  | Current validation/fetch error for staking, null when everything is ok                                                                                    |
| `providerInfo`\*            | <code><a href="/applications/appkit/reference/appkit#stakingproviderinfo">StakingProviderInfo</a> \| undefined</code>             | Staking provider dynamic info (APY, instant unstake availability, etc.)                                                                                   |
| `providerMetadata`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovidermetadata">StakingProviderMetadata</a> \| undefined</code>     | Staking provider static metadata                                                                                                                          |
| `stakingProvider`\*         | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a> \| undefined</code>                     | Currently selected staking provider (defaults to the first registered one)                                                                                |
| `stakingProviders`\*        | <code><a href="/applications/appkit/reference/appkit#stakingprovider">StakingProvider</a>\[]</code>                               | All registered staking providers                                                                                                                          |
| `setStakingProviderId`\*    | `(providerId: string) => void`                                                                                                    | Updates the selected staking provider                                                                                                                     |
| `network`\*                 | <code><a href="/applications/appkit/reference/appkit#network">Network</a> \| undefined</code>                                     | Network the widget is operating on (resolved from prop or wallet)                                                                                         |
| `direction`\*               | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code>                      | Current operation direction: 'stake' or 'unstake'                                                                                                         |
| `isProviderInfoLoading`\*   | `boolean`                                                                                                                         | True while provider info is being fetched                                                                                                                 |
| `balance`\*                 | `string \| undefined`                                                                                                             | Base balance (native or jetton) available for staking                                                                                                     |
| `isBalanceLoading`\*        | `boolean`                                                                                                                         | True while base balance is being fetched                                                                                                                  |
| `stakedBalance`\*           | <code><a href="/applications/appkit/reference/appkit#stakingbalance">StakingBalance</a> \| undefined</code>                       | User's currently staked balance                                                                                                                           |
| `isStakedBalanceLoading`\*  | `boolean`                                                                                                                         | True while staked balance is being fetched                                                                                                                |
| `unstakeMode`\*             | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                                        | Selected unstake-timing mode — `'INSTANT'`, `'WHEN_AVAILABLE'`, or `'ROUND_END'`. See [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). |
| `setAmount`\*               | `(amount: string) => void`                                                                                                        | Sets the input amount                                                                                                                                     |
| `setUnstakeMode`\*          | <code>(mode: <a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a>) => void</code>                        | Sets the unstake mode                                                                                                                                     |
| `sendTransaction`\*         | `() => Promise<void>`                                                                                                             | Triggers the staking/unstaking transaction                                                                                                                |
| `onChangeDirection`\*       | <code>(direction: <a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a>) => void</code> | Changes the direction (stake/unstake)                                                                                                                     |
| `isSendingTransaction`\*    | `boolean`                                                                                                                         | True while a transaction is being processed                                                                                                               |
| `isReversed`\*              | `boolean`                                                                                                                         | True if the user is inputting the output amount ("I want to get X")                                                                                       |
| `toggleReversed`\*          | `() => void`                                                                                                                      | Toggles between inputting from amount and output amount                                                                                                   |
| `reversedAmount`\*          | `string`                                                                                                                          | Amount displayed in the reversed (bottom) input                                                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                                                      | Sets the input amount to the maximum available balance (leaves room for Gram gas on native stake)                                                         |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                                                         | True when the built transaction outflow exceeds the user's Gram balance                                                                                   |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                                             | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.                                                            |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                                          | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op.                                                  |
| `onLowBalanceChange`\*      | `() => void`                                                                                                                      | Replace the input with a value that fits within the current Gram balance and close the warning.                                                           |
| `onLowBalanceCancel`\*      | `() => void`                                                                                                                      | Dismiss the low-balance warning without changing the input.                                                                                               |

#### `UseBuildStakeTransactionReturnType` [#usebuildstaketransactionreturntype]

Return type of [`useBuildStakeTransaction`](#usebuildstaketransaction) — TanStack Query mutation result that resolves to a [`TransactionRequest`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseBuildStakeTransactionReturnType = UseMutationResult<
    BuildStakeTransactionData,
    BuildStakeTransactionErrorType,
    BuildStakeTransactionVariables,
    context
>;
```

#### `UseStakedBalanceParameters` [#usestakedbalanceparameters]

Parameters accepted by [`useStakedBalance`](#usestakedbalance) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the owner address, optional network override and optional `providerId`.

| Field         | Type                                                                                                     | Description                                                                                                                                                   |
| ------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `userAddress` | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code> | Owner whose staked balance should be read.                                                                                                                    |
| `network`     | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                         | Network to query. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set.   |
| `providerId`  | `string`                                                                                                 | Provider to query. Defaults to the registered default staking provider.                                                                                       |
| `query`       | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                     | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseStakedBalanceReturnType` [#usestakedbalancereturntype]

Return type of [`useStakedBalance`](#usestakedbalance) — TanStack Query result carrying the user's staked balance.

```ts
type UseStakedBalanceReturnType = UseQueryReturnType<
    selectData,
    GetStakedBalanceErrorType
>;
```

#### `UseStakingProviderInfoParameters` [#usestakingproviderinfoparameters]

Parameters accepted by [`useStakingProviderInfo`](#usestakingproviderinfo) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus an optional `providerId` and network override.

| Field        | Type                                                                                 | Description                                                                                                                                                                               |
| ------------ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `network`    | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network whose staking pool should be inspected. Defaults to the selected wallet's network. If no wallet is selected, falls back to AppKit's default network, or mainnet when none is set. |
| `providerId` | `string`                                                                             | Provider to query. Defaults to the registered default staking provider.                                                                                                                   |
| `query`      | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                             |

#### `UseStakingProviderInfoReturnType` [#usestakingproviderinforeturntype]

Return type of [`useStakingProviderInfo`](#usestakingproviderinfo) — TanStack Query result carrying live [`StakingProviderInfo`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseStakingProviderInfoReturnType = UseQueryReturnType<
    selectData,
    GetStakingProviderInfoErrorType
>;
```

#### `UseStakingProviderMetadataParameters` [#usestakingprovidermetadataparameters]

Parameters accepted by [`useStakingProviderMetadata`](#usestakingprovidermetadata) — optional `providerId` and network override.

```ts
type UseStakingProviderMetadataParameters = GetStakingProviderMetadataOptions;
```

#### `UseStakingProviderMetadataReturnType` [#usestakingprovidermetadatareturntype]

Return type of [`useStakingProviderMetadata`](#usestakingprovidermetadata) — static [`StakingProviderMetadata`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) for the resolved provider, or `undefined` when no provider matches and no default is registered (the hook swallows the throw from [`getStakingProviderMetadata`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)).

```ts
type UseStakingProviderMetadataReturnType = GetStakingProviderMetadataReturnType | undefined;
```

#### `GetStakingProviderOptions` [#getstakingprovideroptions]

Parameters accepted by [`useStakingProvider`](#usestakingprovider) — optional provider ID forwarded to [`getStakingProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type GetStakingProviderOptions = GetStakingProviderOptions;
```

#### `UseStakingProviderReturnType` [#usestakingproviderreturntype]

Return type of [`useStakingProvider`](#usestakingprovider) — the matching staking provider, or `undefined` when none resolves (the hook swallows the throw from [`getStakingProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)).

```ts
type UseStakingProviderReturnType = GetStakingProviderReturnType | undefined;
```

#### `UseStakingProvidersReturnType` [#usestakingprovidersreturntype]

Return type of [`useStakingProviders`](#usestakingproviders) — array of registered staking providers.

```ts
type UseStakingProvidersReturnType = GetStakingProvidersReturnType;
```

#### `UseStakingQuoteParameters` [#usestakingquoteparameters]

Parameters accepted by [`useStakingQuote`](#usestakingquote) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus stake/unstake amount, direction, target asset and optional `providerId`/network override.

| Field             | Type                                                                                                         | Description                                                                                                                                                                                                                                                                                                  |
| ----------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `direction`       | <code><a href="/applications/appkit/reference/appkit#stakingquotedirection">StakingQuoteDirection</a></code> | Direction of the quote (stake or unstake)                                                                                                                                                                                                                                                                    |
| `amount`          | `string`                                                                                                     | Amount of tokens to stake or unstake.                                                                                                                                                                                                                                                                        |
| `userAddress`     | <code><a href="/applications/appkit/reference/appkit#userfriendlyaddress">UserFriendlyAddress</a></code>     | Address of the user.                                                                                                                                                                                                                                                                                         |
| `network`         | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>                             | Network on which the staking will be executed.                                                                                                                                                                                                                                                               |
| `unstakeMode`     | <code><a href="/applications/appkit/reference/appkit#unstakemodes">UnstakeModes</a></code>                   | Unstake-timing mode the quote should target — see [`UnstakeMode`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) for the supported flavours (`'INSTANT'`, `'WHEN_AVAILABLE'`, `'ROUND_END'`). Only meaningful when `direction === 'unstake'` and the provider lists the mode in `supportedUnstakeModes`. |
| `isReversed`      | `boolean`                                                                                                    | If true, for unstake requests the amount is specified in the staking coin (e.g. GRAM) instead of the Liquid Staking Token (e.g. tsTON).                                                                                                                                                                      |
| `providerOptions` | `TProviderOptions = unknown`                                                                                 | Provider-specific options.                                                                                                                                                                                                                                                                                   |
| `providerId`      | `string`                                                                                                     | Provider to quote against. Defaults to the registered default staking provider.                                                                                                                                                                                                                              |
| `query`           | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)                         | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper.                                                                                                                                                |

#### `UseStakingQuoteReturnType` [#usestakingquotereturntype]

Return type of [`useStakingQuote`](#usestakingquote) — TanStack Query result carrying a [`StakingQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseStakingQuoteReturnType = UseQueryReturnType<
    selectData,
    GetStakingQuoteErrorType
>;
```

### Swap [#swap-2]

#### `SwapContextType` [#swapcontexttype]

Shape of the value exposed by [`useSwapContext`](#useswapcontext). Holds the selected source/target tokens, the entered amount and the latest quote, balance readouts, validation state, slippage / provider settings, and the callbacks needed to mutate them or to submit the swap transaction.

| Field                       | Type                                                                                                    | Description                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `tokens`\*                  | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                                              | Full list of available tokens for swapping                                                               |
| `tokenSections`             | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>                                    | Optional section configs for grouping tokens in the selector                                             |
| `fromToken`\*               | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected source token                                                                          |
| `toToken`\*                 | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected target token                                                                          |
| `fromAmount`\*              | `string`                                                                                                | Amount the user wants to swap (string to preserve input UX)                                              |
| `toAmount`\*                | `string`                                                                                                | Calculated receive amount from the current quote                                                         |
| `fiatSymbol`\*              | `string`                                                                                                | Fiat currency symbol for price display, e.g. "\$"                                                        |
| `fromBalance`\*             | `string \| undefined`                                                                                   | User's balance of the "from" token                                                                       |
| `toBalance`\*               | `string \| undefined`                                                                                   | User's balance of the "to" token                                                                         |
| `isFromBalanceLoading`\*    | `boolean`                                                                                               | True while the "from" balance is being fetched                                                           |
| `isToBalanceLoading`\*      | `boolean`                                                                                               | True while the "to" balance is being fetched                                                             |
| `canSubmit`\*               | `boolean`                                                                                               | Whether the user can proceed with the swap (checks balance, amount, quote)                               |
| `quote`\*                   | `GetSwapQuoteData \| undefined`                                                                         | Raw swap quote from the provider                                                                         |
| `isQuoteLoading`\*          | `boolean`                                                                                               | True while the quote is being fetched from the API                                                       |
| `error`\*                   | `string \| null`                                                                                        | Current validation or fetch error, null when everything is ok                                            |
| `slippage`\*                | `number`                                                                                                | Slippage tolerance in basis points (100 = 1%)                                                            |
| `swapProvider`\*            | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a> \| undefined</code> | Currently selected swap provider (defaults to the first registered one)                                  |
| `swapProviders`\*           | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a>\[]</code>           | All registered swap providers                                                                            |
| `setSwapProviderId`\*       | `(providerId: string) => void`                                                                          | Updates the selected swap provider                                                                       |
| `setFromToken`\*            | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the source token                                                                                 |
| `setToToken`\*              | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the target token                                                                                 |
| `setFromAmount`\*           | `(amount: string) => void`                                                                              | Updates the swap amount                                                                                  |
| `setSlippage`\*             | `(slippage: number) => void`                                                                            | Updates the slippage tolerance                                                                           |
| `onFlip`\*                  | `() => void`                                                                                            | Swaps source and target tokens                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                            | Sets the "from" amount to the maximum available balance                                                  |
| `sendSwapTransaction`\*     | `() => Promise<void>`                                                                                   | Executes the swap transaction                                                                            |
| `isSendingTransaction`\*    | `boolean`                                                                                               | True while a transaction is being built or sent                                                          |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                               | True when the built transaction outflow exceeds the user's Gram balance                                  |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                   | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.           |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op. |
| `onLowBalanceChange`\*      | `() => void`                                                                                            | Replace the input with a value that fits within the current Gram balance and close the warning.          |
| `onLowBalanceCancel`\*      | `() => void`                                                                                            | Dismiss the low-balance warning without changing the input.                                              |

#### `SwapFieldProps` [#swapfieldprops]

Props accepted by [`SwapField`](#swapfield) — a single source/target row inside the swap widget that hosts the amount input, token picker trigger, fiat conversion and balance line.

| Field                  | Type                                                    | Description                                                                                                                             |     |                           |
| ---------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------- |
| `type`\*               | `'pay' \| 'receive'`                                    | `pay` renders the editable source row with a "max" shortcut. `receive` renders the read-only target row.                                |     |                           |
| `amount`\*             | `string`                                                | Current amount shown in the input as a human-readable decimal string.                                                                   |     |                           |
| `fiatSymbol`           | `string`                                                | Fiat currency symbol displayed in front of the converted value. Defaults to `"$"`.                                                      |     |                           |
| `token`                | <code><a href="#appkituitoken">AppkitUIToken</a></code> | Currently selected token. Controls the token selector label, balance formatting and fiat conversion.                                    |     |                           |
| `onAmountChange`       | `(value: string) => void`                               | Called with the raw input value when the user edits the amount. Only fired for `type: "pay"`.                                           |     |                           |
| `balance`              | `string`                                                | Formatted balance of `token` for the active wallet, as a human-readable decimal string. Rendered in the balance line beneath the input. |     |                           |
| `isBalanceLoading`     | `boolean`                                               | When true, the balance area renders a skeleton placeholder instead of the value.                                                        |     |                           |
| `loading`              | `boolean`                                               | When true, the underlying input renders its loading state — used while a fresh quote is in flight.                                      |     |                           |
| `onMaxClick`           | `() => void`                                            | Called when the user clicks the "max" shortcut to fill the maximum spendable amount.                                                    |     |                           |
| `onTokenSelectorClick` | `() => void`                                            | Called when the user clicks the token selector chip — typically opens a `SwapTokenSelectModal`.                                         |     |                           |
| `size`                 | `InputSize`                                             | Size token applied to the input control(s) inside: \`'s'                                                                                | 'm' | 'l'`. Defaults to `'m'\`. |
| `variant`              | `InputVariant`                                          | Visual variant: `'default'` paints a filled field. `'unstyled'` drops the chrome.                                                       |     |                           |
| `disabled`             | `boolean`                                               | When true, descendant input controls are disabled.                                                                                      |     |                           |
| `error`                | `boolean`                                               | When true, the field renders in error styling and [`Input.Caption`](#input) switches to error text.                                     |     |                           |
| `resizable`            | `boolean`                                               | When true, [`Input.Input`](#input) scales its font down to fit the available width as the user types.                                   |     |                           |

#### `SwapFlipButtonProps` [#swapflipbuttonprops]

Props accepted by [`SwapFlipButton`](#swapflipbutton) — the round button placed between the two [`SwapField`](#swapfield) rows that swaps the source and target tokens.

| Field     | Type         | Description                                                                                                                               |
| --------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `onClick` | `() => void` | Called when the user clicks the button. Wire this to a handler that swaps the source/target tokens (e.g. `onFlip` from the swap context). |
| `rotated` | `boolean`    | When true, the icon is drawn in its rotated state — used to animate between flips.                                                        |

#### `SwapInfoProps` [#swapinfoprops]

Props accepted by [`SwapInfo`](#swapinfo) — the summary block under the swap form that surfaces minimum received, slippage and the chosen provider.

| Field            | Type                                                                                       | Description                                                                                                                      |
| ---------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `toToken`\*      | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                            | Target token the user is receiving. Used to format `minReceived` with the right decimals and symbol.                             |
| `slippage`\*     | `number`                                                                                   | Slippage tolerance in basis points (`100` = 1%). Rendered as a percentage.                                                       |
| `provider`       | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a></code> | Current [`SwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md). Its display name is shown in the provider row.     |
| `quote`          | <code><a href="/applications/appkit/reference/appkit#swapquote">SwapQuote</a></code>       | Quote whose `minReceived` value is displayed. When undefined the value falls back to `0` (still suffixed with the token symbol). |
| `isQuoteLoading` | `boolean`                                                                                  | When true, the minimum-received value renders a skeleton placeholder instead of the formatted number.                            |

#### `SwapProviderProps` [#swapproviderprops]

Props accepted by [`SwapWidgetProvider`](#swapwidgetprovider) — the inputs that configure the swap flow (token universe, network override, defaults).

| Field               | Type                                                                             | Description                                                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `tokens`\*          | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                       | Full list of tokens available for swapping in the UI. Filtered to the active network internally.                                              |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>             | Optional section configs for grouping tokens inside the `SwapTokenSelectModal`.                                                               |
| `defaultFromSymbol` | `string`                                                                         | Symbol of the token pre-selected as the source on first mount (e.g. `"GRAM"`).                                                                |
| `defaultToSymbol`   | `string`                                                                         | Symbol of the token pre-selected as the target on first mount.                                                                                |
| `network`           | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code> | Network used for quote fetching and balance reads. When omitted, falls back to the selected wallet's network via [`useNetwork`](#usenetwork). |
| `fiatSymbol`        | `string`                                                                         | Fiat currency symbol displayed next to converted amounts. Defaults to `"$"`.                                                                  |
| `defaultSlippage`   | `number`                                                                         | Initial slippage tolerance in basis points (`100` = 1%). Defaults to `100`.                                                                   |

#### `SwapWidgetProps` [#swapwidgetprops]

Props accepted by [`SwapWidget`](#swapwidget) — extend [`SwapProviderProps`](#swapproviderprops) (swap configuration: tokens, network, defaults) with the standard `<div>` attributes and an optional render-prop override.

| Field               | Type                                                                                          | Description                                                                                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `children`          | <code>(props: <a href="#swapwidgetrenderprops">SwapWidgetRenderProps</a>) => ReactNode</code> | Optional render-prop receiving the full swap context plus the forwarded `<div>` props. When supplied it replaces the default [`SwapWidgetUI`](#swapwidgetui). |
| `network`           | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>              | Network used for quote fetching and balance reads. When omitted, falls back to the selected wallet's network via [`useNetwork`](#usenetwork).                 |
| `tokens`\*          | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                                    | Full list of tokens available for swapping in the UI. Filtered to the active network internally.                                                              |
| `tokenSections`     | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>                          | Optional section configs for grouping tokens inside the `SwapTokenSelectModal`.                                                                               |
| `defaultFromSymbol` | `string`                                                                                      | Symbol of the token pre-selected as the source on first mount (e.g. `"GRAM"`).                                                                                |
| `defaultToSymbol`   | `string`                                                                                      | Symbol of the token pre-selected as the target on first mount.                                                                                                |
| `fiatSymbol`        | `string`                                                                                      | Fiat currency symbol displayed next to converted amounts. Defaults to `"$"`.                                                                                  |
| `defaultSlippage`   | `number`                                                                                      | Initial slippage tolerance in basis points (`100` = 1%). Defaults to `100`.                                                                                   |

#### `SwapWidgetRenderProps` [#swapwidgetrenderprops]

Props accepted by [`SwapWidgetUI`](#swapwidgetui) (and the `children` render-prop on [`SwapWidget`](#swapwidget)). Combines the full [`SwapContextType`](#swapcontexttype) with the standard `<div>` attributes forwarded to the wrapper element.

| Field                       | Type                                                                                                    | Description                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `tokens`\*                  | <code><a href="#appkituitoken">AppkitUIToken</a>\[]</code>                                              | Full list of available tokens for swapping                                                               |
| `tokenSections`             | <code><a href="#tokensectionconfig">TokenSectionConfig</a>\[]</code>                                    | Optional section configs for grouping tokens in the selector                                             |
| `fromToken`\*               | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected source token                                                                          |
| `toToken`\*                 | <code><a href="#appkituitoken">AppkitUIToken</a> \| null</code>                                         | Currently selected target token                                                                          |
| `fromAmount`\*              | `string`                                                                                                | Amount the user wants to swap (string to preserve input UX)                                              |
| `toAmount`\*                | `string`                                                                                                | Calculated receive amount from the current quote                                                         |
| `fiatSymbol`\*              | `string`                                                                                                | Fiat currency symbol for price display, e.g. "\$"                                                        |
| `fromBalance`\*             | `string \| undefined`                                                                                   | User's balance of the "from" token                                                                       |
| `toBalance`\*               | `string \| undefined`                                                                                   | User's balance of the "to" token                                                                         |
| `isFromBalanceLoading`\*    | `boolean`                                                                                               | True while the "from" balance is being fetched                                                           |
| `isToBalanceLoading`\*      | `boolean`                                                                                               | True while the "to" balance is being fetched                                                             |
| `canSubmit`\*               | `boolean`                                                                                               | Whether the user can proceed with the swap (checks balance, amount, quote)                               |
| `quote`\*                   | `GetSwapQuoteData \| undefined`                                                                         | Raw swap quote from the provider                                                                         |
| `isQuoteLoading`\*          | `boolean`                                                                                               | True while the quote is being fetched from the API                                                       |
| `error`\*                   | `string \| null`                                                                                        | Current validation or fetch error, null when everything is ok                                            |
| `slippage`\*                | `number`                                                                                                | Slippage tolerance in basis points (100 = 1%)                                                            |
| `swapProvider`\*            | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a> \| undefined</code> | Currently selected swap provider (defaults to the first registered one)                                  |
| `swapProviders`\*           | <code><a href="/applications/appkit/reference/appkit#swapprovider">SwapProvider</a>\[]</code>           | All registered swap providers                                                                            |
| `setSwapProviderId`\*       | `(providerId: string) => void`                                                                          | Updates the selected swap provider                                                                       |
| `setFromToken`\*            | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the source token                                                                                 |
| `setToToken`\*              | <code>(token: <a href="#appkituitoken">AppkitUIToken</a>) => void</code>                                | Updates the target token                                                                                 |
| `setFromAmount`\*           | `(amount: string) => void`                                                                              | Updates the swap amount                                                                                  |
| `setSlippage`\*             | `(slippage: number) => void`                                                                            | Updates the slippage tolerance                                                                           |
| `onFlip`\*                  | `() => void`                                                                                            | Swaps source and target tokens                                                                           |
| `onMaxClick`\*              | `() => void`                                                                                            | Sets the "from" amount to the maximum available balance                                                  |
| `sendSwapTransaction`\*     | `() => Promise<void>`                                                                                   | Executes the swap transaction                                                                            |
| `isSendingTransaction`\*    | `boolean`                                                                                               | True while a transaction is being built or sent                                                          |
| `isLowBalanceWarningOpen`\* | `boolean`                                                                                               | True when the built transaction outflow exceeds the user's Gram balance                                  |
| `lowBalanceMode`\*          | `'reduce' \| 'topup'`                                                                                   | `reduce` when the outgoing token is Gram (user can fix by changing amount), `topup` otherwise.           |
| `lowBalanceRequiredTon`\*   | `string`                                                                                                | Required Gram amount for the pending operation, formatted as a decimal string. Empty when no pending op. |
| `onLowBalanceChange`\*      | `() => void`                                                                                            | Replace the input with a value that fits within the current Gram balance and close the warning.          |
| `onLowBalanceCancel`\*      | `() => void`                                                                                            | Dismiss the low-balance warning without changing the input.                                              |

#### `UseBuildSwapTransactionParameters` [#usebuildswaptransactionparameters]

Parameters accepted by [`useBuildSwapTransaction`](#usebuildswaptransaction) — TanStack Query mutation options.

```ts
type UseBuildSwapTransactionParameters = BuildSwapTransactionMutationOptions<context>;
```

#### `UseBuildSwapTransactionReturnType` [#usebuildswaptransactionreturntype]

Return type of [`useBuildSwapTransaction`](#usebuildswaptransaction) — TanStack Query mutation result.

```ts
type UseBuildSwapTransactionReturnType = UseMutationResult<
    BuildSwapTransactionData,
    BuildSwapTransactionErrorType,
    BuildSwapTransactionVariables,
    context
>;
```

#### `UseSwapProviderReturnType` [#useswapproviderreturntype]

Return type of [`useSwapProvider`](#useswapprovider) — `[provider, setProviderId]` tuple. `provider` is the default `SwapProviderInterface` (or `undefined` when none is registered). `setProviderId` calls [`setDefaultSwapProvider`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and emits `provider:default-changed`, which [`watchSwapProviders`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) picks up.

```ts
type UseSwapProviderReturnType = readonly [GetSwapProviderReturnType | undefined, (providerId: string) => void];
```

#### `UseSwapProvidersReturnType` [#useswapprovidersreturntype]

Return type of [`useSwapProviders`](#useswapproviders) — array of every `SwapProviderInterface` currently registered on the AppKit instance.

```ts
type UseSwapProvidersReturnType = GetSwapProvidersReturnType;
```

#### `UseSwapQuoteParameters` [#useswapquoteparameters]

Parameters accepted by [`useSwapQuote`](#useswapquote) — TanStack Query options (`select`, `enabled`, `staleTime`, …) plus the [`SwapQuoteParams`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) fields (source/target tokens, amount, `isReverseSwap` flag) and an optional `providerId` / network override.

| Field                 | Type                                                                                 | Description                                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`              | `string`                                                                             | Amount of tokens to swap (incoming or outgoing depending on isReverseSwap)                                                                                    |
| `from`                | <code><a href="/applications/appkit/reference/appkit#swaptoken">SwapToken</a></code> | Token to swap from.                                                                                                                                           |
| `to`                  | <code><a href="/applications/appkit/reference/appkit#swaptoken">SwapToken</a></code> | Token to swap to.                                                                                                                                             |
| `network`             | <code><a href="/applications/appkit/reference/appkit#network">Network</a></code>     | Network on which the swap will be executed.                                                                                                                   |
| `slippageBps`         | `number`                                                                             | Slippage tolerance in basis points (1 `bp` = 0.01%)                                                                                                           |
| `maxOutgoingMessages` | `number`                                                                             | Maximum number of outgoing messages                                                                                                                           |
| `providerOptions`     | `TProviderOptions = unknown`                                                         | Provider-specific options.                                                                                                                                    |
| `isReverseSwap`       | `boolean`                                                                            | If true, amount is the amount to receive (buy). If false, amount is the amount to spend (sell).                                                               |
| `providerId`          | `string`                                                                             | Provider to quote against. Defaults to the registered default swap provider.                                                                                  |
| `query`               | [`QueryOptionsOverride`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) | TanStack Query options forwarded to `useQuery` (`enabled`, `staleTime`, `refetchInterval`, `select`, …). `queryKey` and `queryFn` are managed by the wrapper. |

#### `UseSwapQuoteReturnType` [#useswapquotereturntype]

Return type of [`useSwapQuote`](#useswapquote) — TanStack Query result carrying `data` ([`SwapQuote`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md)), `isLoading`, `error` and the standard companions.

```ts
type UseSwapQuoteReturnType = UseQueryReturnType<
    selectData,
    GetSwapQuoteErrorType
>;
```

### Transactions [#transactions-1]

#### `UseSendTransactionParameters` [#usesendtransactionparameters]

Parameters accepted by [`useSendTransaction`](#usesendtransaction) — TanStack Query mutation options.

```ts
type UseSendTransactionParameters = SendTransactionOptions<context>;
```

#### `UseSendTransactionReturnType` [#usesendtransactionreturntype]

Return type of [`useSendTransaction`](#usesendtransaction) — TanStack Query mutation result.

```ts
type UseSendTransactionReturnType = UseMutationReturnType<
    SendTransactionData,
    SendTransactionErrorType,
    SendTransactionVariables,
    context,
    (
        variables: SendTransactionVariables,
        options?: MutateOptions<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>,
    ) => void,
    MutateFunction<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>
>;
```

#### `UseTransactionStatusParameters` [#usetransactionstatusparameters]

Parameters accepted by [`useTransactionStatus`](#usetransactionstatus) — `boc` xor `normalizedHash` plus optional network and TanStack Query overrides. Pair with `query.refetchInterval` to poll until the transaction completes.

```ts
type UseTransactionStatusParameters = GetTransactionStatusParameters &
    GetTransactionStatusQueryConfig<selectData>;
```

#### `UseTransactionStatusReturnType` [#usetransactionstatusreturntype]

Return type of [`useTransactionStatus`](#usetransactionstatus) — TanStack Query result for the status read.

```ts
type UseTransactionStatusReturnType = UseQueryReturnType<
    selectData,
    GetTransactionStatusErrorType
>;
```

#### `UseTransferTonParameters` [#usetransfertonparameters]

Parameters accepted by [`useTransferTon`](#usetransferton) — TanStack Query mutation options.

```ts
type UseTransferTonParameters = TransferTonOptions<context>;
```

#### `UseTransferTonReturnType` [#usetransfertonreturntype]

Return type of [`useTransferTon`](#usetransferton) — TanStack Query mutation result.

```ts
type UseTransferTonReturnType = UseMutationReturnType<
    TransferTonData,
    TransferTonErrorType,
    TransferTonVariables,
    context,
    (
        variables: TransferTonVariables,
        options?: MutateOptions<TransferTonData, TransferTonErrorType, TransferTonVariables, context>,
    ) => void,
    MutateFunction<TransferTonData, TransferTonErrorType, TransferTonVariables, context>
>;
```

#### `UseWatchTransactionsByAddressParameters` [#usewatchtransactionsbyaddressparameters]

Parameters accepted by [`useWatchTransactionsByAddress`](#usewatchtransactionsbyaddress) — same fields as [`WatchTransactionsByAddressOptions`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md), all optional so callers can render the hook before the address is known.

```ts
type UseWatchTransactionsByAddressParameters = Partial<WatchTransactionsByAddressOptions>;
```

#### `UseWatchTransactionsParameters` [#usewatchtransactionsparameters]

Parameters accepted by [`useWatchTransactions`](#usewatchtransactions).

| Field      | Type                                                                                                                     | Description                                                              |
| ---------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `onChange` | <code>(update: <a href="/applications/appkit/reference/appkit#transactionsupdate">TransactionsUpdate</a>) => void</code> | Callback fired on every transactions update from the streaming provider. |

### UI [#ui-1]

#### `BlockProps` [#blockprops]

Props accepted by [`Block`](#block).

| Field       | Type                | Description                                          |
| ----------- | ------------------- | ---------------------------------------------------- |
| `direction` | `'row' \| 'column'` | Flex direction of the block. Defaults to `'column'`. |

#### `ButtonProps` [#buttonprops]

Props accepted by [`Button`](#button).

| Field          | Type                 | Description                                                                                                                                                                                                                                    |
| -------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `size`         | `ButtonSize`         | Size class applied to the button. Pass `'unset'` to skip the size class entirely (no padding, no typography) — useful with `variant="unstyled"`.                                                                                               |
| `borderRadius` | `ButtonBorderRadius` | Border radius token. Defaults to a size-dependent value (`s` → `2xl`, `m` → `l`, `l` → `xl`).                                                                                                                                                  |
| `variant`      | `ButtonVariant`      | Visual variant. Use `'unstyled'` to opt out of all built-in styling — the consumer is fully responsible for visuals via `className`. The Button still provides ref forwarding, `disabled`/`loading` plumbing, and `icon`/`children` rendering. |
| `loading`      | `boolean`            | When true, renders a spinner instead of `icon`/`children` and disables the button.                                                                                                                                                             |
| `fullWidth`    | `boolean`            | When true, the button stretches to fill its container width.                                                                                                                                                                                   |
| `icon`         | `ReactNode`          | Optional leading icon rendered before `children` when not loading.                                                                                                                                                                             |

#### `CenteredAmountInputProps` [#centeredamountinputprops]

Props accepted by [`CenteredAmountInput`](#centeredamountinput).

| Field             | Type                      | Description                                                   |
| ----------------- | ------------------------- | ------------------------------------------------------------- |
| `value`\*         | `string`                  | Controlled input value (decimal string).                      |
| `onValueChange`\* | `(value: string) => void` | Called with the new string whenever the user edits the input. |
| `ticker`          | `string`                  | Optional trailing ticker label (e.g., `'GRAM'`).              |
| `symbol`          | `string`                  | Optional leading currency symbol (e.g., `'$'`).               |
| `placeholder`     | `string`                  | Placeholder shown when `value` is empty. Defaults to `'0'`.   |
| `disabled`        | `boolean`                 | When true, the underlying `<input>` is disabled.              |

#### `CollapsibleProps` [#collapsibleprops]

Props accepted by [`Collapsible`](#collapsible).

| Field    | Type      | Description                                                                     |
| -------- | --------- | ------------------------------------------------------------------------------- |
| `open`\* | `boolean` | When true, the content is expanded. When false, it is collapsed to zero height. |

#### `IconProps` [#iconprops]

Standard props for all icon components.

Icons render an `<svg>` whose dimensions are controlled by `size`. Color is
inherited from `currentColor`, so style icons by setting `color` on a parent.

| Field  | Type     | Description                                                                               |
| ------ | -------- | ----------------------------------------------------------------------------------------- |
| `size` | `number` | Square size of the icon in pixels. Defaults to [`DEFAULT_ICON_SIZE`](#default_icon_size). |

#### `InputContainerProps` [#inputcontainerprops]

Props accepted by [`Input.Container`](#input) (also used by [`Input`](#input) itself).

| Field        | Type           | Description                                                                                           |     |                           |
| ------------ | -------------- | ----------------------------------------------------------------------------------------------------- | --- | ------------------------- |
| `size`       | `InputSize`    | Size token applied to the input control(s) inside: \`'s'                                              | 'm' | 'l'`. Defaults to `'m'\`. |
| `variant`    | `InputVariant` | Visual variant: `'default'` paints a filled field. `'unstyled'` drops the chrome.                     |     |                           |
| `disabled`   | `boolean`      | When true, descendant input controls are disabled.                                                    |     |                           |
| `error`      | `boolean`      | When true, the field renders in error styling and [`Input.Caption`](#input) switches to error text.   |     |                           |
| `loading`    | `boolean`      | When true, [`Input.Input`](#input) renders a skeleton placeholder instead of an `<input>`.            |     |                           |
| `resizable`  | `boolean`      | When true, [`Input.Input`](#input) scales its font down to fit the available width as the user types. |     |                           |
| `children`\* | `ReactNode`    | Compound sub-components (header, field, control, caption).                                            |     |                           |

#### `InputControlProps` [#inputcontrolprops]

Props accepted by [`Input.Input`](#input) — standard `<input>` props. Size, disabled, loading, and resizable behavior are inherited from the surrounding [`Input.Container`](#input).

```ts
type InputControlProps = ComponentProps<'input'>;
```

#### `InputFieldProps` [#inputfieldprops]

Props accepted by [`Input.Field`](#input).

| Field        | Type        | Description                                                                  |
| ------------ | ----------- | ---------------------------------------------------------------------------- |
| `children`\* | `ReactNode` | Field content — typically slots and the input control laid out horizontally. |

#### `InputHeaderProps` [#inputheaderprops]

Props accepted by [`Input.Header`](#input).

| Field        | Type        | Description                                                                          |
| ------------ | ----------- | ------------------------------------------------------------------------------------ |
| `children`\* | `ReactNode` | Header content — typically a [`Input.Title`](#input) and optional trailing controls. |

#### `InputSlotProps` [#inputslotprops]

Props accepted by [`Input.Slot`](#input).

| Field  | Type                | Description                                  |
| ------ | ------------------- | -------------------------------------------- |
| `side` | `'left' \| 'right'` | Which edge of the field the slot adheres to. |

#### `LogoProps` [#logoprops]

Props accepted by [`Logo`](#logo).

| Field      | Type     | Description                                                                                                                                                             |
| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `size`     | `number` | Square size in pixels for the rendered logo. Defaults to `30`.                                                                                                          |
| `src`      | `string` | Image URL to render. While loading or on failure, the fallback is shown.                                                                                                |
| `alt`      | `string` | Alt text passed to the underlying `<img>`. When `fallback` is not provided, its first character is shown as the fallback. If both are missing, no fallback is rendered. |
| `fallback` | `string` | Text shown in place of the image when `src` fails or is missing (defaults to the first character of `alt`).                                                             |

#### `LogoWithNetworkProps` [#logowithnetworkprops]

Props accepted by [`LogoWithNetwork`](#logowithnetwork).

| Field        | Type     | Description                                                                                    |
| ------------ | -------- | ---------------------------------------------------------------------------------------------- |
| `size`       | `number` | Size of the main logo in pixels. Defaults to `30`. The network badge is sized to `size * 0.4`. |
| `src`        | `string` | Image source for the main logo.                                                                |
| `alt`        | `string` | Alt text for the main logo.                                                                    |
| `fallback`   | `string` | Fallback text shown when the main logo image fails or is missing.                              |
| `networkSrc` | `string` | Image source for the network badge overlay. When omitted, the badge is not rendered.           |
| `networkAlt` | `string` | Alt text for the network badge.                                                                |

#### `ModalProps` [#modalprops]

Props accepted by [`Modal`](#modal).

| Field           | Type                      | Description                                                                                      |
| --------------- | ------------------------- | ------------------------------------------------------------------------------------------------ |
| `open`          | `boolean`                 | Controlled open state.                                                                           |
| `onOpenChange`  | `(open: boolean) => void` | Called whenever the open state changes (e.g., via the close button, overlay click, or `Escape`). |
| `title`         | `string`                  | Optional title rendered in the modal header.                                                     |
| `children`      | `ReactNode`               | Modal body content.                                                                              |
| `className`     | `string`                  | Additional class name applied to the content container.                                          |
| `bodyClassName` | `string`                  | Additional class name applied to the body container.                                             |

#### `SelectContentProps` [#selectcontentprops]

Props accepted by [`Select.Content`](#select).

| Field        | Type               | Description                                   |
| ------------ | ------------------ | --------------------------------------------- |
| `align`      | `'start' \| 'end'` | Horizontal alignment relative to the trigger. |
| `sideOffset` | `number`           | Gap between trigger and content in pixels.    |

#### `SelectItemProps` [#selectitemprops]

Props accepted by [`Select.Item`](#select).

| Field      | Type      | Description                                                                     |
| ---------- | --------- | ------------------------------------------------------------------------------- |
| `value`\*  | `string`  | Value committed to [`Select.Root`](#select) when this item is chosen.           |
| `disabled` | `boolean` | When true, the item is not selectable and is excluded from keyboard navigation. |

#### `SelectRootProps` [#selectrootprops]

Props accepted by [`Select.Root`](#select).

| Field           | Type                      | Description                                                                                                   |
| --------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `value`         | `string`                  | Controlled selected value.                                                                                    |
| `defaultValue`  | `string`                  | Initial value when uncontrolled.                                                                              |
| `onValueChange` | `(value: string) => void` | Called whenever the selected value changes.                                                                   |
| `open`          | `boolean`                 | Controlled open state.                                                                                        |
| `defaultOpen`   | `boolean`                 | Initial open state when uncontrolled.                                                                         |
| `onOpenChange`  | `(open: boolean) => void` | Called whenever the open state changes.                                                                       |
| `disabled`      | `boolean`                 | When true, the trigger is non-interactive.                                                                    |
| `children`\*    | `ReactNode`               | Compound sub-components — [`Select.Trigger`](#select), [`Select.Content`](#select), [`Select.Item`](#select). |

#### `SelectTriggerProps` [#selecttriggerprops]

Props accepted by [`Select.Trigger`](#select) — same as [`ButtonProps`](#buttonprops). The trigger inherits `disabled` from the surrounding root if set.

```ts
type SelectTriggerProps = ButtonProps;
```

#### `SkeletonProps` [#skeletonprops]

Props accepted by [`Skeleton`](#skeleton).

| Field    | Type               | Description                                                                                  |
| -------- | ------------------ | -------------------------------------------------------------------------------------------- |
| `width`  | `string \| number` | Width of the placeholder. Accepts any valid CSS length or a number (interpreted as pixels).  |
| `height` | `string \| number` | Height of the placeholder. Accepts any valid CSS length or a number (interpreted as pixels). |

#### `TabsContentProps` [#tabscontentprops]

Props accepted by [`TabsContent`](#tabscontent).

| Field        | Type        | Description                                                                                           |
| ------------ | ----------- | ----------------------------------------------------------------------------------------------------- |
| `value`\*    | `string`    | Value this panel is associated with — rendered only when the parent [`Tabs`](#tabs) is on this value. |
| `children`\* | `ReactNode` | Panel content.                                                                                        |

#### `TabsListProps` [#tabslistprops]

Props accepted by [`TabsList`](#tabslist).

| Field        | Type        | Description                                                          |
| ------------ | ----------- | -------------------------------------------------------------------- |
| `children`\* | `ReactNode` | Tab triggers — typically one or more [`TabsTrigger`](#tabstrigger)s. |

#### `TabsProps` [#tabsprops]

Props accepted by [`Tabs`](#tabs).

| Field           | Type                      | Description                                                                                                                                   |
| --------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`         | `string`                  | Controlled active tab value.                                                                                                                  |
| `defaultValue`  | `string`                  | Initial active tab when uncontrolled. Defaults to `''`.                                                                                       |
| `onValueChange` | `(value: string) => void` | Called whenever the active tab changes.                                                                                                       |
| `children`\*    | `ReactNode`               | Compound sub-components — typically [`TabsList`](#tabslist) (with [`TabsTrigger`](#tabstrigger)s) followed by [`TabsContent`](#tabscontent)s. |

#### `TabsTriggerProps` [#tabstriggerprops]

Props accepted by [`TabsTrigger`](#tabstrigger).

| Field        | Type        | Description                                                                   |
| ------------ | ----------- | ----------------------------------------------------------------------------- |
| `value`\*    | `string`    | Value committed to the parent [`Tabs`](#tabs) when this trigger is activated. |
| `children`\* | `ReactNode` | Trigger label / content.                                                      |

### Wallets [#wallets-1]

#### `UseAddressReturnType` [#useaddressreturntype]

Return type of [`useAddress`](#useaddress) — `undefined` when no wallet is selected.

```ts
type UseAddressReturnType = string | undefined;
```

#### `UseConnectParameters` [#useconnectparameters]

Parameters accepted by [`useConnect`](#useconnect) — TanStack Query mutation options (`onSuccess`, `onError`, `onMutate`, `retry`, …).

```ts
type UseConnectParameters = ConnectOptions<context>;
```

#### `UseConnectReturnType` [#useconnectreturntype]

Return type of [`useConnect`](#useconnect) — TanStack Query mutation result with `mutate`/`mutateAsync` and the standard companions.

```ts
type UseConnectReturnType = UseMutationReturnType<
    ConnectData,
    ConnectErrorType,
    ConnectVariables,
    context,
    (
        variables: ConnectVariables,
        options?: MutateOptions<ConnectData, ConnectErrorType, ConnectVariables, context>,
    ) => void,
    MutateFunction<ConnectData, ConnectErrorType, ConnectVariables, context>
>;
```

#### `UseConnectedWalletsReturnType` [#useconnectedwalletsreturntype]

Return type of [`useConnectedWallets`](#useconnectedwallets) — same shape as [`GetConnectedWalletsReturnType`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md).

```ts
type UseConnectedWalletsReturnType = GetConnectedWalletsReturnType;
```

#### `UseDisconnectParameters` [#usedisconnectparameters]

Parameters accepted by [`useDisconnect`](#usedisconnect) — TanStack Query mutation options.

```ts
type UseDisconnectParameters = DisconnectOptions<context>;
```

#### `UseDisconnectReturnType` [#usedisconnectreturntype]

Return type of [`useDisconnect`](#usedisconnect) — TanStack Query mutation result.

```ts
type UseDisconnectReturnType = UseMutationReturnType<
    DisconnectData,
    DisconnectErrorType,
    DisconnectVariables,
    context,
    (
        variables: DisconnectVariables,
        options?: MutateOptions<DisconnectData, DisconnectErrorType, DisconnectVariables, context>,
    ) => void,
    MutateFunction<DisconnectData, DisconnectErrorType, DisconnectVariables, context>
>;
```

#### `UseSelectedWalletReturnType` [#useselectedwalletreturntype]

Return type of [`useSelectedWallet`](#useselectedwallet) — `[wallet, setWalletId]` tuple. `wallet` is the active [`WalletInterface`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) (or `null`). `setWalletId` calls [`setSelectedWalletId`](https://docs-rbcpr9qys-ton-core-docs.vercel.app/llms/applications/appkit/reference/appkit/content.md) and emits `wallets:selection-changed`.

```ts
type UseSelectedWalletReturnType = readonly [GetSelectedWalletReturnType, (walletId: string | null) => void];
```

## Constants [#constants]

### Crypto on-ramp [#crypto-on-ramp-3]

#### `DEFAULT_CHAINS` [#default_chains]

Default mapping of CAIP-2 chain identifiers to [`ChainInfo`](#chaininfo) used by the crypto onramp widget. Consumers can override or extend this map via the `chains` prop on [`CryptoOnrampWidgetProvider`](#cryptoonrampwidgetprovider).

```ts
const DEFAULT_CHAINS = {
    'eip155:1': { name: 'Ethereum' },
    'eip155:10': { name: 'Optimism' },
    'eip155:56': { name: 'BSC' },
    'eip155:137': { name: 'Polygon' },
    'eip155:8453': { name: 'Base' },
    'eip155:42161': {
        name: 'Arbitrum One',
        logo: 'https://cdn.layerswap.io/layerswap/networks/arbitrum_mainnet.png',
    },
    'eip155:43114': { name: 'Avalanche' },
    'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': { name: 'Solana' },
    'bip122:000000000019d6689c085ae165831e93': { name: 'Bitcoin' },
};
```

### UI [#ui-2]

#### `DEFAULT_ICON_SIZE` [#default_icon_size]

Default size in pixels (24) applied to icons when `size` is not provided.

```ts
const DEFAULT_ICON_SIZE = 24;
```
