@circle-fin/app-kit 1.15.3 → 1.16.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +5 -2
  3. package/borrow.cjs +28028 -0
  4. package/borrow.cjs.map +1 -0
  5. package/borrow.d.cts +10723 -0
  6. package/borrow.d.mts +10723 -0
  7. package/borrow.d.ts +10723 -0
  8. package/borrow.mjs +28000 -0
  9. package/borrow.mjs.map +1 -0
  10. package/bridge.cjs +1885 -276
  11. package/bridge.d.cts +86 -12
  12. package/bridge.d.mts +86 -12
  13. package/bridge.d.ts +86 -12
  14. package/bridge.mjs +1885 -276
  15. package/chains.cjs +70 -3
  16. package/chains.d.cts +2 -0
  17. package/chains.d.mts +2 -0
  18. package/chains.d.ts +2 -0
  19. package/chains.mjs +70 -3
  20. package/context.cjs +1 -0
  21. package/context.d.cts +86 -12
  22. package/context.d.mts +86 -12
  23. package/context.d.ts +86 -12
  24. package/context.mjs +1 -0
  25. package/earn.cjs +4981 -3314
  26. package/earn.d.cts +1117 -981
  27. package/earn.d.mts +1117 -981
  28. package/earn.d.ts +1117 -981
  29. package/earn.mjs +4981 -3314
  30. package/estimateBridge.cjs +1883 -274
  31. package/estimateBridge.d.cts +86 -12
  32. package/estimateBridge.d.mts +86 -12
  33. package/estimateBridge.d.ts +86 -12
  34. package/estimateBridge.mjs +1883 -274
  35. package/estimateSwap.cjs +8554 -6931
  36. package/estimateSwap.d.cts +86 -12
  37. package/estimateSwap.d.mts +86 -12
  38. package/estimateSwap.d.ts +86 -12
  39. package/estimateSwap.mjs +8503 -6880
  40. package/index.cjs +30943 -18928
  41. package/index.d.cts +23051 -2742
  42. package/index.d.mts +23051 -2742
  43. package/index.d.ts +23051 -2742
  44. package/index.mjs +30884 -18922
  45. package/package.json +17 -7
  46. package/server.cjs +101 -6
  47. package/server.mjs +101 -6
  48. package/swap.cjs +8554 -6931
  49. package/swap.d.cts +86 -12
  50. package/swap.d.mts +86 -12
  51. package/swap.d.ts +86 -12
  52. package/swap.mjs +8503 -6880
  53. package/unifiedBalance.cjs +457 -128
  54. package/unifiedBalance.d.cts +108 -11
  55. package/unifiedBalance.d.mts +108 -11
  56. package/unifiedBalance.d.ts +108 -11
  57. package/unifiedBalance.mjs +457 -128
