@circle-fin/app-kit 1.12.1 → 1.13.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/swap.d.cts CHANGED
@@ -718,6 +718,8 @@ declare enum Blockchain {
718
718
  Optimism_Sepolia = "Optimism_Sepolia",
719
719
  Pharos = "Pharos",
720
720
  Pharos_Testnet = "Pharos_Testnet",
721
+ Plasma = "Plasma",
722
+ Plasma_Testnet = "Plasma_Testnet",
721
723
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
722
724
  Polkadot_Westmint = "Polkadot_Westmint",
723
725
  Plume = "Plume",
@@ -946,6 +948,7 @@ declare enum BridgeChain {
946
948
  Morph = "Morph",
947
949
  Optimism = "Optimism",
948
950
  Pharos = "Pharos",
951
+ Plasma = "Plasma",
949
952
  Plume = "Plume",
950
953
  Polygon = "Polygon",
951
954
  Sei = "Sei",
@@ -971,6 +974,7 @@ declare enum BridgeChain {
971
974
  Morph_Testnet = "Morph_Testnet",
972
975
  Optimism_Sepolia = "Optimism_Sepolia",
973
976
  Pharos_Testnet = "Pharos_Testnet",
977
+ Plasma_Testnet = "Plasma_Testnet",
974
978
  Plume_Testnet = "Plume_Testnet",
975
979
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
976
980
  Sei_Testnet = "Sei_Testnet",
@@ -2652,7 +2656,7 @@ interface ExecuteParams {
2652
2656
  * fromAddress: '0x...',
2653
2657
  * toAddress: '0x...',
2654
2658
  * amount: '1000000',
2655
- * apiKey: 'KIT_KEY:...',
2659
+ * apiKey: 'TEST_API_KEY:...',
2656
2660
  * })
2657
2661
  *
2658
2662
  * // Build token inputs with permit
@@ -2796,7 +2800,7 @@ interface ExecuteSwapEVMParams extends ActionParameters {
2796
2800
  * fromAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2797
2801
  * toAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2798
2802
  * amount: '1000000',
2799
- * apiKey: 'KIT_KEY:...',
2803
+ * apiKey: 'TEST_API_KEY:...',
2800
2804
  * })
2801
2805
  *
2802
2806
  * // Prepare action parameters
@@ -5909,12 +5913,21 @@ interface ServiceSwapConfig {
5909
5913
  recipientAddress?: string;
5910
5914
  };
5911
5915
  /**
5912
- * Stablecoin Service Kit Key used to authenticate service-backed swap
5913
- * requests.
5916
+ * Circle API key used to authenticate service-backed swap requests.
5917
+ *
5918
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
5919
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
5914
5920
  *
5915
5921
  * Treat this value as a credential. Do not log it, embed it in client-side
5916
5922
  * source, or expose it in telemetry.
5917
5923
  */
5924
+ apiKey?: string | undefined;
5925
+ /**
5926
+ * Circle API key used to authenticate service-backed swap requests.
5927
+ *
5928
+ * @deprecated Use {@link ServiceSwapConfig.apiKey} instead. Still honored
5929
+ * when `apiKey` is omitted, and `apiKey` takes precedence when both are set.
5930
+ */
5918
5931
  kitKey?: string;
5919
5932
  /**
5920
5933
  * DEX aggregator identifier used to source the swap route.
@@ -6445,12 +6458,21 @@ interface SwapConfig {
6445
6458
  recipientAddress: string;
6446
6459
  };
6447
6460
  /**
6448
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6449
- * requests.
6461
+ * Circle API key used to authenticate service-backed swap requests.
6462
+ *
6463
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6464
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6450
6465
  *
6451
6466
  * Treat this value as a credential. Do not log it, embed it in client-side
6452
6467
  * source, or expose it in telemetry.
6453
6468
  */
6469
+ apiKey?: string | undefined;
6470
+ /**
6471
+ * Circle API key used to authenticate service-backed swap requests.
6472
+ *
6473
+ * @deprecated Use {@link SwapConfig.apiKey} instead. Still honored when
6474
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6475
+ */
6454
6476
  kitKey?: string;
6455
6477
  }
