@circle-fin/app-kit 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/borrow.cjs +150 -32
  3. package/borrow.d.cts +38 -9
  4. package/borrow.d.mts +38 -9
  5. package/borrow.d.ts +38 -9
  6. package/borrow.mjs +150 -32
  7. package/bridge.cjs +454 -53
  8. package/bridge.d.cts +38 -9
  9. package/bridge.d.mts +38 -9
  10. package/bridge.d.ts +38 -9
  11. package/bridge.mjs +454 -53
  12. package/chains.cjs +10 -6
  13. package/chains.d.cts +1 -1
  14. package/chains.d.mts +1 -1
  15. package/chains.d.ts +1 -1
  16. package/chains.mjs +10 -6
  17. package/context.d.cts +38 -9
  18. package/context.d.mts +38 -9
  19. package/context.d.ts +38 -9
  20. package/earn.cjs +830 -43
  21. package/earn.d.cts +38 -9
  22. package/earn.d.mts +38 -9
  23. package/earn.d.ts +38 -9
  24. package/earn.mjs +830 -43
  25. package/estimateBridge.cjs +454 -53
  26. package/estimateBridge.d.cts +38 -9
  27. package/estimateBridge.d.mts +38 -9
  28. package/estimateBridge.d.ts +38 -9
  29. package/estimateBridge.mjs +454 -53
  30. package/estimateSwap.cjs +265 -45
  31. package/estimateSwap.d.cts +86 -9
  32. package/estimateSwap.d.mts +86 -9
  33. package/estimateSwap.d.ts +86 -9
  34. package/estimateSwap.mjs +265 -45
  35. package/index.cjs +1019 -73
  36. package/index.d.cts +373 -210
  37. package/index.d.mts +373 -210
  38. package/index.d.ts +373 -210
  39. package/index.mjs +1019 -73
  40. package/package.json +8 -8
  41. package/server.cjs +35 -9
  42. package/server.d.cts +29 -10
  43. package/server.d.mts +29 -10
  44. package/server.d.ts +29 -10
  45. package/server.mjs +35 -9
  46. package/swap.cjs +265 -45
  47. package/swap.d.cts +86 -9
  48. package/swap.d.mts +86 -9
  49. package/swap.d.ts +86 -9
  50. package/swap.mjs +265 -45
  51. package/unifiedBalance.cjs +139 -20
  52. package/unifiedBalance.mjs +139 -20
