@circle-fin/app-kit 1.12.1 → 1.14.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/context.d.cts CHANGED
@@ -559,6 +559,19 @@ interface GatewayV1Contracts {
559
559
  * @example "0xD05E7D2E7d30b92c5F17d7d0fC575fce231F1A48"
560
560
  */
561
561
  depositForHandler?: string;
562
+ /**
563
+ * The address of the `GenericExecutor` contract.
564
+ *
565
+ * @description Optional. The contract that acts as `mintRecipient` and
566
+ * `destinationCaller` for the CCTP v2 prepaid FORWARD path. It receives the
567
+ * CCTP mint and calls {@link GatewayV1Contracts.depositForHandler} to
568
+ * complete the fast deposit into the {@link GatewayV1Contracts.wallet}.
569
+ * Present only on chains that are fast-deposit destinations; other Gateway
570
+ * chains omit it.
571
+ *
572
+ * @example "0xFa7be2f04F3Ad4ca969260729c6d45B5625984A7"
573
+ */
574
+ genericExecutor?: string;
562
575
  }
563
576
  /**
564
577
  * Versioned map of Gateway contract configurations.
@@ -718,6 +731,8 @@ declare enum Blockchain {
718
731
  Optimism_Sepolia = "Optimism_Sepolia",
719
732
  Pharos = "Pharos",
720
733
  Pharos_Testnet = "Pharos_Testnet",
734
+ Plasma = "Plasma",
735
+ Plasma_Testnet = "Plasma_Testnet",
721
736
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
722
737
  Polkadot_Westmint = "Polkadot_Westmint",
723
738
  Plume = "Plume",
@@ -946,6 +961,7 @@ declare enum BridgeChain {
946
961
  Morph = "Morph",
947
962
  Optimism = "Optimism",
948
963
  Pharos = "Pharos",
964
+ Plasma = "Plasma",
949
965
  Plume = "Plume",
950
966
  Polygon = "Polygon",
951
967
  Sei = "Sei",
@@ -971,6 +987,7 @@ declare enum BridgeChain {
971
987
  Morph_Testnet = "Morph_Testnet",
972
988
  Optimism_Sepolia = "Optimism_Sepolia",
973
989
  Pharos_Testnet = "Pharos_Testnet",
990
+ Plasma_Testnet = "Plasma_Testnet",
974
991
  Plume_Testnet = "Plume_Testnet",
975
992
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
976
993
  Sei_Testnet = "Sei_Testnet",
@@ -2652,7 +2669,7 @@ interface ExecuteParams {
2652
2669
  * fromAddress: '0x...',
2653
2670
  * toAddress: '0x...',
2654
2671
  * amount: '1000000',
2655
- * apiKey: 'KIT_KEY:...',
2672
+ * apiKey: 'TEST_API_KEY:...',
2656
2673
  * })
2657
2674
  *
2658
2675
  * // Build token inputs with permit
@@ -2796,7 +2813,7 @@ interface ExecuteSwapEVMParams extends ActionParameters {
2796
2813
  * fromAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2797
2814
  * toAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2798
2815
  * amount: '1000000',
2799
- * apiKey: 'KIT_KEY:...',
2816
+ * apiKey: 'TEST_API_KEY:...',
2800
2817
  * })
2801
2818
  *
2802
2819
  * // Prepare action parameters
@@ -5459,6 +5476,48 @@ TChainDefinition extends ChainDefinition = ChainDefinition> extends WalletContex
5459
5476
  * Must be a valid address format for the specified blockchain.
5460
5477
  */
5461
5478
  recipientAddress?: string;