6456
6478
  /**
@@ -6490,7 +6512,13 @@ interface ResolvedSwapConfig extends Omit<SwapConfig, 'customFee'> {
6490
6512
  recipientAddress?: string;
6491
6513
  };
6492
6514
  }
6493
- type SwapResultConfig = Omit<ResolvedSwapConfig, 'kitKey'>;
6515
+ /**
6516
+ * Swap config as echoed back on a result, with credentials removed.
6517
+ *
6518
+ * Both credential fields are omitted so a returned {@link SwapResult} can be
6519
+ * logged or serialized without leaking the secret used to authenticate it.
6520
+ */
6521
+ type SwapResultConfig = Omit<ResolvedSwapConfig, 'apiKey' | 'kitKey'>;
6494
6522
  /**
6495
6523
  * Result of an executed swap operation.
6496
6524
  *
@@ -6786,6 +6814,30 @@ interface SwapParams<TFromAdapterCapabilities extends AdapterCapabilities = Adap
6786
6814
  config?: SwapConfig;
6787
6815
  }
6788
6816
 
6817
+ /**
6818
+ * Configure how CCTP and forwarding fees are collected for a bridge.
6819
+ *
6820
+ * @remarks
6821
+ * Use `'source'` with `to.useForwarder: true` to treat `amount` as the exact
6822
+ * destination amount. Bridge Kit obtains a signed fee quote, collects the fee
6823
+ * in source-chain USDC, and leaves the destination mint unreduced. Omit the
6824
+ * option (or use `'destination'`) to preserve the existing max-fee behavior.
6825
+ *
6826
+ * @example
6827
+ * ```typescript
6828
+ * import type { BridgeExecutionConfig } from '@circle-fin/bridge-kit'
6829
+ *
6830
+ * const config: BridgeExecutionConfig = {
6831
+ * transferSpeed: 'FAST',
6832
+ * feePayment: 'source',
6833
+ * }
6834
+ * ```
6835
+ * @since 1.14.0
6836
+ */
6837
+ interface BridgeExecutionConfig extends BridgeConfig {
6838
+ /** Select source-side signed fees or the legacy destination-side fee path. */
6839
+ feePayment?: 'source' | 'destination';
6840
+ }
6789
6841
  type FeeFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6790
6842
  type FeeRecipientFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (feePayoutChain: ChainDefinition, params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6791
6843
  /**
@@ -6946,7 +6998,7 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6946
6998
  * Optional bridge configuration (e.g., transfer speed).
6947
6999
  * If omitted, defaults will be used
6948
7000
  */
6949
- config?: BridgeConfig;
7001
+ config?: BridgeExecutionConfig;
6950
7002
  /**
6951
7003
  * The token to transfer. Defaults to 'USDC'.
6952
7004
  * If omitted, the provider will use 'USDC' by default.
@@ -6973,6 +7025,16 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6973
7025
  * ```
6974
7026
  */
6975
7027
  invocationMeta?: InvocationMeta;
7028
+ /**
7029
+ * Reuse the opaque signed quote returned by a receive-exact estimate.
7030
+ *
7031
+ * @remarks
7032
+ * Bridge Kit validates a supplied quote against the exact transfer and fails
7033
+ * when it is invalid, mismatched, expired, or too close to expiry. Omit this
7034
+ * value to let Bridge Kit fetch a fresh quote automatically. Never log or
7035
+ * decode it.
7036
+ */
7037
+ quote?: string;
6976
7038
  }
6977
7039
 