package/swap.d.cts CHANGED
@@ -899,10 +899,10 @@ declare enum Blockchain {
899
899
  *
900
900
  * Unlike the full {@link Blockchain} enum, SwapChain includes mainnet
901
901
  * networks and explicitly whitelisted testnets (e.g., {@link Arc_Testnet})
902
- * where adapter contracts are deployed (CCTPv2 support).
902
+ * where Adapter contracts are deployed.
903
903
  *
904
904
  * Dynamic validation via {@link isSwapSupportedChain} ensures chains
905
- * automatically work when adapter contracts and supported tokens are deployed.
905
+ * automatically work when Adapter contracts and supported tokens are deployed.
906
906
  *
907
907
  * @example
908
908
  * ```typescript
@@ -942,20 +942,22 @@ declare enum SwapChain {
942
942
  HyperEVM = "HyperEVM",
943
943
  Monad = "Monad",
944
944
  Arc = "Arc",
945
+ Cronos = "Cronos",
946
+ Morph = "Morph",
945
947
  Arc_Testnet = "Arc_Testnet"
946
948
  }
947
949
  /**
948
950
  * Chain definition that supports swap operations.
949
951
  *
950
952
  * @remarks
951
- * Expanded from 4 to ~18 supported chains based on:
952
- * - CCTPv2 support (adapter contract deployed)
953
+ * Expanded from 4 to supported mainnets and whitelisted testnets based on:
954
+ * - A deployed Adapter contract, configured directly or through CCTP v2
953
955
  * - Mainnet chains plus whitelisted testnets (e.g., Arc Testnet)
954
956
  *
955
957
  * Use `isSwapSupportedChain()` for runtime validation.
956
958
  */
957
959
  type SwapChainDefinition = ChainDefinition & {
958
- chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Arc_Testnet;
960
+ chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Cronos | Blockchain.Morph | Blockchain.Arc_Testnet;
959
961
  };
960
962
  /**
961
963
  * Chain identifier accepted by swap operations.
@@ -6207,6 +6209,44 @@ type BridgeDestination<TAdapterCapabilities extends AdapterCapabilities = Adapte
6207
6209
  useForwarder?: boolean;
6208
6210
  }) | ForwarderDestination<TChainIdentifier>;
6209
6211
 
6212
+ /** Token metadata for one side of a swap route step. */
6213
+ interface SwapRouteToken {
6214
+ readonly symbol: string;
6215
+ readonly address: string;
6216
+ readonly decimals: number;
6217
+ }
6218
+ /** Amount estimates for a swap route step, expressed in base units. */
6219
+ interface SwapRouteStepEstimate {
6220
+ readonly fromAmount: string;
6221
+ readonly toAmount: string;
6222
+ readonly gasCostUSD?: string;
6223
+ }
6224
+ /** A single swap or bridge hop selected by the route provider. */
6225
+ interface SwapRouteStep {
6226
+ /** Hop kind, for example `swap` or `bridge`. */
6227
+ readonly type: string;
6228
+ /** Protocol identifier, for example `cctp-v2`. */
6229
+ readonly tool: string;
6230
+ /** Display name for {@link SwapRouteStep.tool}. */
6231
+ readonly toolName: string;
6232
+ readonly fromToken: SwapRouteToken;
6233
+ readonly toToken: SwapRouteToken;
6234
+ readonly estimate: SwapRouteStepEstimate;
6235
+ /** Provider-specific details that are not part of the stable step shape. */
6236
+ readonly metadata?: Readonly<Record<string, unknown>>;
6237
+ }
6238
+ /** Provider and executable hops selected for a swap. */
6239
+ interface SwapRoute {
6240
+ /**
6241
+ * Provider that routed the swap, for example `lifi` or `circle`. Treat as
6242
+ * an opaque identifier; new providers can appear without an SDK release.
6243
+ */
6244
+ readonly provider: string;
6245
+ readonly steps: readonly SwapRouteStep[];
6246
+ /** Provider-specific details that are not part of the stable route shape. */
6247
+ readonly metadata?: Readonly<Record<string, unknown>>;
6248
+ }
6249
+
6210
6250
  /**
6211
6251
  * Allowance strategy for token approvals during swap operations.
6212
6252
  *
@@ -6364,7 +6404,7 @@ interface ServiceSwapConfig {
6364
6404
  *
6365
6405
  * @defaultValue true
6366
6406
  */
6367
- batchTransactions?: boolean;
6407
+ batchTransactions?: boolean | undefined;
6368
6408
  }
6369
6409
  /**
6370
6410
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -6517,6 +6557,14 @@ interface ServiceSwapFee {
6517
6557
  * addresses are not available from the proxy response.
6518
6558
  */
6519
6559
  readonly recipientAddress?: string;
6560
+ /** Provider-defined fee component (for example `FORWARD`). */
6561
+ readonly component?: string;
6562
+ /**
6563
+ * Chain on which the fee is charged, as reported by the service
6564
+ * (a `Blockchain` value such as `'Ethereum'`). Not validated
6565
+ * against the `Blockchain` enum.
6566
+ */
6567
+ readonly chain?: string;
6520
6568
  }
6521
6569
 
6522
6570
  /**
@@ -6881,6 +6929,33 @@ interface SwapConfig {
6881
6929
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6882
6930
  */
6883
6931
  kitKey?: string;
6932
+ /**
6933
+ * Enable or disable atomic batched execution of the approval and swap.
6934
+ *
6935
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
6936
+ * approval submits the approval and the swap as one atomic batch if the
6937
+ * connected wallet supports it (EIP-5792, or a signing strategy that
6938
+ * declares atomic batching). Set to `false` to force the sequential
6939
+ * approve-then-swap flow.
6940
+ *
6941
+ * @remarks
6942
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
6943
+ * which already execute as a single transaction. USDT input always uses the
6944
+ * sequential path because its allowance must be reset to zero first. The
6945
+ * batched path relies on the wallet's own gas estimation for the swap call;
6946
+ * set `false` if your wallet under-estimates gas for complex routes or
6947
+ * rejects batched calls.
6948
+ *
6949
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
6950
+ *
6951
+ * @example
6952
+ * ```typescript
6953
+ * const config: SwapConfig = {
6954
+ * batchTransactions: false, // force sequential approve → swap
6955
+ * }
6956
+ * ```
6957
+ */
6958
+ batchTransactions?: boolean | undefined;
6884
6959
  }
6885
6960
  /**
6886
6961
  * Configuration for swap results.
@@ -7021,6 +7096,8 @@ interface SwapResult {
7021
7096
  * fees (charged by the DEX aggregator/protocol) and kit fees.
7022
7097
  */
7023
7098
  fees?: readonly ServiceSwapFee[];
7099
+ /** Provider and executable hops selected for the swap. */
7100
+ readonly route?: SwapRoute;
7024
7101
  /**
7025
7102
  * Lifecycle snapshot: `status`, `substatus`, and `substatusMessage`.
7026
7103
  *
@@ -8491,11 +8568,11 @@ interface AppKitContext {
8491
8568
  */
8492
8569
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8493
8570
  /**
8494
- * Disable success analytics for the underlying EarnKit, SwapKit,
8571
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
8495
8572
  * BorrowKit, and UnifiedBalanceKit.
8496
8573
  *
8497
- * When `true`, completed earn, swap, borrow, and unified balance operations
8498
- * will not POST analytics events. This does not disable error reporting; use
8574
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
8575
+ * operations will not POST analytics events. This does not disable error reporting; use
8499
8576
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8500
8577
  *
8501
8578
  * @defaultValue false
package/swap.d.mts CHANGED
@@ -899,10 +899,10 @@ declare enum Blockchain {
899
899
  *
900
900
  * Unlike the full {@link Blockchain} enum, SwapChain includes mainnet
901
901
  * networks and explicitly whitelisted testnets (e.g., {@link Arc_Testnet})
902
- * where adapter contracts are deployed (CCTPv2 support).
902
+ * where Adapter contracts are deployed.
903
903
  *
904
904
  * Dynamic validation via {@link isSwapSupportedChain} ensures chains
905
- * automatically work when adapter contracts and supported tokens are deployed.
905
+ * automatically work when Adapter contracts and supported tokens are deployed.
906
906
  *
907
907
  * @example
908
908
  * ```typescript
@@ -942,20 +942,22 @@ declare enum SwapChain {
942
942
  HyperEVM = "HyperEVM",
943
943
  Monad = "Monad",
944
944
  Arc = "Arc",
945
+ Cronos = "Cronos",
946
+ Morph = "Morph",
945
947
  Arc_Testnet = "Arc_Testnet"
946
948
  }
947
949
  /**
948
950
  * Chain definition that supports swap operations.
949
951
  *
950
952
  * @remarks
951
- * Expanded from 4 to ~18 supported chains based on:
952
- * - CCTPv2 support (adapter contract deployed)
953
+ * Expanded from 4 to supported mainnets and whitelisted testnets based on:
954
+ * - A deployed Adapter contract, configured directly or through CCTP v2
953
955
  * - Mainnet chains plus whitelisted testnets (e.g., Arc Testnet)
954
956
  *
955
957
  * Use `isSwapSupportedChain()` for runtime validation.
956
958
  */
957
959
  type SwapChainDefinition = ChainDefinition & {
958
- chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Arc_Testnet;
960
+ chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Cronos | Blockchain.Morph | Blockchain.Arc_Testnet;
959
961
  };
960
962
  /**
961
963
  * Chain identifier accepted by swap operations.
@@ -6207,6 +6209,44 @@ type BridgeDestination<TAdapterCapabilities extends AdapterCapabilities = Adapte
6207
6209
  useForwarder?: boolean;
6208
6210
  }) | ForwarderDestination<TChainIdentifier>;
6209
6211
 
6212
+ /** Token metadata for one side of a swap route step. */
6213
+ interface SwapRouteToken {
6214
+ readonly symbol: string;
6215
+ readonly address: string;
6216
+ readonly decimals: number;
6217
+ }
6218
+ /** Amount estimates for a swap route step, expressed in base units. */
6219
+ interface SwapRouteStepEstimate {
6220
+ readonly fromAmount: string;
6221
+ readonly toAmount: string;
6222
+ readonly gasCostUSD?: string;
6223
+ }
6224
+ /** A single swap or bridge hop selected by the route provider. */
6225
+ interface SwapRouteStep {
6226
+ /** Hop kind, for example `swap` or `bridge`. */
6227
+ readonly type: string;
6228
+ /** Protocol identifier, for example `cctp-v2`. */
6229
+ readonly tool: string;
6230
+ /** Display name for {@link SwapRouteStep.tool}. */
6231
+ readonly toolName: string;
6232
+ readonly fromToken: SwapRouteToken;
6233
+ readonly toToken: SwapRouteToken;
6234
+ readonly estimate: SwapRouteStepEstimate;
6235
+ /** Provider-specific details that are not part of the stable step shape. */
6236
+ readonly metadata?: Readonly<Record<string, unknown>>;
6237
+ }
6238
+ /** Provider and executable hops selected for a swap. */
6239
+ interface SwapRoute {
6240
+ /**
6241
+ * Provider that routed the swap, for example `lifi` or `circle`. Treat as
6242
+ * an opaque identifier; new providers can appear without an SDK release.
6243
+ */
6244
+ readonly provider: string;
6245
+ readonly steps: readonly SwapRouteStep[];
6246
+ /** Provider-specific details that are not part of the stable route shape. */
6247
+ readonly metadata?: Readonly<Record<string, unknown>>;
6248
+ }
6249
+
6210
6250
  /**
6211
6251
  * Allowance strategy for token approvals during swap operations.
6212
6252
  *
@@ -6364,7 +6404,7 @@ interface ServiceSwapConfig {
6364
6404
  *
6365
6405
  * @defaultValue true
6366
6406
  */
6367
- batchTransactions?: boolean;
6407
+ batchTransactions?: boolean | undefined;
6368
6408
  }