5479
+ /**
5480
+ * Optional destination dApp deposit action for a fast cross-chain transfer.
5481
+ *
5482
+ * When set, the burned USDC is minted to Circle's GenericExecutor on the
5483
+ * destination chain, which calls the registered dApp (for example, a Gateway
5484
+ * `depositFor`) in the same relayed flow. Consumed by the CCTP v2 provider's
5485
+ * executor-deposit path; requires `useForwarder: true`.
5486
+ *
5487
+ * @see {@link BridgeDepositAction}
5488
+ */
5489
+ deposit?: BridgeDepositAction;
5490
+ }
5491
+ /**
5492
+ * Destination dApp deposit action for a fast cross-chain transfer.
5493
+ *
5494
+ * When present on a bridge destination, the CCTP v2 provider routes the
5495
+ * transfer through Circle's GenericExecutor: the burned USDC is minted to the
5496
+ * executor on the destination chain, which then calls the registered dApp (for
5497
+ * example, a Gateway `depositFor`) in the same relayed flow. Encoded into
5498
+ * executor hookData via `buildDepositForGenericExecutorPayload`.
5499
+ *
5500
+ * @example
5501
+ * ```typescript
5502
+ * import type { BridgeDepositAction } from '@core/provider'
5503
+ *
5504
+ * const deposit: BridgeDepositAction = {
5505
+ * dappId: 'gateway_deposit',
5506
+ * params: ['0xTokenMessengerWithFees', '0xDepositAccount', 0n],
5507
+ * }
5508
+ * ```
5509
+ */
5510
+ interface BridgeDepositAction {
5511
+ /**
5512
+ * Registered dApp identifier the GenericExecutor invokes on the destination
5513
+ * chain (for example, `'gateway_deposit'`).
5514
+ */
5515
+ dappId: string;
5516
+ /**
5517
+ * Positional arguments for the dApp function, in ABI order. Dynamic amount
5518
+ * slots are filled in by the executor from the minted amount.
5519
+ */
5520
+ params: readonly unknown[];
5462
5521
  }
5463
5522
  /**
5464
5523
  * Parameters for executing a cross-chain bridge operation.
@@ -5796,6 +5855,30 @@ type BridgeDestination<TAdapterCapabilities extends AdapterCapabilities = Adapte
5796
5855
  useForwarder?: boolean;
5797
5856
  }) | ForwarderDestination<TChainIdentifier>;
5798
5857
 
5858
+ /**
5859
+ * Configure how CCTP and forwarding fees are collected for a bridge.
5860
+ *
5861
+ * @remarks
5862
+ * Use `'source'` with `to.useForwarder: true` to treat `amount` as the exact
5863
+ * destination amount. Bridge Kit obtains a signed fee quote, collects the fee
5864
+ * in source-chain USDC, and leaves the destination mint unreduced. Omit the
5865
+ * option (or use `'destination'`) to preserve the existing max-fee behavior.
5866
+ *
5867
+ * @example
5868
+ * ```typescript
5869
+ * import type { BridgeExecutionConfig } from '@circle-fin/bridge-kit'
5870
+ *
5871
+ * const config: BridgeExecutionConfig = {
5872
+ * transferSpeed: 'FAST',
5873
+ * feePayment: 'source',
5874
+ * }
5875
+ * ```
5876
+ * @since 1.14.0
5877
+ */
5878
+ interface BridgeExecutionConfig extends BridgeConfig {
5879
+ /** Select source-side signed fees or the legacy destination-side fee path. */
5880
+ feePayment?: 'source' | 'destination';
5881
+ }
5799
5882
  type FeeFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
5800
5883
  type FeeRecipientFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (feePayoutChain: ChainDefinition, params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
5801
5884
  /**
@@ -5956,7 +6039,7 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
5956
6039
  * Optional bridge configuration (e.g., transfer speed).
5957
6040
  * If omitted, defaults will be used
5958
6041
  */
5959
- config?: BridgeConfig;
6042
+ config?: BridgeExecutionConfig;
5960
6043
  /**
5961
6044
  * The token to transfer. Defaults to 'USDC'.
5962
6045
  * If omitted, the provider will use 'USDC' by default.
@@ -5983,6 +6066,16 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
5983
6066
  * ```
5984
6067
  */
5985
6068
  invocationMeta?: InvocationMeta;
6069
+ /**
6070
+ * Reuse the opaque signed quote returned by a receive-exact estimate.
6071
+ *
6072
+ * @remarks
6073
+ * Bridge Kit validates a supplied quote against the exact transfer and fails
6074
+ * when it is invalid, mismatched, expired, or too close to expiry. Omit this
6075
+ * value to let Bridge Kit fetch a fresh quote automatically. Never log or
6076
+ * decode it.
6077
+ */
6078
+ quote?: string;
5986
6079
  }