6978
7040
  /**
@@ -7017,29 +7079,37 @@ type EarnAdapterContext<TAdapterCapabilities extends AdapterCapabilities = Adapt
7017
7079
  * Configuration options for earn operations.
7018
7080
  *
7019
7081
  * EarnKit supports dual-mode authentication: operations work both with
7020
- * and without a Kit Key. When present, the Kit Key enables permissioned
7082
+ * and without an API key. When present, the API key enables permissioned
7021
7083
  * features like integrator attribution tracking.
7022
7084
  *
7023
7085
  * @example
7024
7086
  * ```typescript
7025
- * // Permissionless (no Kit Key)
7087
+ * // Permissionless (no API key)
7026
7088
  * const config: EarnConfig = {}
7027
7089
  *
7028
- * // Permissioned (with Kit Key)
7090
+ * // Permissioned (with API key)
7029
7091
  * const config: EarnConfig = {
7030
- * kitKey: 'KIT_KEY:keyId:keySecret',
7092
+ * apiKey: 'TEST_API_KEY:keyId:keySecret',
7031
7093
  * }
7032
7094
  * ```
7033
7095
  */
7034
7096
  interface EarnConfig {
7035
7097
  /**
7036
- * Optional Kit Key for permissioned access.
7098
+ * Optional Circle API key for permissioned access.
7037
7099
  *
7038
7100
  * When provided, enables integrator attribution tracking and
7039
7101
  * higher rate limits. When omitted, the SDK operates in
7040
7102
  * permissionless mode.
7041
7103
  *
7042
- * Format: `KIT_KEY:<keyId>:<keySecret>`
7104
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
7105
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
7106
+ */
7107
+ readonly apiKey?: string | undefined;
7108
+ /**
7109
+ * Optional Circle API key for permissioned access.
7110
+ *
7111
+ * @deprecated Use {@link EarnConfig.apiKey} instead. Still honored when
7112
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
7043
7113
  */
7044
7114
  readonly kitKey?: string | undefined;
7045
7115
  /**
@@ -7806,13 +7876,18 @@ interface AppKitContext {
7806
7876
  */
7807
7877
  disableErrorReporting?: boolean;
7808
7878
  /**
7809
- * Custom HTTP headers forwarded with the underlying CCTP provider's
7810
- * attestation (Iris) API requests made by bridge operations.
7879
+ * Custom HTTP headers forwarded with Circle API requests made by the
7880
+ * underlying kits: the CCTP provider's attestation (Iris) requests for
7881
+ * bridge operations, and the Gateway API requests for unified-balance
7882
+ * operations.
7811
7883
  *
7812
7884
  * @remarks
7813
7885
  * Headers are merged on top of the SDK defaults (such as `Content-Type`)
7814
- * rather than replacing them. The header is forwarded as-is to Circle's API;
7815
- * the SDK does not interpret it.
7886
+ * rather than replacing them. Each header is forwarded as-is to Circle's API;
7887
+ * the SDK does not interpret it. The same map is forwarded to every relevant
7888
+ * kit, so a header a given API ignores is simply a no-op there. A
7889
+ * `unifiedBalance.headers` value, if provided, takes precedence for the
7890
+ * unified-balance kit.
7816
7891
  */
7817
7892
  headers?: Record<string, string>;
7818
7893
  }