6369
6409
  /**
6370
6410
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -6517,6 +6557,14 @@ interface ServiceSwapFee {
6517
6557
  * addresses are not available from the proxy response.
6518
6558
  */
6519
6559
  readonly recipientAddress?: string;
6560
+ /** Provider-defined fee component (for example `FORWARD`). */
6561
+ readonly component?: string;
6562
+ /**
6563
+ * Chain on which the fee is charged, as reported by the service
6564
+ * (a `Blockchain` value such as `'Ethereum'`). Not validated
6565
+ * against the `Blockchain` enum.
6566
+ */
6567
+ readonly chain?: string;
6520
6568
  }
6521
6569
 
6522
6570
  /**
@@ -6881,6 +6929,33 @@ interface SwapConfig {
6881
6929
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6882
6930
  */
6883
6931
  kitKey?: string;
6932
+ /**
6933
+ * Enable or disable atomic batched execution of the approval and swap.
6934
+ *
6935
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
6936
+ * approval submits the approval and the swap as one atomic batch if the
6937
+ * connected wallet supports it (EIP-5792, or a signing strategy that
6938
+ * declares atomic batching). Set to `false` to force the sequential
6939
+ * approve-then-swap flow.
6940
+ *
6941
+ * @remarks
6942
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
6943
+ * which already execute as a single transaction. USDT input always uses the
6944
+ * sequential path because its allowance must be reset to zero first. The
6945
+ * batched path relies on the wallet's own gas estimation for the swap call;
6946
+ * set `false` if your wallet under-estimates gas for complex routes or
6947
+ * rejects batched calls.
6948
+ *
6949
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
6950
+ *
6951
+ * @example
6952
+ * ```typescript
6953
+ * const config: SwapConfig = {
6954
+ * batchTransactions: false, // force sequential approve → swap
6955
+ * }
6956
+ * ```
6957
+ */
6958
+ batchTransactions?: boolean | undefined;
6884
6959
  }