5987
6080
 
5988
6081
  /**
@@ -6098,12 +6191,21 @@ interface ServiceSwapConfig {
6098
6191
  recipientAddress?: string;
6099
6192
  };
6100
6193
  /**
6101
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6102
- * requests.
6194
+ * Circle API key used to authenticate service-backed swap requests.
6195
+ *
6196
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6197
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6103
6198
  *
6104
6199
  * Treat this value as a credential. Do not log it, embed it in client-side
6105
6200
  * source, or expose it in telemetry.
6106
6201
  */
6202
+ apiKey?: string | undefined;
6203
+ /**
6204
+ * Circle API key used to authenticate service-backed swap requests.
6205
+ *
6206
+ * @deprecated Use {@link ServiceSwapConfig.apiKey} instead. Still honored
6207
+ * when `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6208
+ */
6107
6209
  kitKey?: string;
6108
6210
  /**
6109
6211
  * DEX aggregator identifier used to source the swap route.
@@ -6581,12 +6683,21 @@ interface SwapConfig {
6581
6683
  recipientAddress: string;
6582
6684
  };
6583
6685
  /**
6584
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6585
- * requests.
6686
+ * Circle API key used to authenticate service-backed swap requests.
6687
+ *
6688
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6689
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6586
6690
  *
6587
6691
  * Treat this value as a credential. Do not log it, embed it in client-side
6588
6692
  * source, or expose it in telemetry.
6589
6693
  */
6694
+ apiKey?: string | undefined;
6695
+ /**
6696
+ * Circle API key used to authenticate service-backed swap requests.
6697
+ *
6698
+ * @deprecated Use {@link SwapConfig.apiKey} instead. Still honored when
6699
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6700
+ */
6590
6701
  kitKey?: string;
6591
6702
  }
6592
6703
  /**
@@ -6715,29 +6826,37 @@ type EarnAdapterContext<TAdapterCapabilities extends AdapterCapabilities = Adapt
6715
6826
  * Configuration options for earn operations.
6716
6827
  *
6717
6828
  * EarnKit supports dual-mode authentication: operations work both with
6718
- * and without a Kit Key. When present, the Kit Key enables permissioned
6829
+ * and without an API key. When present, the API key enables permissioned
6719
6830
  * features like integrator attribution tracking.
6720
6831
  *
6721
6832
  * @example
6722
6833
  * ```typescript
6723
- * // Permissionless (no Kit Key)
6834
+ * // Permissionless (no API key)
6724
6835
  * const config: EarnConfig = {}
6725
6836
  *
6726
- * // Permissioned (with Kit Key)
6837
+ * // Permissioned (with API key)
6727
6838
  * const config: EarnConfig = {
6728
- * kitKey: 'KIT_KEY:keyId:keySecret',
6839
+ * apiKey: 'TEST_API_KEY:keyId:keySecret',
6729
6840
  * }
6730
6841
  * ```
6731
6842
  */