package/swap.d.mts CHANGED
@@ -718,6 +718,8 @@ declare enum Blockchain {
718
718
  Optimism_Sepolia = "Optimism_Sepolia",
719
719
  Pharos = "Pharos",
720
720
  Pharos_Testnet = "Pharos_Testnet",
721
+ Plasma = "Plasma",
722
+ Plasma_Testnet = "Plasma_Testnet",
721
723
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
722
724
  Polkadot_Westmint = "Polkadot_Westmint",
723
725
  Plume = "Plume",
@@ -946,6 +948,7 @@ declare enum BridgeChain {
946
948
  Morph = "Morph",
947
949
  Optimism = "Optimism",
948
950
  Pharos = "Pharos",
951
+ Plasma = "Plasma",
949
952
  Plume = "Plume",
950
953
  Polygon = "Polygon",
951
954
  Sei = "Sei",
@@ -971,6 +974,7 @@ declare enum BridgeChain {
971
974
  Morph_Testnet = "Morph_Testnet",
972
975
  Optimism_Sepolia = "Optimism_Sepolia",
973
976
  Pharos_Testnet = "Pharos_Testnet",
977
+ Plasma_Testnet = "Plasma_Testnet",
974
978
  Plume_Testnet = "Plume_Testnet",
975
979
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
976
980
  Sei_Testnet = "Sei_Testnet",
@@ -2652,7 +2656,7 @@ interface ExecuteParams {
2652
2656
  * fromAddress: '0x...',
2653
2657
  * toAddress: '0x...',
2654
2658
  * amount: '1000000',
2655
- * apiKey: 'KIT_KEY:...',
2659
+ * apiKey: 'TEST_API_KEY:...',
2656
2660
  * })
2657
2661
  *
2658
2662
  * // Build token inputs with permit
@@ -2796,7 +2800,7 @@ interface ExecuteSwapEVMParams extends ActionParameters {
2796
2800
  * fromAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2797
2801
  * toAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2798
2802
  * amount: '1000000',
2799
- * apiKey: 'KIT_KEY:...',
2803
+ * apiKey: 'TEST_API_KEY:...',
2800
2804
  * })
2801
2805
  *
2802
2806
  * // Prepare action parameters
@@ -5909,12 +5913,21 @@ interface ServiceSwapConfig {
5909
5913
  recipientAddress?: string;
5910
5914
  };
5911
5915
  /**
5912
- * Stablecoin Service Kit Key used to authenticate service-backed swap
5913
- * requests.
5916
+ * Circle API key used to authenticate service-backed swap requests.
5917
+ *
5918
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
5919
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
5914
5920
  *
5915
5921
  * Treat this value as a credential. Do not log it, embed it in client-side
5916
5922
  * source, or expose it in telemetry.
5917
5923
  */
5924
+ apiKey?: string | undefined;
5925
+ /**
5926
+ * Circle API key used to authenticate service-backed swap requests.
5927
+ *
5928
+ * @deprecated Use {@link ServiceSwapConfig.apiKey} instead. Still honored
5929
+ * when `apiKey` is omitted, and `apiKey` takes precedence when both are set.
5930
+ */
5918
5931
  kitKey?: string;
5919
5932
  /**
5920
5933
  * DEX aggregator identifier used to source the swap route.
@@ -6445,12 +6458,21 @@ interface SwapConfig {
6445
6458
  recipientAddress: string;
6446
6459
  };
6447
6460
  /**
6448
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6449
- * requests.
6461
+ * Circle API key used to authenticate service-backed swap requests.
6462
+ *
6463
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6464
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6450
6465
  *
6451
6466
  * Treat this value as a credential. Do not log it, embed it in client-side
6452
6467
  * source, or expose it in telemetry.
6453
6468
  */
6469
+ apiKey?: string | undefined;
6470
+ /**
6471
+ * Circle API key used to authenticate service-backed swap requests.
6472
+ *
6473
+ * @deprecated Use {@link SwapConfig.apiKey} instead. Still honored when
6474
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6475
+ */
6454
6476
  kitKey?: string;
6455
6477
  }
6456
6478
  /**
@@ -6490,7 +6512,13 @@ interface ResolvedSwapConfig extends Omit<SwapConfig, 'customFee'> {
6490
6512
  recipientAddress?: string;
6491
6513
  };
6492
6514
  }
6493
- type SwapResultConfig = Omit<ResolvedSwapConfig, 'kitKey'>;
6515
+ /**
6516
+ * Swap config as echoed back on a result, with credentials removed.
6517
+ *
6518
+ * Both credential fields are omitted so a returned {@link SwapResult} can be
6519
+ * logged or serialized without leaking the secret used to authenticate it.
6520
+ */
6521
+ type SwapResultConfig = Omit<ResolvedSwapConfig, 'apiKey' | 'kitKey'>;
6494
6522
  /**
6495
6523
  * Result of an executed swap operation.
6496
6524
  *
@@ -6786,6 +6814,30 @@ interface SwapParams<TFromAdapterCapabilities extends AdapterCapabilities = Adap
6786
6814
  config?: SwapConfig;
6787
6815
  }
6788
6816
 
6817
+ /**
6818
+ * Configure how CCTP and forwarding fees are collected for a bridge.
6819
+ *
6820
+ * @remarks
6821
+ * Use `'source'` with `to.useForwarder: true` to treat `amount` as the exact
6822
+ * destination amount. Bridge Kit obtains a signed fee quote, collects the fee
6823
+ * in source-chain USDC, and leaves the destination mint unreduced. Omit the
6824
+ * option (or use `'destination'`) to preserve the existing max-fee behavior.
6825
+ *
6826
+ * @example
6827
+ * ```typescript
6828
+ * import type { BridgeExecutionConfig } from '@circle-fin/bridge-kit'
6829
+ *
6830
+ * const config: BridgeExecutionConfig = {
6831
+ * transferSpeed: 'FAST',
6832
+ * feePayment: 'source',
6833
+ * }
6834
+ * ```
6835
+ * @since 1.14.0
6836
+ */
6837
+ interface BridgeExecutionConfig extends BridgeConfig {
6838
+ /** Select source-side signed fees or the legacy destination-side fee path. */
6839
+ feePayment?: 'source' | 'destination';
6840
+ }
6789
6841
  type FeeFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6790
