@circle-fin/app-kit 1.16.0 → 1.17.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.
package/earn.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.
@@ -9264,7 +9266,7 @@ interface ServiceSwapConfig {
9264
9266
  *
9265
9267
  * @defaultValue true
9266
9268
  */
9267
- batchTransactions?: boolean;
9269
+ batchTransactions?: boolean | undefined;
9268
9270
  }
9269
9271
  /**
9270
9272
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -9728,6 +9730,33 @@ interface SwapConfig {
9728
9730
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
9729
9731
  */
9730
9732
  kitKey?: string;
9733
+ /**
9734
+ * Enable or disable atomic batched execution of the approval and swap.
9735
+ *
9736
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
9737
+ * approval submits the approval and the swap as one atomic batch if the
9738
+ * connected wallet supports it (EIP-5792, or a signing strategy that
9739
+ * declares atomic batching). Set to `false` to force the sequential
9740
+ * approve-then-swap flow.
9741
+ *
9742
+ * @remarks
9743
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
9744
+ * which already execute as a single transaction. USDT input always uses the
9745
+ * sequential path because its allowance must be reset to zero first. The
9746
+ * batched path relies on the wallet's own gas estimation for the swap call;
9747
+ * set `false` if your wallet under-estimates gas for complex routes or
9748
+ * rejects batched calls.
9749
+ *
9750
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
9751
+ *
9752
+ * @example
9753
+ * ```typescript
9754
+ * const config: SwapConfig = {
9755
+ * batchTransactions: false, // force sequential approve → swap
9756
+ * }
9757
+ * ```
9758
+ */
9759
+ batchTransactions?: boolean | undefined;
9731
9760
  }
9732
9761
  /**
9733
9762
  * Resolved parameters for swap operations after validation and normalization.
package/earn.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.
@@ -9264,7 +9266,7 @@ interface ServiceSwapConfig {
9264
9266
  *
9265
9267
  * @defaultValue true
9266
9268
  */
9267
- batchTransactions?: boolean;
9269
+ batchTransactions?: boolean | undefined;
9268
9270
  }
9269
9271
  /**
9270
9272
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -9728,6 +9730,33 @@ interface SwapConfig {
9728
9730
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
9729
9731
  */
9730
9732
  kitKey?: string;
9733
+ /**
9734
+ * Enable or disable atomic batched execution of the approval and swap.
9735
+ *
9736
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
9737
+ * approval submits the approval and the swap as one atomic batch if the
9738
+ * connected wallet supports it (EIP-5792, or a signing strategy that
9739
+ * declares atomic batching). Set to `false` to force the sequential
9740
+ * approve-then-swap flow.
9741
+ *
9742
+ * @remarks
9743
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
9744
+ * which already execute as a single transaction. USDT input always uses the
9745
+ * sequential path because its allowance must be reset to zero first. The
9746
+ * batched path relies on the wallet's own gas estimation for the swap call;
9747
+ * set `false` if your wallet under-estimates gas for complex routes or
9748
+ * rejects batched calls.
9749
+ *
9750
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
9751
+ *
9752
+ * @example
9753
+ * ```typescript
9754
+ * const config: SwapConfig = {
9755
+ * batchTransactions: false, // force sequential approve → swap
9756
+ * }
9757
+ * ```
9758
+ */
9759
+ batchTransactions?: boolean | undefined;
9731
9760
  }
9732
9761
  /**
9733
9762
  * Resolved parameters for swap operations after validation and normalization.
package/earn.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.
@@ -9264,7 +9266,7 @@ interface ServiceSwapConfig {
9264
9266
  *
9265
9267
  * @defaultValue true
9266
9268
  */
9267
- batchTransactions?: boolean;
9269
+ batchTransactions?: boolean | undefined;
9268
9270
  }
9269
9271
  /**
9270
9272
  * Parameters for initiating a swap operation through the Stablecoin Service.
@@ -9728,6 +9730,33 @@ interface SwapConfig {
9728
9730
  * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
9729
9731
  */
9730
9732
  kitKey?: string;
9733
+ /**
9734
+ * Enable or disable atomic batched execution of the approval and swap.
9735
+ *
9736
+ * When `true` (or omitted), an EVM swap that needs an on-chain ERC-20
9737
+ * approval submits the approval and the swap as one atomic batch if the
9738
+ * connected wallet supports it (EIP-5792, or a signing strategy that
9739
+ * declares atomic batching). Set to `false` to force the sequential
9740
+ * approve-then-swap flow.
9741
+ *
9742
+ * @remarks
9743
+ * Has no effect on the gasless permit path, native-token swaps, or Solana,
9744
+ * which already execute as a single transaction. USDT input always uses the
9745
+ * sequential path because its allowance must be reset to zero first. The
9746
+ * batched path relies on the wallet's own gas estimation for the swap call;
9747
+ * set `false` if your wallet under-estimates gas for complex routes or
9748
+ * rejects batched calls.
9749
+ *
9750
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
9751
+ *
9752
+ * @example
9753
+ * ```typescript
9754
+ * const config: SwapConfig = {
9755
+ * batchTransactions: false, // force sequential approve → swap
9756
+ * }
9757
+ * ```
9758
+ */
9759
+ batchTransactions?: boolean | undefined;
9731
9760
  }
9732
9761
  /**
9733
9762
  * Resolved parameters for swap operations after validation and normalization.