6732
6843
  interface EarnConfig {
6733
6844
  /**
6734
- * Optional Kit Key for permissioned access.
6845
+ * Optional Circle API key for permissioned access.
6735
6846
  *
6736
6847
  * When provided, enables integrator attribution tracking and
6737
6848
  * higher rate limits. When omitted, the SDK operates in
6738
6849
  * permissionless mode.
6739
6850
  *
6740
- * Format: `KIT_KEY:<keyId>:<keySecret>`
6851
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6852
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6853
+ */
6854
+ readonly apiKey?: string | undefined;
6855
+ /**
6856
+ * Optional Circle API key for permissioned access.
6857
+ *
6858
+ * @deprecated Use {@link EarnConfig.apiKey} instead. Still honored when
6859
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6741
6860
  */
6742
6861
  readonly kitKey?: string | undefined;
6743
6862
  /**
@@ -7504,13 +7623,18 @@ interface AppKitContext {
7504
7623
  */
7505
7624
  disableErrorReporting?: boolean;
7506
7625
  /**
7507
- * Custom HTTP headers forwarded with the underlying CCTP provider's
7508
- * attestation (Iris) API requests made by bridge operations.
7626
+ * Custom HTTP headers forwarded with Circle API requests made by the
7627
+ * underlying kits: the CCTP provider's attestation (Iris) requests for
7628
+ * bridge operations, and the Gateway API requests for unified-balance
7629
+ * operations.
7509
7630
  *
7510
7631
  * @remarks
7511
7632
  * Headers are merged on top of the SDK defaults (such as `Content-Type`)
7512
- * rather than replacing them. The header is forwarded as-is to Circle's API;
7513
- * the SDK does not interpret it.
7633
+ * rather than replacing them. Each header is forwarded as-is to Circle's API;
7634
+ * the SDK does not interpret it. The same map is forwarded to every relevant
7635
+ * kit, so a header a given API ignores is simply a no-op there. A
7636
+ * `unifiedBalance.headers` value, if provided, takes precedence for the
7637
+ * unified-balance kit.
7514
7638
  */
7515
7639
  headers?: Record<string, string>;
7516
7640
  }
package/context.d.mts CHANGED
@@ -559,6 +559,19 @@ interface GatewayV1Contracts {
559
559
  * @example "0xD05E7D2E7d30b92c5F17d7d0fC575fce231F1A48"
560
560
  */
561
561
  depositForHandler?: string;
562
+ /**
563
+ * The address of the `GenericExecutor` contract.
564
+ *
565
+ * @description Optional. The contract that acts as `mintRecipient` and
566
+ * `destinationCaller` for the CCTP v2 prepaid FORWARD path. It receives the
567
+ * CCTP mint and calls {@link GatewayV1Contracts.depositForHandler} to
568
+ * complete the fast deposit into the {@link GatewayV1Contracts.wallet}.
569
+ * Present only on chains that are fast-deposit destinations; other Gateway
570
+ * chains omit it.
571
+ *
572
+ * @example "0xFa7be2f04F3Ad4ca969260729c6d45B5625984A7"
573
+ */
574
+ genericExecutor?: string;
562
575
  }