6885
6960
  /**
6886
6961
  * Configuration for swap results.
@@ -7021,6 +7096,8 @@ interface SwapResult {
7021
7096
  * fees (charged by the DEX aggregator/protocol) and kit fees.
7022
7097
  */
7023
7098
  fees?: readonly ServiceSwapFee[];
7099
+ /** Provider and executable hops selected for the swap. */
7100
+ readonly route?: SwapRoute;
7024
7101
  /**
7025
7102
  * Lifecycle snapshot: `status`, `substatus`, and `substatusMessage`.
7026
7103
  *
@@ -8491,11 +8568,11 @@ interface AppKitContext {
8491
8568
  */
8492
8569
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8493
8570
  /**
8494
- * Disable success analytics for the underlying EarnKit, SwapKit,
8571
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
8495
8572
  * BorrowKit, and UnifiedBalanceKit.
8496
8573
  *
8497
- * When `true`, completed earn, swap, borrow, and unified balance operations
8498
- * will not POST analytics events. This does not disable error reporting; use
8574
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
8575
+ * operations will not POST analytics events. This does not disable error reporting; use
8499
8576
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8500
8577
  *
8501
8578
  * @defaultValue false
package/swap.d.ts CHANGED
@@ -899,10 +899,10 @@ declare enum Blockchain {
899
899
  *
900
900
  * Unlike the full {@link Blockchain} enum, SwapChain includes mainnet
901
901
  * networks and explicitly whitelisted testnets (e.g., {@link Arc_Testnet})
902
- * where adapter contracts are deployed (CCTPv2 support).
902
+ * where Adapter contracts are deployed.
903
903
  *
904
904
  * Dynamic validation via {@link isSwapSupportedChain} ensures chains
905
- * automatically work when adapter contracts and supported tokens are deployed.
905
+ * automatically work when Adapter contracts and supported tokens are deployed.
906
906
  *
907
907
  * @example
908
908
  * ```typescript
@@ -942,20 +942,22 @@ declare enum SwapChain {
942
942
  HyperEVM = "HyperEVM",
943
943
  Monad = "Monad",
944
944
  Arc = "Arc",
945
+ Cronos = "Cronos",
946
+ Morph = "Morph",
945
947
  Arc_Testnet = "Arc_Testnet"
946
948
  }
947
949
  /**
948
950
  * Chain definition that supports swap operations.
949
951
  *
950
952
  * @remarks
951
- * Expanded from 4 to ~18 supported chains based on:
952
- * - CCTPv2 support (adapter contract deployed)
953
+ * Expanded from 4 to supported mainnets and whitelisted testnets based on:
954
+ * - A deployed Adapter contract, configured directly or through CCTP v2
953
955
  * - Mainnet chains plus whitelisted testnets (e.g., Arc Testnet)
954
956
  *
955
957
  * Use `isSwapSupportedChain()` for runtime validation.
956
958
  */
