@circle-fin/adapter-ethers-v6 1.6.4 → 1.6.6

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 (5) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/index.cjs +6036 -2390
  3. package/index.d.ts +481 -7
  4. package/index.mjs +6036 -2390
  5. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -168,6 +168,43 @@ interface BaseChainDefinition {
168
168
  * ```
169
169
  */
170
170
  kitContracts?: KitContracts;
171
+ /**
172
+ * Optional Gateway contract configuration for Gateway protocol support.
173
+ *
174
+ * @description When provided, the chain supports the Gateway protocol for
175
+ * cross-chain transfers. Gateway provides an alternative bridging mechanism
176
+ * with its own set of smart contracts (GatewayWallet and GatewayMinter).
177
+ *
178
+ * Use the {@link isGatewayV1Supported} type guard to check if a chain
179
+ * supports Gateway v1 before accessing these properties.
180
+ *
181
+ * @example
182
+ * ```typescript
183
+ * // Chain with Gateway v1 support
184
+ * const chainWithGateway: ChainDefinition = {
185
+ * // ... other properties
186
+ * gateway: {
187
+ * domain: 6,
188
+ * forwarderSupported: { source: true, destination: true },
189
+ * contracts: {
190
+ * v1: {
191
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
192
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
193
+ * }
194
+ * }
195
+ * }
196
+ * }
197
+ *
198
+ * // Check Gateway support
199
+ * if (isGatewayV1Supported(chainWithGateway)) {
200
+ * console.log('Gateway wallet:', chainWithGateway.gateway.contracts.v1.wallet)
201
+ * }
202
+ * ```
203
+ *
204
+ * @see {@link GatewayConfig} for the structure of Gateway configuration.
205
+ * @see {@link isGatewayV1Supported} for checking Gateway v1 support.
206
+ */
207
+ gateway?: GatewayConfig;
171
208
  }
172
209
  /**
173
210
  * Represents chain definitions for Ethereum Virtual Machine (EVM) compatible blockchains.
@@ -449,6 +486,128 @@ interface CCTPConfig {
449
486
  * ```
450
487
  */
451
488
  type KitContractType = 'bridge' | 'adapter';
489
+ /**
490
+ * Configuration for Gateway v1 contracts.
491
+ *
492
+ * @description Contains the addresses for the GatewayWallet and GatewayMinter
493
+ * smart contracts that enable Gateway functionality on a chain.
494
+ *
495
+ * @example
496
+ * ```typescript
497
+ * import type { GatewayV1Contracts } from '@core/chains'
498
+ *
499
+ * const v1Contracts: GatewayV1Contracts = {
500
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
501
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
502
+ * }
503
+ * ```
504
+ */
505
+ interface GatewayV1Contracts {
506
+ /**
507
+ * The address of the GatewayWallet smart contract.
508
+ *
509
+ * @description The GatewayWallet contract manages wallet operations
510
+ * for Gateway transactions.
511
+ *
512
+ * Address format varies by blockchain:
513
+ * - EVM chains: 40-character hexadecimal with 0x prefix (e.g., "0x1234...")
514
+ * - Solana: Base58-encoded 32-byte address (e.g., "9WzDX...")
515
+ *
516
+ * @example "0x1234567890abcdef1234567890abcdef12345678"
517
+ */
518
+ wallet: string;
519
+ /**
520
+ * The address of the GatewayMinter smart contract.
521
+ *
522
+ * @description The GatewayMinter contract handles minting operations
523
+ * for Gateway transactions.
524
+ *
525
+ * Address format varies by blockchain:
526
+ * - EVM chains: 40-character hexadecimal with 0x prefix (e.g., "0x1234...")
527
+ * - Solana: Base58-encoded 32-byte address (e.g., "9WzDX...")
528
+ *
529
+ * @example "0xabcdef1234567890abcdef1234567890abcdef12"
530
+ */
531
+ minter: string;
532
+ }
533
+ /**
534
+ * Versioned map of Gateway contract configurations.
535
+ *
536
+ * @description Maps protocol versions to their contract addresses, following
537
+ * the same pattern as {@link CCTPContracts}. Each version is optional so that
538
+ * chains can support any combination of Gateway protocol versions.
539
+ *
540
+ * @example
541
+ * ```typescript
542
+ * import type { GatewayContracts } from '@core/chains'
543
+ *
544
+ * const contracts: GatewayContracts = {
545
+ * v1: {
546
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
547
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
548
+ * }
549
+ * }
550
+ * ```
551
+ */
552
+ type GatewayContracts = Partial<{
553
+ v1: GatewayV1Contracts;
554
+ }>;
555
+ /**
556
+ * Configuration for the Gateway protocol on a blockchain.
557
+ *
558
+ * @description Contains the Gateway domain identifier and version-specific
559
+ * contract configurations. Follows the same structure as {@link CCTPConfig}:
560
+ * a domain number plus a versioned contracts map.
561
+ *
562
+ * @example
563
+ * ```typescript
564
+ * import type { GatewayConfig } from '@core/chains'
565
+ *
566
+ * const gatewayConfig: GatewayConfig = {
567
+ * domain: 0,
568
+ * forwarderSupported: { source: true, destination: true },
569
+ * contracts: {
570
+ * v1: {
571
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
572
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
573
+ * }
574
+ * }
575
+ * }
576
+ * ```
577
+ */
578
+ interface GatewayConfig {
579
+ /**
580
+ * The Gateway domain identifier for this chain.
581
+ *
582
+ * @description Similar to CCTP domains, this number uniquely identifies
583
+ * the chain within the Gateway protocol.
584
+ *
585
+ * @example 0 for Ethereum, 6 for Base
586
+ */
587
+ domain: number;
588
+ /**
589
+ * Version-specific Gateway contract addresses.
590
+ *
591
+ * @description Contains the addresses for each supported Gateway protocol
592
+ * version, following the same pattern as {@link CCTPContracts}.
593
+ */
594
+ contracts: GatewayContracts;
595
+ /**
596
+ * Indicate whether the chain supports the Forwarding Service as a source
597
+ * and/or destination within the Gateway protocol.
598
+ *
599
+ * @example
600
+ * ```typescript
601
+ * forwarderSupported: { source: true, destination: true }
602
+ * ```
603
+ */
604
+ forwarderSupported: {
605
+ /** Whether this chain can be used as a source in forwarded transfers. */
606
+ source: boolean;
607
+ /** Whether this chain can be used as a destination in forwarded transfers. */
608
+ destination: boolean;
609
+ };
610
+ }
452
611
  /**
453
612
  * Kit-specific contract addresses for enhanced chain functionality.
454
613
  *
@@ -523,6 +682,8 @@ declare enum Blockchain {
523
682
  Noble_Testnet = "Noble_Testnet",
524
683
  Optimism = "Optimism",
525
684
  Optimism_Sepolia = "Optimism_Sepolia",
685
+ Pharos = "Pharos",
686
+ Pharos_Testnet = "Pharos_Testnet",
526
687
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
527
688
  Polkadot_Westmint = "Polkadot_Westmint",
528
689
  Plume = "Plume",
@@ -763,10 +924,39 @@ type EvmPreparedChainRequestParams = {
763
924
  functionName: string;
764
925
  /** The arguments to pass to the function. */
765
926
  args: unknown[];
927
+ /**
928
+ * Specific block number to read contract state at (read-only calls only).
929
+ * Used for historical reads, e.g. checking delegate status at Gateway's
930
+ * processed height rather than the latest block. Ignored for write
931
+ * operations (transactions).
932
+ */
933
+ blockNumber?: bigint;
766
934
  } & Partial<EvmEstimateOverrides>;