6842
  type FeeRecipientFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (feePayoutChain: ChainDefinition, params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6791
6843
  /**
@@ -6946,7 +6998,7 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6946
6998
  * Optional bridge configuration (e.g., transfer speed).
6947
6999
  * If omitted, defaults will be used
6948
7000
  */
6949
- config?: BridgeConfig;
7001
+ config?: BridgeExecutionConfig;
6950
7002
  /**
6951
7003
  * The token to transfer. Defaults to 'USDC'.
6952
7004
  * If omitted, the provider will use 'USDC' by default.
@@ -6973,6 +7025,16 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6973
7025
  * ```
6974
7026
  */
6975
7027
  invocationMeta?: InvocationMeta;
7028
+ /**
7029
+ * Reuse the opaque signed quote returned by a receive-exact estimate.
7030
+ *
7031
+ * @remarks
7032
+ * Bridge Kit validates a supplied quote against the exact transfer and fails
7033
+ * when it is invalid, mismatched, expired, or too close to expiry. Omit this
7034
+ * value to let Bridge Kit fetch a fresh quote automatically. Never log or
7035
+ * decode it.
7036
+ */
7037
+ quote?: string;
6976
7038
  }
6977
7039
 
6978
7040
  /**
@@ -7017,29 +7079,37 @@ type EarnAdapterContext<TAdapterCapabilities extends AdapterCapabilities = Adapt
7017
7079
  * Configuration options for earn operations.
7018
7080
  *
7019
7081
  * EarnKit supports dual-mode authentication: operations work both with
7020
- * and without a Kit Key. When present, the Kit Key enables permissioned
7082
+ * and without an API key. When present, the API key enables permissioned
7021
7083
  * features like integrator attribution tracking.
7022
7084
  *
7023
7085
  * @example
7024
7086
  * ```typescript
7025
- * // Permissionless (no Kit Key)
7087
+ * // Permissionless (no API key)
7026
7088
  * const config: EarnConfig = {}
7027
7089
  *
7028
- * // Permissioned (with Kit Key)
7090
+ * // Permissioned (with API key)
7029
7091
  * const config: EarnConfig = {
7030
- * kitKey: 'KIT_KEY:keyId:keySecret',
7092
+ * apiKey: 'TEST_API_KEY:keyId:keySecret',
7031
7093
  * }
7032
7094
  * ```
7033
7095
  */