563
576
  /**
564
577
  * Versioned map of Gateway contract configurations.
@@ -718,6 +731,8 @@ declare enum Blockchain {
718
731
  Optimism_Sepolia = "Optimism_Sepolia",
719
732
  Pharos = "Pharos",
720
733
  Pharos_Testnet = "Pharos_Testnet",
734
+ Plasma = "Plasma",
735
+ Plasma_Testnet = "Plasma_Testnet",
721
736
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
722
737
  Polkadot_Westmint = "Polkadot_Westmint",
723
738
  Plume = "Plume",
@@ -946,6 +961,7 @@ declare enum BridgeChain {
946
961
  Morph = "Morph",
947
962
  Optimism = "Optimism",
948
963
  Pharos = "Pharos",
964
+ Plasma = "Plasma",
949
965
  Plume = "Plume",
950
966
  Polygon = "Polygon",
951
967
  Sei = "Sei",
@@ -971,6 +987,7 @@ declare enum BridgeChain {
971
987
  Morph_Testnet = "Morph_Testnet",
972
988
  Optimism_Sepolia = "Optimism_Sepolia",
973
989
  Pharos_Testnet = "Pharos_Testnet",
990
+ Plasma_Testnet = "Plasma_Testnet",
974
991
  Plume_Testnet = "Plume_Testnet",
975
992
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
976
993
  Sei_Testnet = "Sei_Testnet",
@@ -2652,7 +2669,7 @@ interface ExecuteParams {
2652
2669
  * fromAddress: '0x...',
2653
2670
  * toAddress: '0x...',
2654
2671
  * amount: '1000000',
2655
- * apiKey: 'KIT_KEY:...',
2672
+ * apiKey: 'TEST_API_KEY:...',
2656
2673
  * })
2657
2674
  *
2658
2675
  * // Build token inputs with permit
@@ -2796,7 +2813,7 @@ interface ExecuteSwapEVMParams extends ActionParameters {
2796
2813
  * fromAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2797
2814
  * toAddress: 'YubQzu18FDqJRyNfG8JqHmsdbxhnoQqcKUHBdUkN6tP',
2798
2815
  * amount: '1000000',
2799
- * apiKey: 'KIT_KEY:...',
2816
+ * apiKey: 'TEST_API_KEY:...',
2800
2817
  * })
2801
2818
  *
2802
2819
  * // Prepare action parameters
@@ -5459,6 +5476,48 @@ TChainDefinition extends ChainDefinition = ChainDefinition> extends WalletContex
5459
5476
  * Must be a valid address format for the specified blockchain.
5460
5477
  */
5461
5478
  recipientAddress?: string;
5479
+ /**
5480
+ * Optional destination dApp deposit action for a fast cross-chain transfer.
5481
+ *
5482
+ * When set, the burned USDC is minted to Circle's GenericExecutor on the
5483
+ * destination chain, which calls the registered dApp (for example, a Gateway
5484
+ * `depositFor`) in the same relayed flow. Consumed by the CCTP v2 provider's
5485
+ * executor-deposit path; requires `useForwarder: true`.
5486
+ *
5487
+ * @see {@link BridgeDepositAction}
5488
+ */
5489
+ deposit?: BridgeDepositAction;
5490
+ }
5491
+ /**
5492
+ * Destination dApp deposit action for a fast cross-chain transfer.
5493
+ *
5494
+ * When present on a bridge destination, the CCTP v2 provider routes the
5495
+ * transfer through Circle's GenericExecutor: the burned USDC is minted to the
5496
+ * executor on the destination chain, which then calls the registered dApp (for
5497
+ * example, a Gateway `depositFor`) in the same relayed flow. Encoded into
5498
+ * executor hookData via `buildDepositForGenericExecutorPayload`.
5499
+ *
5500
+ * @example
5501
+ * ```typescript
5502
+ * import type { BridgeDepositAction } from '@core/provider'
5503
+ *
5504
+ * const deposit: BridgeDepositAction = {
5505
+ * dappId: 'gateway_deposit',
5506
+ * params: ['0xTokenMessengerWithFees', '0xDepositAccount', 0n],
5507
+ * }
5508
+ * ```
5509
+ */
5510
+ interface BridgeDepositAction {
5511
+ /**
5512
+ * Registered dApp identifier the GenericExecutor invokes on the destination
5513
+ * chain (for example, `'gateway_deposit'`).
5514
+ */
5515
+ dappId: string;
5516
+ /**
5517
+ * Positional arguments for the dApp function, in ABI order. Dynamic amount
5518
+ * slots are filled in by the executor from the minted amount.
5519
+ */
5520
+ params: readonly unknown[];
5462
5521
  }
