@circle-fin/provider-cctp-v2 1.4.1 → 1.6.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/index.d.ts CHANGED
@@ -499,6 +499,8 @@ declare enum Blockchain {
499
499
  Celo_Alfajores_Testnet = "Celo_Alfajores_Testnet",
500
500
  Codex = "Codex",
501
501
  Codex_Testnet = "Codex_Testnet",
502
+ Edge = "Edge",
503
+ Edge_Testnet = "Edge_Testnet",
502
504
  Ethereum = "Ethereum",
503
505
  Ethereum_Sepolia = "Ethereum_Sepolia",
504
506
  Hedera = "Hedera",
@@ -511,6 +513,8 @@ declare enum Blockchain {
511
513
  Linea_Sepolia = "Linea_Sepolia",
512
514
  Monad = "Monad",
513
515
  Monad_Testnet = "Monad_Testnet",
516
+ Morph = "Morph",
517
+ Morph_Testnet = "Morph_Testnet",
514
518
  NEAR = "NEAR",
515
519
  NEAR_Testnet = "NEAR_Testnet",
516
520
  Noble = "Noble",
@@ -661,6 +665,32 @@ interface EvmExecuteOverrides extends EvmEstimateOverrides {
661
665
  */
662
666
  nonce?: number;
663
667
  }
668
+ /**
669
+ * Raw EVM call data tuple for a single contract interaction.
670
+ *
671
+ * Represents the minimal data needed to submit an EVM transaction:
672
+ * the target contract address, the ABI-encoded calldata, and an
673
+ * optional native token value. Used by EIP-5792 batched execution
674
+ * to compose multiple calls into a single `wallet_sendCalls` request.
675
+ *
676
+ * @interface EvmCallData
677
+ *
678
+ * @example
679
+ * ```typescript
680
+ * const callData: EvmCallData = {
681
+ * to: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
682
+ * data: '0x095ea7b3000000000000000000000000...',
683
+ * }
684
+ * ```
685
+ */
686
+ interface EvmCallData {
687
+ /** The target contract address. */
688
+ to: `0x${string}`;
689
+ /** The ABI-encoded function calldata. */
690
+ data: `0x${string}`;
691
+ /** Optional native token value to send with the call. */
692
+ value?: bigint | undefined;
693
+ }
664
694
  /**
665
695
  * Prepared contract execution for EVM chains.
666
696
  *
@@ -689,6 +719,28 @@ interface EvmPreparedChainRequest {
689
719
  * @throws If the execution fails
690
720
  */
691
721
  execute(overrides?: EvmExecuteOverrides): Promise<string>;
722
+ /**
723
+ * Return the raw call tuple without executing or estimating.
724
+ *
725
+ * Expose the `{ to, data, value }` triple that would be sent on-chain so
726
+ * callers can feed it into EIP-5792 `wallet_sendCalls` or other batching
727
+ * mechanisms. This method is optional -- adapters that do not support
728
+ * calldata extraction (e.g. Ethers v6) may omit it.
729
+ *
730
+ * @returns The raw EVM call data for this prepared request.
731
+ * @throws Never — synchronous accessor with no failure path.
732
+ * @since 2.0.0
733
+ *
734
+ * @example
735
+ * ```typescript
736
+ * const prepared = await adapter.prepare(params, ctx)
737
+ * if (prepared.getCallData) {
738
+ * const { to, data, value } = prepared.getCallData()
739
+ * console.log('Target:', to, 'Data:', data)
740
+ * }
741
+ * ```
742
+ */
743
+ getCallData?(): EvmCallData;
692
744
  }
693
745
  /**
694
746
  * Union type for all supported prepared contract executions.
@@ -4413,6 +4465,21 @@ interface BridgeStep {
4413
4465
  * - `undefined`: Not applicable (non-mint steps)
4414
4466
  */
4415
4467
  forwarded?: boolean;
4468
+ /**
4469
+ * Whether this step was executed as part of an EIP-5792 batched
4470
+ * `wallet_sendCalls` request.
4471
+ *
4472
+ * - `true`: The step was included in a batched call bundle
4473
+ * - `undefined`: The step was executed individually (sequential flow)
4474
+ */
4475
+ batched?: boolean | undefined;
4476
+ /**
4477
+ * The wallet-assigned batch identifier from `wallet_sendCalls`.
4478
+ *
4479
+ * Present only when {@link batched} is `true`. Can be used with
4480
+ * `wallet_getCallsStatus` to query the status of the entire bundle.
4481
+ */
4482
+ batchId?: string | undefined;
4416
4483
  /** Optional human-readable error message */
4417
4484
  errorMessage?: string;
4418
4485
  /** Optional raw error object (can be Viem/Ethers/Chain error) */
@@ -4557,6 +4624,24 @@ interface BridgeConfig {
4557
4624
  * @defaultValue TransferSpeed.FAST
4558
4625
  */
4559
4626
  transferSpeed?: TransferSpeed | `${TransferSpeed}` | undefined;
4627
+ /**
4628
+ * Enable or disable EIP-5792 batched transaction execution.
4629
+ *
4630
+ * When `true` (or `undefined` / omitted), the bridge will attempt to batch
4631
+ * the approve and burn calls into a single `wallet_sendCalls` request if
4632
+ * the connected wallet supports it. Set to `false` to explicitly opt out
4633
+ * and always use the sequential approve -> burn flow.
4634
+ *
4635
+ * @defaultValue `undefined` (batching attempted when the wallet supports it)
4636
+ *
4637
+ * @example
4638
+ * ```typescript
4639
+ * const config: BridgeConfig = {
4640
+ * batchTransactions: false, // force sequential flow
4641
+ * }
4642
+ * ```
4643
+ */
4644
+ batchTransactions?: boolean | undefined;
4560
4645
  /**
4561
4646
  * The maximum fee to pay for the burn operation.
4562
4647
  *