7034
7096
  interface EarnConfig {
7035
7097
  /**
7036
- * Optional Kit Key for permissioned access.
7098
+ * Optional Circle API key for permissioned access.
7037
7099
  *
7038
7100
  * When provided, enables integrator attribution tracking and
7039
7101
  * higher rate limits. When omitted, the SDK operates in
7040
7102
  * permissionless mode.
7041
7103
  *
7042
- * Format: `KIT_KEY:<keyId>:<keySecret>`
7104
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
7105
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
7106
+ */
7107
+ readonly apiKey?: string | undefined;
7108
+ /**
7109
+ * Optional Circle API key for permissioned access.
7110
+ *
7111
+ * @deprecated Use {@link EarnConfig.apiKey} instead. Still honored when
7112
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
7043
7113
  */
7044
7114
  readonly kitKey?: string | undefined;
7045
7115
  /**
@@ -7806,13 +7876,18 @@ interface AppKitContext {
7806
7876
  */
7807
7877
  disableErrorReporting?: boolean;
7808
7878
  /**
7809
- * Custom HTTP headers forwarded with the underlying CCTP provider's
7810
- * attestation (Iris) API requests made by bridge operations.
7879
+ * Custom HTTP headers forwarded with Circle API requests made by the
7880
+ * underlying kits: the CCTP provider's attestation (Iris) requests for
7881
+ * bridge operations, and the Gateway API requests for unified-balance
7882
+ * operations.
7811
7883
  *
7812
7884
  * @remarks
7813
7885
  * Headers are merged on top of the SDK defaults (such as `Content-Type`)
7814
- * rather than replacing them. The header is forwarded as-is to Circle's API;
7815
- * the SDK does not interpret it.
7886
+ * rather than replacing them. Each header is forwarded as-is to Circle's API;
7887
+ * the SDK does not interpret it. The same map is forwarded to every relevant
7888
+ * kit, so a header a given API ignores is simply a no-op there. A
7889
+ * `unifiedBalance.headers` value, if provided, takes precedence for the
7890
+ * unified-balance kit.
7816
7891
  */
7817
7892
  headers?: Record<string, string>;
7818
7893
  }
package/swap.d.ts CHANGED
@@ -718,6 +718,8 @@ declare enum Blockchain {
718
718
  Optimism_Sepolia = "Optimism_Sepolia",
719
719
  Pharos = "Pharos",
720
720
  Pharos_Testnet = "Pharos_Testnet",
721
+ Plasma = "Plasma",
722
+ Plasma_Testnet = "Plasma_Testnet",
721
723
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
722
724
  Polkadot_Westmint = "Polkadot_Westmint",
723
725
  Plume = "Plume",
@@ -946,6 +948,7 @@ declare enum BridgeChain {
946
948
  Morph = "Morph",
947
949
  Optimism = "Optimism",
948
950
  Pharos = "Pharos",
951
+ Plasma = "Plasma",
949
952
  Plume = "Plume",
950
953
  Polygon = "Polygon",
951
954
  Sei = "Sei",
@@ -971,6 +974,7 @@ declare enum BridgeChain {
971
974
  Morph_Testnet = "Morph_Testnet",
972
975
  Optimism_Sepolia = "Optimism_Sepolia",
973
976
  Pharos_Testnet = "Pharos_Testnet",
977
+ Plasma_Testnet = "Plasma_Testnet",
974
978
  Plume_Testnet = "Plume_Testnet",
975
979
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
976
980
  Sei_Testnet = "Sei_Testnet",
@@ -2652,7 +2656,7 @@ interface ExecuteParams {
2652
2656
  * fromAddress: '0x...',
2653
2657
  * toAddress: '0x...',
2654
2658
  * amount: '1000000',
2655
- * apiKey: 'KIT_KEY:...',
2659
+ * apiKey: 'TEST_API_KEY:...',
2656
2660
  * })
2657
2661
  *
2658
2662
  * // Build token inputs with permit
@@ -2796,7 +2800,7 @@ interface ExecuteSwapEVMParams extends ActionParameters {
2796
2800
  * fromAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2797
2801
  * toAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2798
2802
  * amount: '1000000',
2799
- * apiKey: 'KIT_KEY:...',
2803
+ * apiKey: 'TEST_API_KEY:...',
2800
2804
  * })
2801
2805
  *
2802
2806
  * // Prepare action parameters
@@ -5909,12 +5913,21 @@ interface ServiceSwapConfig {
5909
5913
  recipientAddress?: string;
5910
5914
  };
5911
5915
  /**
5912
- * Stablecoin Service Kit Key used to authenticate service-backed swap
5913
- * requests.
5916
+ * Circle API key used to authenticate service-backed swap requests.
5917
+ *
5918
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
5919
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
5914
5920
  *
5915
5921
  * Treat this value as a credential. Do not log it, embed it in client-side
5916
5922
  * source, or expose it in telemetry.
5917
5923
  */
5924
+ apiKey?: string | undefined;
5925
+ /**
5926
+ * Circle API key used to authenticate service-backed swap requests.
5927
+ *
5928
+ * @deprecated Use {@link ServiceSwapConfig.apiKey} instead. Still honored
5929
+ * when `apiKey` is omitted, and `apiKey` takes precedence when both are set.
5930
+ */
5918
5931
  kitKey?: string;
5919
5932
  /**
5920
5933
  * DEX aggregator identifier used to source the swap route.
@@ -6445,12 +6458,21 @@ interface SwapConfig {
6445
6458
  recipientAddress: string;
6446
6459
  };
6447
6460
  /**
6448
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6449
- * requests.
6461
+ * Circle API key used to authenticate service-backed swap requests.
6462
+ *
6463
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6464
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6450
6465
  *
6451
6466
  * Treat this value as a credential. Do not log it, embed it in client-side
6452
6467
  * source, or expose it in telemetry.
6453
6468
  */
6469
+ apiKey?: string | undefined;
6470
+ /**
6471
+ * Circle API key used to authenticate service-backed swap requests.
6472
+ *
6473
+ * @deprecated Use {@link SwapConfig.apiKey} instead. Still honored when
6474
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6475
+ */
6454
6476
  kitKey?: string;
6455
6477
  }