935
+ /**
936
+ * Parameters for preparing an EIP-712 typed data signing request (EVM).
937
+ * When executed, returns the signature hex string.
938
+ */
939
+ interface EvmSignTypedDataPreparedChainRequestParams {
940
+ type: 'evm-sign-typed-data';
941
+ typedData: {
942
+ types: Record<string, unknown[]>;
943
+ domain: Record<string, unknown>;
944
+ primaryType: string;
945
+ message: Record<string, unknown>;
946
+ };
947
+ }
767
948
  /**
768
949
  * Solana-specific parameters for preparing a transaction.
769
- * @interface SolanaPreparedChainRequestParams
950
+ *
951
+ * @example
952
+ * ```typescript
953
+ * import type { SolanaPreparedChainRequestParams } from '@core/adapter'
954
+ *
955
+ * const params: SolanaPreparedChainRequestParams = {
956
+ * instructions: [transferInstruction],
957
+ * addressLookupTables: [],
958
+ * }
959
+ * ```
770
960
  */
771
961
  interface SolanaPreparedChainRequestParams {
772
962
  /**
@@ -807,6 +997,24 @@ interface SolanaPreparedChainRequestParams {
807
997
  */
808
998
  addressLookupTableAddresses?: string[];
809
999
  }
1000
+ /**
1001
+ * Parameters for preparing a message signing request (Solana).
1002
+ * When executed, returns the signature.
1003
+ *
1004
+ * @example
1005
+ * ```typescript
1006
+ * import type { SolanaSignMessagePreparedChainRequestParams } from '@core/adapter'
1007
+ *
1008
+ * const params: SolanaSignMessagePreparedChainRequestParams = {
1009
+ * type: 'solana-sign-message',
1010
+ * message: new TextEncoder().encode('Sign this message'),
1011
+ * }
1012
+ * ```
1013
+ */
1014
+ interface SolanaSignMessagePreparedChainRequestParams {
1015
+ type: 'solana-sign-message';
1016
+ message: Uint8Array;
1017
+ }
810
1018
  /**
811
1019
  * Solana-specific configuration for transaction estimation.
812
1020
  * @interface SolanaEstimateOverrides
@@ -879,7 +1087,7 @@ interface NoopPreparedChainRequest {
879
1087
  * Union type for all supported contract execution parameters.
880
1088
  * Currently only supports EVM chains, but can be extended for other chains.
881
1089
  */