957
959
  type SwapChainDefinition = ChainDefinition & {
958
- chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Arc_Testnet;
960
+ chain: Blockchain.Ethereum | Blockchain.Base | Blockchain.Polygon | Blockchain.Solana | Blockchain.Arbitrum | Blockchain.Optimism | Blockchain.Avalanche | Blockchain.Linea | Blockchain.Ink | Blockchain.World_Chain | Blockchain.Unichain | Blockchain.Plume | Blockchain.Sei | Blockchain.Sonic | Blockchain.XDC | Blockchain.HyperEVM | Blockchain.Monad | Blockchain.Arc | Blockchain.Cronos | Blockchain.Morph | Blockchain.Arc_Testnet;
959
961
  };
960
962
  /**
961
963
  * Chain identifier accepted by swap operations.
@@ -6207,6 +6209,44 @@ type BridgeDestination<TAdapterCapabilities extends AdapterCapabilities = Adapte
6207
6209
  useForwarder?: boolean;
6208
6210
  }) | ForwarderDestination<TChainIdentifier>;
6209
6211
 
6212
+ /** Token metadata for one side of a swap route step. */
6213
+ interface SwapRouteToken {
6214
+ readonly symbol: string;
6215
+ readonly address: string;
6216
+ readonly decimals: number;
6217
+ }
6218
+ /** Amount estimates for a swap route step, expressed in base units. */
6219
+ interface SwapRouteStepEstimate {
6220
+ readonly fromAmount: string;
6221
+ readonly toAmount: string;
6222
+ readonly gasCostUSD?: string;
6223
+ }
6224
+ /** A single swap or bridge hop selected by the route provider. */
6225
+ interface SwapRouteStep {
6226
+ /** Hop kind, for example `swap` or `bridge`. */
6227
+ readonly type: string;
6228
+ /** Protocol identifier, for example `cctp-v2`. */
6229
+ readonly tool: string;
6230
+ /** Display name for {@link SwapRouteStep.tool}. */
6231
+ readonly toolName: string;
6232
+ readonly fromToken: SwapRouteToken;
6233
+ readonly toToken: SwapRouteToken;
6234
+ readonly estimate: SwapRouteStepEstimate;
6235
+ /** Provider-specific details that are not part of the stable step shape. */
6236
+ readonly metadata?: Readonly<Record<string, unknown>>;
6237
+ }
6238
+ /** Provider and executable hops selected for a swap. */
6239
+ interface SwapRoute {
6240
+ /**
6241
+ * Provider that routed the swap, for example `lifi` or `circle`. Treat as
6242
+ * an opaque identifier; new providers can appear without an SDK release.
6243
+ */
6244
+ readonly provider: string;
6245
+ readonly steps: readonly SwapRouteStep[];
6246
+ /** Provider-specific details that are not part of the stable route shape. */
6247
+ readonly metadata?: Readonly<Record<string, unknown>>;
6248
+ }
6249
+
6210
6250
  /**
6211
6251
  * Allowance strategy for token approvals during swap operations.
6212
6252
  *
@@ -6364,7 +6404,7 @@ interface ServiceSwapConfig {
6364
6404
  *
6365
6405
  * @defaultValue true
6366
6406
  */