6456
6478
  /**
@@ -6490,7 +6512,13 @@ interface ResolvedSwapConfig extends Omit<SwapConfig, 'customFee'> {
6490
6512
  recipientAddress?: string;
6491
6513
  };
6492
6514
  }
6493
- type SwapResultConfig = Omit<ResolvedSwapConfig, 'kitKey'>;
6515
+ /**
6516
+ * Swap config as echoed back on a result, with credentials removed.
6517
+ *
6518
+ * Both credential fields are omitted so a returned {@link SwapResult} can be
6519
+ * logged or serialized without leaking the secret used to authenticate it.
6520
+ */
6521
+ type SwapResultConfig = Omit<ResolvedSwapConfig, 'apiKey' | 'kitKey'>;
6494
6522
  /**
6495
6523
  * Result of an executed swap operation.
6496
6524
  *
@@ -6786,6 +6814,30 @@ interface SwapParams<TFromAdapterCapabilities extends AdapterCapabilities = Adap
6786
6814
  config?: SwapConfig;
6787
6815
  }
6788
6816
 
6817
+ /**
6818
+ * Configure how CCTP and forwarding fees are collected for a bridge.
6819
+ *
6820
+ * @remarks
6821
+ * Use `'source'` with `to.useForwarder: true` to treat `amount` as the exact
6822
+ * destination amount. Bridge Kit obtains a signed fee quote, collects the fee
6823
+ * in source-chain USDC, and leaves the destination mint unreduced. Omit the
6824
+ * option (or use `'destination'`) to preserve the existing max-fee behavior.
6825
+ *
6826
+ * @example
6827
+ * ```typescript
6828
+ * import type { BridgeExecutionConfig } from '@circle-fin/bridge-kit'
6829
+ *
6830
+ * const config: BridgeExecutionConfig = {
6831
+ * transferSpeed: 'FAST',
6832
+ * feePayment: 'source',
6833
+ * }
6834
+ * ```
6835
+ * @since 1.14.0
6836
+ */
6837
+ interface BridgeExecutionConfig extends BridgeConfig {
6838
+ /** Select source-side signed fees or the legacy destination-side fee path. */
6839
+ feePayment?: 'source' | 'destination';
6840
+ }
6789
6841
  type FeeFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6790