882
- type PreparedChainRequestParams = EvmPreparedChainRequestParams | SolanaPreparedChainRequestParams;
1090
+ type PreparedChainRequestParams = EvmPreparedChainRequestParams | EvmSignTypedDataPreparedChainRequestParams | SolanaPreparedChainRequestParams | SolanaSignMessagePreparedChainRequestParams;
883
1091
  /**
884
1092
  * Response from waiting for a transaction to be mined and confirmed on the blockchain.
885
1093
  *
@@ -2230,6 +2438,18 @@ interface USDCActionMap {
2230
2438
  * This is a read-only operation.
2231
2439
  */
2232
2440
  balanceOf: Omit<BaseUSDCActions['balanceOf'], 'tokenAddress'>;
2441
+ /**
2442
+ * Get the EIP-712 domain name of the USDC contract on the current chain.
2443
+ *
2444
+ * Automatically uses the USDC contract address for the current chain.
2445
+ * This is a read-only operation with no parameters.
2446
+ */
2447
+ name: ActionParameters & {
2448
+ /**
2449
+ * Optional chain override; defaults to the operation context chain.
2450
+ */
2451
+ chain?: ChainDefinition;
2452
+ };
2233
2453
  }
2234
2454
 
2235
2455
  /**
@@ -2272,6 +2492,252 @@ interface USDTActionMap {
2272
2492
  transfer: BaseUSDTActions['transfer'];
2273
2493
  }
2274
2494
 
2495
+ /**
2496
+ * Versioned wrapper for Gateway action namespaces.
2497
+ *
2498
+ * Follows the same pattern as {@link CCTPActionMap}: each version is a
2499
+ * nested namespace so that action keys read `gateway.v1.deposit`, etc.
2500
+ *
2501
+ * @see {@link GatewayV1ActionMap} for v1 action definitions
2502
+ */
2503
+ interface GatewayActionMap {
2504
+ /** Gateway protocol v1 operations. */
2505
+ readonly v1: GatewayV1ActionMap;
2506
+ }
2507
+ /**
2508
+ * Action map for Circle Gateway Wallet v1 contract operations.
2509
+ *
2510
+ * Mirrors the GatewayWallet interface: deposit variants, delegate management,
2511
+ * and balance queries.
2512
+ *
2513
+ * @see https://developers.circle.com/gateway/references/contract-interfaces-and-events
2514
+ * @see https://developers.circle.com/gateway/references/solana-programs
2515
+ */
2516
+ interface GatewayV1ActionMap {
2517
+ /**
2518
+ * Deposit tokens after approving the Gateway contract. Balance is credited to the caller.
2519
+ *
2520
+ * Corresponds to `deposit(address token, uint256 value)`.
2521
+ */
2522
+ deposit: ActionParameters & {
2523
+ /** Token contract address (e.g. USDC). */
2524
+ token: string;
2525
+ /** Amount in token's smallest unit. */
2526
+ value: bigint;
2527
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2528
+ chain?: ChainDefinition;
2529
+ };
2530
+ /**
2531
+ * Deposit tokens on behalf of another address after approving. Balance is credited to `depositor`.
2532
+ *
2533
+ * Corresponds to `depositFor(address token, address depositor, uint256 value)`.
2534
+ */
2535
+ depositFor: ActionParameters & {
2536
+ /** Token contract address. */
2537
+ token: string;
2538
+ /** Address that will own the resulting balance. */
2539
+ depositor: string;
2540
+ /** Amount in token's smallest unit. */
2541
+ value: bigint;
2542
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2543
+ chain?: ChainDefinition;
2544
+ };
2545
+ /**
2546
+ * Deposit with EIP-2612 permit (gasless approval via signature).
2547
+ *
2548
+ * Corresponds to `depositWithPermit(token, owner, value, deadline, signature)` (bytes)
2549
+ * or the overload with (v, r, s). Use `signature` for EIP-7597 (SCA); use (v, r, s) for EOA.
2550
+ */
2551
+ depositWithPermit: ActionParameters & {
2552
+ /** Token contract address. */
2553
+ token: string;
2554
+ /** Depositor's address (owner in permit). */
2555
+ owner: string;
2556
+ /** Amount in token's smallest unit. */
2557
+ value: bigint;
2558
+ /** Permit deadline (Unix timestamp) or max uint256 for no expiration. */
2559
+ deadline: bigint;
2560
+ /** Signature as bytes (EIP-7597) or omit and use v, r, s. */
2561
+ signature?: `0x${string}`;
2562
+ /** ECDSA v (when not using signature bytes). */
2563
+ v?: number;
2564
+ /** ECDSA r (when not using signature bytes). */
2565
+ r?: `0x${string}`;
2566
+ /** ECDSA s (when not using signature bytes). */
2567
+ s?: `0x${string}`;
2568
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2569
+ chain?: ChainDefinition;
2570
+ };
2571
+ /**
2572
+ * Deposit with EIP-3009 transferWithAuthorization (receiveWithAuthorization).
2573
+ *
2574
+ * Corresponds to `depositWithAuthorization(token, from, value, validAfter, validBefore, nonce, signature)`
2575
+ * or the overload with (v, r, s).
2576
+ */
2577
+ depositWithAuthorization: ActionParameters & {
2578
+ /** Token contract address. */
2579
+ token: string;
2580
+ /** Depositor's address (from in authorization). */
2581
+ from: string;
2582
+ /** Amount in token's smallest unit. */
2583
+ value: bigint;
2584
+ /** Unix timestamp after which the authorization is valid. */
2585
+ validAfter: bigint;
2586
+ /** Unix timestamp before which the authorization is valid. */
2587
+ validBefore: bigint;
2588
+ /** Unique nonce (bytes32). */
2589
+ nonce: `0x${string}`;
2590
+ /** Signature as bytes (EIP-7598) or omit and use v, r, s. */
2591
+ signature?: `0x${string}`;
2592
+ /** ECDSA v (when not using signature bytes). */
2593
+ v?: number;
2594
+ /** ECDSA r (when not using signature bytes). */
2595
+ r?: `0x${string}`;
2596
+ /** ECDSA s (when not using signature bytes). */
2597
+ s?: `0x${string}`;
2598
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2599
+ chain?: ChainDefinition;
2600
+ };
2601
+ /**
2602
+ * Grant spending rights to a delegate on the caller's Gateway account.
2603
+ *
2604
+ * Corresponds to `addDelegate(address token, address delegate)`.
2605
+ */
2606
+ addDelegate: ActionParameters & {
2607
+ /** Token contract address (e.g. USDC). */
2608
+ token: string;
2609
+ /** Address to authorize as a delegate. */
2610
+ delegate: string;
2611
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2612
+ chain?: ChainDefinition;
2613
+ };
2614
+ /**
2615
+ * Revoke spending rights from a delegate on the caller's Gateway account.
2616
+ *
2617
+ * Corresponds to `removeDelegate(address token, address delegate)`.
2618
+ */
2619
+ removeDelegate: ActionParameters & {
2620
+ /** Token contract address (e.g. USDC). */
2621
+ token: string;
2622
+ /** Address to revoke as a delegate. */
2623
+ delegate: string;
2624
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2625
+ chain?: ChainDefinition;
2626
+ };
2627
+ /**
2628
+ * Check whether an address is authorized as a delegate for a depositor's balance.
2629
+ *
2630
+ * Corresponds to `isAuthorizedForBalance(address token, address depositor, address addr)`.
2631
+ */
2632
+ isDelegate: ActionParameters & {
2633
+ /** Token contract address (e.g. USDC). */
2634
+ token: string;
2635
+ /** The depositor (balance owner) address. */
2636
+ depositor: string;
2637
+ /** The address to check for delegate status. */
2638
+ delegate: string;
2639
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2640
+ chain?: ChainDefinition;
2641
+ /** EVM: specific block number to read state at (for finality-aware checks). */
2642
+ blockNumber?: bigint;
2643
+ /** Solana: commitment level for the account read. */
2644
+ commitment?: 'confirmed' | 'finalized';
2645
+ };
2646
+ /**
2647
+ * Start a delayed fund removal from a Gateway account.
2648
+ *
2649
+ * Corresponds to `initiateWithdrawal(address token, uint256 value)` (EVM)
2650
+ * or the `initiate_withdrawal` instruction (Solana).
2651
+ */
2652
+ initiateWithdrawal: ActionParameters & {
2653
+ /** Token contract address (e.g. USDC). */
2654
+ token: string;
2655
+ /** Amount in token's smallest unit. */
2656
+ value: bigint;
2657
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2658
+ chain?: ChainDefinition;
2659
+ };
2660
+ /**
2661
+ * Complete a fund removal after the withdrawal delay has elapsed.
2662
+ *
2663
+ * Corresponds to `withdraw(address token)` (EVM) or the `withdraw`
2664
+ * instruction (Solana). No amount parameter -- the contract returns the
2665
+ * full pending withdrawal balance.
2666
+ */
2667
+ withdraw: ActionParameters & {
2668
+ /** Token contract address (e.g. USDC). */
2669
+ token: string;
2670
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2671
+ chain?: ChainDefinition;
2672
+ };
2673
+ /**
2674
+ * Read the pending withdrawal balance for a depositor.
2675
+ *
2676
+ * Corresponds to `withdrawingBalance(address token, address depositor)` (EVM)
2677
+ * or reading `withdrawing_amount` from the `GatewayDeposit` PDA (Solana).
2678
+ */
2679
+ withdrawingBalance: ActionParameters & {
2680
+ /** Token contract address (e.g. USDC). */
2681
+ token: string;
2682
+ /** The depositor whose pending withdrawal to query. */
2683
+ depositor: string;
2684
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2685
+ chain?: ChainDefinition;
2686
+ };
2687
+ /**
2688
+ * Read the block number at which a pending withdrawal can be completed.
2689
+ *
2690
+ * Corresponds to `withdrawalBlock(address token, address depositor)` (EVM)
2691
+ * or reading `withdrawal_block` from the `GatewayDeposit` PDA (Solana).
2692
+ */
2693
+ withdrawalBlock: ActionParameters & {
2694
+ /** Token contract address (e.g. USDC). */
2695
+ token: string;
2696
+ /** The depositor whose withdrawal block to query. */
2697
+ depositor: string;
2698
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2699
+ chain?: ChainDefinition;
2700
+ };
2701
+ /**
2702
+ * Execute gatewayBurn on the Gateway Wallet contract.
2703
+ * Burns tokens from a source chain as part of a cross-chain spend.
2704
+ *
2705
+ * Corresponds to `gatewayBurn(bytes calldataBytes, bytes signature)`.
2706
+ */
2707
+ gatewayBurn: ActionParameters & {
2708
+ /** ABI-encoded burn intent calldata. */
2709
+ calldataBytes: `0x${string}`;
2710
+ /** Signature over the burn intent(s). */
2711
+ signature: `0x${string}`;
2712
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2713
+ chain?: ChainDefinition;
2714
+ };
2715
+ /**
2716
+ * Execute gatewayMint on the Gateway Minter contract.
2717
+ * Mints tokens on the destination chain to complete a cross-chain spend.
2718
+ *
2719
+ * Corresponds to `gatewayMint(bytes attestationPayload, bytes signature)`.
2720
+ */
2721
+ gatewayMint: ActionParameters & {
2722
+ /** Attestation payload from the Gateway API. */
2723
+ attestation: `0x${string}`;
2724
+ /** Signature over the attestation. */
2725
+ signature: `0x${string}`;
2726
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2727
+ chain?: ChainDefinition;
2728
+ };
2729
+ /**
2730
+ * Sign burn intents using EIP-712 typed data (EVM) or binary encoding (Solana).
2731
+ * Returns the signature needed for the Gateway API transfer call.
2732
+ */
2733
+ signBurnIntents: ActionParameters & {
2734
+ /** EIP-712 typed data for EVM, or binary-encoded data for Solana. */
2735
+ typedData: unknown;
2736
+ /** Chain with Gateway v1 (optional; defaults to operation context chain). */
2737
+ chain?: ChainDefinition;
2738
+ };
2739
+ }
2740
+
2275
2741
  /**
2276
2742
  * Native token-related action maps for the bridge kit.
2277
2743
  *
@@ -2326,14 +2792,16 @@ interface NativeActionMap {
2326
2792
  interface ActionMap {
2327
2793
  /** CCTP-specific operations with automatic address resolution. */