5463
5522
  /**
5464
5523
  * Parameters for executing a cross-chain bridge operation.
@@ -5796,6 +5855,30 @@ type BridgeDestination<TAdapterCapabilities extends AdapterCapabilities = Adapte
5796
5855
  useForwarder?: boolean;
5797
5856
  }) | ForwarderDestination<TChainIdentifier>;
5798
5857
 
5858
+ /**
5859
+ * Configure how CCTP and forwarding fees are collected for a bridge.
5860
+ *
5861
+ * @remarks
5862
+ * Use `'source'` with `to.useForwarder: true` to treat `amount` as the exact
5863
+ * destination amount. Bridge Kit obtains a signed fee quote, collects the fee
5864
+ * in source-chain USDC, and leaves the destination mint unreduced. Omit the
5865
+ * option (or use `'destination'`) to preserve the existing max-fee behavior.
5866
+ *
5867
+ * @example
5868
+ * ```typescript
5869
+ * import type { BridgeExecutionConfig } from '@circle-fin/bridge-kit'
5870
+ *
5871
+ * const config: BridgeExecutionConfig = {
5872
+ * transferSpeed: 'FAST',
5873
+ * feePayment: 'source',
5874
+ * }
5875
+ * ```
5876
+ * @since 1.14.0
5877
+ */
5878
+ interface BridgeExecutionConfig extends BridgeConfig {
5879
+ /** Select source-side signed fees or the legacy destination-side fee path. */
5880
+ feePayment?: 'source' | 'destination';
5881
+ }
5799
5882
  type FeeFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
5800
5883
  type FeeRecipientFunction<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities> = (feePayoutChain: ChainDefinition, params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>) => Promise<string> | string;
5801
5884
  /**
@@ -5956,7 +6039,7 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
5956
6039
  * Optional bridge configuration (e.g., transfer speed).
5957
6040
  * If omitted, defaults will be used
5958
6041
  */
5959
- config?: BridgeConfig;
6042
+ config?: BridgeExecutionConfig;
5960
6043
  /**
5961
6044
  * The token to transfer. Defaults to 'USDC'.
5962
6045
  * If omitted, the provider will use 'USDC' by default.
@@ -5983,6 +6066,16 @@ interface BridgeParams<TFromAdapterCapabilities extends AdapterCapabilities = Ad
5983
6066
  * ```
5984
6067
  */
5985
6068
  invocationMeta?: InvocationMeta;
6069
+ /**
6070
+ * Reuse the opaque signed quote returned by a receive-exact estimate.
6071
+ *
6072
+ * @remarks
6073
+ * Bridge Kit validates a supplied quote against the exact transfer and fails
6074
+ * when it is invalid, mismatched, expired, or too close to expiry. Omit this
6075
+ * value to let Bridge Kit fetch a fresh quote automatically. Never log or
6076
+ * decode it.
6077
+ */
6078
+ quote?: string;
5986
6079
  }
5987
6080
 
5988
6081
  /**
@@ -6098,12 +6191,21 @@ interface ServiceSwapConfig {
6098
6191
  recipientAddress?: string;
6099
6192
  };
6100
6193
  /**
6101
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6102
- * requests.
6194
+ * Circle API key used to authenticate service-backed swap requests.
6195
+ *
6196
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6197
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6103
6198
  *
6104
6199
  * Treat this value as a credential. Do not log it, embed it in client-side
6105
6200
  * source, or expose it in telemetry.
6106
6201
  */
6202
+ apiKey?: string | undefined;
6203
+ /**
6204
+ * Circle API key used to authenticate service-backed swap requests.
6205
+ *
6206
+ * @deprecated Use {@link ServiceSwapConfig.apiKey} instead. Still honored
6207
+ * when `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6208
+ */
6107
6209
  kitKey?: string;
6108
6210
  /**
6109
6211
  * DEX aggregator identifier used to source the swap route.
@@ -6581,12 +6683,21 @@ interface SwapConfig {
6581
6683
  recipientAddress: string;
6582
6684
  };
6583
6685
  /**
6584
- * Stablecoin Service Kit Key used to authenticate service-backed swap
6585
- * requests.
6686
+ * Circle API key used to authenticate service-backed swap requests.
6687
+ *
6688
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6689
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6586
6690
  *
6587
6691
  * Treat this value as a credential. Do not log it, embed it in client-side
6588
6692
  * source, or expose it in telemetry.
6589
6693
  */