6367
- batchTransactions?: boolean;
6407
+ batchTransactions?: boolean | undefined;
6368
6408
  }
6369
6409
  /**
6370
6410
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -6517,6 +6557,14 @@ interface ServiceSwapFee {
6517
6557
  * addresses are not available from the proxy response.
6518
6558
  */
6519
6559
  readonly recipientAddress?: string;
6560
+ /** Provider-defined fee component (for example `FORWARD`). */
6561
+ readonly component?: string;
6562
+ /**
6563
+ * Chain on which the fee is charged, as reported by the service
6564
+ * (a `Blockchain` value such as `'Ethereum'`). Not validated
6565
+ * against the `Blockchain` enum.
6566
+ */
6567
+ readonly chain?: string;
6520
6568
  }
6521
6569
 
6522
6570
  /**
@@ -6881,6 +6929,33 @@ interface SwapConfig {
6881
6929
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6882
6930
  */
6883
6931
  kitKey?: string;
6932
+ /**
6933
+ * Enable or disable atomic batched execution of the approval and swap.
6934
+ *
6935
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
6936
+ * approval submits the approval and the swap as one atomic batch if the
6937
+ * connected wallet supports it (EIP-5792, or a signing strategy that
6938
+ * declares atomic batching). Set to `false` to force the sequential
6939
+ * approve-then-swap flow.
6940
+ *
6941
+ * @remarks
6942
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
6943
+ * which already execute as a single transaction. USDT input always uses the
6944
+ * sequential path because its allowance must be reset to zero first. The
6945
+ * batched path relies on the wallet's own gas estimation for the swap call;
6946
+ * set `false` if your wallet under-estimates gas for complex routes or
6947
+ * rejects batched calls.
6948
+ *
6949
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
6950
+ *
6951
+ * @example
6952
+ * ```typescript
6953
+ * const config: SwapConfig = {
6954
+ * batchTransactions: false, // force sequential approve → swap
6955
+ * }
6956
+ * ```
6957
+ */
6958
+ batchTransactions?: boolean | undefined;
6884
6959
  }
6885
6960
  /**
6886
6961
  * Configuration for swap results.
@@ -7021,6 +7096,8 @@ interface SwapResult {
7021
7096
  * fees (charged by the DEX aggregator/protocol) and kit fees.
7022
7097
  */
7023
7098
  fees?: readonly ServiceSwapFee[];
7099
+ /** Provider and executable hops selected for the swap. */
7100
+ readonly route?: SwapRoute;
7024
7101
  /**
7025
7102
  * Lifecycle snapshot: `status`, `substatus`, and `substatusMessage`.
7026
7103
  *
@@ -8491,11 +8568,11 @@ interface AppKitContext {
8491
8568
  */
8492
8569
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8493
8570
  /**
8494
- * Disable success analytics for the underlying EarnKit, SwapKit,
8571
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
8495
8572
  * BorrowKit, and UnifiedBalanceKit.
8496
8573
  *
8497
- * When `true`, completed earn, swap, borrow, and unified balance operations
8498
- * will not POST analytics events. This does not disable error reporting; use
8574
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
8575
+ * operations will not POST analytics events. This does not disable error reporting; use
8499
8576
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8500
8577
  *
8501
8578
  * @defaultValue false