@@ -551,8 +551,23 @@ interface CCTPXChainConfig {
551
551
  * const contractType: KitContractType = 'bridge' // Valid
552
552
  * const invalidType: KitContractType = 'invalid' // TypeScript error
553
553
  * ```
554
- */
555
- type KitContractType = 'bridge' | 'adapter';
554
+ *
555
+ * @remarks
556
+ * `'senderPreservingBatcher'` carries a stricter requirement than the others,
557
+ * because setting it wrong fails silently rather than loudly. It must name a
558
+ * batching contract that preserves the calling EOA as `msg.sender` in every
559
+ * subcall — on Arc, the `Multicall3From` predeploy, which achieves that
560
+ * through the `CallFrom` precompile. The name is deliberately more specific
561
+ * than "batcher": the ubiquitous Multicall3 at
562
+ * `0xcA11bde05977b3631167028862bE2a173976CA11` has the same ABI and the same
563
+ * selectors but does **not** qualify, since each subcall would arrive as the
564
+ * Multicall3 contract, so a batched `approve` would grant an allowance from
565
+ * the batcher's own balance rather than from the user's — a field named just
566
+ * `batcher` would make that misconfiguration look valid. Leave
567
+ * `senderPreservingBatcher` unset on any chain lacking one; an unset field
568
+ * simply means callers fall back to submitting calls one at a time.
569
+ */
570
+ type KitContractType = 'bridge' | 'adapter' | 'senderPreservingBatcher';
556
571
  /**
557
572
  * Configuration for Gateway v1 contracts.
558
573
  *
@@ -1436,8 +1451,13 @@ type PreparedChainRequest = EvmPreparedChainRequest | SolanaPreparedChainRequest
1436
1451
  * Parameters for preparing an EVM contract execution.
1437
1452
  */
1438
1453
  type EvmPreparedChainRequestParams = {
1439
- /** The type of the prepared execution. */
1440
- type: 'evm';
1454
+ /**
1455
+ * The type of the prepared execution. Optional here because EVM is the
1456
+ * only chain type `Adapter.prepare()` implementations narrow their param
1457
+ * type to in practice — callers that only ever prepare EVM requests can
1458
+ * omit it rather than repeat a discriminator that never varies for them.
1459
+ */
1460
+ type?: 'evm';
1441
1461
  /** The ABI of the contract. */
1442
1462
  abi: Abi | string[];
1443
1463
  /** The address of the contract. */
@@ -2716,6 +2736,57 @@ interface EarnActionMap {
2716
2736
  readonly claimRewards: ExecuteEarnParams;
2717
2737
  }
2718
2738
 
2739
+ /** Permit standards accepted by Borrow Adapter executions. */
2740
+ declare enum BorrowPermitType {
2741
+ /** Tokens must be approved separately. */
2742
+ NONE = 0,
2743
+ /** EIP-2612 permit calldata accompanies the token input. */
2744
+ EIP2612 = 1
2745
+ }
2746
+ /** Token input forwarded by Borrow Kit to the Adapter Contract. */
2747
+ interface BorrowTokenInput {
2748
+ readonly permitType: BorrowPermitType;
2749
+ readonly token: `0x${string}`;
2750
+ readonly amount: bigint;
2751
+ readonly permitCalldata: `0x${string}`;
2752
+ }
2753
+ /** A single instruction in a Circle-signed Borrow execution. */
2754
+ interface BorrowInstruction {
2755
+ readonly target: `0x${string}`;
2756
+ readonly data: `0x${string}`;
2757
+ readonly value: string | bigint;
2758
+ readonly tokenIn: `0x${string}`;
2759
+ readonly amountToApprove: string | bigint;
2760
+ readonly tokenOut: `0x${string}`;
2761
+ readonly minTokenOut: string | bigint;
2762
+ }
2763
+ /** A token recipient in a Circle-signed Borrow execution. */
2764
+ interface BorrowTokenRecipient {
2765
+ readonly token: `0x${string}`;
2766
+ readonly beneficiary: `0x${string}`;
2767
+ }
2768
+ /** Circle-signed Borrow parameters forwarded to the Adapter Contract. */
2769
+ interface BorrowExecutionParams {
2770
+ readonly instructions: readonly BorrowInstruction[];
2771
+ readonly tokens: readonly BorrowTokenRecipient[];
2772
+ readonly execId: string | bigint;
2773
+ readonly deadline: string | bigint;
2774
+ readonly metadata: `0x${string}`;
2775
+ }
2776
+ /** Parameters for a service-signed Borrow Adapter execution. */
2777
+ interface ExecuteBorrowParams extends ActionParameters {
2778
+ readonly executeParams: BorrowExecutionParams;
2779
+ readonly tokenInputs: BorrowTokenInput[];
2780
+ readonly signature: `0x${string}`;
2781
+ }
2782
+ /** Borrow actions supported by EVM adapters. */
2783
+ interface BorrowActionMap {
2784
+ /** Execute a Circle-signed partial loan repayment. */
2785
+ readonly repay: ExecuteBorrowParams;
2786
+ /** Execute a Circle-signed borrow. */
2787
+ readonly execute: ExecuteBorrowParams;
2788
+ }
2789
+
2719
2790
  /**
2720
2791
  * Single instruction to execute within the Adapter Contract.
2721
2792
  *
@@ -3672,6 +3743,8 @@ interface NativeActionMap {
3672
3743
  * @see {@link ActionPayload} for extracting payload types
3673
3744
  */
3674
3745
  interface ActionMap {
3746
+ /** Borrow operations that execute service-signed payloads. */
3747
+ readonly borrow: BorrowActionMap;
3675
3748
  /** CCTP-specific operations with automatic address resolution. */
3676
3749
  readonly cctp: CCTPActionMap;
3677
3750
  /** CCTPx operations (CrossChainTokenService) for cross-chain transfers of registered tokens (Circle-issued or otherwise). */
@@ -3691,6 +3764,7 @@ interface ActionMap {
3691
3764
  /** Earn operations that execute service-signed payloads via the adapter contract. */
3692
3765
  readonly earn: EarnActionMap;
3693
3766
  }
3767
+
3694
3768
  /**
3695
3769
  * Determine if a type represents an action parameter object (leaf node).
3696
3770
  *
@@ -8352,8 +8426,8 @@ interface AppKitContext {
8352
8426
  *
8353
8427
  * This property stores event handlers that are registered via the AppKit's
8354
8428
  * `on()` method. Handlers are grouped by operation type. The runtime buckets
8355
- * are `bridge` and `earn`; the context can add more operation buckets as
8356
- * AppKit wires action handlers for additional kits.
8429
+ * are `bridge`, `earn`, and `borrow`; the context can add more operation
8430
+ * buckets as AppKit wires action handlers for additional kits.
8357
8431
  *
8358
8432
  * Within each operation bucket, handlers are keyed by action name (for
8359
8433
  * example, `bridge.approve` or `earn.deposit`) or `*` for wildcard handlers.
@@ -8372,13 +8446,13 @@ interface AppKitContext {
8372
8446
  * // Earn handlers are registered with EarnKit when earn operations run
8373
8447
  * ```
8374
8448
  */
8375
- actions: Record<'bridge' | 'earn', Record<string, ((payload: unknown) => void)[]>>;
8449
+ actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8376
8450
  /**
8377
- * Disable success analytics for the underlying EarnKit, SwapKit, and
8378
- * UnifiedBalanceKit.
8451
+ * Disable success analytics for the underlying EarnKit, SwapKit,
8452
+ * BorrowKit, and UnifiedBalanceKit.
8379
8453
  *
8380
- * When `true`, completed earn, swap, and unified balance operations will not
8381
- * POST analytics events. This does not disable error reporting; use
8454
+ * When `true`, completed earn, swap, borrow, and unified balance operations
8455
+ * will not POST analytics events. This does not disable error reporting; use
8382
8456
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8383
8457
  *
8384
8458
  * @defaultValue false
@@ -8388,7 +8462,7 @@ interface AppKitContext {
8388
8462
  * Disable error telemetry for all sub-kits.
8389
8463
  *
8390
8464
  * When `true`, none of the underlying kits (BridgeKit, SwapKit, EarnKit,
8391
- * UnifiedBalanceKit) will POST error details to the telemetry
8465
+ * BorrowKit, UnifiedBalanceKit) will POST error details to the telemetry
8392
8466
  * endpoint when operations throw. Defaults to `false` (enabled).
8393
8467
  *
8394
8468
  * @defaultValue false
@@ -551,8 +551,23 @@ interface CCTPXChainConfig {
551
551
  * const contractType: KitContractType = 'bridge' // Valid
552
552
  * const invalidType: KitContractType = 'invalid' // TypeScript error
553
553
  * ```
554
- */
555
- type KitContractType = 'bridge' | 'adapter';
554
+ *
555
+ * @remarks
556
+ * `'senderPreservingBatcher'` carries a stricter requirement than the others,
557
+ * because setting it wrong fails silently rather than loudly. It must name a
558
+ * batching contract that preserves the calling EOA as `msg.sender` in every
559
+ * subcall — on Arc, the `Multicall3From` predeploy, which achieves that
560
+ * through the `CallFrom` precompile. The name is deliberately more specific
561
+ * than "batcher": the ubiquitous Multicall3 at
562
+ * `0xcA11bde05977b3631167028862bE2a173976CA11` has the same ABI and the same
563
+ * selectors but does **not** qualify, since each subcall would arrive as the
564
+ * Multicall3 contract, so a batched `approve` would grant an allowance from
565
+ * the batcher's own balance rather than from the user's — a field named just
566
+ * `batcher` would make that misconfiguration look valid. Leave
567
+ * `senderPreservingBatcher` unset on any chain lacking one; an unset field
568
+ * simply means callers fall back to submitting calls one at a time.
569
+ */
570
+ type KitContractType = 'bridge' | 'adapter' | 'senderPreservingBatcher';
556
571
  /**
557
572
  * Configuration for Gateway v1 contracts.
558
573
  *
@@ -1436,8 +1451,13 @@ type PreparedChainRequest = EvmPreparedChainRequest | SolanaPreparedChainRequest
1436
1451
  * Parameters for preparing an EVM contract execution.
1437
1452
  */
1438
1453
  type EvmPreparedChainRequestParams = {
1439
- /** The type of the prepared execution. */
1440
- type: 'evm';
1454
+ /**
1455
+ * The type of the prepared execution. Optional here because EVM is the
1456
+ * only chain type `Adapter.prepare()` implementations narrow their param
1457
+ * type to in practice — callers that only ever prepare EVM requests can
1458
+ * omit it rather than repeat a discriminator that never varies for them.
1459
+ */
1460
+ type?: 'evm';
1441
1461
  /** The ABI of the contract. */
1442
1462
  abi: Abi | string[];
1443
1463
  /** The address of the contract. */
@@ -2716,6 +2736,57 @@ interface EarnActionMap {
2716
2736
  readonly claimRewards: ExecuteEarnParams;
2717
2737
  }
2718
2738
 
2739
+ /** Permit standards accepted by Borrow Adapter executions. */
2740
+ declare enum BorrowPermitType {
2741
+ /** Tokens must be approved separately. */
2742
+ NONE = 0,
2743
+ /** EIP-2612 permit calldata accompanies the token input. */
2744
+ EIP2612 = 1
2745
+ }
2746
+ /** Token input forwarded by Borrow Kit to the Adapter Contract. */
2747
+ interface BorrowTokenInput {
2748
+ readonly permitType: BorrowPermitType;
2749
+ readonly token: `0x${string}`;
2750
+ readonly amount: bigint;
2751
+ readonly permitCalldata: `0x${string}`;
2752
+ }
2753
+ /** A single instruction in a Circle-signed Borrow execution. */
2754
+ interface BorrowInstruction {
2755
+ readonly target: `0x${string}`;
2756
+ readonly data: `0x${string}`;
2757
+ readonly value: string | bigint;
2758
+ readonly tokenIn: `0x${string}`;
2759
+ readonly amountToApprove: string | bigint;
2760
+ readonly tokenOut: `0x${string}`;
2761
+ readonly minTokenOut: string | bigint;
2762
+ }
2763
+ /** A token recipient in a Circle-signed Borrow execution. */
2764
+ interface BorrowTokenRecipient {
2765
+ readonly token: `0x${string}`;
2766
+ readonly beneficiary: `0x${string}`;
2767
+ }
2768
+ /** Circle-signed Borrow parameters forwarded to the Adapter Contract. */
2769
+ interface BorrowExecutionParams {
2770
+ readonly instructions: readonly BorrowInstruction[];
2771
+ readonly tokens: readonly BorrowTokenRecipient[];
2772
+ readonly execId: string | bigint;
2773
+ readonly deadline: string | bigint;
2774
+ readonly metadata: `0x${string}`;
2775
+ }
2776
+ /** Parameters for a service-signed Borrow Adapter execution. */
2777
+ interface ExecuteBorrowParams extends ActionParameters {
2778
+ readonly executeParams: BorrowExecutionParams;
2779
+ readonly tokenInputs: BorrowTokenInput[];
2780
+ readonly signature: `0x${string}`;
2781
+ }
2782
+ /** Borrow actions supported by EVM adapters. */
2783
+ interface BorrowActionMap {
2784
+ /** Execute a Circle-signed partial loan repayment. */
2785
+ readonly repay: ExecuteBorrowParams;
2786
+ /** Execute a Circle-signed borrow. */
2787
+ readonly execute: ExecuteBorrowParams;
2788
+ }
2789
+
2719
2790
  /**
2720
2791
  * Single instruction to execute within the Adapter Contract.
2721
2792
  *
@@ -3672,6 +3743,8 @@ interface NativeActionMap {
3672
3743
  * @see {@link ActionPayload} for extracting payload types
3673
3744
  */
3674
3745
  interface ActionMap {
3746
+ /** Borrow operations that execute service-signed payloads. */
3747
+ readonly borrow: BorrowActionMap;
3675
3748
  /** CCTP-specific operations with automatic address resolution. */
3676
3749
  readonly cctp: CCTPActionMap;
3677
3750
  /** CCTPx operations (CrossChainTokenService) for cross-chain transfers of registered tokens (Circle-issued or otherwise). */
@@ -3691,6 +3764,7 @@ interface ActionMap {
3691
3764
  /** Earn operations that execute service-signed payloads via the adapter contract. */
3692
3765
  readonly earn: EarnActionMap;
3693
3766
  }
3767
+
3694
3768
  /**
3695
3769
  * Determine if a type represents an action parameter object (leaf node).
3696
3770
  *
@@ -8352,8 +8426,8 @@ interface AppKitContext {
8352
8426
  *
8353
8427
  * This property stores event handlers that are registered via the AppKit's
8354
8428
  * `on()` method. Handlers are grouped by operation type. The runtime buckets
8355
- * are `bridge` and `earn`; the context can add more operation buckets as
8356
- * AppKit wires action handlers for additional kits.
8429
+ * are `bridge`, `earn`, and `borrow`; the context can add more operation
8430
+ * buckets as AppKit wires action handlers for additional kits.
8357
8431
  *
8358
8432
  * Within each operation bucket, handlers are keyed by action name (for
8359
8433
  * example, `bridge.approve` or `earn.deposit`) or `*` for wildcard handlers.
@@ -8372,13 +8446,13 @@ interface AppKitContext {
8372
8446
  * // Earn handlers are registered with EarnKit when earn operations run
8373
8447
  * ```
8374
8448
  */
8375
- actions: Record<'bridge' | 'earn', Record<string, ((payload: unknown) => void)[]>>;
8449
+ actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8376
8450
  /**
8377
- * Disable success analytics for the underlying EarnKit, SwapKit, and
8378
- * UnifiedBalanceKit.
8451
+ * Disable success analytics for the underlying EarnKit, SwapKit,
8452
+ * BorrowKit, and UnifiedBalanceKit.
8379
8453
  *
8380
- * When `true`, completed earn, swap, and unified balance operations will not
8381
- * POST analytics events. This does not disable error reporting; use
8454
+ * When `true`, completed earn, swap, borrow, and unified balance operations
8455
+ * will not POST analytics events. This does not disable error reporting; use
8382
8456
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8383
8457
  *
8384
8458
  * @defaultValue false
@@ -8388,7 +8462,7 @@ interface AppKitContext {
8388
8462
  * Disable error telemetry for all sub-kits.
8389
8463
  *
8390
8464
  * When `true`, none of the underlying kits (BridgeKit, SwapKit, EarnKit,
8391
- * UnifiedBalanceKit) will POST error details to the telemetry
8465
+ * BorrowKit, UnifiedBalanceKit) will POST error details to the telemetry
8392
8466
  * endpoint when operations throw. Defaults to `false` (enabled).
8393
8467
  *
8394
8468
  * @defaultValue false
@@ -551,8 +551,23 @@ interface CCTPXChainConfig {
551
551
  * const contractType: KitContractType = 'bridge' // Valid
552
552
  * const invalidType: KitContractType = 'invalid' // TypeScript error
553
553
  * ```
554
- */
555
- type KitContractType = 'bridge' | 'adapter';
554
+ *
555
+ * @remarks
556
+ * `'senderPreservingBatcher'` carries a stricter requirement than the others,
557
+ * because setting it wrong fails silently rather than loudly. It must name a
558
+ * batching contract that preserves the calling EOA as `msg.sender` in every
559
+ * subcall — on Arc, the `Multicall3From` predeploy, which achieves that
560
+ * through the `CallFrom` precompile. The name is deliberately more specific
561
+ * than "batcher": the ubiquitous Multicall3 at
562
+ * `0xcA11bde05977b3631167028862bE2a173976CA11` has the same ABI and the same
563
+ * selectors but does **not** qualify, since each subcall would arrive as the
564
+ * Multicall3 contract, so a batched `approve` would grant an allowance from
565
+ * the batcher's own balance rather than from the user's — a field named just
566
+ * `batcher` would make that misconfiguration look valid. Leave
567
+ * `senderPreservingBatcher` unset on any chain lacking one; an unset field
568
+ * simply means callers fall back to submitting calls one at a time.
569
+ */
570
+ type KitContractType = 'bridge' | 'adapter' | 'senderPreservingBatcher';
556
571
  /**
557
572
  * Configuration for Gateway v1 contracts.
558
573
  *
@@ -1436,8 +1451,13 @@ type PreparedChainRequest = EvmPreparedChainRequest | SolanaPreparedChainRequest
1436
1451
  * Parameters for preparing an EVM contract execution.
1437
1452
  */
1438
1453
  type EvmPreparedChainRequestParams = {
1439
- /** The type of the prepared execution. */
1440
- type: 'evm';
1454
+ /**
1455
+ * The type of the prepared execution. Optional here because EVM is the
1456
+ * only chain type `Adapter.prepare()` implementations narrow their param
1457
+ * type to in practice — callers that only ever prepare EVM requests can
1458
+ * omit it rather than repeat a discriminator that never varies for them.
1459
+ */
1460
+ type?: 'evm';
1441
1461
  /** The ABI of the contract. */
1442
1462
  abi: Abi | string[];
1443
1463
  /** The address of the contract. */
@@ -2716,6 +2736,57 @@ interface EarnActionMap {
2716
2736
  readonly claimRewards: ExecuteEarnParams;
2717
2737
  }
2718
2738
 
2739
+ /** Permit standards accepted by Borrow Adapter executions. */
2740
+ declare enum BorrowPermitType {
2741
+ /** Tokens must be approved separately. */
2742
+ NONE = 0,
2743
+ /** EIP-2612 permit calldata accompanies the token input. */
2744
+ EIP2612 = 1
2745
+ }
2746
+ /** Token input forwarded by Borrow Kit to the Adapter Contract. */
2747
+ interface BorrowTokenInput {
2748
+ readonly permitType: BorrowPermitType;
2749
+ readonly token: `0x${string}`;
2750
+ readonly amount: bigint;
2751
+ readonly permitCalldata: `0x${string}`;
2752
+ }
2753
+ /** A single instruction in a Circle-signed Borrow execution. */
2754
+ interface BorrowInstruction {
2755
+ readonly target: `0x${string}`;
2756
+ readonly data: `0x${string}`;
2757
+ readonly value: string | bigint;
2758
+ readonly tokenIn: `0x${string}`;
2759
+ readonly amountToApprove: string | bigint;
2760
+ readonly tokenOut: `0x${string}`;
2761
+ readonly minTokenOut: string | bigint;
2762
+ }
2763
+ /** A token recipient in a Circle-signed Borrow execution. */
2764
+ interface BorrowTokenRecipient {
2765
+ readonly token: `0x${string}`;
2766
+ readonly beneficiary: `0x${string}`;
2767
+ }
2768
+ /** Circle-signed Borrow parameters forwarded to the Adapter Contract. */
2769
+ interface BorrowExecutionParams {
2770
+ readonly instructions: readonly BorrowInstruction[];
2771
+ readonly tokens: readonly BorrowTokenRecipient[];
2772
+ readonly execId: string | bigint;
2773
+ readonly deadline: string | bigint;
2774
+ readonly metadata: `0x${string}`;
2775
+ }
2776
+ /** Parameters for a service-signed Borrow Adapter execution. */
2777
+ interface ExecuteBorrowParams extends ActionParameters {
2778
+ readonly executeParams: BorrowExecutionParams;
2779
+ readonly tokenInputs: BorrowTokenInput[];
2780
+ readonly signature: `0x${string}`;
2781
+ }
2782
+ /** Borrow actions supported by EVM adapters. */
2783
+ interface BorrowActionMap {
2784
+ /** Execute a Circle-signed partial loan repayment. */
2785
+ readonly repay: ExecuteBorrowParams;
2786
+ /** Execute a Circle-signed borrow. */
2787
+ readonly execute: ExecuteBorrowParams;
2788
+ }
2789
+
2719
2790
  /**
2720
2791
  * Single instruction to execute within the Adapter Contract.
2721
2792
  *
@@ -3672,6 +3743,8 @@ interface NativeActionMap {
3672
3743
  * @see {@link ActionPayload} for extracting payload types
3673
3744
  */
3674
3745
  interface ActionMap {
3746
+ /** Borrow operations that execute service-signed payloads. */
3747
+ readonly borrow: BorrowActionMap;
3675
3748
  /** CCTP-specific operations with automatic address resolution. */
3676
3749
  readonly cctp: CCTPActionMap;
3677
3750
  /** CCTPx operations (CrossChainTokenService) for cross-chain transfers of registered tokens (Circle-issued or otherwise). */
@@ -3691,6 +3764,7 @@ interface ActionMap {
3691
3764
  /** Earn operations that execute service-signed payloads via the adapter contract. */
3692
3765
  readonly earn: EarnActionMap;
3693
3766
  }
3767
+
3694
3768
  /**
3695
3769
  * Determine if a type represents an action parameter object (leaf node).
3696
3770
  *
@@ -8352,8 +8426,8 @@ interface AppKitContext {
8352
8426
  *
8353
8427
  * This property stores event handlers that are registered via the AppKit's
8354
8428
  * `on()` method. Handlers are grouped by operation type. The runtime buckets
8355
- * are `bridge` and `earn`; the context can add more operation buckets as
8356
- * AppKit wires action handlers for additional kits.
8429
+ * are `bridge`, `earn`, and `borrow`; the context can add more operation
8430
+ * buckets as AppKit wires action handlers for additional kits.
8357
8431
  *
8358
8432
  * Within each operation bucket, handlers are keyed by action name (for
8359
8433
  * example, `bridge.approve` or `earn.deposit`) or `*` for wildcard handlers.
@@ -8372,13 +8446,13 @@ interface AppKitContext {
8372
8446
  * // Earn handlers are registered with EarnKit when earn operations run
8373
8447
  * ```
8374
8448
  */
8375
- actions: Record<'bridge' | 'earn', Record<string, ((payload: unknown) => void)[]>>;
8449
+ actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
8376
8450
  /**
8377
- * Disable success analytics for the underlying EarnKit, SwapKit, and
8378
- * UnifiedBalanceKit.
8451
+ * Disable success analytics for the underlying EarnKit, SwapKit,
8452
+ * BorrowKit, and UnifiedBalanceKit.
8379
8453
  *
8380
- * When `true`, completed earn, swap, and unified balance operations will not
8381
- * POST analytics events. This does not disable error reporting; use
8454
+ * When `true`, completed earn, swap, borrow, and unified balance operations
8455
+ * will not POST analytics events. This does not disable error reporting; use
8382
8456
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
8383
8457
  *
8384
8458
  * @defaultValue false
@@ -8388,7 +8462,7 @@ interface AppKitContext {
8388
8462
  * Disable error telemetry for all sub-kits.
8389
8463
  *
8390
8464
  * When `true`, none of the underlying kits (BridgeKit, SwapKit, EarnKit,
8391
- * UnifiedBalanceKit) will POST error details to the telemetry
8465
+ * BorrowKit, UnifiedBalanceKit) will POST error details to the telemetry
8392
8466
  * endpoint when operations throw. Defaults to `false` (enabled).
8393
8467
  *
8394
8468
  * @defaultValue false