6694
+ apiKey?: string | undefined;
6695
+ /**
6696
+ * Circle API key used to authenticate service-backed swap requests.
6697
+ *
6698
+ * @deprecated Use {@link SwapConfig.apiKey} instead. Still honored when
6699
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6700
+ */
6590
6701
  kitKey?: string;
6591
6702
  }
6592
6703
  /**
@@ -6715,29 +6826,37 @@ type EarnAdapterContext<TAdapterCapabilities extends AdapterCapabilities = Adapt
6715
6826
  * Configuration options for earn operations.
6716
6827
  *
6717
6828
  * EarnKit supports dual-mode authentication: operations work both with
6718
- * and without a Kit Key. When present, the Kit Key enables permissioned
6829
+ * and without an API key. When present, the API key enables permissioned
6719
6830
  * features like integrator attribution tracking.
6720
6831
  *
6721
6832
  * @example
6722
6833
  * ```typescript
6723
- * // Permissionless (no Kit Key)
6834
+ * // Permissionless (no API key)
6724
6835
  * const config: EarnConfig = {}
6725
6836
  *
6726
- * // Permissioned (with Kit Key)
6837
+ * // Permissioned (with API key)
6727
6838
  * const config: EarnConfig = {
6728
- * kitKey: 'KIT_KEY:keyId:keySecret',
6839
+ * apiKey: 'TEST_API_KEY:keyId:keySecret',
6729
6840
  * }
6730
6841
  * ```
6731
6842
  */
6732
6843
  interface EarnConfig {
6733
6844
  /**
6734
- * Optional Kit Key for permissioned access.
6845
+ * Optional Circle API key for permissioned access.
6735
6846
  *
6736
6847
  * When provided, enables integrator attribution tracking and
6737
6848
  * higher rate limits. When omitted, the SDK operates in
6738
6849
  * permissionless mode.
6739
6850
  *
6740
- * Format: `KIT_KEY:<keyId>:<keySecret>`
6851
+ * Format: `<ENV>_API_KEY:<keyId>:<keySecret>`. A legacy
6852
+ * `KIT_KEY:<keyId>:<keySecret>` value is also accepted.
6853
+ */
6854
+ readonly apiKey?: string | undefined;
6855
+ /**
6856
+ * Optional Circle API key for permissioned access.
6857
+ *
6858
+ * @deprecated Use {@link EarnConfig.apiKey} instead. Still honored when
6859
+ * `apiKey` is omitted, and `apiKey` takes precedence when both are set.
6741
6860
  */
6742
6861
  readonly kitKey?: string | undefined;
6743
6862
  /**
@@ -7504,13 +7623,18 @@ interface AppKitContext {
7504
7623
  */
7505
7624
  disableErrorReporting?: boolean;
7506
7625
  /**
7507
- * Custom HTTP headers forwarded with the underlying CCTP provider's
7508
- * attestation (Iris) API requests made by bridge operations.
7626
+ * Custom HTTP headers forwarded with Circle API requests made by the
7627
+ * underlying kits: the CCTP provider's attestation (Iris) requests for
7628
+ * bridge operations, and the Gateway API requests for unified-balance
7629
+ * operations.
7509
7630
  *
7510
7631
  * @remarks
7511
7632
  * Headers are merged on top of the SDK defaults (such as `Content-Type`)
7512
- * rather than replacing them. The header is forwarded as-is to Circle's API;
7513
- * the SDK does not interpret it.
7633
+ * rather than replacing them. Each header is forwarded as-is to Circle's API;
7634
+ * the SDK does not interpret it. The same map is forwarded to every relevant
7635
+ * kit, so a header a given API ignores is simply a no-op there. A
7636
+ * `unifiedBalance.headers` value, if provided, takes precedence for the
7637
+ * unified-balance kit.
7514
7638
  */
7515
7639
  headers?: Record<string, string>;
7516
7640
  }