diff --git a/content/docs/cli/guides/swap-and-bridge.mdx b/content/docs/cli/guides/swap-and-bridge.mdx
index d0d3481c..a1eae8dc 100644
--- a/content/docs/cli/guides/swap-and-bridge.mdx
+++ b/content/docs/cli/guides/swap-and-bridge.mdx
@@ -8,6 +8,8 @@ icon: ArrowLeftRight
WDK CLI beta.6 can quote installed swap and bridge protocols, select a route, and execute it from an unlocked wallet. Use `wdk token list` to find the registered network and token names accepted by these commands.
+Use this guide to [Select The Account And Recipient](#select-the-account-and-recipient), [Prepare A Velora Token Allowance](#prepare-a-velora-token-allowance), [Preview A Swap](#preview-a-swap), [Execute A Swap](#execute-a-swap), [Preview And Execute A Bridge](#preview-and-execute-a-bridge), [Choose A Protocol](#choose-a-protocol).
+
Before you begin, [set up and unlock a wallet](/cli/guides/get-started) and check the source and destination token names with `wdk token list`. Built-in entries need no registration. If an entry is missing, [add a custom token](/cli/guides/manage-tokens#add-a-custom-token). Fund the source account with the tokens and native gas asset needed for execution.
If you register a custom or overriding native token, read [Manage Tokens](/cli/guides/manage-tokens) first: `wdk token add` cannot retain `nativeId`, so routing works only when the selected protocol discovers the asset by symbol or does not require a native route identifier. Custom native tokens are not guaranteed to swap or bridge.
diff --git a/content/docs/sdk/core-module/api-reference.mdx b/content/docs/sdk/core-module/api-reference.mdx
index fb97a5cc..de806e49 100644
--- a/content/docs/sdk/core-module/api-reference.mdx
+++ b/content/docs/sdk/core-module/api-reference.mdx
@@ -31,6 +31,8 @@ new WDK(seed, options?)
- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
- `options` (`WdkOptions`, optional): Instance settings. `maxConditionTimeoutMs` is a finite positive number that caps every policy condition timeout on this WDK instance and defaults to `30000` milliseconds. `policyExclusions?: string[]` appends non-empty method names to the default policy exclusions.
+For base `WalletManager` implementations, `@tetherto/wdk-wallet@1.0.0-beta.20` clarifies that byte input is a raw BIP-32 master seed of 16–64 bytes. It need not have been generated from a BIP-39 mnemonic. This is a declaration clarification, not a new derivation algorithm; check each concrete wallet's seed and derivation requirements.
+
**Throws:** `Error` if the seed is invalid. Throws `PolicyConfigurationError` if `options` fails the published options schema, such as an array or primitive value, if `maxConditionTimeoutMs` is not a finite positive number, or if `policyExclusions` is not an array of non-empty strings.
**Example:**
diff --git a/content/docs/sdk/core-module/index.mdx b/content/docs/sdk/core-module/index.mdx
index 8a2e7963..46679b56 100644
--- a/content/docs/sdk/core-module/index.mdx
+++ b/content/docs/sdk/core-module/index.mdx
@@ -10,7 +10,7 @@ WDK Core is the main runtime for registering and managing wallet, protocol, midd
These pages reflect `@tetherto/wdk@1.0.0-beta.18`. This release adds machine-readable policy denial codes; integrations can branch on `DENIAL_CODES`, `PolicyViolationError.code`, or `SimulationResult.code` instead of parsing `reason`.
-The base-wallet reference also covers `@tetherto/wdk-wallet@1.0.0-beta.22`, including signer capabilities, disposal state, and `DisposalError`. This is a separate package from the WDK orchestrator; see the [base-wallet migration notes](/sdk/core-module/api-reference#base-wallet-signer-contracts).
+The base-wallet reference also covers `@tetherto/wdk-wallet@1.0.0-beta.22`, including raw BIP-32 seed input, signer capabilities, disposal state, and `DisposalError`. This is a separate package from the WDK orchestrator; see the [base-wallet migration notes](/sdk/core-module/api-reference#base-wallet-signer-contracts).
Use WDK Core to:
diff --git a/content/docs/sdk/pricing-modules/pricing-coingecko-http/configuration.mdx b/content/docs/sdk/pricing-modules/pricing-coingecko-http/configuration.mdx
index 9e312df5..266c3178 100644
--- a/content/docs/sdk/pricing-modules/pricing-coingecko-http/configuration.mdx
+++ b/content/docs/sdk/pricing-modules/pricing-coingecko-http/configuration.mdx
@@ -83,7 +83,7 @@ const provider = new PricingProvider({
const btcUsd = await provider.getLastPrice('BTC', 'USD')
```
-The provider failover layer retries connection errors. A pair that resolves to `null` is still an unavailable result for that client.
+With multiple clients, `PricingProvider` retries failures matching `error instanceof Error` within its `retries` limit, including application and HTTP errors. A resolved `null` is an unavailable result and does not trigger failover.
## Runtime Notes
diff --git a/content/docs/sdk/pricing-modules/pricing-coingecko-http/guides/handle-errors.mdx b/content/docs/sdk/pricing-modules/pricing-coingecko-http/guides/handle-errors.mdx
index 5c20a58c..3255a07b 100644
--- a/content/docs/sdk/pricing-modules/pricing-coingecko-http/guides/handle-errors.mdx
+++ b/content/docs/sdk/pricing-modules/pricing-coingecko-http/guides/handle-errors.mdx
@@ -75,7 +75,7 @@ try {
}
```
-When using `PricingProvider` with multiple clients, connection errors can trigger failover to the next client in the ordered list. A `null` result means the client completed the request but did not resolve that pair.
+When using `PricingProvider` with multiple clients, failures matching `error instanceof Error` can trigger failover within its `retries` limit, including application and HTTP errors. A resolved `null` means the client did not resolve that pair and does not trigger failover.
## Next Steps
diff --git a/content/docs/sdk/swap-modules/swap-velora-evm/guides/execute-swaps.mdx b/content/docs/sdk/swap-modules/swap-velora-evm/guides/execute-swaps.mdx
index 96596d1d..db9fd436 100644
--- a/content/docs/sdk/swap-modules/swap-velora-evm/guides/execute-swaps.mdx
+++ b/content/docs/sdk/swap-modules/swap-velora-evm/guides/execute-swaps.mdx
@@ -51,6 +51,20 @@ Execution fetches a new rate and rejects a mismatched pair, mismatched input amo
## Exact output swap
+You can receive an exact amount of the output token by passing `tokenOutAmount` to [`swap()`](/sdk/swap-modules/swap-velora-evm/api-reference):
+
+```javascript title="Exact output amount"
+const result = await swapProtocol.swap({
+ tokenIn: ETHEREUM_USDT,
+ tokenOut: ETHEREUM_WETH,
+ tokenOutAmount: 500000000000000000n // 0.5 WETH (18 decimals)
+})
+
+console.log('Swap hash:', result.hash)
+console.log('Quoted input (base units):', result.tokenInAmount)
+console.log('Quoted output (base units):', result.tokenOutAmount)
+```
+
BUY validates the requested exact output and retains it in the transaction build. An optional `minAmountOut` also rejects an output below that floor; it does not add an input-token spending cap.
## Swap with ERC-4337
diff --git a/content/docs/sdk/wallet-modules/wallet-aptos/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-aptos/api-reference.mdx
index 09a9ba21..9668b258 100644
--- a/content/docs/sdk/wallet-modules/wallet-aptos/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-aptos/api-reference.mdx
@@ -21,7 +21,7 @@ import WalletManagerAptos, {
Creates and manages seed-derived Aptos accounts.
-Beta.3 reuses one manager-created REST client across derived accounts and their read-only conversions.
+`seed` accepts a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation. Beta.3 reuses one manager-created REST client across derived accounts and their read-only conversions.
```typescript
new WalletManagerAptos(
diff --git a/content/docs/sdk/wallet-modules/wallet-aptos/index.mdx b/content/docs/sdk/wallet-modules/wallet-aptos/index.mdx
index 72e7f5e4..3bbe69c0 100644
--- a/content/docs/sdk/wallet-modules/wallet-aptos/index.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-aptos/index.mdx
@@ -11,7 +11,7 @@ Use this module when an app needs Aptos account derivation, APT balances, fungib
## Features
-- **BIP-39 seed support**: Accepts a mnemonic phrase or seed bytes.
+- **Seed inputs**: Accepts a BIP-39 mnemonic phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- **Shared RPC client**: Beta.3 shares the manager's Aptos REST client across derived accounts and their read-only conversions.
- **SLIP-0010 Ed25519 derivation**: Uses Aptos coin type `637` and hardened path segments.
- **Aptos addresses**: Derives 32-byte Aptos addresses from the public key.
diff --git a/content/docs/sdk/wallet-modules/wallet-btc/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-btc/api-reference.mdx
index 78969897..4c31b80c 100644
--- a/content/docs/sdk/wallet-modules/wallet-btc/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-btc/api-reference.mdx
@@ -29,7 +29,7 @@ Extends `WalletManager` from `@tetherto/wdk-wallet`.
new WalletManagerBtc(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `config` (BtcWalletConfig, optional): Configuration object
- `client` (`IBtcClient | BtcClientDescriptor | Array`, optional): Bitcoin client, descriptor, or ordered failover list
- `network` (string, optional): "bitcoin", "testnet", or "regtest" (default: "bitcoin")
@@ -115,7 +115,7 @@ new WalletAccountBtc(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `path` (string): Derivation path suffix (e.g., "0'/0/0")
- `config` (BtcWalletConfig, optional): Configuration object
- `client` (`IBtcClient | BtcClientDescriptor | Array`, optional): Bitcoin client, descriptor, or ordered failover list
diff --git a/content/docs/sdk/wallet-modules/wallet-btc/guides/handle-errors.mdx b/content/docs/sdk/wallet-modules/wallet-btc/guides/handle-errors.mdx
index 7413fe56..f8bc04bd 100644
--- a/content/docs/sdk/wallet-modules/wallet-btc/guides/handle-errors.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-btc/guides/handle-errors.mdx
@@ -3,7 +3,7 @@ title: Handle Errors
description: Handle errors, manage fees, and dispose of sensitive data.
---
-This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), and follow [best practices](#best-practices) for fee management and memory cleanup.
+This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), [handle transaction status errors](#transaction-status-errors), and follow [best practices](#best-practices) for fee management and memory cleanup.
## Transaction Errors
diff --git a/content/docs/sdk/wallet-modules/wallet-evm-7702-gasless/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-evm-7702-gasless/api-reference.mdx
index e058cc10..b9031edc 100644
--- a/content/docs/sdk/wallet-modules/wallet-evm-7702-gasless/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-evm-7702-gasless/api-reference.mdx
@@ -32,7 +32,7 @@ new WalletManagerEvm7702Gasless(seed, config)
| Parameter | Type | Description |
|-----------|------|-------------|
-| `seed` | `string \| Uint8Array` | BIP-39 mnemonic seed phrase or seed bytes. |
+| `seed` | `string \| Uint8Array` | BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes). |
| `config` | `Evm7702GaslessWalletConfig` | Wallet configuration with common fields and one fee mode. |
In beta.7, the manager builds one RPC client and shares it across the accounts it derives. A supplied ethers provider is reused; see [provider configuration](/sdk/wallet-modules/wallet-evm-7702-gasless/configuration#provider-failover).
@@ -65,7 +65,7 @@ new WalletAccountEvm7702Gasless(walletAccountEvm, config)
| Parameter | Type | Description |
|-----------|------|-------------|
-| `seed` | `string \| Uint8Array` | BIP-39 mnemonic seed phrase or seed bytes. |
+| `seed` | `string \| Uint8Array` | BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes). |
| `path` | `string` | EVM derivation path suffix, for example `"0'/0/0"`. |
| `walletAccountEvm` | `WalletAccountEvm` | Existing EVM account from the same beta.19 package instance used by this module; see [wrapping an account](/sdk/wallet-modules/wallet-evm-7702-gasless/guides/manage-accounts#wrap-an-existing-evm-account). |
| `config` | `Evm7702GaslessWalletConfig` | Wallet configuration. |
diff --git a/content/docs/sdk/wallet-modules/wallet-evm-erc-4337/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-evm-erc-4337/api-reference.mdx
index 3b514517..92cb6d69 100644
--- a/content/docs/sdk/wallet-modules/wallet-evm-erc-4337/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-evm-erc-4337/api-reference.mdx
@@ -37,7 +37,7 @@ new WalletManagerEvmErc4337(seed, config)
In beta.21, this manager builds one RPC client and shares it across derived accounts and their read-only views. See [provider configuration](/sdk/wallet-modules/wallet-evm-erc-4337/configuration#provider).
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `config` (EvmErc4337WalletConfig): Configuration object with common fields and a gas payment mode
**Common config fields (required for all modes):**
@@ -227,7 +227,7 @@ wallet.dispose()
| Property | Type | Description |
|----------|------|-------------|
-| `seed` | `Uint8Array` | Seed bytes |
+| `seed` | `Uint8Array` | Raw BIP-32 master seed bytes, including bytes derived from a supplied mnemonic |
## WalletAccountEvmErc4337
@@ -251,7 +251,7 @@ new WalletAccountEvmErc4337(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (EvmErc4337WalletConfig): Configuration object (same as [WalletManagerEvmErc4337](#constructor))
diff --git a/content/docs/sdk/wallet-modules/wallet-evm/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-evm/api-reference.mdx
index 518e084e..cf84998e 100644
--- a/content/docs/sdk/wallet-modules/wallet-evm/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-evm/api-reference.mdx
@@ -26,7 +26,7 @@ new WalletManagerEvm(seedOrSigner, config?)
```
**Parameters:**
-- `seedOrSigner` (`string | Uint8Array | ISigner`): BIP-39 mnemonic seed phrase, seed bytes, or a derivable root signer
+- `seedOrSigner` (`string | Uint8Array | ISigner`): BIP-39 mnemonic, raw BIP-32 master seed (16–64 bytes), or a derivable root signer
- `config` (object, optional): Configuration object
- `provider` (`string | Eip1193Provider | Array`, optional): RPC endpoint URL, EIP-1193 provider instance, or ordered failover list
- `retries` (number, optional): Additional retry attempts when `provider` is an array
@@ -242,7 +242,7 @@ new WalletAccountEvm(signer, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `signer`: Object implementing the EVM signer shape
- `config` (object, optional): Configuration object
diff --git a/content/docs/sdk/wallet-modules/wallet-evm/configuration.mdx b/content/docs/sdk/wallet-modules/wallet-evm/configuration.mdx
index 03be2c58..60a4c3fe 100644
--- a/content/docs/sdk/wallet-modules/wallet-evm/configuration.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-evm/configuration.mdx
@@ -35,7 +35,7 @@ const wallet = new WalletManagerEvm(seedPhrase, config)
## Signer Configuration
-`WalletManagerEvm` accepts either a BIP-39 seed phrase/seed bytes or a derivable EVM signer as its first argument. Use the `@tetherto/wdk-wallet-evm/signers` entrypoint when you need explicit signer objects:
+`WalletManagerEvm` accepts a BIP-39 mnemonic, raw BIP-32 master seed bytes (16–64 bytes), or a derivable EVM signer as its first argument. Raw seed bytes do not have to originate from BIP-39. Use the `@tetherto/wdk-wallet-evm/signers` entrypoint when you need explicit signer objects:
```javascript title="Create A Manager From A Seed Signer"
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
diff --git a/content/docs/sdk/wallet-modules/wallet-evm/guides/transfer-tokens.mdx b/content/docs/sdk/wallet-modules/wallet-evm/guides/transfer-tokens.mdx
index ec378696..f50bc575 100644
--- a/content/docs/sdk/wallet-modules/wallet-evm/guides/transfer-tokens.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-evm/guides/transfer-tokens.mdx
@@ -11,16 +11,36 @@ This guide explains how to [transfer ERC-20 tokens](#transfer-tokens), [estimate
Use [`account.transfer()`](/sdk/wallet-modules/wallet-evm/api-reference#transferoptions) to send ERC-20 tokens to a recipient address.
+```javascript title="Transfer ERC-20 Tokens"
+const USDT_ETHEREUM = '0xdAC17F958D2ee523a2206206994597C13D831ec7'
+
+const transferResult = await account.transfer({
+ token: USDT_ETHEREUM,
+ recipient: '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
+ amount: 1000000n // 1 USDt on Ethereum (6 decimals)
+})
+console.log('Transfer hash:', transferResult.hash)
+console.log('Transfer fee:', transferResult.fee, 'wei')
+```
+
## Estimate Transfer Fees
Use [`account.quoteTransfer()`](/sdk/wallet-modules/wallet-evm/api-reference#quotetransferoptions) to get a fee estimate before executing the transfer.
+```javascript title="Quote Token Transfer"
+const transferQuote = await account.quoteTransfer({
+ token: USDT_ETHEREUM,
+ recipient: '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
+ amount: 1000000n
+})
+console.log('Transfer fee estimate:', transferQuote.fee, 'wei')
+```
+
## Override Gas and Fees (optional)
Starting in beta.20, pass gas overrides directly in the options for [`quoteTransfer()`](/sdk/wallet-modules/wallet-evm/api-reference#quotetransferoptions) and [`transfer()`](/sdk/wallet-modules/wallet-evm/api-reference#transferoptions). Use EIP-1559 fee fields or legacy `gasPrice`; do not combine them.
```javascript title="Quote a Transfer with Explicit Fee Rates"
-const USDT_ETHEREUM = '0xdAC17F958D2ee523a2206206994597C13D831ec7'
const transfer = {
token: USDT_ETHEREUM,
recipient,
diff --git a/content/docs/sdk/wallet-modules/wallet-solana-gasless/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-solana-gasless/api-reference.mdx
index 1bdbbbe8..ad892773 100644
--- a/content/docs/sdk/wallet-modules/wallet-solana-gasless/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-solana-gasless/api-reference.mdx
@@ -48,7 +48,7 @@ import {
## WalletManagerSolanaGasless
-Derives and returns owned Solana gasless accounts from a BIP-39 seed phrase or seed bytes. Extends `WalletManager` from `@tetherto/wdk-wallet`. The manager shares one Solana RPC client and one Kora paymaster client across derived accounts and their read-only conversions.
+Derives and returns owned Solana gasless accounts from a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation. Extends `WalletManager` from `@tetherto/wdk-wallet`. The manager shares one Solana RPC client and one Kora paymaster client across derived accounts and their read-only conversions.
### Constructor
@@ -61,7 +61,7 @@ new WalletManagerSolanaGasless(
**Parameters:**
-- `seed`: BIP-39 mnemonic seed phrase or seed bytes.
+- `seed`: BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- `config`: Solana RPC and Kora-compatible paymaster configuration.
### Methods
@@ -112,7 +112,7 @@ new WalletAccountSolanaGasless(
**Parameters:**
-- `seed`: BIP-39 mnemonic seed phrase or seed bytes.
+- `seed`: BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- `path`: SLIP-0010 derivation path, for example `"0'/0'/0'"`.
- `config`: Solana RPC and Kora-compatible paymaster configuration.
diff --git a/content/docs/sdk/wallet-modules/wallet-solana-gasless/configuration.mdx b/content/docs/sdk/wallet-modules/wallet-solana-gasless/configuration.mdx
index ba97c664..7e540cb2 100644
--- a/content/docs/sdk/wallet-modules/wallet-solana-gasless/configuration.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-solana-gasless/configuration.mdx
@@ -8,7 +8,7 @@ icon: Settings
## Wallet Configuration
-`WalletManagerSolanaGasless` accepts a seed phrase or seed bytes plus a Solana gasless wallet configuration. Beta.6 shares one Solana RPC client and one Kora paymaster client across manager-derived accounts and their read-only conversions:
+`WalletManagerSolanaGasless` accepts a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation plus a Solana gasless wallet configuration. Beta.6 shares one Solana RPC client and one Kora paymaster client across manager-derived accounts and their read-only conversions:
```javascript title="Create a gasless Solana wallet"
import WalletManagerSolanaGasless from '@tetherto/wdk-wallet-solana-gasless'
diff --git a/content/docs/sdk/wallet-modules/wallet-solana-gasless/guides/handle-errors.mdx b/content/docs/sdk/wallet-modules/wallet-solana-gasless/guides/handle-errors.mdx
index a26fde70..29ccdbee 100644
--- a/content/docs/sdk/wallet-modules/wallet-solana-gasless/guides/handle-errors.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-solana-gasless/guides/handle-errors.mdx
@@ -5,7 +5,7 @@ docType: how-to
schemaType: TechArticle
---
-This guide covers configuration errors, paymaster failures, fee caps, transaction message fee payer checks, and memory cleanup.
+This guide covers [configuration errors](#handle-configuration-errors), [fee caps](#manage-fee-caps), [invalid payment instructions](#handle-invalid-payment-instructions), [paymaster failures](#handle-paymaster-failures), [transaction status](#handle-transaction-status-errors), [signed broadcasts](#handle-signed-transaction-broadcasts), and [cleanup](#dispose-of-sensitive-data).
Beta.5 exports public error classes from the package root. Use `instanceof` checks, rethrow unfamiliar errors, and avoid branching on message text. `ConfigurationError` was removed; missing required paymaster fields now raise `ValueError`.
@@ -26,82 +26,44 @@ try {
}
```
-## Handle Transaction Fee Caps
-
-[`sendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#sendtransaction) and [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) raise `MaximumFeeExceededError` when the fee is greater than `transactionMaxFee`. A fee equal to the cap is allowed. Caps use the effective paymaster token's base units.
-
-Handle the new error class for a transaction your application has prepared and reviewed:
-
-```javascript title="Transaction fee cap handling"
-import { MaximumFeeExceededError } from '@tetherto/wdk-wallet-solana-gasless'
-
-try {
- const result = await account.sendTransaction(transaction, {
- transactionMaxFee: 500000n
- })
- console.log('Transaction submitted:', result.hash)
-} catch (error) {
- if (!(error instanceof MaximumFeeExceededError)) throw error
- console.error('The paymaster fee exceeded the approved cap')
-}
-```
-
-## Handle Transfer Fee Caps
-
-[`transfer()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#transfer) raises `MaximumFeeExceededError` when the fee is greater than `transferMaxFee`. Pass your reviewed token, recipient and base-unit amount in `transferOptions`:
+## Handle Invalid Payment Instructions
-```javascript title="Transfer fee cap handling"
-try {
- const result = await account.transfer(transferOptions, {
- transferMaxFee: 500000n
- })
- console.log('Transfer submitted:', result.hash)
-} catch (error) {
- if (!(error instanceof MaximumFeeExceededError)) throw error
- console.error('The paymaster fee exceeded the approved cap')
-}
-```
+For unsigned flows, the module requires an SPL Token `Transfer` or `TransferChecked` payment to the associated token account derived from the configured paymaster address and effective fee token. It decodes the fee from that instruction rather than trusting separate `payment_amount` metadata. Invalid payment instructions raise `ValueError`.
-## Handle Fee Payer Mismatches
+A prebuilt `TransactionMessage` with a fee payer that differs from `paymasterAddress` also raises `ValueError`. Check the configuration and intended instructions; do not accept an unexpected payment destination or disable the cap to force a payment through.
-When you pass a prebuilt `TransactionMessage`, the explicit fee payer must match `paymasterAddress`. Beta.5 raises `ValueError` for a mismatch:
+You can stop signing when [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) rejects the input or paymaster response:
-```javascript title="Fee payer mismatch handling"
+```javascript title="Handle invalid transaction or payment data"
try {
- await account.sendTransaction(transactionMessage)
+ await account.signTransaction(transactionMessage)
} catch (error) {
if (!(error instanceof ValueError)) throw error
- console.error('Check the TransactionMessage fee payer and paymaster configuration')
+ console.error('Check the transaction and paymaster configuration:', error.message)
}
```
## Handle Paymaster Failures
-Paymaster calls can fail when the endpoint is unavailable, the paymaster cannot quote the transaction, or the paymaster token is not funded for the requested flow. Wrap quote and send calls in `try/catch` blocks.
-
-Use ordered `paymasterUrl` arrays and `retries` when you need endpoint failover.
-
-## Handle Invalid Payment Instructions
+Paymaster calls can fail when the endpoint is unavailable, the transaction cannot be quoted, or the fee token cannot fund the requested flow. Provider libraries can throw errors outside the exported WDK classes.
-In beta.5, invalid payment instructions raise `ValueError`. For unsigned flows, the module does not trust the paymaster's separate `payment_amount` metadata. It derives the configured paymaster's associated token account, requires the returned instruction to be an SPL Token `Transfer` or `TransferChecked` to that account, and decodes the fee from the instruction before applying fee caps or requesting signatures. Keep trusted paymaster fees at or below `Number.MAX_SAFE_INTEGER`; beta.5 still converts that decoded amount through `Number` before the owned account compares it.
+You can surface a quote failure from [`quoteSendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#quotesendtransaction) without treating it as permission to send:
-```javascript title="Reject an invalid paymaster payment"
+```javascript title="Handle a paymaster quote failure"
try {
- await account.signTransaction(transaction)
+ const quote = await account.quoteSendTransaction(transaction)
+ console.log('Paymaster fee estimate:', quote.fee)
} catch (error) {
- if (error instanceof ValueError) {
- console.error('Check the transaction and paymaster configuration:', error.message)
- } else {
- throw error
- }
+ console.error('Unable to quote the paymaster fee:', error.message)
+ throw error
}
```
-Do not retry by accepting the returned destination or by disabling fee caps. Verify `paymasterAddress`, `paymasterToken`, and the endpoint before trying again.
+Use ordered `paymasterUrl` arrays and `retries` when you need endpoint failover. A timeout after a send does not prove that the transaction failed to reach the network.
## Handle Transaction Status Errors
-`getTransaction()` throws `ValueError` for an invalid base58 signature and `NoSuchElementError` for a well-formed signature absent from transaction history. `waitForTransaction()` throws `TimeoutError` when the target is not reached. A confirmed or final receipt can still have `success: false`, and the Solana implementation does not currently classify a transaction as `dropped`.
+[`getTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#gettransaction) throws `ValueError` for an invalid base58 signature and `NoSuchElementError` for a well-formed signature absent from history. [`waitForTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#waitfortransaction) throws `TimeoutError` when the target is not reached. A confirmed or final receipt can still have `success: false`; the Solana implementation does not currently classify a transaction as `dropped`.
## Handle Signed-Transaction Broadcasts
@@ -133,10 +95,47 @@ try {
This payment check does not validate every instruction or signature. Accept this account's exact signed output, or independently validate externally supplied payloads. The module does not refresh a signed blockhash, durable nonce, payment, or signature. After an uncertain RPC result, inspect the original transaction's status and lifetime before creating a replacement.
-## Dispose of Sensitive Data
+## Best Practices
-Call `dispose()` on owned accounts and wallet managers when private keys are no longer needed.
+### Manage Fee Caps
-
-Read-only accounts do not hold private keys, but owned accounts wrap a standard Solana account and should be disposed after use.
-
+[`sendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#sendtransaction) and [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) enforce `transactionMaxFee`; [`transfer()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#transfer) enforces `transferMaxFee`. A fee greater than the applicable cap raises `MaximumFeeExceededError`; a fee equal to the cap is allowed. Caps use the effective paymaster token's base units.
+
+You can handle a rejected cap for a prepared transaction:
+
+```javascript title="Handle a transaction fee cap"
+import { MaximumFeeExceededError } from '@tetherto/wdk-wallet-solana-gasless'
+
+try {
+ const result = await account.sendTransaction(transaction, {
+ transactionMaxFee: 500000n
+ })
+ console.log('Transaction submitted:', result.hash)
+} catch (error) {
+ if (!(error instanceof MaximumFeeExceededError)) throw error
+ console.error('The paymaster fee exceeded the approved cap')
+}
+```
+
+For unsigned flows, keep trusted paymaster payment amounts at or below `Number.MAX_SAFE_INTEGER`. Beta.5 still converts the decoded `u64` through `Number` before returning a `bigint`, so larger amounts can round in quotes and cap comparisons. Signed-fee decoding uses `bigint` directly.
+
+### Dispose of sensitive data
+
+Call [`dispose()`](/sdk/wallet-modules/wallet-solana/api-reference#dispose-1) when owned accounts and managers are no longer needed:
+
+```javascript title="Dispose wallet resources"
+account.dispose()
+wallet.dispose()
+```
+
+Read-only accounts do not hold private keys. Disposing an owned account clears the keys held by its standard Solana account.
+
+## Next Steps
+
+Return to [Send Transactions](/sdk/wallet-modules/wallet-solana-gasless/guides/send-transactions) for quote, sign, and broadcast flows.
+
+***
+
+## Need Help?
+
+
diff --git a/content/docs/sdk/wallet-modules/wallet-solana/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-solana/api-reference.mdx
index bc4e98e1..6585d29b 100644
--- a/content/docs/sdk/wallet-modules/wallet-solana/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-solana/api-reference.mdx
@@ -595,7 +595,7 @@ Estimates the fee for an SPL token transfer, including an optional memo. Token-2
- `options` (TransferOptions): Transfer options
- `token` (string): Token mint address (base58-encoded)
- `recipient` (string): Recipient's Solana address (base58-encoded)
- - `amount`: Amount in token's base units
+ - `amount` (number | bigint): Amount in token's base units
- `solanaOptions` ([SolanaTransferOptions](#solanatransferoptions), optional): `{ memo?: string }`; omitted or empty memos add no instruction
diff --git a/content/docs/sdk/wallet-modules/wallet-spark/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-spark/api-reference.mdx
index 05d5db91..8420bb24 100644
--- a/content/docs/sdk/wallet-modules/wallet-spark/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-spark/api-reference.mdx
@@ -25,7 +25,7 @@ Extends `WalletManager` from `@tetherto/wdk-wallet`.
new WalletManagerSpark(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `config` (object, optional): Configuration object
- `network` (string, optional): 'MAINNET', 'SIGNET', or 'REGTEST' (default: 'MAINNET')
- `client` (`SparkReadonlyClient`, optional): Existing read-only Spark client, reused as-is. The manager shares one read-only client across its accounts and their read-only conversions; signing wallets remain account-specific.
diff --git a/content/docs/sdk/wallet-modules/wallet-spark/guides/handle-errors.mdx b/content/docs/sdk/wallet-modules/wallet-spark/guides/handle-errors.mdx
index 6c968686..44815b5a 100644
--- a/content/docs/sdk/wallet-modules/wallet-spark/guides/handle-errors.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-spark/guides/handle-errors.mdx
@@ -3,7 +3,7 @@ title: Handle Errors
description: Handle Spark transaction and connection failures, plus fees and disposal.
---
-This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), handle unsupported operations and missing transfers, and apply [best practices](#best-practices) for fees and secure cleanup. Constructor and derivation failures can also expose validation context, so avoid logging complete error objects when they may contain sensitive values. In beta.26, the HD-key derivation failure keeps the `hdkey` field identifier but omits seed bytes from that context.
+This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), [handle unsupported operations and missing transfers](#unsupported-operations-and-missing-transfers), and apply [best practices](#best-practices) for fees and secure cleanup. Constructor and derivation failures can also expose validation context, so avoid logging complete error objects when they may contain sensitive values. In beta.26, the HD-key derivation failure keeps the `hdkey` field identifier but omits seed bytes from that context.
## Transaction Errors
diff --git a/content/docs/sdk/wallet-modules/wallet-spark/guides/lightning-payments.mdx b/content/docs/sdk/wallet-modules/wallet-spark/guides/lightning-payments.mdx
index 67cf5146..d80c68d0 100644
--- a/content/docs/sdk/wallet-modules/wallet-spark/guides/lightning-payments.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-spark/guides/lightning-payments.mdx
@@ -26,6 +26,16 @@ console.log('Lightning invoice:', invoice.invoice)
2. Set `maxFeeSats` to cap routing fees.
3. Call [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference).
+You can pay an invoice using [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference):
+
+```javascript title="Pay Lightning Invoice"
+const payment = await account.payLightningInvoice({
+ invoice: 'lnbc500u1p...',
+ maxFeeSats: 1000
+})
+console.log('Payment result:', payment)
+```
+
If you enable [`syncAndRetry`](/sdk/wallet-modules/wallet-spark/configuration#automatic-retry), the wallet syncs state after a payment failure and retries [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference#paylightninginvoiceoptions) once only for a stale-leaf error. Both attempts reuse the same `transferId`. The wallet generates an ID when you omit it.
You can enable the stale-leaf retry when constructing the wallet:
@@ -37,7 +47,7 @@ const wallet = new WalletManagerSpark(seedPhrase, {
})
const account = await wallet.getAccount(0)
-const payment = await account.payLightningInvoice({
+await account.payLightningInvoice({
invoice: 'lnbc500u1p...',
maxFeeSats: 1000,
})
diff --git a/content/docs/sdk/wallet-modules/wallet-ton-gasless/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-ton-gasless/api-reference.mdx
index ea814d89..861bd38c 100644
--- a/content/docs/sdk/wallet-modules/wallet-ton-gasless/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-ton-gasless/api-reference.mdx
@@ -25,7 +25,7 @@ new WalletManagerTonGasless(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation
- `config` (TonGaslessWalletConfig): Configuration object
- `tonClient` (object | TonClient | array): TON client configuration, instance, or an array of configurations or instances for failover
- `url` (string): TON Center v2 JSON-RPC URL (e.g., 'https://toncenter.com/api/v2/jsonRPC')
@@ -128,7 +128,7 @@ new WalletAccountTonGasless(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (TonGaslessWalletConfig): Configuration object (same as WalletManagerTonGasless)
diff --git a/content/docs/sdk/wallet-modules/wallet-ton/guides/get-started.mdx b/content/docs/sdk/wallet-modules/wallet-ton/guides/get-started.mdx
index c97598d9..9b990ff8 100644
--- a/content/docs/sdk/wallet-modules/wallet-ton/guides/get-started.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-ton/guides/get-started.mdx
@@ -5,7 +5,7 @@ docType: getting-started
schemaType: TechArticle
---
-This guide explains how to [install the package](#1-install-the-package), [create a wallet](#2-create-a-wallet), and [get your first account](#3-get-your-first-account).
+This guide explains how to [install the package](#1-install-the-package), [create a wallet](#2-create-a-wallet), [get your first account](#3-get-your-first-account), and [convert it to read-only](#4-optional-convert-to-read-only).
## 1. Install the Package
diff --git a/content/docs/sdk/wallet-modules/wallet-tron-gasfree/configuration.mdx b/content/docs/sdk/wallet-modules/wallet-tron-gasfree/configuration.mdx
index 837254fe..7f418a38 100644
--- a/content/docs/sdk/wallet-modules/wallet-tron-gasfree/configuration.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-tron-gasfree/configuration.mdx
@@ -19,7 +19,9 @@ icon: Settings
```javascript
import WalletManagerTronGasfree from '@tetherto/wdk-wallet-tron-gasfree'
+import { TronWeb } from 'tronweb'
+// Option 1: Using RPC URL
const config = {
// Required parameters
chainId: 728126428, // Blockchain ID
@@ -30,6 +32,16 @@ const config = {
}
const wallet = new WalletManagerTronGasfree(seedPhrase, config)
+
+// Option 2: Using TronWeb instance
+const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io' })
+const config2 = {
+ chainId: 728126428,
+ provider: tronWeb,
+ gasFreeProvider: 'https://open.gasfree.io/tron/',
+ serviceProvider: 'REPLACE_WITH_PROVIDER_ADDRESS',
+ verifyingContract: 'TFFAMQLZybALaLb4uxHA9RBE7pxhUAjF3U'
+}
```
`gasFreeApiKey` and `gasFreeApiSecret` are optional. Omit both when your GasFree provider accepts unsigned requests. If you configure signed GasFree API requests, provide both values together; the constructor rejects partial credentials.
@@ -93,10 +105,17 @@ The manager initializes one RPC provider shared by its derived accounts. Use sep
**Examples:**
```javascript
+// Option 1: Using RPC URL
const config = {
provider: 'https://api.trongrid.io'
}
+// Option 2: Using TronWeb instance
+const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io' })
+const config2 = {
+ provider: tronWeb
+}
+
```
### RPC Failover Retries
diff --git a/content/docs/sdk/wallet-modules/wallet-tron/api-reference.mdx b/content/docs/sdk/wallet-modules/wallet-tron/api-reference.mdx
index 46f5f2d7..c06e7026 100644
--- a/content/docs/sdk/wallet-modules/wallet-tron/api-reference.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-tron/api-reference.mdx
@@ -34,7 +34,7 @@ new WalletManagerTron(seed, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic string or a raw 16–64-byte BIP-32 master seed (`Uint8Array`). Byte input is used directly for derivation.
- `config` (TronWalletConfig, optional): Configuration object
- `provider` (`string | TronWeb | Array`, optional): Tron RPC endpoint URL, TronWeb instance, or ordered failover list
- `retries` (number, optional): Additional failover attempts when `provider` is an array (default: 3)
@@ -149,11 +149,11 @@ new WalletAccountTron(seed, path, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic string or a raw 16–64-byte BIP-32 master seed (`Uint8Array`). Byte input is used directly for derivation.
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (TronWalletConfig, optional): Configuration object
-**Throws:** Error if seed phrase is invalid (BIP-39 validation fails)
+**Throws:** Error if the mnemonic fails BIP-39 validation or the raw seed length is outside 16–64 bytes
**Example:**
```javascript
diff --git a/content/docs/sdk/wallet-modules/wallet-tron/guides/get-started.mdx b/content/docs/sdk/wallet-modules/wallet-tron/guides/get-started.mdx
index 2843babd..d7ad1bb1 100644
--- a/content/docs/sdk/wallet-modules/wallet-tron/guides/get-started.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-tron/guides/get-started.mdx
@@ -20,7 +20,7 @@ npm install @tetherto/wdk-wallet-tron
## 2. Create a Wallet
-You can create a new wallet instance using the [`WalletManagerTron`](/sdk/wallet-modules/wallet-tron/api-reference) constructor with a BIP-39 seed phrase and a Tron RPC provider:
+You can create a new wallet instance using the [`WalletManagerTron`](/sdk/wallet-modules/wallet-tron/api-reference) constructor with a BIP-39 seed phrase or a raw 16–64-byte BIP-32 master seed (`Uint8Array`), plus a Tron RPC provider. This example uses a seed phrase:
```javascript title="Create Tron Wallet"
import WalletManagerTron, { WalletAccountTron, WalletAccountReadOnlyTron } from '@tetherto/wdk-wallet-tron'
@@ -33,7 +33,7 @@ const wallet = new WalletManagerTron(seedPhrase, {
```
-**Secure the Seed Phrase:** You must securely store this seed phrase immediately. If it is lost, the user will permanently lose access to their funds.
+**Secure the Seed:** You must securely store the seed phrase or raw seed bytes you use. If the seed is lost, the user will permanently lose access to their funds.
## 3. Get Your First Account
diff --git a/content/docs/sdk/wallet-modules/wallet-tron/index.mdx b/content/docs/sdk/wallet-modules/wallet-tron/index.mdx
index 94c5f1d0..efac47d0 100644
--- a/content/docs/sdk/wallet-modules/wallet-tron/index.mdx
+++ b/content/docs/sdk/wallet-modules/wallet-tron/index.mdx
@@ -14,8 +14,9 @@ These pages reflect `@tetherto/wdk-wallet-tron@1.0.0-beta.15`. Accounts derived
## Features
- **BIP-39 Seed Phrase Support**: Generate and validate BIP-39 mnemonic seed phrases
+- **Raw Seed Support**: Initialize wallets and accounts with a raw 16–64-byte BIP-32 master seed supplied as a `Uint8Array`
- **Tron Derivation Paths**: Support for BIP-44 standard derivation paths for Tron
-- **Multi-Account Management**: Create and manage multiple accounts from a single seed phrase
+- **Multi-Account Management**: Create and manage multiple accounts from a single seed
- **Tron Address Support:** Generate and manage Tron addresses
- **Message Signing:** Sign and verify messages using Tron cryptography
- **Transaction Management**: Send transactions and get fee estimates, including activation fee details for native TRX sends
diff --git a/content/docs/tools/price-rates/api-reference.mdx b/content/docs/tools/price-rates/api-reference.mdx
index f7dccae9..dd01104e 100644
--- a/content/docs/tools/price-rates/api-reference.mdx
+++ b/content/docs/tools/price-rates/api-reference.mdx
@@ -31,7 +31,7 @@ See [currency-code resolution and fallback behavior](/tools/price-rates/configur
#### Methods
-| Method | Description | Returns |
+| Method | Description | Returns (declared) |
|--------|-------------|---------|
| `getCurrentPrice(base, quote)` | Fetch latest price for base/quote pair | `Promise\` |
| `getMultiCurrentPrices(pairs)` | Fetch latest prices for multiple pairs in one batch | `Promise\\>` |
@@ -71,15 +71,21 @@ const data = await client.getMultiPriceData([
##### `getHistoricalPrice(from, to, opts?)`
-If the returned series exceeds 100 points, it is downscaled by powers of two until ≤ 100.
+Supply `start` and `end` as Unix timestamps in milliseconds; both fields are required by `HistoricalPriceOptions`. Keep `start` within the trailing 365 days to avoid the client's range error. If the returned series exceeds 100 points, it is downscaled by powers of two until ≤ 100.
+
+Request the last 24 hours:
```javascript title="Historical Prices"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const series = await client.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000, // optional
- end: 1709913600000 // optional
+ start,
+ end
})
```
+The concrete Bitfinex beta.6 implementation returns `{ price, ts }`, with `ts` in Unix milliseconds. Its inherited `HistoricalPriceResult` declaration still defines `{ price, timestamp }`. This is a declaration/runtime mismatch: `timestamp` is not the runtime field returned by this client. Validate or adapt the concrete result before using it through that declared type; `PricingProvider` forwards the client's historical result without renaming fields.
+
## Package: `@tetherto/wdk-pricing-provider`
### Class: `PricingProvider`
@@ -96,13 +102,15 @@ new PricingProvider({
})
```
-- `client` (`PricingClient | PricingClient[]`): a single client instance or an ordered array of client instances. When an array is provided, connection errors trigger automatic failover to the next client in the list.
-- `retries` (number, optional): number of additional retry attempts after the initial call fails. Total attempts = `1 + retries`. When `retries` exceeds the number of provided clients, the failover loops back in round-robin order. Default: `3`. Only applies when `client` is an array.
+- `client` (`PricingClient | PricingClient[]`): a single client instance or an ordered array of client instances. With an array, failures matching `error instanceof Error` can trigger failover within the `retries` limit, including application and HTTP errors. A resolved `null` does not trigger failover.
+- `retries` (number, optional): number of additional retry attempts after the initial call fails. Total attempts = `1 + retries`. When the total attempt budget exceeds the number of clients, attempts can wrap in round-robin order. Default: `3`. Only applies when `client` is an array.
- `priceCacheDurationMs` (number, optional): cache TTL for last price in ms (default 3,600,000)
#### Methods
-| Method | Description | Returns |
+The table shows the published Provider beta.7 declarations. At runtime, current-price and price-data methods can forward and cache `null` from a client, including individual `null` entries in batch results. Handle unavailable values even though the wrapper's declared return types do not include `null`.
+
+| Method | Description | Returns (declared) |
|--------|-------------|---------|
| `getLastPrice(base, quote)` | Returns cached last price; refreshes when TTL expires | `Promise\` |
| `getMultiLastPrices(pairs)` | Returns cached last prices for multiple pairs | `Promise\` |
@@ -128,9 +136,15 @@ const prices = await provider.getMultiLastPrices([
##### `getLastPriceData(base, quote)`
+Check for an unavailable result before reading its fields:
+
```javascript title="Cached Price Data"
const data = await provider.getLastPriceData('BTC', 'USD')
-console.log(data.lastPrice, data.dailyChange, data.dailyChangeRelative)
+if (data === null) {
+ console.log('Price data unavailable')
+} else {
+ console.log(data.lastPrice, data.dailyChange, data.dailyChangeRelative)
+}
```
##### `getMultiLastPriceData(pairs)`
@@ -143,10 +157,14 @@ const data = await provider.getMultiLastPriceData([
##### `getHistoricalPrice(from, to, opts?)`
+Request the last 24 hours through the provider. When its client is Bitfinex, the result retains the concrete `ts` field described [above](#gethistoricalpricefrom-to-opts); the wrapper does not convert it to the declared `timestamp` field.
+
```javascript title="Historical via Provider"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const hist = await provider.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000,
- end: 1709913600000
+ start,
+ end
})
```
diff --git a/content/docs/tools/price-rates/configuration.mdx b/content/docs/tools/price-rates/configuration.mdx
index b7eead32..1986754f 100644
--- a/content/docs/tools/price-rates/configuration.mdx
+++ b/content/docs/tools/price-rates/configuration.mdx
@@ -74,20 +74,24 @@ const priceData = await client.getMultiPriceData([
### Historical Series
-Downscales long histories to ≤ 100 points.
+Supply `start` and `end` as Unix timestamps in milliseconds; both fields are required by `HistoricalPriceOptions`. Keep `start` within the trailing 365 days to avoid the client's range error. Long histories are downscaled to ≤ 100 points. This example requests the last 24 hours:
```javascript title="Get Historical Prices"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const series = await client.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000, // optional (ms)
- end: 1709913600000 // optional (ms)
+ start,
+ end
})
```
+The concrete Bitfinex result uses `{ price, ts }`, with `ts` in Unix milliseconds. The inherited `HistoricalPriceResult` declaration instead names the time field `timestamp`; this is a declaration/runtime mismatch. See the [historical API notes](/tools/price-rates/api-reference#gethistoricalpricefrom-to-opts) before consuming the series in TypeScript.
+
## Provider Integration
Works with `@tetherto/wdk-pricing-provider` as a `PricingClient` implementation.
-You can pass a single client or an array of clients. When an array is provided, connection errors trigger automatic failover to the next client in the list.
+You can pass a single client or an array of clients. With an array, failures matching `error instanceof Error` trigger failover within the configured `retries` limit, including application and HTTP errors. A resolved `null` does not trigger failover.
```javascript title="Single client"
import { PricingProvider } from '@tetherto/wdk-pricing-provider'
@@ -102,13 +106,15 @@ const prices = await provider.getMultiLastPrices([
{ from: 'BTC', to: 'USD' },
{ from: 'ETH', to: 'USD' }
])
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const hist = await provider.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000,
- end: 1709913600000
+ start,
+ end
})
```
-To enable failover, pass an ordered array of `PricingClient` instances. The provider tries each client in order when a connection error occurs.
+To enable failover, pass an ordered array of `PricingClient` instances. The provider advances through that array when a failure matches `error instanceof Error`, up to the `retries` limit.
```javascript title="Failover across multiple clients"
import { PricingProvider } from '@tetherto/wdk-pricing-provider'
diff --git a/public/llms-full.txt b/public/llms-full.txt
index 3f718634..75a1cc13 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -4809,6 +4809,8 @@ Description: Preview and execute token swaps and cross-network bridges with WDK
WDK CLI beta.6 can quote installed swap and bridge protocols, select a route, and execute it from an unlocked wallet. Use `wdk token list` to find the registered network and token names accepted by these commands.
+Use this guide to [Select The Account And Recipient](#select-the-account-and-recipient), [Prepare A Velora Token Allowance](#prepare-a-velora-token-allowance), [Preview A Swap](#preview-a-swap), [Execute A Swap](#execute-a-swap), [Preview And Execute A Bridge](#preview-and-execute-a-bridge), [Choose A Protocol](#choose-a-protocol).
+
Before you begin, [set up and unlock a wallet](/cli/guides/get-started) and check the source and destination token names with `wdk token list`. Built-in entries need no registration. If an entry is missing, [add a custom token](/cli/guides/manage-tokens#add-a-custom-token). Fund the source account with the tokens and native gas asset needed for execution.
If you register a custom or overriding native token, read [Manage Tokens](/cli/guides/manage-tokens) first: `wdk token add` cannot retain `nativeId`, so routing works only when the selected protocol discovers the asset by symbol or does not require a native route identifier. Custom native tokens are not guaranteed to swap or bridge.
@@ -13605,7 +13607,7 @@ WDK Core is the main runtime for registering and managing wallet, protocol, midd
These pages reflect `@tetherto/wdk@1.0.0-beta.18`. This release adds machine-readable policy denial codes; integrations can branch on `DENIAL_CODES`, `PolicyViolationError.code`, or `SimulationResult.code` instead of parsing `reason`.
-The base-wallet reference also covers `@tetherto/wdk-wallet@1.0.0-beta.22`, including signer capabilities, disposal state, and `DisposalError`. This is a separate package from the WDK orchestrator; see the [base-wallet migration notes](/sdk/core-module/api-reference#base-wallet-signer-contracts).
+The base-wallet reference also covers `@tetherto/wdk-wallet@1.0.0-beta.22`, including raw BIP-32 seed input, signer capabilities, disposal state, and `DisposalError`. This is a separate package from the WDK orchestrator; see the [base-wallet migration notes](/sdk/core-module/api-reference#base-wallet-signer-contracts).
Use WDK Core to:
@@ -13675,6 +13677,8 @@ new WDK(seed, options?)
- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
- `options` (`WdkOptions`, optional): Instance settings. `maxConditionTimeoutMs` is a finite positive number that caps every policy condition timeout on this WDK instance and defaults to `30000` milliseconds. `policyExclusions?: string[]` appends non-empty method names to the default policy exclusions.
+For base `WalletManager` implementations, `@tetherto/wdk-wallet@1.0.0-beta.20` clarifies that byte input is a raw BIP-32 master seed of 16–64 bytes. It need not have been generated from a BIP-39 mnemonic. This is a declaration clarification, not a new derivation algorithm; check each concrete wallet's seed and derivation requirements.
+
**Throws:** `Error` if the seed is invalid. Throws `PolicyConfigurationError` if `options` fails the published options schema, such as an array or primitive value, if `maxConditionTimeoutMs` is not a finite positive number, or if `policyExclusions` is not an array of non-empty strings.
**Example:**
@@ -21067,7 +21071,7 @@ const provider = new PricingProvider({
const btcUsd = await provider.getLastPrice('BTC', 'USD')
```
-The provider failover layer retries connection errors. A pair that resolves to `null` is still an unavailable result for that client.
+With multiple clients, `PricingProvider` retries failures matching `error instanceof Error` within its `retries` limit, including application and HTTP errors. A resolved `null` is an unavailable result and does not trigger failover.
## Runtime Notes
@@ -21374,7 +21378,7 @@ try {
}
```
-When using `PricingProvider` with multiple clients, connection errors can trigger failover to the next client in the ordered list. A `null` result means the client completed the request but did not resolve that pair.
+When using `PricingProvider` with multiple clients, failures matching `error instanceof Error` can trigger failover within its `retries` limit, including application and HTTP errors. A resolved `null` means the client did not resolve that pair and does not trigger failover.
## Next Steps
@@ -21928,6 +21932,20 @@ Execution fetches a new rate and rejects a mismatched pair, mismatched input amo
## Exact output swap
+You can receive an exact amount of the output token by passing `tokenOutAmount` to [`swap()`](/sdk/swap-modules/swap-velora-evm/api-reference):
+
+```javascript title="Exact output amount"
+const result = await swapProtocol.swap({
+ tokenIn: ETHEREUM_USDT,
+ tokenOut: ETHEREUM_WETH,
+ tokenOutAmount: 500000000000000000n // 0.5 WETH (18 decimals)
+})
+
+console.log('Swap hash:', result.hash)
+console.log('Quoted input (base units):', result.tokenInAmount)
+console.log('Quoted output (base units):', result.tokenOutAmount)
+```
+
BUY validates the requested exact output and retains it in the transaction build. An optional `minAmountOut` also rejects an output below that floor; it does not add an input-token spending cap.
## Swap with ERC-4337
@@ -27434,7 +27452,7 @@ Use this module when an app needs Aptos account derivation, APT balances, fungib
## Features
-- **BIP-39 seed support**: Accepts a mnemonic phrase or seed bytes.
+- **Seed inputs**: Accepts a BIP-39 mnemonic phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- **Shared RPC client**: Beta.3 shares the manager's Aptos REST client across derived accounts and their read-only conversions.
- **SLIP-0010 Ed25519 derivation**: Uses Aptos coin type `637` and hardened path segments.
- **Aptos addresses**: Derives 32-byte Aptos addresses from the public key.
@@ -27515,7 +27533,7 @@ import WalletManagerAptos, {
Creates and manages seed-derived Aptos accounts.
-Beta.3 reuses one manager-created REST client across derived accounts and their read-only conversions.
+`seed` accepts a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation. Beta.3 reuses one manager-created REST client across derived accounts and their read-only conversions.
```typescript
new WalletManagerAptos(
@@ -28196,7 +28214,7 @@ Extends `WalletManager` from `@tetherto/wdk-wallet`.
new WalletManagerBtc(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `config` (BtcWalletConfig, optional): Configuration object
- `client` (`IBtcClient | BtcClientDescriptor | Array`, optional): Bitcoin client, descriptor, or ordered failover list
- `network` (string, optional): "bitcoin", "testnet", or "regtest" (default: "bitcoin")
@@ -28282,7 +28300,7 @@ new WalletAccountBtc(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `path` (string): Derivation path suffix (e.g., "0'/0/0")
- `config` (BtcWalletConfig, optional): Configuration object
- `client` (`IBtcClient | BtcClientDescriptor | Array`, optional): Bitcoin client, descriptor, or ordered failover list
@@ -29736,7 +29754,7 @@ Learn how to [sign and verify messages](/sdk/wallet-modules/wallet-btc/guides/si
URL: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-btc/guides/handle-errors
Description: Handle errors, manage fees, and dispose of sensitive data.
-This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), and follow [best practices](#best-practices) for fee management and memory cleanup.
+This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), [handle transaction status errors](#transaction-status-errors), and follow [best practices](#best-practices) for fee management and memory cleanup.
## Transaction Errors
@@ -31010,7 +31028,7 @@ new WalletManagerEvm7702Gasless(seed, config)
| Parameter | Type | Description |
|-----------|------|-------------|
-| `seed` | `string \| Uint8Array` | BIP-39 mnemonic seed phrase or seed bytes. |
+| `seed` | `string \| Uint8Array` | BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes). |
| `config` | `Evm7702GaslessWalletConfig` | Wallet configuration with common fields and one fee mode. |
In beta.7, the manager builds one RPC client and shares it across the accounts it derives. A supplied ethers provider is reused; see [provider configuration](/sdk/wallet-modules/wallet-evm-7702-gasless/configuration#provider-failover).
@@ -31043,7 +31061,7 @@ new WalletAccountEvm7702Gasless(walletAccountEvm, config)
| Parameter | Type | Description |
|-----------|------|-------------|
-| `seed` | `string \| Uint8Array` | BIP-39 mnemonic seed phrase or seed bytes. |
+| `seed` | `string \| Uint8Array` | BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes). |
| `path` | `string` | EVM derivation path suffix, for example `"0'/0/0"`. |
| `walletAccountEvm` | `WalletAccountEvm` | Existing EVM account from the same beta.19 package instance used by this module; see [wrapping an account](/sdk/wallet-modules/wallet-evm-7702-gasless/guides/manage-accounts#wrap-an-existing-evm-account). |
| `config` | `Evm7702GaslessWalletConfig` | Wallet configuration. |
@@ -32351,7 +32369,7 @@ new WalletManagerEvmErc4337(seed, config)
In beta.21, this manager builds one RPC client and shares it across derived accounts and their read-only views. See [provider configuration](/sdk/wallet-modules/wallet-evm-erc-4337/configuration#provider).
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `config` (EvmErc4337WalletConfig): Configuration object with common fields and a gas payment mode
**Common config fields (required for all modes):**
@@ -32541,7 +32559,7 @@ wallet.dispose()
| Property | Type | Description |
|----------|------|-------------|
-| `seed` | `Uint8Array` | Seed bytes |
+| `seed` | `Uint8Array` | Raw BIP-32 master seed bytes, including bytes derived from a supplied mnemonic |
## WalletAccountEvmErc4337
@@ -32565,7 +32583,7 @@ new WalletAccountEvmErc4337(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (EvmErc4337WalletConfig): Configuration object (same as [WalletManagerEvmErc4337](#constructor))
@@ -35229,7 +35247,7 @@ new WalletManagerEvm(seedOrSigner, config?)
```
**Parameters:**
-- `seedOrSigner` (`string | Uint8Array | ISigner`): BIP-39 mnemonic seed phrase, seed bytes, or a derivable root signer
+- `seedOrSigner` (`string | Uint8Array | ISigner`): BIP-39 mnemonic, raw BIP-32 master seed (16–64 bytes), or a derivable root signer
- `config` (object, optional): Configuration object
- `provider` (`string | Eip1193Provider | Array`, optional): RPC endpoint URL, EIP-1193 provider instance, or ordered failover list
- `retries` (number, optional): Additional retry attempts when `provider` is an array
@@ -35445,7 +35463,7 @@ new WalletAccountEvm(signer, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic or raw BIP-32 master seed (16–64 bytes)
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `signer`: Object implementing the EVM signer shape
- `config` (object, optional): Configuration object
@@ -36572,7 +36590,7 @@ const wallet = new WalletManagerEvm(seedPhrase, config)
## Signer Configuration
-`WalletManagerEvm` accepts either a BIP-39 seed phrase/seed bytes or a derivable EVM signer as its first argument. Use the `@tetherto/wdk-wallet-evm/signers` entrypoint when you need explicit signer objects:
+`WalletManagerEvm` accepts a BIP-39 mnemonic, raw BIP-32 master seed bytes (16–64 bytes), or a derivable EVM signer as its first argument. Raw seed bytes do not have to originate from BIP-39. Use the `@tetherto/wdk-wallet-evm/signers` entrypoint when you need explicit signer objects:
```javascript title="Create A Manager From A Seed Signer"
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
@@ -37468,16 +37486,36 @@ This guide explains how to [transfer ERC-20 tokens](#transfer-tokens), [estimate
Use [`account.transfer()`](/sdk/wallet-modules/wallet-evm/api-reference#transferoptions) to send ERC-20 tokens to a recipient address.
+```javascript title="Transfer ERC-20 Tokens"
+const USDT_ETHEREUM = '0xdAC17F958D2ee523a2206206994597C13D831ec7'
+
+const transferResult = await account.transfer({
+ token: USDT_ETHEREUM,
+ recipient: '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
+ amount: 1000000n // 1 USDt on Ethereum (6 decimals)
+})
+console.log('Transfer hash:', transferResult.hash)
+console.log('Transfer fee:', transferResult.fee, 'wei')
+```
+
## Estimate Transfer Fees
Use [`account.quoteTransfer()`](/sdk/wallet-modules/wallet-evm/api-reference#quotetransferoptions) to get a fee estimate before executing the transfer.
+```javascript title="Quote Token Transfer"
+const transferQuote = await account.quoteTransfer({
+ token: USDT_ETHEREUM,
+ recipient: '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
+ amount: 1000000n
+})
+console.log('Transfer fee estimate:', transferQuote.fee, 'wei')
+```
+
## Override Gas and Fees (optional)
Starting in beta.20, pass gas overrides directly in the options for [`quoteTransfer()`](/sdk/wallet-modules/wallet-evm/api-reference#quotetransferoptions) and [`transfer()`](/sdk/wallet-modules/wallet-evm/api-reference#transferoptions). Use EIP-1559 fee fields or legacy `gasPrice`; do not combine them.
```javascript title="Quote a Transfer with Explicit Fee Rates"
-const USDT_ETHEREUM = '0xdAC17F958D2ee523a2206206994597C13D831ec7'
const transfer = {
token: USDT_ETHEREUM,
recipient,
@@ -37803,7 +37841,7 @@ import {
## WalletManagerSolanaGasless
-Derives and returns owned Solana gasless accounts from a BIP-39 seed phrase or seed bytes. Extends `WalletManager` from `@tetherto/wdk-wallet`. The manager shares one Solana RPC client and one Kora paymaster client across derived accounts and their read-only conversions.
+Derives and returns owned Solana gasless accounts from a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation. Extends `WalletManager` from `@tetherto/wdk-wallet`. The manager shares one Solana RPC client and one Kora paymaster client across derived accounts and their read-only conversions.
### Constructor
@@ -37816,7 +37854,7 @@ new WalletManagerSolanaGasless(
**Parameters:**
-- `seed`: BIP-39 mnemonic seed phrase or seed bytes.
+- `seed`: BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- `config`: Solana RPC and Kora-compatible paymaster configuration.
### Methods
@@ -37867,7 +37905,7 @@ new WalletAccountSolanaGasless(
**Parameters:**
-- `seed`: BIP-39 mnemonic seed phrase or seed bytes.
+- `seed`: BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation.
- `path`: SLIP-0010 derivation path, for example `"0'/0'/0'"`.
- `config`: Solana RPC and Kora-compatible paymaster configuration.
@@ -38207,7 +38245,7 @@ Description: Configuration options for @tetherto/wdk-wallet-solana-gasless.
## Wallet Configuration
-`WalletManagerSolanaGasless` accepts a seed phrase or seed bytes plus a Solana gasless wallet configuration. Beta.6 shares one Solana RPC client and one Kora paymaster client across manager-derived accounts and their read-only conversions:
+`WalletManagerSolanaGasless` accepts a BIP-39 mnemonic or raw 16–64-byte seed for SLIP-0010 derivation plus a Solana gasless wallet configuration. Beta.6 shares one Solana RPC client and one Kora paymaster client across manager-derived accounts and their read-only conversions:
```javascript title="Create a gasless Solana wallet"
import WalletManagerSolanaGasless from '@tetherto/wdk-wallet-solana-gasless'
@@ -38562,7 +38600,7 @@ wallet.dispose()
URL: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-solana-gasless/guides/handle-errors
Description: Handle paymaster, fee, transaction, and cleanup errors in Solana gasless wallets.
-This guide covers configuration errors, paymaster failures, fee caps, transaction message fee payer checks, and memory cleanup.
+This guide covers [configuration errors](#handle-configuration-errors), [fee caps](#manage-fee-caps), [invalid payment instructions](#handle-invalid-payment-instructions), [paymaster failures](#handle-paymaster-failures), [transaction status](#handle-transaction-status-errors), [signed broadcasts](#handle-signed-transaction-broadcasts), and [cleanup](#dispose-of-sensitive-data).
Beta.5 exports public error classes from the package root. Use `instanceof` checks, rethrow unfamiliar errors, and avoid branching on message text. `ConfigurationError` was removed; missing required paymaster fields now raise `ValueError`.
@@ -38583,82 +38621,44 @@ try {
}
```
-## Handle Transaction Fee Caps
-
-[`sendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#sendtransaction) and [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) raise `MaximumFeeExceededError` when the fee is greater than `transactionMaxFee`. A fee equal to the cap is allowed. Caps use the effective paymaster token's base units.
-
-Handle the new error class for a transaction your application has prepared and reviewed:
-
-```javascript title="Transaction fee cap handling"
-import { MaximumFeeExceededError } from '@tetherto/wdk-wallet-solana-gasless'
-
-try {
- const result = await account.sendTransaction(transaction, {
- transactionMaxFee: 500000n
- })
- console.log('Transaction submitted:', result.hash)
-} catch (error) {
- if (!(error instanceof MaximumFeeExceededError)) throw error
- console.error('The paymaster fee exceeded the approved cap')
-}
-```
-
-## Handle Transfer Fee Caps
-
-[`transfer()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#transfer) raises `MaximumFeeExceededError` when the fee is greater than `transferMaxFee`. Pass your reviewed token, recipient and base-unit amount in `transferOptions`:
+## Handle Invalid Payment Instructions
-```javascript title="Transfer fee cap handling"
-try {
- const result = await account.transfer(transferOptions, {
- transferMaxFee: 500000n
- })
- console.log('Transfer submitted:', result.hash)
-} catch (error) {
- if (!(error instanceof MaximumFeeExceededError)) throw error
- console.error('The paymaster fee exceeded the approved cap')
-}
-```
+For unsigned flows, the module requires an SPL Token `Transfer` or `TransferChecked` payment to the associated token account derived from the configured paymaster address and effective fee token. It decodes the fee from that instruction rather than trusting separate `payment_amount` metadata. Invalid payment instructions raise `ValueError`.
-## Handle Fee Payer Mismatches
+A prebuilt `TransactionMessage` with a fee payer that differs from `paymasterAddress` also raises `ValueError`. Check the configuration and intended instructions; do not accept an unexpected payment destination or disable the cap to force a payment through.
-When you pass a prebuilt `TransactionMessage`, the explicit fee payer must match `paymasterAddress`. Beta.5 raises `ValueError` for a mismatch:
+You can stop signing when [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) rejects the input or paymaster response:
-```javascript title="Fee payer mismatch handling"
+```javascript title="Handle invalid transaction or payment data"
try {
- await account.sendTransaction(transactionMessage)
+ await account.signTransaction(transactionMessage)
} catch (error) {
if (!(error instanceof ValueError)) throw error
- console.error('Check the TransactionMessage fee payer and paymaster configuration')
+ console.error('Check the transaction and paymaster configuration:', error.message)
}
```
## Handle Paymaster Failures
-Paymaster calls can fail when the endpoint is unavailable, the paymaster cannot quote the transaction, or the paymaster token is not funded for the requested flow. Wrap quote and send calls in `try/catch` blocks.
+Paymaster calls can fail when the endpoint is unavailable, the transaction cannot be quoted, or the fee token cannot fund the requested flow. Provider libraries can throw errors outside the exported WDK classes.
-Use ordered `paymasterUrl` arrays and `retries` when you need endpoint failover.
+You can surface a quote failure from [`quoteSendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#quotesendtransaction) without treating it as permission to send:
-## Handle Invalid Payment Instructions
-
-In beta.5, invalid payment instructions raise `ValueError`. For unsigned flows, the module does not trust the paymaster's separate `payment_amount` metadata. It derives the configured paymaster's associated token account, requires the returned instruction to be an SPL Token `Transfer` or `TransferChecked` to that account, and decodes the fee from the instruction before applying fee caps or requesting signatures. Keep trusted paymaster fees at or below `Number.MAX_SAFE_INTEGER`; beta.5 still converts that decoded amount through `Number` before the owned account compares it.
-
-```javascript title="Reject an invalid paymaster payment"
+```javascript title="Handle a paymaster quote failure"
try {
- await account.signTransaction(transaction)
+ const quote = await account.quoteSendTransaction(transaction)
+ console.log('Paymaster fee estimate:', quote.fee)
} catch (error) {
- if (error instanceof ValueError) {
- console.error('Check the transaction and paymaster configuration:', error.message)
- } else {
- throw error
- }
+ console.error('Unable to quote the paymaster fee:', error.message)
+ throw error
}
```
-Do not retry by accepting the returned destination or by disabling fee caps. Verify `paymasterAddress`, `paymasterToken`, and the endpoint before trying again.
+Use ordered `paymasterUrl` arrays and `retries` when you need endpoint failover. A timeout after a send does not prove that the transaction failed to reach the network.
## Handle Transaction Status Errors
-`getTransaction()` throws `ValueError` for an invalid base58 signature and `NoSuchElementError` for a well-formed signature absent from transaction history. `waitForTransaction()` throws `TimeoutError` when the target is not reached. A confirmed or final receipt can still have `success: false`, and the Solana implementation does not currently classify a transaction as `dropped`.
+[`getTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#gettransaction) throws `ValueError` for an invalid base58 signature and `NoSuchElementError` for a well-formed signature absent from history. [`waitForTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#waitfortransaction) throws `TimeoutError` when the target is not reached. A confirmed or final receipt can still have `success: false`; the Solana implementation does not currently classify a transaction as `dropped`.
## Handle Signed-Transaction Broadcasts
@@ -38690,13 +38690,50 @@ try {
This payment check does not validate every instruction or signature. Accept this account's exact signed output, or independently validate externally supplied payloads. The module does not refresh a signed blockhash, durable nonce, payment, or signature. After an uncertain RPC result, inspect the original transaction's status and lifetime before creating a replacement.
-## Dispose of Sensitive Data
+## Best Practices
-Call `dispose()` on owned accounts and wallet managers when private keys are no longer needed.
+### Manage Fee Caps
-
-Read-only accounts do not hold private keys, but owned accounts wrap a standard Solana account and should be disposed after use.
-
+[`sendTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#sendtransaction) and [`signTransaction()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#signtransaction) enforce `transactionMaxFee`; [`transfer()`](/sdk/wallet-modules/wallet-solana-gasless/api-reference#transfer) enforces `transferMaxFee`. A fee greater than the applicable cap raises `MaximumFeeExceededError`; a fee equal to the cap is allowed. Caps use the effective paymaster token's base units.
+
+You can handle a rejected cap for a prepared transaction:
+
+```javascript title="Handle a transaction fee cap"
+import { MaximumFeeExceededError } from '@tetherto/wdk-wallet-solana-gasless'
+
+try {
+ const result = await account.sendTransaction(transaction, {
+ transactionMaxFee: 500000n
+ })
+ console.log('Transaction submitted:', result.hash)
+} catch (error) {
+ if (!(error instanceof MaximumFeeExceededError)) throw error
+ console.error('The paymaster fee exceeded the approved cap')
+}
+```
+
+For unsigned flows, keep trusted paymaster payment amounts at or below `Number.MAX_SAFE_INTEGER`. Beta.5 still converts the decoded `u64` through `Number` before returning a `bigint`, so larger amounts can round in quotes and cap comparisons. Signed-fee decoding uses `bigint` directly.
+
+### Dispose of sensitive data
+
+Call [`dispose()`](/sdk/wallet-modules/wallet-solana/api-reference#dispose-1) when owned accounts and managers are no longer needed:
+
+```javascript title="Dispose wallet resources"
+account.dispose()
+wallet.dispose()
+```
+
+Read-only accounts do not hold private keys. Disposing an owned account clears the keys held by its standard Solana account.
+
+## Next Steps
+
+Return to [Send Transactions](/sdk/wallet-modules/wallet-solana-gasless/guides/send-transactions) for quote, sign, and broadcast flows.
+
+***
+
+## Need Help?
+
+
***
@@ -39753,7 +39790,7 @@ Estimates the fee for an SPL token transfer, including an optional memo. Token-2
- `options` (TransferOptions): Transfer options
- `token` (string): Token mint address (base58-encoded)
- `recipient` (string): Recipient's Solana address (base58-encoded)
- - `amount`: Amount in token's base units
+ - `amount` (number | bigint): Amount in token's base units
- `solanaOptions` ([SolanaTransferOptions](#solanatransferoptions), optional): `{ memo?: string }`; omitted or empty memos add no instruction
@@ -40978,7 +41015,7 @@ Extends `WalletManager` from `@tetherto/wdk-wallet`.
new WalletManagerSpark(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw BIP-32 master seed (16–64 bytes)
- `config` (object, optional): Configuration object
- `network` (string, optional): 'MAINNET', 'SIGNET', or 'REGTEST' (default: 'MAINNET')
- `client` (`SparkReadonlyClient`, optional): Existing read-only Spark client, reused as-is. The manager shares one read-only client across its accounts and their read-only conversions; signing wallets remain account-specific.
@@ -42755,7 +42792,7 @@ With your wallet ready, learn how to [manage multiple accounts](/sdk/wallet-modu
URL: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-spark/guides/handle-errors
Description: Handle Spark transaction and connection failures, plus fees and disposal.
-This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), handle unsupported operations and missing transfers, and apply [best practices](#best-practices) for fees and secure cleanup. Constructor and derivation failures can also expose validation context, so avoid logging complete error objects when they may contain sensitive values. In beta.26, the HD-key derivation failure keeps the `hdkey` field identifier but omits seed bytes from that context.
+This guide explains how to [handle transaction errors](#transaction-errors), [handle connection errors](#connection-errors), [handle unsupported operations and missing transfers](#unsupported-operations-and-missing-transfers), and apply [best practices](#best-practices) for fees and secure cleanup. Constructor and derivation failures can also expose validation context, so avoid logging complete error objects when they may contain sensitive values. In beta.26, the HD-key derivation failure keeps the `hdkey` field identifier but omits seed bytes from that context.
## Transaction Errors
@@ -42944,6 +42981,16 @@ console.log('Lightning invoice:', invoice.invoice)
2. Set `maxFeeSats` to cap routing fees.
3. Call [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference).
+You can pay an invoice using [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference):
+
+```javascript title="Pay Lightning Invoice"
+const payment = await account.payLightningInvoice({
+ invoice: 'lnbc500u1p...',
+ maxFeeSats: 1000
+})
+console.log('Payment result:', payment)
+```
+
If you enable [`syncAndRetry`](/sdk/wallet-modules/wallet-spark/configuration#automatic-retry), the wallet syncs state after a payment failure and retries [`account.payLightningInvoice()`](/sdk/wallet-modules/wallet-spark/api-reference#paylightninginvoiceoptions) once only for a stale-leaf error. Both attempts reuse the same `transferId`. The wallet generates an ID when you omit it.
You can enable the stale-leaf retry when constructing the wallet:
@@ -42955,7 +43002,7 @@ const wallet = new WalletManagerSpark(seedPhrase, {
})
const account = await wallet.getAccount(0)
-const payment = await account.payLightningInvoice({
+await account.payLightningInvoice({
invoice: 'lnbc500u1p...',
maxFeeSats: 1000,
})
@@ -43385,7 +43432,7 @@ new WalletManagerTonGasless(seed, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation
- `config` (TonGaslessWalletConfig): Configuration object
- `tonClient` (object | TonClient | array): TON client configuration, instance, or an array of configurations or instances for failover
- `url` (string): TON Center v2 JSON-RPC URL (e.g., 'https://toncenter.com/api/v2/jsonRPC')
@@ -43488,7 +43535,7 @@ new WalletAccountTonGasless(seed, path, config)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or raw 16–64-byte seed for SLIP-0010 derivation
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (TonGaslessWalletConfig): Configuration object (same as WalletManagerTonGasless)
@@ -45936,7 +45983,7 @@ With balance checks in place, learn how to [send TON](/sdk/wallet-modules/wallet
URL: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-ton/guides/get-started
Description: Install and create your first TON wallet.
-This guide explains how to [install the package](#1-install-the-package), [create a wallet](#2-create-a-wallet), and [get your first account](#3-get-your-first-account).
+This guide explains how to [install the package](#1-install-the-package), [create a wallet](#2-create-a-wallet), [get your first account](#3-get-your-first-account), and [convert it to read-only](#4-optional-convert-to-read-only).
## 1. Install the Package
@@ -46463,8 +46510,9 @@ These pages reflect `@tetherto/wdk-wallet-tron@1.0.0-beta.15`. Accounts derived
## Features
- **BIP-39 Seed Phrase Support**: Generate and validate BIP-39 mnemonic seed phrases
+- **Raw Seed Support**: Initialize wallets and accounts with a raw 16–64-byte BIP-32 master seed supplied as a `Uint8Array`
- **Tron Derivation Paths**: Support for BIP-44 standard derivation paths for Tron
-- **Multi-Account Management**: Create and manage multiple accounts from a single seed phrase
+- **Multi-Account Management**: Create and manage multiple accounts from a single seed
- **Tron Address Support:** Generate and manage Tron addresses
- **Message Signing:** Sign and verify messages using Tron cryptography
- **Transaction Management**: Send transactions and get fee estimates, including activation fee details for native TRX sends
@@ -47271,7 +47319,9 @@ Description: Configuration options and settings for @tetherto/wdk-wallet-tron-ga
```javascript
import WalletManagerTronGasfree from '@tetherto/wdk-wallet-tron-gasfree'
+import { TronWeb } from 'tronweb'
+// Option 1: Using RPC URL
const config = {
// Required parameters
chainId: 728126428, // Blockchain ID
@@ -47282,6 +47332,16 @@ const config = {
}
const wallet = new WalletManagerTronGasfree(seedPhrase, config)
+
+// Option 2: Using TronWeb instance
+const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io' })
+const config2 = {
+ chainId: 728126428,
+ provider: tronWeb,
+ gasFreeProvider: 'https://open.gasfree.io/tron/',
+ serviceProvider: 'REPLACE_WITH_PROVIDER_ADDRESS',
+ verifyingContract: 'TFFAMQLZybALaLb4uxHA9RBE7pxhUAjF3U'
+}
```
`gasFreeApiKey` and `gasFreeApiSecret` are optional. Omit both when your GasFree provider accepts unsigned requests. If you configure signed GasFree API requests, provide both values together; the constructor rejects partial credentials.
@@ -47345,10 +47405,17 @@ The manager initializes one RPC provider shared by its derived accounts. Use sep
**Examples:**
```javascript
+// Option 1: Using RPC URL
const config = {
provider: 'https://api.trongrid.io'
}
+// Option 2: Using TronWeb instance
+const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io' })
+const config2 = {
+ provider: tronWeb
+}
+
```
### RPC Failover Retries
@@ -48119,7 +48186,7 @@ new WalletManagerTron(seed, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic string or a raw 16–64-byte BIP-32 master seed (`Uint8Array`). Byte input is used directly for derivation.
- `config` (TronWalletConfig, optional): Configuration object
- `provider` (`string | TronWeb | Array`, optional): Tron RPC endpoint URL, TronWeb instance, or ordered failover list
- `retries` (number, optional): Additional failover attempts when `provider` is an array (default: 3)
@@ -48234,11 +48301,11 @@ new WalletAccountTron(seed, path, config?)
```
**Parameters:**
-- `seed` (string | Uint8Array): BIP-39 mnemonic seed phrase or seed bytes
+- `seed` (string | Uint8Array): BIP-39 mnemonic string or a raw 16–64-byte BIP-32 master seed (`Uint8Array`). Byte input is used directly for derivation.
- `path` (string): BIP-44 derivation path (e.g., "0'/0/0")
- `config` (TronWalletConfig, optional): Configuration object
-**Throws:** Error if seed phrase is invalid (BIP-39 validation fails)
+**Throws:** Error if the mnemonic fails BIP-39 validation or the raw seed length is outside 16–64 bytes
**Example:**
```javascript
@@ -49048,7 +49115,7 @@ npm install @tetherto/wdk-wallet-tron
## 2. Create a Wallet
-You can create a new wallet instance using the [`WalletManagerTron`](/sdk/wallet-modules/wallet-tron/api-reference) constructor with a BIP-39 seed phrase and a Tron RPC provider:
+You can create a new wallet instance using the [`WalletManagerTron`](/sdk/wallet-modules/wallet-tron/api-reference) constructor with a BIP-39 seed phrase or a raw 16–64-byte BIP-32 master seed (`Uint8Array`), plus a Tron RPC provider. This example uses a seed phrase:
```javascript title="Create Tron Wallet"
import WalletManagerTron, { WalletAccountTron, WalletAccountReadOnlyTron } from '@tetherto/wdk-wallet-tron'
@@ -49061,7 +49128,7 @@ const wallet = new WalletManagerTron(seedPhrase, {
```
-**Secure the Seed Phrase:** You must securely store this seed phrase immediately. If it is lost, the user will permanently lose access to their funds.
+**Secure the Seed:** You must securely store the seed phrase or raw seed bytes you use. If the seed is lost, the user will permanently lose access to their funds.
## 3. Get Your First Account
@@ -56800,7 +56867,7 @@ See [currency-code resolution and fallback behavior](/tools/price-rates/configur
#### Methods
-| Method | Description | Returns |
+| Method | Description | Returns (declared) |
|--------|-------------|---------|
| `getCurrentPrice(base, quote)` | Fetch latest price for base/quote pair | `Promise\` |
| `getMultiCurrentPrices(pairs)` | Fetch latest prices for multiple pairs in one batch | `Promise\\>` |
@@ -56840,15 +56907,21 @@ const data = await client.getMultiPriceData([
##### `getHistoricalPrice(from, to, opts?)`
-If the returned series exceeds 100 points, it is downscaled by powers of two until ≤ 100.
+Supply `start` and `end` as Unix timestamps in milliseconds; both fields are required by `HistoricalPriceOptions`. Keep `start` within the trailing 365 days to avoid the client's range error. If the returned series exceeds 100 points, it is downscaled by powers of two until ≤ 100.
+
+Request the last 24 hours:
```javascript title="Historical Prices"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const series = await client.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000, // optional
- end: 1709913600000 // optional
+ start,
+ end
})
```
+The concrete Bitfinex beta.6 implementation returns `{ price, ts }`, with `ts` in Unix milliseconds. Its inherited `HistoricalPriceResult` declaration still defines `{ price, timestamp }`. This is a declaration/runtime mismatch: `timestamp` is not the runtime field returned by this client. Validate or adapt the concrete result before using it through that declared type; `PricingProvider` forwards the client's historical result without renaming fields.
+
## Package: `@tetherto/wdk-pricing-provider`
### Class: `PricingProvider`
@@ -56865,13 +56938,15 @@ new PricingProvider({
})
```
-- `client` (`PricingClient | PricingClient[]`): a single client instance or an ordered array of client instances. When an array is provided, connection errors trigger automatic failover to the next client in the list.
-- `retries` (number, optional): number of additional retry attempts after the initial call fails. Total attempts = `1 + retries`. When `retries` exceeds the number of provided clients, the failover loops back in round-robin order. Default: `3`. Only applies when `client` is an array.
+- `client` (`PricingClient | PricingClient[]`): a single client instance or an ordered array of client instances. With an array, failures matching `error instanceof Error` can trigger failover within the `retries` limit, including application and HTTP errors. A resolved `null` does not trigger failover.
+- `retries` (number, optional): number of additional retry attempts after the initial call fails. Total attempts = `1 + retries`. When the total attempt budget exceeds the number of clients, attempts can wrap in round-robin order. Default: `3`. Only applies when `client` is an array.
- `priceCacheDurationMs` (number, optional): cache TTL for last price in ms (default 3,600,000)
#### Methods
-| Method | Description | Returns |
+The table shows the published Provider beta.7 declarations. At runtime, current-price and price-data methods can forward and cache `null` from a client, including individual `null` entries in batch results. Handle unavailable values even though the wrapper's declared return types do not include `null`.
+
+| Method | Description | Returns (declared) |
|--------|-------------|---------|
| `getLastPrice(base, quote)` | Returns cached last price; refreshes when TTL expires | `Promise\` |
| `getMultiLastPrices(pairs)` | Returns cached last prices for multiple pairs | `Promise\` |
@@ -56897,9 +56972,15 @@ const prices = await provider.getMultiLastPrices([
##### `getLastPriceData(base, quote)`
+Check for an unavailable result before reading its fields:
+
```javascript title="Cached Price Data"
const data = await provider.getLastPriceData('BTC', 'USD')
-console.log(data.lastPrice, data.dailyChange, data.dailyChangeRelative)
+if (data === null) {
+ console.log('Price data unavailable')
+} else {
+ console.log(data.lastPrice, data.dailyChange, data.dailyChangeRelative)
+}
```
##### `getMultiLastPriceData(pairs)`
@@ -56912,10 +56993,14 @@ const data = await provider.getMultiLastPriceData([
##### `getHistoricalPrice(from, to, opts?)`
+Request the last 24 hours through the provider. When its client is Bitfinex, the result retains the concrete `ts` field described [above](#gethistoricalpricefrom-to-opts); the wrapper does not convert it to the declared `timestamp` field.
+
```javascript title="Historical via Provider"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const hist = await provider.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000,
- end: 1709913600000
+ start,
+ end
})
```
@@ -57017,20 +57102,24 @@ const priceData = await client.getMultiPriceData([
### Historical Series
-Downscales long histories to ≤ 100 points.
+Supply `start` and `end` as Unix timestamps in milliseconds; both fields are required by `HistoricalPriceOptions`. Keep `start` within the trailing 365 days to avoid the client's range error. Long histories are downscaled to ≤ 100 points. This example requests the last 24 hours:
```javascript title="Get Historical Prices"
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const series = await client.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000, // optional (ms)
- end: 1709913600000 // optional (ms)
+ start,
+ end
})
```
+The concrete Bitfinex result uses `{ price, ts }`, with `ts` in Unix milliseconds. The inherited `HistoricalPriceResult` declaration instead names the time field `timestamp`; this is a declaration/runtime mismatch. See the [historical API notes](/tools/price-rates/api-reference#gethistoricalpricefrom-to-opts) before consuming the series in TypeScript.
+
## Provider Integration
Works with `@tetherto/wdk-pricing-provider` as a `PricingClient` implementation.
-You can pass a single client or an array of clients. When an array is provided, connection errors trigger automatic failover to the next client in the list.
+You can pass a single client or an array of clients. With an array, failures matching `error instanceof Error` trigger failover within the configured `retries` limit, including application and HTTP errors. A resolved `null` does not trigger failover.
```javascript title="Single client"
import { PricingProvider } from '@tetherto/wdk-pricing-provider'
@@ -57045,13 +57134,15 @@ const prices = await provider.getMultiLastPrices([
{ from: 'BTC', to: 'USD' },
{ from: 'ETH', to: 'USD' }
])
+const end = Date.now()
+const start = end - 24 * 60 * 60 * 1000
const hist = await provider.getHistoricalPrice('BTC', 'USD', {
- start: 1709906400000,
- end: 1709913600000
+ start,
+ end
})
```
-To enable failover, pass an ordered array of `PricingClient` instances. The provider tries each client in order when a connection error occurs.
+To enable failover, pass an ordered array of `PricingClient` instances. The provider advances through that array when a failure matches `error instanceof Error`, up to the `retries` limit.
```javascript title="Failover across multiple clients"
import { PricingProvider } from '@tetherto/wdk-pricing-provider'