2328
2794
  readonly cctp: CCTPActionMap;
2795
+ /** Gateway Wallet operations, versioned (e.g. gateway.v1.deposit). */
2796
+ readonly gateway: GatewayActionMap;
2797
+ /** Native token operations (ETH, SOL, MATIC, etc.). */
2798
+ readonly native: NativeActionMap;
2329
2799
  /** General token operations requiring explicit token addresses. */
2330
2800
  readonly token: TokenActionMap;
2331
2801
  /** USDC-specific operations with automatic address resolution. */
2332
2802
  readonly usdc: USDCActionMap;
2333
2803
  /** USDT-specific operations with automatic address resolution. */
2334
2804
  readonly usdt: USDTActionMap;
2335
- /** Native token operations. */
2336
- readonly native: NativeActionMap;
2337
2805
  /** Swap operations for DEX aggregator integrations. */
2338
2806
  readonly swap: SwapActionMap;
2339
2807
  }
@@ -3075,6 +3543,7 @@ declare module './types' {
3075
3543
  POL: true;
3076
3544
  PLUME: true;
3077
3545
  MON: true;
3546
+ cirBTC: true;
3078
3547
  }
3079
3548
  }
3080
3549
 
@@ -3150,6 +3619,11 @@ type InferAdapterCapabilities<T extends Partial<AdapterCapabilities>> = T & {
3150
3619
  * Represents the domain separator fields as defined by the EIP-712 standard.
3151
3620
  * Used to prevent signature replay across different domains (contracts, chains, etc).
3152
3621
  *
3622
+ * `chainId` and `verifyingContract` are **required** to ensure cross-chain and
3623
+ * cross-contract replay protection for CCTP v2 permits and authorisations.
3624
+ * For Gateway burn-intent signing (which embeds replay-protection in the
3625
+ * message body), use {@link GatewayEIP712Domain} instead.
3626
+ *
3153
3627
  * @see {@link https://eips.ethereum.org/EIPS/eip-712}
3154
3628
  *
3155
3629
  * @example
@@ -3167,9 +3641,9 @@ interface EIP712Domain {
3167
3641
  name: string;
3168
3642
  /** Current major version of the signing domain (e.g., "2") */
3169
3643
  version: string;
3170
- /** EVM chain ID where the contract is deployed */
3644
+ /** EVM chain ID where the contract is deployed — required for cross-chain replay protection. */
3171
3645
  chainId: number | bigint;
3172
- /** Address of the contract that will verify the signature */
3646
+ /** Address of the contract that will verify the signature — required to bind the signature to a specific contract. */
3173
3647
  verifyingContract: `0x${string}`;
3174
3648
  /** Optional salt for domain separation (as hex string) */
3175
3649
  salt?: `0x${string}`;
@@ -3649,7 +4123,7 @@ type EIP2612NonceFetcher = (token: `0x${string}`, owner: `0x${string}`) => Promi
3649
4123
  * automatically using the adapter's `fetchEIP2612Nonce` method, which queries
3650
4124
  * the token contract's `nonces(owner)` function.
3651
4125
  *
3652
- * **Deadline Calculation**: If no deadline is provided, it defaults to 24 hours
4126
+ * **Deadline Calculation**: If no deadline is provided, it defaults to 1 hour
3653
4127
  * from the current time (computed using `computeDefaultDeadline`).
3654
4128
  *
3655
4129
  * @param meta - Domain metadata for the token contract