6842
  type FeeRecipientFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (feePayoutChain: ChainDefinition, params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
6791
6843
  /**
@@ -6946,7 +6998,7 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6946
6998
  * Optional bridge configuration (e.g., transfer speed).
6947
6999
  * If omitted, defaults will be used
6948
7000
  */
6949
- config?: BridgeConfig;
7001
+ config?: BridgeExecutionConfig;
6950
7002
  /**
6951
7003
  * The token to transfer. Defaults to 'USDC'.
6952
7004
  * If omitted, the provider will use 'USDC' by default.
@@ -6973,6 +7025,16 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
6973
7025
  * ```
6974
7026
  */
6975
7027
  invocationMeta?: InvocationMeta;
7028
+ /**
7029
+ * Reuse the opaque signed quote returned by a receive-exact estimate.
7030
+ *
7031
+ * @remarks
7032
+ * Bridge Kit validates a supplied quote against the exact transfer and fails
7033
+ * when it is invalid, mismatched, expired, or too close to expiry. Omit this
7034
+ * value to let Bridge Kit fetch a fresh quote automatically. Never log or
7035
+ * decode it.
7036
+ */
7037
+ quote?: string;
6976
7038
  }
6977
7039
 
6978
7040
  /**
@@ -7017,29 +7079,37 @@ type EarnAdapterContext<TAdapterCapabilities extends AdapterCapabilities = Adapt
7017
7079
  * Configuration options for earn operations.
7018
7080
  *
7019
7081
  * EarnKit supports dual-mode authentication: operations work both with
7020
- * and without a Kit Key. When present, the Kit Key enables permissioned
7082
+ * and without an API key. When present, the API key enables permissioned
7021
7083
  * features like integrator attribution tracking.
7022
7084
  *
7023
7085
  * @example
7024
7086
  * ```typescript
7025
- * // Permissionless (no Kit Key)
7087
+ * // Permissionless (no API key)
7026
7088
  * const config: EarnConfig = {}
7027
7089
  *
7028
- * // Permissioned (with Kit Key)
7090
+ * // Permissioned (with API key)
7029
7091
  * const config: EarnConfig = {
7030
- * kitKey: 'KIT_KEY:keyId:keySecret',
7092
+ * apiKey: 'TEST_API_KEY:keyId:keySecret',
7031
7093
  * }
7032
7094
  * ```
7033
7095
  */
7034
7096
  interface EarnConfig {
7035
7097
  /**
7036
- * Optional Kit Key for permissioned access.
7098
+ * Optional Circle API key for permissioned access.
7037
7099
  *
7038
7100
  * When provided, enables integrator attribution tracking and
7039
7101
  * higher rate limits. When omitted, the SDK operates in
7040
7102
  * permissionless mode.
7041
7103
  *
7042
- * Format: `KIT_KEY:<keyId>:<keySecret>`
7104
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
7105
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
7106
+ */
7107
+ readonly apiKey?: string | undefined;
7108
+ /**
7109
+ * Optional Circle API key for permissioned access.
7110
+ *
7111
+ * @deprecated Use {@link EarnConfig.apiKey} instead. Still honored when
7112
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
7043
7113
  */
7044
7114
  readonly kitKey?: string | undefined;
7045
7115
  /**
@@ -7806,13 +7876,18 @@ interface AppKitContext {
7806
7876
  */
7807
7877
  disableErrorReporting?: boolean;
7808
7878
  /**
7809
- * Custom HTTP headers forwarded with the underlying CCTP provider's
7810
- * attestation (Iris) API requests made by bridge operations.
7879
+ * Custom HTTP headers forwarded with Circle API requests made by the
7880
+ * underlying kits: the CCTP provider's attestation (Iris) requests for
7881
+ * bridge operations, and the Gateway API requests for unified-balance
7882
+ * operations.
7811
7883
  *
7812
7884
  * @remarks
7813
7885
  * Headers are merged on top of the SDK defaults (such as `Content-Type`)
7814
- * rather than replacing them. The header is forwarded as-is to Circle's API;
7815
- * the SDK does not interpret it.
7886
+ * rather than replacing them. Each header is forwarded as-is to Circle's API;
7887
+ * the SDK does not interpret it. The same map is forwarded to every relevant
7888
+ * kit, so a header a given API ignores is simply a no-op there. A
7889
+ * `unifiedBalance.headers` value, if provided, takes precedence for the
7890
+ * unified-balance kit.
7816
7891
  */
7817
7892
  headers?: Record<string, string>;
7818
7893
  }