@circle-fin/app-kit 1.9.0 → 1.11.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/CHANGELOG.md +60 -0
- package/bridge.cjs +691 -43
- package/bridge.d.cts +159 -11
- package/bridge.d.mts +159 -11
- package/bridge.d.ts +159 -11
- package/bridge.mjs +691 -43
- package/chains.cjs +19 -2
- package/chains.d.cts +1 -0
- package/chains.d.mts +1 -0
- package/chains.d.ts +1 -0
- package/chains.mjs +19 -2
- package/context.cjs +12 -0
- package/context.d.cts +164 -13
- package/context.d.mts +164 -13
- package/context.d.ts +164 -13
- package/context.mjs +12 -0
- package/earn.cjs +1559 -468
- package/earn.d.cts +533 -95
- package/earn.d.mts +533 -95
- package/earn.d.ts +533 -95
- package/earn.mjs +1559 -469
- package/estimateBridge.cjs +691 -43
- package/estimateBridge.d.cts +159 -11
- package/estimateBridge.d.mts +159 -11
- package/estimateBridge.d.ts +159 -11
- package/estimateBridge.mjs +691 -43
- package/estimateSwap.cjs +1065 -118
- package/estimateSwap.d.cts +159 -11
- package/estimateSwap.d.mts +159 -11
- package/estimateSwap.d.ts +159 -11
- package/estimateSwap.mjs +1065 -118
- package/index.cjs +2981 -718
- package/index.d.cts +1104 -133
- package/index.d.mts +1104 -133
- package/index.d.ts +1104 -133
- package/index.mjs +2981 -718
- package/package.json +7 -6
- package/swap.cjs +1065 -118
- package/swap.d.cts +159 -11
- package/swap.d.mts +159 -11
- package/swap.d.ts +159 -11
- package/swap.mjs +1065 -118
- package/unifiedBalance.cjs +817 -140
- package/unifiedBalance.d.cts +250 -9
- package/unifiedBalance.d.mts +250 -9
- package/unifiedBalance.d.ts +250 -9
- package/unifiedBalance.mjs +817 -140
package/index.d.mts
CHANGED
|
@@ -374,6 +374,14 @@ interface CCTPSplitConfig {
|
|
|
374
374
|
type: 'split';
|
|
375
375
|
tokenMessenger: string;
|
|
376
376
|
messageTransmitter: string;
|
|
377
|
+
/**
|
|
378
|
+
* Address of the `TokenMessengerWithFees` wrapper, when deployed on this chain.
|
|
379
|
+
*
|
|
380
|
+
* Optional. Present only on chains that support the prepaid FORWARD path
|
|
381
|
+
* (source-chain fee collection via `depositForBurnWithHookAndFees`). Resolve
|
|
382
|
+
* it with `resolveCCTPV2ContractAddress(chain, 'tokenMessengerWithFees')`.
|
|
383
|
+
*/
|
|
384
|
+
tokenMessengerWithFees?: string;
|
|
377
385
|
confirmations: number;
|
|
378
386
|
}
|
|
379
387
|
/**
|
|
@@ -394,6 +402,14 @@ interface CCTPSplitConfig {
|
|
|
394
402
|
interface CCTPMergedConfig {
|
|
395
403
|
type: 'merged';
|
|
396
404
|
contract: string;
|
|
405
|
+
/**
|
|
406
|
+
* Address of the `TokenMessengerWithFees` wrapper, when deployed on this chain.
|
|
407
|
+
*
|
|
408
|
+
* Optional. Present only on chains that support the prepaid FORWARD path
|
|
409
|
+
* (source-chain fee collection via `depositForBurnWithHookAndFees`). Resolve
|
|
410
|
+
* it with `resolveCCTPV2ContractAddress(chain, 'tokenMessengerWithFees')`.
|
|
411
|
+
*/
|
|
412
|
+
tokenMessengerWithFees?: string;
|
|
397
413
|
confirmations: number;
|
|
398
414
|
}
|
|
399
415
|
/**
|
|
@@ -528,6 +544,21 @@ interface GatewayV1Contracts {
|
|
|
528
544
|
* @example "0xabcdef1234567890abcdef1234567890abcdef12"
|
|
529
545
|
*/
|
|
530
546
|
minter: string;
|
|
547
|
+
/**
|
|
548
|
+
* The address of the `DepositForHandler` contract.
|
|
549
|
+
*
|
|
550
|
+
* @description Optional. The handler the GenericExecutor calls on this chain
|
|
551
|
+
* to run a fast cross-chain deposit into the {@link GatewayV1Contracts.wallet}.
|
|
552
|
+
* Present only on chains that are fast-deposit destinations; other Gateway
|
|
553
|
+
* chains omit it.
|
|
554
|
+
*
|
|
555
|
+
* Address format varies by blockchain:
|
|
556
|
+
* - EVM chains: 40-character hexadecimal with 0x prefix (e.g., "0x1234...")
|
|
557
|
+
* - Solana: Base58-encoded 32-byte address (e.g., "9WzDX...")
|
|
558
|
+
*
|
|
559
|
+
* @example "0xD05E7D2E7d30b92c5F17d7d0fC575fce231F1A48"
|
|
560
|
+
*/
|
|
561
|
+
depositForHandler?: string;
|
|
531
562
|
}
|
|
532
563
|
/**
|
|
533
564
|
* Versioned map of Gateway contract configurations.
|
|
@@ -1362,6 +1393,7 @@ declare const ArcTestnet: {
|
|
|
1362
1393
|
readonly v1: {
|
|
1363
1394
|
readonly wallet: "0x0077777d7EBA4688BDeF3E311b846F25870A19B9";
|
|
1364
1395
|
readonly minter: "0x0022222ABE238Cc2C7Bb1f21003F0a260052475B";
|
|
1396
|
+
readonly depositForHandler: "0xD05E7D2E7d30b92c5F17d7d0fC575fce231F1A48";
|
|
1365
1397
|
};
|
|
1366
1398
|
};
|
|
1367
1399
|
readonly forwarderSupported: {
|
|
@@ -5472,6 +5504,110 @@ interface CCTPv2ActionMap {
|
|
|
5472
5504
|
*/
|
|
5473
5505
|
hookData: string;
|
|
5474
5506
|
};
|
|
5507
|
+
/**
|
|
5508
|
+
* Initiate a prepaid cross-chain USDC transfer through the `TokenMessengerWithFees` wrapper.
|
|
5509
|
+
*
|
|
5510
|
+
* Burn USDC on the source chain while collecting all fees up front against a
|
|
5511
|
+
* signed quote. The wrapper collects the fee via `FeeManager`, then delegates
|
|
5512
|
+
* to the unmodified `TokenMessengerV2`. When `hookData` is provided (the
|
|
5513
|
+
* GenericExecutor FORWARD path) the wrapper's `depositForBurnWithHookAndFees`
|
|
5514
|
+
* contract method is used; otherwise `depositForBurnWithFees` is used.
|
|
5515
|
+
*
|
|
5516
|
+
* @remarks
|
|
5517
|
+
* SDK/contract naming: this SDK action is `depositForBurnWithFees` but, when a
|
|
5518
|
+
* `hookData` is present, it dispatches to the `depositForBurnWithHookAndFees`
|
|
5519
|
+
* contract method on `TokenMessengerWithFees` (NOT on `TokenMessengerV2`).
|
|
5520
|
+
*
|
|
5521
|
+
* Fee payment channel (must match the quote's `feeToken`):
|
|
5522
|
+
* - Native fee (`feeToken` is the zero address): exactly `feeTotalAmount` is
|
|
5523
|
+
* attached as `msg.value`.
|
|
5524
|
+
* - ERC-20 fee (e.g. USDC): no value is attached; the caller must first approve
|
|
5525
|
+
* the wrapper for `feeTotalAmount` (see the provider's fee approval helper).
|
|
5526
|
+
*
|
|
5527
|
+
* @remarks
|
|
5528
|
+
* Unlike `depositForBurn`, the `TokenMessengerWithFees` contract methods do NOT
|
|
5529
|
+
* take `maxFee` or `minFinalityThreshold` — fee and finality behavior are
|
|
5530
|
+
* derived from the signed quote — so those fields are omitted from this action.
|
|
5531
|
+
*
|
|
5532
|
+
* @example
|
|
5533
|
+
* ```typescript
|
|
5534
|
+
* await adapter.action('cctp.v2.depositForBurnWithFees', {
|
|
5535
|
+
* amount: BigInt('1000000'),
|
|
5536
|
+
* mintRecipient: executorAddress, // GenericExecutor (bytes32)
|
|
5537
|
+
* destinationCaller: executorAddress, // GenericExecutor (bytes32)
|
|
5538
|
+
* fromChain: ethereum,
|
|
5539
|
+
* toChain: arc,
|
|
5540
|
+
* hookData: geForwardHookData, // cctp-forward-wrapped GenericExecutor blob
|
|
5541
|
+
* claim: { signedQuote: '0x...', refundAddress: '0x...' },
|
|
5542
|
+
* feeToken: '0x0000000000000000000000000000000000000000', // native
|
|
5543
|
+
* feeTotalAmount: 3500000n,
|
|
5544
|
+
* })
|
|
5545
|
+
* ```
|
|
5546
|
+
*/
|
|
5547
|
+
depositForBurnWithFees: Omit<CCTPv2ActionMap['depositForBurn'], 'maxFee' | 'minFinalityThreshold'> & {
|
|
5548
|
+
/**
|
|
5549
|
+
* Optional hex-encoded hook data for the GenericExecutor FORWARD path.
|
|
5550
|
+
*
|
|
5551
|
+
* When present, the `depositForBurnWithHookAndFees` contract method is used
|
|
5552
|
+
* and the blob must be wrapped in the `cctp-forward` envelope (the wrapper
|
|
5553
|
+
* rejects a FORWARD fee quote whose hook lacks it). When omitted, the plain
|
|
5554
|
+
* `depositForBurnWithFees` contract method is used.
|
|
5555
|
+
*/
|
|
5556
|
+
hookData?: string;
|
|
5557
|
+
/**
|
|
5558
|
+
* Signed fee quote claim passed to the `TokenMessengerWithFees` wrapper.
|
|
5559
|
+
*
|
|
5560
|
+
* `signedQuote` is the `[uint8 0x01][abi.encode(Quote)]` blob returned by the
|
|
5561
|
+
* Fee Quote service; `refundAddress` receives any fee overpayment refund.
|
|
5562
|
+
*/
|
|
5563
|
+
claim: QuoteClaim;
|
|
5564
|
+
/**
|
|
5565
|
+
* Fee token from the signed quote.
|
|
5566
|
+
*
|
|
5567
|
+
* The zero address (`0x000…0`) means the fee is paid in native currency and
|
|
5568
|
+
* is attached as `msg.value`. Any other address (e.g. USDC) means an ERC-20
|
|
5569
|
+
* fee that must be approved to the wrapper beforehand. This is independent of
|
|
5570
|
+
* `burnToken`, which is always USDC.
|
|
5571
|
+
*/
|
|
5572
|
+
feeToken: string;
|
|
5573
|
+
/**
|
|
5574
|
+
* Total fee amount from the signed quote, in `feeToken` minor units.
|
|
5575
|
+
*
|
|
5576
|
+
* Firm only until the quote's `expiresAt`. For a native fee this is the exact
|
|
5577
|
+
* `msg.value`; for an ERC-20 fee this is the amount approved to the wrapper.
|
|
5578
|
+
*/
|
|
5579
|
+
feeTotalAmount: bigint;
|
|
5580
|
+
};
|
|
5581
|
+
}
|
|
5582
|
+
/**
|
|
5583
|
+
* Signed fee quote claim consumed by the `TokenMessengerWithFees` wrapper.
|
|
5584
|
+
*
|
|
5585
|
+
* Mirrors the on-chain `IFeeManager.QuoteClaim` struct.
|
|
5586
|
+
*
|
|
5587
|
+
* @example
|
|
5588
|
+
* ```typescript
|
|
5589
|
+
* const claim: QuoteClaim = {
|
|
5590
|
+
* signedQuote: '0x01...', // [uint8 0x01][abi.encode(Quote)]
|
|
5591
|
+
* refundAddress: '0xUserWallet...',
|
|
5592
|
+
* }
|
|
5593
|
+
* ```
|
|
5594
|
+
*/
|
|
5595
|
+
interface QuoteClaim {
|
|
5596
|
+
/**
|
|
5597
|
+
* Opaque signed quote bytes (`0x` hex) from the fee-quote service
|
|
5598
|
+
* (`SignedFeeQuote.signedQuote` returned by `fetchFeeQuote`). Pass verbatim;
|
|
5599
|
+
* do not decode.
|
|
5600
|
+
*
|
|
5601
|
+
* The quote binds the FORWARD fee item to the on-chain call via `argsHash`;
|
|
5602
|
+
* passing a quote that does not match the burn args reverts `QuoteArgsMismatch`.
|
|
5603
|
+
*/
|
|
5604
|
+
signedQuote: string;
|
|
5605
|
+
/**
|
|
5606
|
+
* Address that receives any refund of overpaid fees.
|
|
5607
|
+
*
|
|
5608
|
+
* Typically the user wallet that authorized the burn.
|
|
5609
|
+
*/
|
|
5610
|
+
refundAddress: string;
|
|
5475
5611
|
}
|
|
5476
5612
|
|
|
5477
5613
|
/**
|
|
@@ -8469,14 +8605,14 @@ declare const ServiceError: {
|
|
|
8469
8605
|
};
|
|
8470
8606
|
|
|
8471
8607
|
/**
|
|
8472
|
-
* Standardized error definitions for Earn
|
|
8608
|
+
* Standardized error definitions for Earn operations.
|
|
8473
8609
|
*
|
|
8474
8610
|
* These error codes provide fine-grained categorization of failures
|
|
8475
|
-
* from the
|
|
8611
|
+
* from the Earn service, enabling SDK consumers to distinguish
|
|
8476
8612
|
* between input errors (fix your request) and service errors (retry later).
|
|
8477
8613
|
*
|
|
8478
8614
|
* Error code ranges:
|
|
8479
|
-
* - 1100-
|
|
8615
|
+
* - 1100-1106: INPUT errors — invalid, unsupported, or stale request state
|
|
8480
8616
|
* - 8100-8105: SERVICE errors — retryable backend/provider failures
|
|
8481
8617
|
*
|
|
8482
8618
|
* @example
|
|
@@ -8536,6 +8672,15 @@ declare const EarnError: {
|
|
|
8536
8672
|
readonly name: "EARN_UNSUPPORTED_BRIDGE_ROUTE";
|
|
8537
8673
|
readonly type: ErrorType;
|
|
8538
8674
|
};
|
|
8675
|
+
/**
|
|
8676
|
+
* The bridge quote expired. This is an INPUT error because the prepared
|
|
8677
|
+
* request is stale and must be replaced instead of retried.
|
|
8678
|
+
*/
|
|
8679
|
+
readonly BRIDGE_QUOTE_EXPIRED: {
|
|
8680
|
+
readonly code: 1106;
|
|
8681
|
+
readonly name: "EARN_BRIDGE_QUOTE_EXPIRED";
|
|
8682
|
+
readonly type: ErrorType;
|
|
8683
|
+
};
|
|
8539
8684
|
/** The proxy signing call failed — retryable. */
|
|
8540
8685
|
readonly SIGNING_FAILED: {
|
|
8541
8686
|
readonly code: 8100;
|
|
@@ -12174,6 +12319,70 @@ interface ICCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> {
|
|
|
12174
12319
|
mint<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities>(source: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>['source'], destination: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>['destination'], attestation: AttestationMessage): Promise<PreparedChainRequest>;
|
|
12175
12320
|
}
|
|
12176
12321
|
|
|
12322
|
+
/**
|
|
12323
|
+
* An ERC-20 approval required before a prepaid-FORWARD burn.
|
|
12324
|
+
*
|
|
12325
|
+
* @example
|
|
12326
|
+
* ```typescript
|
|
12327
|
+
* const approval: FeeApproval = {
|
|
12328
|
+
* token: '0xUSDC...',
|
|
12329
|
+
* amount: 1_003_500_000n,
|
|
12330
|
+
* }
|
|
12331
|
+
* ```
|
|
12332
|
+
*/
|
|
12333
|
+
interface FeeApproval {
|
|
12334
|
+
/**
|
|
12335
|
+
* Token address to approve (the burn token and/or the ERC-20 fee token).
|
|
12336
|
+
*/
|
|
12337
|
+
token: string;
|
|
12338
|
+
/**
|
|
12339
|
+
* Amount to approve to the `TokenMessengerWithFees` wrapper, in token minor units.
|
|
12340
|
+
*/
|
|
12341
|
+
amount: bigint;
|
|
12342
|
+
}
|
|
12343
|
+
/**
|
|
12344
|
+
* The resolved fee payment channel for a prepaid-FORWARD burn.
|
|
12345
|
+
*
|
|
12346
|
+
* @example
|
|
12347
|
+
* ```typescript
|
|
12348
|
+
* const plan: FeePaymentPlan = {
|
|
12349
|
+
* isNativeFee: false,
|
|
12350
|
+
* isBurnTokenFee: true,
|
|
12351
|
+
* nativeValue: 0n,
|
|
12352
|
+
* approvals: [{ token: '0xUSDC...', amount: 1_003_500_000n }],
|
|
12353
|
+
* }
|
|
12354
|
+
* ```
|
|
12355
|
+
*/
|
|
12356
|
+
interface FeePaymentPlan {
|
|
12357
|
+
/**
|
|
12358
|
+
* True when the fee is paid in native currency (`feeToken` is the zero address).
|
|
12359
|
+
*/
|
|
12360
|
+
isNativeFee: boolean;
|
|
12361
|
+
/**
|
|
12362
|
+
* True when the fee token is the same token being burned (both USDC).
|
|
12363
|
+
*
|
|
12364
|
+
* In this case a single, combined approval covers both the burn and the fee,
|
|
12365
|
+
* so the redundant second approval is skipped.
|
|
12366
|
+
*/
|
|
12367
|
+
isBurnTokenFee: boolean;
|
|
12368
|
+
/**
|
|
12369
|
+
* Native value to attach as `msg.value`.
|
|
12370
|
+
*
|
|
12371
|
+
* Exactly `feeTotalAmount` for a native fee; `0n` for an ERC-20 fee.
|
|
12372
|
+
*/
|
|
12373
|
+
nativeValue: bigint;
|
|
12374
|
+
/**
|
|
12375
|
+
* ERC-20 approvals required before the burn, each to the `TokenMessengerWithFees`
|
|
12376
|
+
* wrapper.
|
|
12377
|
+
*
|
|
12378
|
+
* - Native fee: a single approval of `amount` for the burn token.
|
|
12379
|
+
* - ERC-20 fee equal to the burn token: a single approval of `amount + feeTotalAmount`.
|
|
12380
|
+
* - ERC-20 fee different from the burn token: two approvals — `amount` for the
|
|
12381
|
+
* burn token and `feeTotalAmount` for the fee token.
|
|
12382
|
+
*/
|
|
12383
|
+
approvals: FeeApproval[];
|
|
12384
|
+
}
|
|
12385
|
+
|
|
12177
12386
|
/**
|
|
12178
12387
|
* Configuration options for the CCTP v2 provider.
|
|
12179
12388
|
*
|
|
@@ -12203,6 +12412,81 @@ interface CCTPV2Config {
|
|
|
12203
12412
|
*/
|
|
12204
12413
|
headers?: Record<string, string>;
|
|
12205
12414
|
}
|
|
12415
|
+
/**
|
|
12416
|
+
* Parameters for a prepaid-FORWARD burn via {@link CCTPV2BridgingProvider.burnWithFees}.
|
|
12417
|
+
*
|
|
12418
|
+
* @typeParam TFromAdapterCapabilities - The source adapter's capabilities.
|
|
12419
|
+
*/
|
|
12420
|
+
interface BurnWithFeesParams<TFromAdapterCapabilities extends AdapterCapabilities = AdapterCapabilities> {
|
|
12421
|
+
/**
|
|
12422
|
+
* Source wallet context (adapter + CCTP v2 source chain).
|
|
12423
|
+
*/
|
|
12424
|
+
source: WalletContext<TFromAdapterCapabilities, ChainDefinitionWithCCTPv2>;
|
|
12425
|
+
/**
|
|
12426
|
+
* Destination chain definition (provides the destination CCTP domain).
|
|
12427
|
+
*/
|
|
12428
|
+
destinationChain: ChainDefinitionWithCCTPv2;
|
|
12429
|
+
/**
|
|
12430
|
+
* Amount of USDC to burn, in minor units.
|
|
12431
|
+
*/
|
|
12432
|
+
amount: string | bigint;
|
|
12433
|
+
/**
|
|
12434
|
+
* The GenericExecutor address on the destination chain.
|
|
12435
|
+
*
|
|
12436
|
+
* Used for BOTH `mintRecipient` and `destinationCaller` (padded to bytes32 by
|
|
12437
|
+
* the underlying action): the executor mints to itself and is the only account
|
|
12438
|
+
* allowed to complete the transfer.
|
|
12439
|
+
*/
|
|
12440
|
+
executor: string;
|
|
12441
|
+
/**
|
|
12442
|
+
* The `cctp-forward`-wrapped GenericExecutor hookData blob.
|
|
12443
|
+
*
|
|
12444
|
+
* Produced with `@core/utils`: wrap the bare blob from
|
|
12445
|
+
* `buildDepositForGenericExecutorPayload(...).hookData` with
|
|
12446
|
+
* `buildForwardingHookDataWithPayload(version, bareBlob)`. It must begin with
|
|
12447
|
+
* the `cctp-forward` frame, or the wrapper reverts `ForwardFeeWithoutHook`.
|
|
12448
|
+
*
|
|
12449
|
+
* Pass the SAME wrapped bytes here that were bound to the FORWARD fee quote
|
|
12450
|
+
* (`fetchFeeQuote` FORWARD `params.hookData`); mismatched bytes revert
|
|
12451
|
+
* `QuoteArgsMismatch`. Do not pass the bare (`circle-generic-executor`) blob.
|
|
12452
|
+
*/
|
|
12453
|
+
hookData: string;
|
|
12454
|
+
/**
|
|
12455
|
+
* Signed fee quote claim (`{ signedQuote, refundAddress }`).
|
|
12456
|
+
*/
|
|
12457
|
+
claim: QuoteClaim;
|
|
12458
|
+
/**
|
|
12459
|
+
* Fee token from the quote. The zero address denotes a native fee.
|
|
12460
|
+
*/
|
|
12461
|
+
feeToken: string;
|
|
12462
|
+
/**
|
|
12463
|
+
* Total fee amount from the quote, in `feeToken` minor units.
|
|
12464
|
+
*/
|
|
12465
|
+
feeTotalAmount: string | bigint;
|
|
12466
|
+
}
|
|
12467
|
+
/**
|
|
12468
|
+
* Result of {@link CCTPV2BridgingProvider.burnWithFees}.
|
|
12469
|
+
*
|
|
12470
|
+
* The prepared requests are returned unexecuted; the caller executes the
|
|
12471
|
+
* approvals first (in order) and then the burn.
|
|
12472
|
+
*/
|
|
12473
|
+
interface BurnWithFeesResult {
|
|
12474
|
+
/**
|
|
12475
|
+
* ERC-20 approvals to the `TokenMessengerWithFees` wrapper required before the
|
|
12476
|
+
* burn. Always contains at least one entry: the burn-token approval. A
|
|
12477
|
+
* distinct fee-token approval is added only when the fee token differs from
|
|
12478
|
+
* the burn token and is not the native token.
|
|
12479
|
+
*/
|
|
12480
|
+
approvals: PreparedChainRequest[];
|
|
12481
|
+
/**
|
|
12482
|
+
* The prepared `depositForBurnWithHookAndFees` burn transaction.
|
|
12483
|
+
*/
|
|
12484
|
+
burn: PreparedChainRequest;
|
|
12485
|
+
/**
|
|
12486
|
+
* The resolved fee payment plan (native value, approvals, and flags).
|
|
12487
|
+
*/
|
|
12488
|
+
feePayment: FeePaymentPlan;
|
|
12489
|
+
}
|
|
12206
12490
|
/**
|
|
12207
12491
|
* Concrete implementation of BridgingProvider for Circle's Cross-Chain Transfer Protocol (CCTP) version 2.
|
|
12208
12492
|
*
|
|
@@ -12711,6 +12995,57 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
|
|
|
12711
12995
|
* ```
|
|
12712
12996
|
*/
|
|
12713
12997
|
burn<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities>(params: BridgeParams$1<TFromAdapterCapabilities, TToAdapterCapabilities>): Promise<PreparedChainRequest>;
|
|
12998
|
+
/**
|
|
12999
|
+
* Prepare a prepaid-FORWARD burn through the `TokenMessengerWithFees` wrapper.
|
|
13000
|
+
*
|
|
13001
|
+
* Builds the source-chain `depositForBurnWithHookAndFees` call for the
|
|
13002
|
+
* GenericExecutor FORWARD path: fees are collected up front on the source chain
|
|
13003
|
+
* against a signed quote, `mintRecipient` and `destinationCaller` are both set to
|
|
13004
|
+
* the GenericExecutor, and the GE `hookData` is passed through unchanged.
|
|
13005
|
+
*
|
|
13006
|
+
* This is the low-level on-chain primitive behind the UBK `fastCrossChainDeposit`
|
|
13007
|
+
* and Bridge Kit `bridge({ deposit })` flows. The `hookData` and signed-quote
|
|
13008
|
+
* `claim` are produced elsewhere and passed in here:
|
|
13009
|
+
* - `hookData`: `buildForwardingHookDataWithPayload(version,
|
|
13010
|
+
* buildDepositForGenericExecutorPayload(...).hookData)` from `@core/utils`.
|
|
13011
|
+
* - `claim.signedQuote` / `feeToken` / `feeTotalAmount`: from `fetchFeeQuote`
|
|
13012
|
+
* (`@circle-fin/provider-fee-v1`), whose FORWARD item must be bound to the
|
|
13013
|
+
* SAME `hookData` and executor `destinationCaller` used here.
|
|
13014
|
+
*
|
|
13015
|
+
* The returned approvals and burn are NOT executed — the caller executes the
|
|
13016
|
+
* approvals first (in order) and then the burn. The fee payment channel matches
|
|
13017
|
+
* the quote's `feeToken`:
|
|
13018
|
+
* - Native fee: exactly `feeTotalAmount` is attached as the burn's `msg.value`;
|
|
13019
|
+
* only the burn amount is approved.
|
|
13020
|
+
* - USDC fee (same token as the burn): a single combined `amount + feeTotalAmount`
|
|
13021
|
+
* approval covers both; the redundant second approval is skipped.
|
|
13022
|
+
*
|
|
13023
|
+
* @typeParam TFromAdapterCapabilities - The source adapter's capabilities.
|
|
13024
|
+
* @param params - The burn amount, executor, hookData, signed-quote claim, and fee.
|
|
13025
|
+
* @returns The prepared approvals, the prepared burn, and the resolved fee plan.
|
|
13026
|
+
* @throws {KitError} If the wallet context is invalid, `destinationChain` does not
|
|
13027
|
+
* support CCTP v2, the executor is missing, `amount` or `feeTotalAmount` is not
|
|
13028
|
+
* a bigint or a numeric string coercible to bigint, the hookData lacks a
|
|
13029
|
+
* `cctp-forward` frame (guaranteed `ForwardFeeWithoutHook`), or the operation
|
|
13030
|
+
* context cannot be resolved.
|
|
13031
|
+
*
|
|
13032
|
+
* @example
|
|
13033
|
+
* ```typescript
|
|
13034
|
+
* const { approvals, burn } = await provider.burnWithFees({
|
|
13035
|
+
* source,
|
|
13036
|
+
* destinationChain: Arc,
|
|
13037
|
+
* amount: 1_000_000n,
|
|
13038
|
+
* executor: genericExecutorAddress,
|
|
13039
|
+
* hookData: geForwardHookData,
|
|
13040
|
+
* claim: { signedQuote: '0x01...', refundAddress: userAddress },
|
|
13041
|
+
* feeToken: '0x0000000000000000000000000000000000000000', // native
|
|
13042
|
+
* feeTotalAmount: 3_500_000n,
|
|
13043
|
+
* })
|
|
13044
|
+
* for (const approval of approvals) await approval.execute()
|
|
13045
|
+
* const txHash = await burn.execute()
|
|
13046
|
+
* ```
|
|
13047
|
+
*/
|
|
13048
|
+
burnWithFees<TFromAdapterCapabilities extends AdapterCapabilities = AdapterCapabilities>(params: BurnWithFeesParams<TFromAdapterCapabilities>): Promise<BurnWithFeesResult>;
|
|
12714
13049
|
/**
|
|
12715
13050
|
* Waits for a transaction to be mined and confirmed on the blockchain.
|
|
12716
13051
|
*
|
|
@@ -13553,6 +13888,29 @@ interface ServiceSwapConfig {
|
|
|
13553
13888
|
* @example 'lifi', 'paraswap'
|
|
13554
13889
|
*/
|
|
13555
13890
|
provider?: string;
|
|
13891
|
+
/**
|
|
13892
|
+
* Whether to fuse the ERC-20 approval and the swap into a single atomic
|
|
13893
|
+
* batch when the adapter supports it (EIP-5792, or a signing strategy that
|
|
13894
|
+
* declares atomic batching).
|
|
13895
|
+
*
|
|
13896
|
+
* @remarks
|
|
13897
|
+
* Defaults to `true`. When batching is available this collapses the two
|
|
13898
|
+
* sequential transactions of the on-chain approval path into one atomic
|
|
13899
|
+
* submission — a single signing challenge for a smart-contract wallet. Set
|
|
13900
|
+
* to `false` to force the sequential approve-then-swap path. Has no effect on
|
|
13901
|
+
* the gasless permit path (already a single transaction) or on native-token
|
|
13902
|
+
* swaps (no approval needed).
|
|
13903
|
+
*
|
|
13904
|
+
* The batch path relies on the wallet's own gas estimation for the swap call:
|
|
13905
|
+
* the service-provided gas floor and pre-flight simulation that the sequential
|
|
13906
|
+
* path applies are not conveyed through the batch. For a complex/multi-hop
|
|
13907
|
+
* swap whose wallet-side estimate under-shoots, this can out-of-gas-revert the
|
|
13908
|
+
* atomic batch where the sequential path would succeed — set `false` to fall
|
|
13909
|
+
* back to the service-floored sequential path if you hit this.
|
|
13910
|
+
*
|
|
13911
|
+
* @defaultValue true
|
|
13912
|
+
*/
|
|
13913
|
+
batchTransactions?: boolean;
|
|
13556
13914
|
}
|
|
13557
13915
|
/**
|
|
13558
13916
|
* Parameters for initiating a swap operation through the Stablecoin Service.
|
|
@@ -13880,6 +14238,17 @@ interface SwapResult$1 {
|
|
|
13880
14238
|
* The transaction hash for the executed swap.
|
|
13881
14239
|
*/
|
|
13882
14240
|
readonly txHash: string;
|
|
14241
|
+
/**
|
|
14242
|
+
* Per-swap correlation id echoed back by the service (a UUID).
|
|
14243
|
+
*
|
|
14244
|
+
* @remarks
|
|
14245
|
+
* Attached to success telemetry so a swap can be correlated across records.
|
|
14246
|
+
* Present when the service response exposes it — currently every chain
|
|
14247
|
+
* (EVM + Solana); undefined only against an older service that omits it.
|
|
14248
|
+
* Internal telemetry detail — not part of the developer-facing result.
|
|
14249
|
+
* @internal
|
|
14250
|
+
*/
|
|
14251
|
+
readonly correlationId?: string;
|
|
13883
14252
|
/**
|
|
13884
14253
|
* Array of all transactions executed during the swap operation.
|
|
13885
14254
|
*
|
|
@@ -14987,9 +15356,10 @@ interface SwapDestinationLeg {
|
|
|
14987
15356
|
* Parameters for {@link SwapKit.getSwapStatus}.
|
|
14988
15357
|
*
|
|
14989
15358
|
* @remarks
|
|
14990
|
-
* Only `txHash
|
|
14991
|
-
* when the original swap was cross-chain
|
|
14992
|
-
* chain)
|
|
15359
|
+
* Only `txHash` and `chainIn` are required; `chainOut` and `kitKey` are
|
|
15360
|
+
* optional. Supply `chainOut` when the original swap was cross-chain
|
|
15361
|
+
* (source chain ≠ destination chain); omit `kitKey` to call in
|
|
15362
|
+
* permissionless mode.
|
|
14993
15363
|
*
|
|
14994
15364
|
* The field names mirror {@link SwapResult.chainIn} / {@link
|
|
14995
15365
|
* SwapResult.chainOut} so consumers can pipe a `SwapResult` straight into
|
|
@@ -15004,11 +15374,11 @@ interface SwapDestinationLeg {
|
|
|
15004
15374
|
* ```typescript
|
|
15005
15375
|
* const result = await kit.swap(params)
|
|
15006
15376
|
*
|
|
15377
|
+
* // Permissionless — no kit key needed. Pass `kitKey` to authenticate.
|
|
15007
15378
|
* let status = await kit.getSwapStatus({
|
|
15008
15379
|
* txHash: result.txHash,
|
|
15009
15380
|
* chainIn: result.chainIn,
|
|
15010
15381
|
* chainOut: result.chainOut,
|
|
15011
|
-
* kitKey: process.env.KIT_KEY ?? '',
|
|
15012
15382
|
* })
|
|
15013
15383
|
* while (status.progress.status === 'PENDING') {
|
|
15014
15384
|
* await new Promise((r) => setTimeout(r, 3_000))
|
|
@@ -15016,7 +15386,6 @@ interface SwapDestinationLeg {
|
|
|
15016
15386
|
* txHash: result.txHash,
|
|
15017
15387
|
* chainIn: result.chainIn,
|
|
15018
15388
|
* chainOut: result.chainOut,
|
|
15019
|
-
* kitKey: process.env.KIT_KEY ?? '',
|
|
15020
15389
|
* })
|
|
15021
15390
|
* }
|
|
15022
15391
|
* ```
|
|
@@ -15044,8 +15413,11 @@ interface GetSwapStatusParams {
|
|
|
15044
15413
|
/**
|
|
15045
15414
|
* Stablecoin Service Kit Key used as a bearer credential for the status
|
|
15046
15415
|
* request. Treat this value as a secret and do not log it.
|
|
15416
|
+
*
|
|
15417
|
+
* Optional — when omitted, the request is made without an `Authorization`
|
|
15418
|
+
* header (permissionless mode).
|
|
15047
15419
|
*/
|
|
15048
|
-
kitKey
|
|
15420
|
+
kitKey?: string;
|
|
15049
15421
|
}
|
|
15050
15422
|
/**
|
|
15051
15423
|
* Result of a swap status lookup — a single snapshot of the swap's state at
|
|
@@ -15093,8 +15465,11 @@ interface WaitForSwapCommonParams {
|
|
|
15093
15465
|
/**
|
|
15094
15466
|
* Stablecoin Service Kit Key used as a bearer credential. Treat as a
|
|
15095
15467
|
* secret and do not log it.
|
|
15468
|
+
*
|
|
15469
|
+
* Optional — when omitted, the request is made without an `Authorization`
|
|
15470
|
+
* header (permissionless mode).
|
|
15096
15471
|
*/
|
|
15097
|
-
readonly kitKey
|
|
15472
|
+
readonly kitKey?: string;
|
|
15098
15473
|
/**
|
|
15099
15474
|
* Overall wait budget, in milliseconds. The promise rejects with a
|
|
15100
15475
|
* RETRYABLE {@link KitError} when this elapses without a terminal
|
|
@@ -15255,8 +15630,11 @@ interface GetTokenRatesParams {
|
|
|
15255
15630
|
/**
|
|
15256
15631
|
* Stablecoin Service Kit Key used as a bearer credential for the rates
|
|
15257
15632
|
* request. Treat this value as a secret and do not log it.
|
|
15633
|
+
*
|
|
15634
|
+
* Optional — when omitted, the request is made without an `Authorization`
|
|
15635
|
+
* header (permissionless mode).
|
|
15258
15636
|
*/
|
|
15259
|
-
kitKey
|
|
15637
|
+
kitKey?: string;
|
|
15260
15638
|
}
|
|
15261
15639
|
/**
|
|
15262
15640
|
* Result of a token rates lookup.
|
|
@@ -15420,6 +15798,19 @@ interface SwapKitConfig<TExtraProviders extends FlexibleSwappingProvider[] = []>
|
|
|
15420
15798
|
* for all swaps executed through the created context.
|
|
15421
15799
|
*/
|
|
15422
15800
|
customFeePolicy?: CustomFeePolicy$1;
|
|
15801
|
+
/**
|
|
15802
|
+
* Disable success/analytics telemetry.
|
|
15803
|
+
*
|
|
15804
|
+
* When `true`, the SDK will not POST success telemetry (the `swap_swap`
|
|
15805
|
+
* volume-attribution event emitted after a successful swap). Independent of
|
|
15806
|
+
* {@link SwapKitConfig.disableErrorReporting}, so analytics can be opted out
|
|
15807
|
+
* without silencing error reports. The events carry SDK metadata and
|
|
15808
|
+
* allowlisted operation context (chains, token symbols, txHash, correlation
|
|
15809
|
+
* id); they do not include wallet addresses or amounts. Defaults to `false`.
|
|
15810
|
+
*
|
|
15811
|
+
* @defaultValue false
|
|
15812
|
+
*/
|
|
15813
|
+
disableAnalytics?: boolean;
|
|
15423
15814
|
/**
|
|
15424
15815
|
* Disable error telemetry.
|
|
15425
15816
|
*
|
|
@@ -15431,6 +15822,30 @@ interface SwapKitConfig<TExtraProviders extends FlexibleSwappingProvider[] = []>
|
|
|
15431
15822
|
disableErrorReporting?: boolean;
|
|
15432
15823
|
}
|
|
15433
15824
|
|
|
15825
|
+
/** @internal */
|
|
15826
|
+
declare const bridgeQuoteExpirySchema: z.ZodCatch<z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
15827
|
+
mode: z.ZodLiteral<"TIMESTAMP">;
|
|
15828
|
+
expiresAt: z.ZodString;
|
|
15829
|
+
}, "strip", z.ZodTypeAny, {
|
|
15830
|
+
mode: "TIMESTAMP";
|
|
15831
|
+
expiresAt: string;
|
|
15832
|
+
}, {
|
|
15833
|
+
mode: "TIMESTAMP";
|
|
15834
|
+
expiresAt: string;
|
|
15835
|
+
}>, z.ZodObject<{
|
|
15836
|
+
mode: z.ZodLiteral<"BLOCK_NUMBER">;
|
|
15837
|
+
expiresAtBlock: z.ZodNumber;
|
|
15838
|
+
blockEstimatedAt: z.ZodOptional<z.ZodString>;
|
|
15839
|
+
}, "strip", z.ZodTypeAny, {
|
|
15840
|
+
mode: "BLOCK_NUMBER";
|
|
15841
|
+
expiresAtBlock: number;
|
|
15842
|
+
blockEstimatedAt?: string | undefined;
|
|
15843
|
+
}, {
|
|
15844
|
+
mode: "BLOCK_NUMBER";
|
|
15845
|
+
expiresAtBlock: number;
|
|
15846
|
+
blockEstimatedAt?: string | undefined;
|
|
15847
|
+
}>]>>>;
|
|
15848
|
+
|
|
15434
15849
|
/**
|
|
15435
15850
|
* Configuration options for the Earn Service provider.
|
|
15436
15851
|
*
|
|
@@ -15504,6 +15919,7 @@ interface VaultRewardInfo {
|
|
|
15504
15919
|
* assetAddress: '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf',
|
|
15505
15920
|
* lltv: 0.86,
|
|
15506
15921
|
* supplyUsd: 50000000.25,
|
|
15922
|
+
* allocationPct: 0.6,
|
|
15507
15923
|
* }
|
|
15508
15924
|
* ```
|
|
15509
15925
|
*/
|
|
@@ -15516,6 +15932,17 @@ interface CollateralInfo {
|
|
|
15516
15932
|
readonly lltv: number;
|
|
15517
15933
|
/** Approximate supplied value in USD, e.g. 50000000.25 for $50,000,000.25. */
|
|
15518
15934
|
readonly supplyUsd: number;
|
|
15935
|
+
/**
|
|
15936
|
+
* Share of the vault's supply allocated to this collateral market
|
|
15937
|
+
* (e.g., 0.6 = 60%).
|
|
15938
|
+
*
|
|
15939
|
+
* Populated for Morpho V1 vaults; `null` when the underlying product
|
|
15940
|
+
* exposes no per-market allocation (e.g. Morpho V2). Optional for now — a
|
|
15941
|
+
* backend that predates this field omits it entirely, matching the other
|
|
15942
|
+
* optional facets on {@link EarnOpportunityBase}; a future release makes it
|
|
15943
|
+
* required once every backend emits it.
|
|
15944
|
+
*/
|
|
15945
|
+
readonly allocationPct?: number | null | undefined;
|
|
15519
15946
|
}
|
|
15520
15947
|
/**
|
|
15521
15948
|
* Vault warning from the underlying earn protocol.
|
|
@@ -15535,65 +15962,253 @@ interface VaultWarning {
|
|
|
15535
15962
|
readonly level: 'YELLOW' | 'RED';
|
|
15536
15963
|
}
|
|
15537
15964
|
/**
|
|
15538
|
-
*
|
|
15965
|
+
* Manager (e.g., curator) responsible for a yield opportunity.
|
|
15966
|
+
*
|
|
15967
|
+
* Generalizes Morpho's "curator". `null` on the opportunity when the
|
|
15968
|
+
* underlying product has no per-opportunity manager (e.g., a pooled
|
|
15969
|
+
* lending market).
|
|
15539
15970
|
*
|
|
15540
15971
|
* @example
|
|
15541
15972
|
* ```typescript
|
|
15542
|
-
* const
|
|
15543
|
-
*
|
|
15544
|
-
*
|
|
15545
|
-
*
|
|
15546
|
-
*
|
|
15547
|
-
*
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
|
|
15973
|
+
* const manager: ManagerInfo = {
|
|
15974
|
+
* name: 'Steakhouse',
|
|
15975
|
+
* address: '0x...',
|
|
15976
|
+
* type: 'curator',
|
|
15977
|
+
* }
|
|
15978
|
+
* ```
|
|
15979
|
+
*/
|
|
15980
|
+
interface ManagerInfo {
|
|
15981
|
+
/** Human-readable manager name. */
|
|
15982
|
+
readonly name: string;
|
|
15983
|
+
/** On-chain manager address, when the product exposes one. */
|
|
15984
|
+
readonly address?: string | undefined;
|
|
15985
|
+
/**
|
|
15986
|
+
* Manager role within the product. Only `'curator'` is emitted today
|
|
15987
|
+
* (Morpho V1/V2); additional roles are added as the providers that emit
|
|
15988
|
+
* them land.
|
|
15989
|
+
*/
|
|
15990
|
+
readonly type: 'curator';
|
|
15991
|
+
}
|
|
15992
|
+
/**
|
|
15993
|
+
* Yield profile for an opportunity, including trailing averages.
|
|
15994
|
+
*
|
|
15995
|
+
* `current` is always present; trailing and native values are `null` when
|
|
15996
|
+
* unavailable for this instance (e.g., a vault younger than the lookback
|
|
15997
|
+
* window). `source`/`asOf` carry provenance for derived/staleness-prone
|
|
15998
|
+
* values.
|
|
15999
|
+
*
|
|
16000
|
+
* @example
|
|
16001
|
+
* ```typescript
|
|
16002
|
+
* const apyProfile: ApyProfile = {
|
|
16003
|
+
* current: 0.085,
|
|
16004
|
+
* native: 0.071,
|
|
16005
|
+
* d7: 0.082,
|
|
16006
|
+
* d30: 0.079,
|
|
16007
|
+
* d90: 0.081,
|
|
16008
|
+
* rewardShare: 0.16,
|
|
16009
|
+
* source: 'morpho:avgNetApy',
|
|
16010
|
+
* asOf: '2026-06-23T18:00:00Z',
|
|
16011
|
+
* }
|
|
16012
|
+
* ```
|
|
16013
|
+
*/
|
|
16014
|
+
interface ApyProfile {
|
|
16015
|
+
/** Current total APY including rewards. */
|
|
16016
|
+
readonly current: number;
|
|
16017
|
+
/** Native APY excluding reward incentives; `null` when unavailable. */
|
|
16018
|
+
readonly native: number | null;
|
|
16019
|
+
/** Trailing 7-day average net APY; `null` when unavailable. */
|
|
16020
|
+
readonly d7: number | null;
|
|
16021
|
+
/** Trailing 30-day average net APY; `null` when unavailable. */
|
|
16022
|
+
readonly d30: number | null;
|
|
16023
|
+
/** Trailing 90-day average net APY; `null` when unavailable. */
|
|
16024
|
+
readonly d90: number | null;
|
|
16025
|
+
/** Share of current APY attributable to rewards; `null` when unavailable. */
|
|
16026
|
+
readonly rewardShare: number | null;
|
|
16027
|
+
/** Provenance of the trailing values (`native` or `circle:<source>`). */
|
|
16028
|
+
readonly source?: string | undefined;
|
|
16029
|
+
/** RFC3339 timestamp of the newest input used for the trailing values. */
|
|
16030
|
+
readonly asOf?: string | undefined;
|
|
16031
|
+
}
|
|
16032
|
+
/**
|
|
16033
|
+
* Fee split for an opportunity.
|
|
16034
|
+
*
|
|
16035
|
+
* Each component is `null` when the product does not levy it (e.g., Morpho
|
|
16036
|
+
* V1 vaults have no management fee).
|
|
16037
|
+
*
|
|
16038
|
+
* @example
|
|
16039
|
+
* ```typescript
|
|
16040
|
+
* const fee: FeeInfo = { performance: 0.1, management: null }
|
|
16041
|
+
* ```
|
|
16042
|
+
*/
|
|
16043
|
+
interface FeeInfo {
|
|
16044
|
+
/** Performance fee as a decimal (e.g., 0.1 = 10%); `null` when unavailable. */
|
|
16045
|
+
readonly performance: number | null;
|
|
16046
|
+
/** Management fee as a decimal; `null` when unavailable. */
|
|
16047
|
+
readonly management: number | null;
|
|
16048
|
+
}
|
|
16049
|
+
/**
|
|
16050
|
+
* Liquidity profile for an opportunity.
|
|
16051
|
+
*
|
|
16052
|
+
* @example
|
|
16053
|
+
* ```typescript
|
|
16054
|
+
* const liquidityProfile: LiquidityProfile = {
|
|
16055
|
+
* totalDeposits: Amount.fromJSON({ raw: '45000000000000', decimals: 6 }),
|
|
16056
|
+
* available: Amount.fromJSON({ raw: '5200000000000', decimals: 6 }),
|
|
16057
|
+
* totalSupply: Amount.fromJSON({ raw: '44900000000000000000', decimals: 18 }),
|
|
15556
16058
|
* status: 'active',
|
|
15557
|
-
* circleGuarded: false,
|
|
15558
16059
|
* }
|
|
15559
16060
|
* ```
|
|
15560
16061
|
*/
|
|
15561
|
-
interface
|
|
15562
|
-
/**
|
|
15563
|
-
readonly
|
|
15564
|
-
/**
|
|
16062
|
+
interface LiquidityProfile {
|
|
16063
|
+
/** Total value deposited in base-unit amount form. */
|
|
16064
|
+
readonly totalDeposits: Amount;
|
|
16065
|
+
/** Available liquidity in base-unit amount form. */
|
|
16066
|
+
readonly available: Amount;
|
|
16067
|
+
/** Outstanding vault share tokens (ERC4626 totalSupply) in base-unit form. */
|
|
16068
|
+
readonly totalSupply: Amount;
|
|
16069
|
+
/** Current liquidity status. */
|
|
16070
|
+
readonly status: 'active' | 'low_liquidity';
|
|
16071
|
+
}
|
|
16072
|
+
/**
|
|
16073
|
+
* Risk signals for an opportunity.
|
|
16074
|
+
*
|
|
16075
|
+
* @example
|
|
16076
|
+
* ```typescript
|
|
16077
|
+
* const riskSignals: RiskSignals = {
|
|
16078
|
+
* circleSentinel: true,
|
|
16079
|
+
* warnings: [],
|
|
16080
|
+
* earnKitWarnings: [],
|
|
16081
|
+
* }
|
|
16082
|
+
* ```
|
|
16083
|
+
*/
|
|
16084
|
+
interface RiskSignals {
|
|
16085
|
+
/** Whether the opportunity is covered by Circle Sentinel. */
|
|
16086
|
+
readonly circleSentinel: boolean;
|
|
16087
|
+
/** Protocol warnings for this opportunity. */
|
|
16088
|
+
readonly warnings?: readonly VaultWarning[] | undefined;
|
|
16089
|
+
/** Circle-specific warnings (e.g., unsupported reward protocol). */
|
|
16090
|
+
readonly earnKitWarnings?: readonly string[] | undefined;
|
|
16091
|
+
}
|
|
16092
|
+
/**
|
|
16093
|
+
* Facets common to every earn opportunity, plus the deprecated flat
|
|
16094
|
+
* fields retained for backward compatibility.
|
|
16095
|
+
*
|
|
16096
|
+
* The flat aliases are emitted by the backend alongside the nested facets
|
|
16097
|
+
* and mapped straight through, so existing consumers keep reading them until
|
|
16098
|
+
* they are removed in a future major release. Narrow on
|
|
16099
|
+
* {@link EarnOpportunity.productType} to access product-specific fields.
|
|
16100
|
+
*/
|
|
16101
|
+
interface EarnOpportunityBase {
|
|
16102
|
+
/** Blockchain where the opportunity is deployed. */
|
|
15565
16103
|
readonly chain: `${EarnChain}`;
|
|
15566
|
-
/** Human-readable
|
|
16104
|
+
/** Human-readable opportunity name. */
|
|
15567
16105
|
readonly name: string;
|
|
15568
|
-
/**
|
|
16106
|
+
/** Protocol identifier. */
|
|
15569
16107
|
readonly protocol: string;
|
|
15570
16108
|
/** Underlying deposit asset symbol (e.g., 'USDC'). */
|
|
15571
16109
|
readonly asset: string;
|
|
15572
16110
|
/** Underlying deposit asset contract address. */
|
|
15573
16111
|
readonly assetAddress: string;
|
|
15574
|
-
/**
|
|
16112
|
+
/** Reward tokens distributed by this opportunity. */
|
|
16113
|
+
readonly rewards: readonly VaultRewardInfo[];
|
|
16114
|
+
/** Primary on-chain address (protocol-neutral; replaces vaultAddress). */
|
|
16115
|
+
readonly address?: string | undefined;
|
|
16116
|
+
/** RFC3339 freshness timestamp: provider state ts, else cache sync time. */
|
|
16117
|
+
readonly asOf?: string | undefined;
|
|
16118
|
+
/** Manager/curator identity; `null` when the product has no manager. */
|
|
16119
|
+
readonly manager?: ManagerInfo | null | undefined;
|
|
16120
|
+
/** Yield profile including trailing averages. */
|
|
16121
|
+
readonly apyProfile?: ApyProfile | undefined;
|
|
16122
|
+
/** Fee split. */
|
|
16123
|
+
readonly fee?: FeeInfo | undefined;
|
|
16124
|
+
/** Liquidity profile. */
|
|
16125
|
+
readonly liquidityProfile?: LiquidityProfile | undefined;
|
|
16126
|
+
/** Risk signals. */
|
|
16127
|
+
readonly riskSignals?: RiskSignals | undefined;
|
|
16128
|
+
/** @deprecated use {@link EarnOpportunityBase.address} */
|
|
16129
|
+
readonly vaultAddress: string;
|
|
16130
|
+
/** @deprecated use {@link ApyProfile.current} via apyProfile */
|
|
15575
16131
|
readonly currentApy: number;
|
|
15576
|
-
/**
|
|
16132
|
+
/** @deprecated use {@link ApyProfile.native} via apyProfile */
|
|
15577
16133
|
readonly nativeApy: number;
|
|
15578
|
-
/**
|
|
16134
|
+
/** @deprecated use {@link FeeInfo.performance} via fee */
|
|
15579
16135
|
readonly vaultFee: number;
|
|
15580
|
-
/**
|
|
15581
|
-
readonly rewards: readonly VaultRewardInfo[];
|
|
15582
|
-
/** Collateral markets backing this vault. */
|
|
15583
|
-
readonly collateral: readonly CollateralInfo[];
|
|
15584
|
-
/** Total value deposited in base-unit amount form. */
|
|
16136
|
+
/** @deprecated use {@link LiquidityProfile.totalDeposits} via liquidityProfile */
|
|
15585
16137
|
readonly totalDeposits: Amount;
|
|
15586
|
-
/**
|
|
16138
|
+
/** @deprecated use {@link LiquidityProfile.available} via liquidityProfile */
|
|
15587
16139
|
readonly liquidity: Amount;
|
|
15588
|
-
/**
|
|
16140
|
+
/** @deprecated use {@link LiquidityProfile.status} via liquidityProfile */
|
|
15589
16141
|
readonly status: 'active' | 'low_liquidity';
|
|
15590
|
-
/**
|
|
16142
|
+
/** @deprecated use {@link RiskSignals.circleSentinel} via riskSignals */
|
|
15591
16143
|
readonly circleGuarded: boolean;
|
|
15592
|
-
/**
|
|
16144
|
+
/** @deprecated use {@link RiskSignals.warnings} via riskSignals */
|
|
15593
16145
|
readonly warnings?: readonly VaultWarning[] | undefined;
|
|
15594
|
-
/**
|
|
16146
|
+
/** @deprecated use {@link RiskSignals.earnKitWarnings} via riskSignals */
|
|
15595
16147
|
readonly earnKitWarnings?: readonly string[] | undefined;
|
|
15596
16148
|
}
|
|
16149
|
+
/**
|
|
16150
|
+
* A yield-bearing vault opportunity (`productType: 'vault'`).
|
|
16151
|
+
*
|
|
16152
|
+
* Carries the universal {@link EarnOpportunityBase} facets plus the
|
|
16153
|
+
* vault-specific `collateral` markets.
|
|
16154
|
+
*
|
|
16155
|
+
* @example
|
|
16156
|
+
* ```typescript
|
|
16157
|
+
* const vault: VaultOpportunity = {
|
|
16158
|
+
* productType: 'vault',
|
|
16159
|
+
* address: '0x8eB67A509616cd6A7c1B3c8C21D48FF57df3d458',
|
|
16160
|
+
* chain: 'Arc_Testnet',
|
|
16161
|
+
* name: 'Steakhouse USDC',
|
|
16162
|
+
* protocol: 'MORPHO',
|
|
16163
|
+
* asset: 'USDC',
|
|
16164
|
+
* assetAddress: '0x3600000000000000000000000000000000000000',
|
|
16165
|
+
* asOf: '2026-06-23T18:00:00Z',
|
|
16166
|
+
* manager: { name: 'Steakhouse', address: '0x...', type: 'curator' },
|
|
16167
|
+
* apyProfile: { current: 0.085, native: 0.071, d7: 0.082, d30: 0.079, d90: 0.081, rewardShare: 0.16 },
|
|
16168
|
+
* fee: { performance: 0.1, management: null },
|
|
16169
|
+
* liquidityProfile: {
|
|
16170
|
+
* totalDeposits: Amount.fromJSON({ raw: '15000000000000', decimals: 6 }),
|
|
16171
|
+
* available: Amount.fromJSON({ raw: '5000000000000', decimals: 6 }),
|
|
16172
|
+
* totalSupply: Amount.fromJSON({ raw: '14950000000000000000', decimals: 18 }),
|
|
16173
|
+
* status: 'active',
|
|
16174
|
+
* },
|
|
16175
|
+
* riskSignals: { circleSentinel: true, warnings: [], earnKitWarnings: [] },
|
|
16176
|
+
* rewards: [{ token: 'MORPHO', tokenAddress: '0x...', apy: 0.0075 }],
|
|
16177
|
+
* collateral: [{ asset: 'cbBTC', assetAddress: '0x...', lltv: 0.86, supplyUsd: 50000000.25, allocationPct: 0.6 }],
|
|
16178
|
+
* // deprecated flat aliases (dual-emitted during migration)
|
|
16179
|
+
* vaultAddress: '0x8eB67A509616cd6A7c1B3c8C21D48FF57df3d458',
|
|
16180
|
+
* currentApy: 0.085,
|
|
16181
|
+
* nativeApy: 0.071,
|
|
16182
|
+
* vaultFee: 0.1,
|
|
16183
|
+
* totalDeposits: Amount.fromJSON({ raw: '15000000000000', decimals: 6 }),
|
|
16184
|
+
* liquidity: Amount.fromJSON({ raw: '5000000000000', decimals: 6 }),
|
|
16185
|
+
* status: 'active',
|
|
16186
|
+
* circleGuarded: true,
|
|
16187
|
+
* }
|
|
16188
|
+
* ```
|
|
16189
|
+
*/
|
|
16190
|
+
interface VaultOpportunity extends EarnOpportunityBase {
|
|
16191
|
+
/**
|
|
16192
|
+
* Universal discriminator identifying the opportunity shape.
|
|
16193
|
+
*
|
|
16194
|
+
* Optional for now — a backend that predates the field omits it, matching
|
|
16195
|
+
* the other optional facets — so this release stays source-compatible for
|
|
16196
|
+
* code that constructs the type. A future release makes it required once
|
|
16197
|
+
* every backend emits it. Always present on responses from an emitting
|
|
16198
|
+
* backend; narrow on it before reading product-specific fields.
|
|
16199
|
+
*/
|
|
16200
|
+
readonly productType?: 'vault';
|
|
16201
|
+
/** Collateral markets backing this vault. */
|
|
16202
|
+
readonly collateral: readonly CollateralInfo[];
|
|
16203
|
+
}
|
|
16204
|
+
/**
|
|
16205
|
+
* A yield opportunity available through the earn service.
|
|
16206
|
+
*
|
|
16207
|
+
* Modeled as a discriminated union on `productType` over a shared base.
|
|
16208
|
+
* Only the `vault` variant ships today; additional product types (e.g.
|
|
16209
|
+
* `lending_market`, `rwa_token`) are added as additive union members.
|
|
16210
|
+
*/
|
|
16211
|
+
type EarnOpportunity = VaultOpportunity;
|
|
15597
16212
|
/**
|
|
15598
16213
|
* Per-vault error from a batch vault lookup.
|
|
15599
16214
|
*
|
|
@@ -15773,6 +16388,14 @@ interface AssetAmount {
|
|
|
15773
16388
|
*/
|
|
15774
16389
|
readonly status?: string | undefined;
|
|
15775
16390
|
}
|
|
16391
|
+
/**
|
|
16392
|
+
* Source-fee quote expiry metadata returned by bridge prepare.
|
|
16393
|
+
*
|
|
16394
|
+
* `TIMESTAMP` expiries use an ISO-8601 UTC `expiresAt`; `BLOCK_NUMBER`
|
|
16395
|
+
* expiries use a source-chain `expiresAtBlock`, with an optional ISO-8601 UTC
|
|
16396
|
+
* `blockEstimatedAt` for when that block estimate was produced.
|
|
16397
|
+
*/
|
|
16398
|
+
type EarnBridgeQuoteExpiry = Readonly<Exclude<z.infer<typeof bridgeQuoteExpirySchema>, undefined>>;
|
|
15776
16399
|
/**
|
|
15777
16400
|
* Result of a deposit operation returned by
|
|
15778
16401
|
* {@link EarningProvider.deposit}.
|
|
@@ -15873,6 +16496,13 @@ interface EarnCrossChainDepositResult {
|
|
|
15873
16496
|
* @example '2026-05-19T00:00:00Z'
|
|
15874
16497
|
*/
|
|
15875
16498
|
readonly expiresAt: string;
|
|
16499
|
+
/** ISO-8601 UTC timestamp at which the source-fee quote was issued. */
|
|
16500
|
+
readonly quoteIssuedAt?: string | undefined;
|
|
16501
|
+
/**
|
|
16502
|
+
* Optional source-fee quote expiry metadata for display and refresh UX.
|
|
16503
|
+
* This deadline is independent of the prepared-bundle `expiresAt` above.
|
|
16504
|
+
*/
|
|
16505
|
+
readonly quoteExpiry?: EarnBridgeQuoteExpiry | undefined;
|
|
15876
16506
|
}
|
|
15877
16507
|
/**
|
|
15878
16508
|
* Status of one hop (source relay or destination mint) of a cross-chain
|
|
@@ -16349,27 +16979,21 @@ interface DepositQuoteInfo {
|
|
|
16349
16979
|
*/
|
|
16350
16980
|
readonly fees: readonly AssetAmount[];
|
|
16351
16981
|
/**
|
|
16352
|
-
* Estimated native gas fees for the transactions needed to deposit
|
|
16353
|
-
*
|
|
16982
|
+
* Estimated native gas fees for the transactions needed to deposit (e.g.
|
|
16983
|
+
* token approval and the deposit itself).
|
|
16354
16984
|
*
|
|
16355
16985
|
* Optional so that custom {@link EarningProvider} implementations are not
|
|
16356
16986
|
* required to produce gas estimates. The bundled Earn Service provider
|
|
16357
|
-
*
|
|
16358
|
-
*
|
|
16359
|
-
*
|
|
16360
|
-
*
|
|
16361
|
-
*
|
|
16362
|
-
*
|
|
16363
|
-
*
|
|
16364
|
-
*
|
|
16365
|
-
*
|
|
16366
|
-
*
|
|
16367
|
-
* When a token approval is still pending (typically a first-time deposit),
|
|
16368
|
-
* the deposit simulation reverts because the allowance is not yet in
|
|
16369
|
-
* place, so the deposit entry resolves with `fees: null` while the
|
|
16370
|
-
* approval entry still carries a real estimate. Render a fallback (e.g.
|
|
16371
|
-
* "available after approval") for that case rather than treating it as an
|
|
16372
|
-
* error.
|
|
16987
|
+
* populates this from the server-side estimate returned on the quote, with
|
|
16988
|
+
* one entry per action. Empty for cross-chain quotes, which resolve no
|
|
16989
|
+
* single source chain.
|
|
16990
|
+
*
|
|
16991
|
+
* Each entry is the Earn Service's estimate for that action, so a pending
|
|
16992
|
+
* token approval no longer causes the deposit entry to fail. An entry may
|
|
16993
|
+
* still carry `fees: null` with an `error` when the service could not
|
|
16994
|
+
* estimate it, so a non-empty array does not imply every estimate
|
|
16995
|
+
* succeeded — inspect each entry's `fees` and look entries up by `name`,
|
|
16996
|
+
* not by index.
|
|
16373
16997
|
*/
|
|
16374
16998
|
readonly gasFees?: readonly EarnGasFeeEstimate$1[] | undefined;
|
|
16375
16999
|
}
|
|
@@ -16410,26 +17034,21 @@ interface WithdrawalQuoteInfo {
|
|
|
16410
17034
|
*/
|
|
16411
17035
|
readonly fees: readonly AssetAmount[];
|
|
16412
17036
|
/**
|
|
16413
|
-
* Estimated native gas fees for the transactions needed to withdraw.
|
|
17037
|
+
* Estimated native gas fees for the transactions needed to withdraw (e.g.
|
|
17038
|
+
* vault-share approval and the withdrawal itself).
|
|
16414
17039
|
*
|
|
16415
17040
|
* Optional so that custom {@link EarningProvider} implementations are not
|
|
16416
17041
|
* required to produce gas estimates. The bundled Earn Service provider
|
|
16417
|
-
*
|
|
16418
|
-
*
|
|
16419
|
-
*
|
|
16420
|
-
*
|
|
16421
|
-
*
|
|
16422
|
-
*
|
|
16423
|
-
*
|
|
16424
|
-
*
|
|
16425
|
-
*
|
|
16426
|
-
*
|
|
16427
|
-
* When a vault-share approval is still pending (typically the first
|
|
16428
|
-
* withdrawal from a vault), the withdrawal simulation reverts because the
|
|
16429
|
-
* allowance is not yet in place, so the withdrawal entry resolves with
|
|
16430
|
-
* `fees: null` while the approval entry still carries a real estimate.
|
|
16431
|
-
* Render a fallback (e.g. "available after approval") for that case
|
|
16432
|
-
* rather than treating it as an error.
|
|
17042
|
+
* populates this from the server-side estimate returned on the quote, with
|
|
17043
|
+
* one entry per action. Empty for cross-chain quotes, which resolve no
|
|
17044
|
+
* single source chain.
|
|
17045
|
+
*
|
|
17046
|
+
* Each entry is the Earn Service's estimate for that action, so a pending
|
|
17047
|
+
* vault-share approval no longer causes the withdrawal entry to fail. An
|
|
17048
|
+
* entry may still carry `fees: null` with an `error` when the service could
|
|
17049
|
+
* not estimate it, so a non-empty array does not imply every estimate
|
|
17050
|
+
* succeeded — inspect each entry's `fees` and look entries up by `name`,
|
|
17051
|
+
* not by index.
|
|
16433
17052
|
*/
|
|
16434
17053
|
readonly gasFees?: readonly EarnGasFeeEstimate$1[] | undefined;
|
|
16435
17054
|
/**
|
|
@@ -16462,16 +17081,13 @@ interface ClaimRewardsQuoteInfo {
|
|
|
16462
17081
|
/** Reward tokens available for claiming. */
|
|
16463
17082
|
readonly rewards: readonly AssetAmount[];
|
|
16464
17083
|
/**
|
|
16465
|
-
* Estimated native gas fees for claiming rewards.
|
|
16466
|
-
* rewards to claim.
|
|
17084
|
+
* Estimated native gas fees for claiming rewards.
|
|
16467
17085
|
*
|
|
16468
17086
|
* Optional so that custom {@link EarningProvider} implementations are not
|
|
16469
|
-
* required to produce gas estimates.
|
|
16470
|
-
*
|
|
16471
|
-
*
|
|
16472
|
-
*
|
|
16473
|
-
* every estimate succeeded; inspect each entry's `fees`. Look entries up by
|
|
16474
|
-
* `name`, not by index.
|
|
17087
|
+
* required to produce gas estimates. The bundled Earn Service provider does
|
|
17088
|
+
* not return a gas estimate for claim-rewards quotes, so this is always
|
|
17089
|
+
* empty (`[]`); it is retained for API symmetry with the deposit and
|
|
17090
|
+
* withdrawal quotes.
|
|
16475
17091
|
*/
|
|
16476
17092
|
readonly gasFees?: readonly EarnGasFeeEstimate$1[] | undefined;
|
|
16477
17093
|
}
|
|
@@ -16482,8 +17098,8 @@ interface ClaimRewardsQuoteInfo {
|
|
|
16482
17098
|
* `vaults` while per-vault failures are in `errors`.
|
|
16483
17099
|
*/
|
|
16484
17100
|
interface GetVaultsResult {
|
|
16485
|
-
/** Successfully resolved
|
|
16486
|
-
readonly vaults: readonly
|
|
17101
|
+
/** Successfully resolved opportunities. */
|
|
17102
|
+
readonly vaults: readonly EarnOpportunity[];
|
|
16487
17103
|
/** Per-vault errors for failed lookups. */
|
|
16488
17104
|
readonly errors: readonly VaultError[];
|
|
16489
17105
|
}
|
|
@@ -16536,7 +17152,7 @@ interface ExploreVaultsPagination {
|
|
|
16536
17152
|
*/
|
|
16537
17153
|
interface ExploreVaultsResult {
|
|
16538
17154
|
/** Vaults matching the query, in the requested sort order. */
|
|
16539
|
-
readonly vaults: readonly
|
|
17155
|
+
readonly vaults: readonly EarnOpportunity[];
|
|
16540
17156
|
/** Pagination metadata for the query. */
|
|
16541
17157
|
readonly pagination: ExploreVaultsPagination;
|
|
16542
17158
|
}
|
|
@@ -17192,10 +17808,6 @@ declare class EarnServiceProvider implements EarningProvider {
|
|
|
17192
17808
|
supportsRetry(error: unknown): boolean;
|
|
17193
17809
|
/** {@inheritdoc} */
|
|
17194
17810
|
retry(error: unknown): Promise<EarnDepositOutcome | EarnWithdrawResult | ClaimRewardsResult>;
|
|
17195
|
-
private gasEstimateFailure;
|
|
17196
|
-
private estimateDepositQuoteGasFees;
|
|
17197
|
-
private estimateWithdrawalQuoteGasFees;
|
|
17198
|
-
private estimateClaimRewardsQuoteGasFees;
|
|
17199
17811
|
/** {@inheritdoc} */
|
|
17200
17812
|
getDepositQuote<T extends AdapterCapabilities>(params: GetDepositQuoteServiceParams<T>): Promise<DepositQuoteInfo>;
|
|
17201
17813
|
/** {@inheritdoc} */
|
|
@@ -17786,12 +18398,42 @@ type EarnAssetAmount = Omit<AssetAmount, 'amount'> & {
|
|
|
17786
18398
|
/** Token amount in human-readable decimal format. */
|
|
17787
18399
|
readonly amount: string;
|
|
17788
18400
|
};
|
|
17789
|
-
/**
|
|
17790
|
-
|
|
18401
|
+
/**
|
|
18402
|
+
* Distributive `Omit` over a union.
|
|
18403
|
+
*
|
|
18404
|
+
* A plain `Omit<Union, K>` is not distributive: `keyof (A | B)` collapses to
|
|
18405
|
+
* the shared keys, dropping every variant-specific field and the discriminant
|
|
18406
|
+
* narrowing. Distributing over each member preserves the union.
|
|
18407
|
+
*/
|
|
18408
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
18409
|
+
/** Liquidity profile returned by the SDK with amounts as decimal strings. */
|
|
18410
|
+
type EarnLiquidityProfile = Omit<LiquidityProfile, 'totalDeposits' | 'available' | 'totalSupply'> & {
|
|
18411
|
+
/** Total value deposited in human-readable decimal format. */
|
|
18412
|
+
readonly totalDeposits: string;
|
|
18413
|
+
/** Available liquidity in human-readable decimal format. */
|
|
18414
|
+
readonly available: string;
|
|
18415
|
+
/** Outstanding vault share tokens (ERC4626 totalSupply) in decimal format. */
|
|
18416
|
+
readonly totalSupply: string;
|
|
18417
|
+
};
|
|
18418
|
+
/**
|
|
18419
|
+
* Vault information returned by the SDK.
|
|
18420
|
+
*
|
|
18421
|
+
* Derived with a distributive `Omit` so each opportunity variant keeps its
|
|
18422
|
+
* product-specific fields and the `productType` discriminant.
|
|
18423
|
+
*/
|
|
18424
|
+
type EarnVaultInfo = DistributiveOmit<EarnOpportunity, 'totalDeposits' | 'liquidity' | 'liquidityProfile'> & {
|
|
17791
18425
|
/** Total value deposited in human-readable decimal format. */
|
|
17792
18426
|
readonly totalDeposits: string;
|
|
17793
18427
|
/** Available liquidity in the vault in human-readable decimal format. */
|
|
17794
18428
|
readonly liquidity: string;
|
|
18429
|
+
/**
|
|
18430
|
+
* Liquidity profile with amounts as human-readable decimal strings.
|
|
18431
|
+
*
|
|
18432
|
+
* Optional during the expand/contract migration window: a backend that
|
|
18433
|
+
* predates the nested facets omits it, so it is absent until the response
|
|
18434
|
+
* carries it.
|
|
18435
|
+
*/
|
|
18436
|
+
readonly liquidityProfile?: EarnLiquidityProfile;
|
|
17795
18437
|
};
|
|
17796
18438
|
/** Result of a batch vault lookup. */
|
|
17797
18439
|
type EarnGetVaultsResult = Omit<GetVaultsResult, 'vaults'> & {
|
|
@@ -17921,6 +18563,27 @@ interface EarnKitContext<TProviders extends readonly FlexibleEarningProvider[] =
|
|
|
17921
18563
|
interface EarnKitConfig<TExtraProviders extends FlexibleEarningProvider[] = []> {
|
|
17922
18564
|
/** Optional array of custom earn providers. */
|
|
17923
18565
|
providers?: TExtraProviders;
|
|
18566
|
+
/**
|
|
18567
|
+
* Disable success telemetry for completed EarnKit operations.
|
|
18568
|
+
*
|
|
18569
|
+
* When `true`, direct {@link EarnKit} instances do not send success events
|
|
18570
|
+
* to Circle's telemetry endpoint for vault lookups, vault discovery,
|
|
18571
|
+
* deposits, withdrawals, or reward claims. The events include SDK metadata
|
|
18572
|
+
* and allowlisted operation context; they do not include wallet addresses or
|
|
18573
|
+
* amounts. Defaults to `false`.
|
|
18574
|
+
*
|
|
18575
|
+
* @defaultValue false
|
|
18576
|
+
*/
|
|
18577
|
+
disableAnalytics?: boolean;
|
|
18578
|
+
/**
|
|
18579
|
+
* Disable error telemetry for failed public operations.
|
|
18580
|
+
*
|
|
18581
|
+
* When `true`, direct {@link EarnKit} instances do not send structured
|
|
18582
|
+
* error details to Circle's telemetry endpoint. Defaults to `false`.
|
|
18583
|
+
*
|
|
18584
|
+
* @defaultValue false
|
|
18585
|
+
*/
|
|
18586
|
+
disableErrorReporting?: boolean;
|
|
17924
18587
|
}
|
|
17925
18588
|
|
|
17926
18589
|
/**
|
|
@@ -17982,6 +18645,10 @@ interface EarnKitConfig<TExtraProviders extends FlexibleEarningProvider[] = []>
|
|
|
17982
18645
|
*/
|
|
17983
18646
|
declare class EarnKit {
|
|
17984
18647
|
private readonly context;
|
|
18648
|
+
/** Per-kit identity and opt-out state for error telemetry. */
|
|
18649
|
+
private readonly telemetryConfig;
|
|
18650
|
+
/** Per-kit identity and opt-out state for success telemetry. */
|
|
18651
|
+
private readonly analyticsTelemetryConfig;
|
|
17985
18652
|
/**
|
|
17986
18653
|
* Event dispatcher for step-level events emitted during multi-phase earn
|
|
17987
18654
|
* operations. Prefer {@link EarnKit.on} / {@link EarnKit.off} over using
|
|
@@ -18994,22 +19661,27 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
18994
19661
|
v1: z.ZodOptional<z.ZodObject<{
|
|
18995
19662
|
wallet: z.ZodString;
|
|
18996
19663
|
minter: z.ZodString;
|
|
19664
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
18997
19665
|
}, "strict", z.ZodTypeAny, {
|
|
18998
19666
|
wallet: string;
|
|
18999
19667
|
minter: string;
|
|
19668
|
+
depositForHandler?: string | undefined;
|
|
19000
19669
|
}, {
|
|
19001
19670
|
wallet: string;
|
|
19002
19671
|
minter: string;
|
|
19672
|
+
depositForHandler?: string | undefined;
|
|
19003
19673
|
}>>;
|
|
19004
19674
|
}, "strict", z.ZodTypeAny, {
|
|
19005
19675
|
v1?: {
|
|
19006
19676
|
wallet: string;
|
|
19007
19677
|
minter: string;
|
|
19678
|
+
depositForHandler?: string | undefined;
|
|
19008
19679
|
} | undefined;
|
|
19009
19680
|
}, {
|
|
19010
19681
|
v1?: {
|
|
19011
19682
|
wallet: string;
|
|
19012
19683
|
minter: string;
|
|
19684
|
+
depositForHandler?: string | undefined;
|
|
19013
19685
|
} | undefined;
|
|
19014
19686
|
}>;
|
|
19015
19687
|
forwarderSupported: z.ZodObject<{
|
|
@@ -19028,6 +19700,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19028
19700
|
v1?: {
|
|
19029
19701
|
wallet: string;
|
|
19030
19702
|
minter: string;
|
|
19703
|
+
depositForHandler?: string | undefined;
|
|
19031
19704
|
} | undefined;
|
|
19032
19705
|
};
|
|
19033
19706
|
forwarderSupported: {
|
|
@@ -19040,6 +19713,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19040
19713
|
v1?: {
|
|
19041
19714
|
wallet: string;
|
|
19042
19715
|
minter: string;
|
|
19716
|
+
depositForHandler?: string | undefined;
|
|
19043
19717
|
} | undefined;
|
|
19044
19718
|
};
|
|
19045
19719
|
forwarderSupported: {
|
|
@@ -19078,6 +19752,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19078
19752
|
v1?: {
|
|
19079
19753
|
wallet: string;
|
|
19080
19754
|
minter: string;
|
|
19755
|
+
depositForHandler?: string | undefined;
|
|
19081
19756
|
} | undefined;
|
|
19082
19757
|
};
|
|
19083
19758
|
forwarderSupported: {
|
|
@@ -19113,6 +19788,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19113
19788
|
v1?: {
|
|
19114
19789
|
wallet: string;
|
|
19115
19790
|
minter: string;
|
|
19791
|
+
depositForHandler?: string | undefined;
|
|
19116
19792
|
} | undefined;
|
|
19117
19793
|
};
|
|
19118
19794
|
forwarderSupported: {
|
|
@@ -19160,22 +19836,27 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19160
19836
|
v1: z.ZodOptional<z.ZodObject<{
|
|
19161
19837
|
wallet: z.ZodString;
|
|
19162
19838
|
minter: z.ZodString;
|
|
19839
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
19163
19840
|
}, "strict", z.ZodTypeAny, {
|
|
19164
19841
|
wallet: string;
|
|
19165
19842
|
minter: string;
|
|
19843
|
+
depositForHandler?: string | undefined;
|
|
19166
19844
|
}, {
|
|
19167
19845
|
wallet: string;
|
|
19168
19846
|
minter: string;
|
|
19847
|
+
depositForHandler?: string | undefined;
|
|
19169
19848
|
}>>;
|
|
19170
19849
|
}, "strict", z.ZodTypeAny, {
|
|
19171
19850
|
v1?: {
|
|
19172
19851
|
wallet: string;
|
|
19173
19852
|
minter: string;
|
|
19853
|
+
depositForHandler?: string | undefined;
|
|
19174
19854
|
} | undefined;
|
|
19175
19855
|
}, {
|
|
19176
19856
|
v1?: {
|
|
19177
19857
|
wallet: string;
|
|
19178
19858
|
minter: string;
|
|
19859
|
+
depositForHandler?: string | undefined;
|
|
19179
19860
|
} | undefined;
|
|
19180
19861
|
}>;
|
|
19181
19862
|
forwarderSupported: z.ZodObject<{
|
|
@@ -19194,6 +19875,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19194
19875
|
v1?: {
|
|
19195
19876
|
wallet: string;
|
|
19196
19877
|
minter: string;
|
|
19878
|
+
depositForHandler?: string | undefined;
|
|
19197
19879
|
} | undefined;
|
|
19198
19880
|
};
|
|
19199
19881
|
forwarderSupported: {
|
|
@@ -19206,6 +19888,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19206
19888
|
v1?: {
|
|
19207
19889
|
wallet: string;
|
|
19208
19890
|
minter: string;
|
|
19891
|
+
depositForHandler?: string | undefined;
|
|
19209
19892
|
} | undefined;
|
|
19210
19893
|
};
|
|
19211
19894
|
forwarderSupported: {
|
|
@@ -19242,6 +19925,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19242
19925
|
v1?: {
|
|
19243
19926
|
wallet: string;
|
|
19244
19927
|
minter: string;
|
|
19928
|
+
depositForHandler?: string | undefined;
|
|
19245
19929
|
} | undefined;
|
|
19246
19930
|
};
|
|
19247
19931
|
forwarderSupported: {
|
|
@@ -19276,6 +19960,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19276
19960
|
v1?: {
|
|
19277
19961
|
wallet: string;
|
|
19278
19962
|
minter: string;
|
|
19963
|
+
depositForHandler?: string | undefined;
|
|
19279
19964
|
} | undefined;
|
|
19280
19965
|
};
|
|
19281
19966
|
forwarderSupported: {
|
|
@@ -19311,6 +19996,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19311
19996
|
v1?: {
|
|
19312
19997
|
wallet: string;
|
|
19313
19998
|
minter: string;
|
|
19999
|
+
depositForHandler?: string | undefined;
|
|
19314
20000
|
} | undefined;
|
|
19315
20001
|
};
|
|
19316
20002
|
forwarderSupported: {
|
|
@@ -19345,6 +20031,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19345
20031
|
v1?: {
|
|
19346
20032
|
wallet: string;
|
|
19347
20033
|
minter: string;
|
|
20034
|
+
depositForHandler?: string | undefined;
|
|
19348
20035
|
} | undefined;
|
|
19349
20036
|
};
|
|
19350
20037
|
forwarderSupported: {
|
|
@@ -19380,6 +20067,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19380
20067
|
v1?: {
|
|
19381
20068
|
wallet: string;
|
|
19382
20069
|
minter: string;
|
|
20070
|
+
depositForHandler?: string | undefined;
|
|
19383
20071
|
} | undefined;
|
|
19384
20072
|
};
|
|
19385
20073
|
forwarderSupported: {
|
|
@@ -19414,6 +20102,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19414
20102
|
v1?: {
|
|
19415
20103
|
wallet: string;
|
|
19416
20104
|
minter: string;
|
|
20105
|
+
depositForHandler?: string | undefined;
|
|
19417
20106
|
} | undefined;
|
|
19418
20107
|
};
|
|
19419
20108
|
forwarderSupported: {
|
|
@@ -19452,6 +20141,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19452
20141
|
v1?: {
|
|
19453
20142
|
wallet: string;
|
|
19454
20143
|
minter: string;
|
|
20144
|
+
depositForHandler?: string | undefined;
|
|
19455
20145
|
} | undefined;
|
|
19456
20146
|
};
|
|
19457
20147
|
forwarderSupported: {
|
|
@@ -19486,6 +20176,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19486
20176
|
v1?: {
|
|
19487
20177
|
wallet: string;
|
|
19488
20178
|
minter: string;
|
|
20179
|
+
depositForHandler?: string | undefined;
|
|
19489
20180
|
} | undefined;
|
|
19490
20181
|
};
|
|
19491
20182
|
forwarderSupported: {
|
|
@@ -19524,6 +20215,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19524
20215
|
v1?: {
|
|
19525
20216
|
wallet: string;
|
|
19526
20217
|
minter: string;
|
|
20218
|
+
depositForHandler?: string | undefined;
|
|
19527
20219
|
} | undefined;
|
|
19528
20220
|
};
|
|
19529
20221
|
forwarderSupported: {
|
|
@@ -19558,6 +20250,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19558
20250
|
v1?: {
|
|
19559
20251
|
wallet: string;
|
|
19560
20252
|
minter: string;
|
|
20253
|
+
depositForHandler?: string | undefined;
|
|
19561
20254
|
} | undefined;
|
|
19562
20255
|
};
|
|
19563
20256
|
forwarderSupported: {
|
|
@@ -19605,6 +20298,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19605
20298
|
v1?: {
|
|
19606
20299
|
wallet: string;
|
|
19607
20300
|
minter: string;
|
|
20301
|
+
depositForHandler?: string | undefined;
|
|
19608
20302
|
} | undefined;
|
|
19609
20303
|
};
|
|
19610
20304
|
forwarderSupported: {
|
|
@@ -19639,6 +20333,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19639
20333
|
v1?: {
|
|
19640
20334
|
wallet: string;
|
|
19641
20335
|
minter: string;
|
|
20336
|
+
depositForHandler?: string | undefined;
|
|
19642
20337
|
} | undefined;
|
|
19643
20338
|
};
|
|
19644
20339
|
forwarderSupported: {
|
|
@@ -19682,6 +20377,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19682
20377
|
v1?: {
|
|
19683
20378
|
wallet: string;
|
|
19684
20379
|
minter: string;
|
|
20380
|
+
depositForHandler?: string | undefined;
|
|
19685
20381
|
} | undefined;
|
|
19686
20382
|
};
|
|
19687
20383
|
forwarderSupported: {
|
|
@@ -19716,6 +20412,7 @@ declare const getVaultsParamsSchema: z.ZodObject<{
|
|
|
19716
20412
|
v1?: {
|
|
19717
20413
|
wallet: string;
|
|
19718
20414
|
minter: string;
|
|
20415
|
+
depositForHandler?: string | undefined;
|
|
19719
20416
|
} | undefined;
|
|
19720
20417
|
};
|
|
19721
20418
|
forwarderSupported: {
|
|
@@ -19785,22 +20482,27 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19785
20482
|
v1: z.ZodOptional<z.ZodObject<{
|
|
19786
20483
|
wallet: z.ZodString;
|
|
19787
20484
|
minter: z.ZodString;
|
|
20485
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
19788
20486
|
}, "strict", z.ZodTypeAny, {
|
|
19789
20487
|
wallet: string;
|
|
19790
20488
|
minter: string;
|
|
20489
|
+
depositForHandler?: string | undefined;
|
|
19791
20490
|
}, {
|
|
19792
20491
|
wallet: string;
|
|
19793
20492
|
minter: string;
|
|
20493
|
+
depositForHandler?: string | undefined;
|
|
19794
20494
|
}>>;
|
|
19795
20495
|
}, "strict", z.ZodTypeAny, {
|
|
19796
20496
|
v1?: {
|
|
19797
20497
|
wallet: string;
|
|
19798
20498
|
minter: string;
|
|
20499
|
+
depositForHandler?: string | undefined;
|
|
19799
20500
|
} | undefined;
|
|
19800
20501
|
}, {
|
|
19801
20502
|
v1?: {
|
|
19802
20503
|
wallet: string;
|
|
19803
20504
|
minter: string;
|
|
20505
|
+
depositForHandler?: string | undefined;
|
|
19804
20506
|
} | undefined;
|
|
19805
20507
|
}>;
|
|
19806
20508
|
forwarderSupported: z.ZodObject<{
|
|
@@ -19819,6 +20521,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19819
20521
|
v1?: {
|
|
19820
20522
|
wallet: string;
|
|
19821
20523
|
minter: string;
|
|
20524
|
+
depositForHandler?: string | undefined;
|
|
19822
20525
|
} | undefined;
|
|
19823
20526
|
};
|
|
19824
20527
|
forwarderSupported: {
|
|
@@ -19831,6 +20534,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19831
20534
|
v1?: {
|
|
19832
20535
|
wallet: string;
|
|
19833
20536
|
minter: string;
|
|
20537
|
+
depositForHandler?: string | undefined;
|
|
19834
20538
|
} | undefined;
|
|
19835
20539
|
};
|
|
19836
20540
|
forwarderSupported: {
|
|
@@ -19869,6 +20573,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19869
20573
|
v1?: {
|
|
19870
20574
|
wallet: string;
|
|
19871
20575
|
minter: string;
|
|
20576
|
+
depositForHandler?: string | undefined;
|
|
19872
20577
|
} | undefined;
|
|
19873
20578
|
};
|
|
19874
20579
|
forwarderSupported: {
|
|
@@ -19904,6 +20609,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19904
20609
|
v1?: {
|
|
19905
20610
|
wallet: string;
|
|
19906
20611
|
minter: string;
|
|
20612
|
+
depositForHandler?: string | undefined;
|
|
19907
20613
|
} | undefined;
|
|
19908
20614
|
};
|
|
19909
20615
|
forwarderSupported: {
|
|
@@ -19951,22 +20657,27 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19951
20657
|
v1: z.ZodOptional<z.ZodObject<{
|
|
19952
20658
|
wallet: z.ZodString;
|
|
19953
20659
|
minter: z.ZodString;
|
|
20660
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
19954
20661
|
}, "strict", z.ZodTypeAny, {
|
|
19955
20662
|
wallet: string;
|
|
19956
20663
|
minter: string;
|
|
20664
|
+
depositForHandler?: string | undefined;
|
|
19957
20665
|
}, {
|
|
19958
20666
|
wallet: string;
|
|
19959
20667
|
minter: string;
|
|
20668
|
+
depositForHandler?: string | undefined;
|
|
19960
20669
|
}>>;
|
|
19961
20670
|
}, "strict", z.ZodTypeAny, {
|
|
19962
20671
|
v1?: {
|
|
19963
20672
|
wallet: string;
|
|
19964
20673
|
minter: string;
|
|
20674
|
+
depositForHandler?: string | undefined;
|
|
19965
20675
|
} | undefined;
|
|
19966
20676
|
}, {
|
|
19967
20677
|
v1?: {
|
|
19968
20678
|
wallet: string;
|
|
19969
20679
|
minter: string;
|
|
20680
|
+
depositForHandler?: string | undefined;
|
|
19970
20681
|
} | undefined;
|
|
19971
20682
|
}>;
|
|
19972
20683
|
forwarderSupported: z.ZodObject<{
|
|
@@ -19985,6 +20696,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19985
20696
|
v1?: {
|
|
19986
20697
|
wallet: string;
|
|
19987
20698
|
minter: string;
|
|
20699
|
+
depositForHandler?: string | undefined;
|
|
19988
20700
|
} | undefined;
|
|
19989
20701
|
};
|
|
19990
20702
|
forwarderSupported: {
|
|
@@ -19997,6 +20709,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
19997
20709
|
v1?: {
|
|
19998
20710
|
wallet: string;
|
|
19999
20711
|
minter: string;
|
|
20712
|
+
depositForHandler?: string | undefined;
|
|
20000
20713
|
} | undefined;
|
|
20001
20714
|
};
|
|
20002
20715
|
forwarderSupported: {
|
|
@@ -20033,6 +20746,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20033
20746
|
v1?: {
|
|
20034
20747
|
wallet: string;
|
|
20035
20748
|
minter: string;
|
|
20749
|
+
depositForHandler?: string | undefined;
|
|
20036
20750
|
} | undefined;
|
|
20037
20751
|
};
|
|
20038
20752
|
forwarderSupported: {
|
|
@@ -20067,6 +20781,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20067
20781
|
v1?: {
|
|
20068
20782
|
wallet: string;
|
|
20069
20783
|
minter: string;
|
|
20784
|
+
depositForHandler?: string | undefined;
|
|
20070
20785
|
} | undefined;
|
|
20071
20786
|
};
|
|
20072
20787
|
forwarderSupported: {
|
|
@@ -20102,6 +20817,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20102
20817
|
v1?: {
|
|
20103
20818
|
wallet: string;
|
|
20104
20819
|
minter: string;
|
|
20820
|
+
depositForHandler?: string | undefined;
|
|
20105
20821
|
} | undefined;
|
|
20106
20822
|
};
|
|
20107
20823
|
forwarderSupported: {
|
|
@@ -20136,6 +20852,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20136
20852
|
v1?: {
|
|
20137
20853
|
wallet: string;
|
|
20138
20854
|
minter: string;
|
|
20855
|
+
depositForHandler?: string | undefined;
|
|
20139
20856
|
} | undefined;
|
|
20140
20857
|
};
|
|
20141
20858
|
forwarderSupported: {
|
|
@@ -20171,6 +20888,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20171
20888
|
v1?: {
|
|
20172
20889
|
wallet: string;
|
|
20173
20890
|
minter: string;
|
|
20891
|
+
depositForHandler?: string | undefined;
|
|
20174
20892
|
} | undefined;
|
|
20175
20893
|
};
|
|
20176
20894
|
forwarderSupported: {
|
|
@@ -20205,6 +20923,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20205
20923
|
v1?: {
|
|
20206
20924
|
wallet: string;
|
|
20207
20925
|
minter: string;
|
|
20926
|
+
depositForHandler?: string | undefined;
|
|
20208
20927
|
} | undefined;
|
|
20209
20928
|
};
|
|
20210
20929
|
forwarderSupported: {
|
|
@@ -20256,6 +20975,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20256
20975
|
v1?: {
|
|
20257
20976
|
wallet: string;
|
|
20258
20977
|
minter: string;
|
|
20978
|
+
depositForHandler?: string | undefined;
|
|
20259
20979
|
} | undefined;
|
|
20260
20980
|
};
|
|
20261
20981
|
forwarderSupported: {
|
|
@@ -20290,6 +21010,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20290
21010
|
v1?: {
|
|
20291
21011
|
wallet: string;
|
|
20292
21012
|
minter: string;
|
|
21013
|
+
depositForHandler?: string | undefined;
|
|
20293
21014
|
} | undefined;
|
|
20294
21015
|
};
|
|
20295
21016
|
forwarderSupported: {
|
|
@@ -20337,6 +21058,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20337
21058
|
v1?: {
|
|
20338
21059
|
wallet: string;
|
|
20339
21060
|
minter: string;
|
|
21061
|
+
depositForHandler?: string | undefined;
|
|
20340
21062
|
} | undefined;
|
|
20341
21063
|
};
|
|
20342
21064
|
forwarderSupported: {
|
|
@@ -20371,6 +21093,7 @@ declare const exploreVaultsParamsSchema: z.ZodObject<{
|
|
|
20371
21093
|
v1?: {
|
|
20372
21094
|
wallet: string;
|
|
20373
21095
|
minter: string;
|
|
21096
|
+
depositForHandler?: string | undefined;
|
|
20374
21097
|
} | undefined;
|
|
20375
21098
|
};
|
|
20376
21099
|
forwarderSupported: {
|
|
@@ -20447,22 +21170,27 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20447
21170
|
v1: z.ZodOptional<z.ZodObject<{
|
|
20448
21171
|
wallet: z.ZodString;
|
|
20449
21172
|
minter: z.ZodString;
|
|
21173
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
20450
21174
|
}, "strict", z.ZodTypeAny, {
|
|
20451
21175
|
wallet: string;
|
|
20452
21176
|
minter: string;
|
|
21177
|
+
depositForHandler?: string | undefined;
|
|
20453
21178
|
}, {
|
|
20454
21179
|
wallet: string;
|
|
20455
21180
|
minter: string;
|
|
21181
|
+
depositForHandler?: string | undefined;
|
|
20456
21182
|
}>>;
|
|
20457
21183
|
}, "strict", z.ZodTypeAny, {
|
|
20458
21184
|
v1?: {
|
|
20459
21185
|
wallet: string;
|
|
20460
21186
|
minter: string;
|
|
21187
|
+
depositForHandler?: string | undefined;
|
|
20461
21188
|
} | undefined;
|
|
20462
21189
|
}, {
|
|
20463
21190
|
v1?: {
|
|
20464
21191
|
wallet: string;
|
|
20465
21192
|
minter: string;
|
|
21193
|
+
depositForHandler?: string | undefined;
|
|
20466
21194
|
} | undefined;
|
|
20467
21195
|
}>;
|
|
20468
21196
|
forwarderSupported: z.ZodObject<{
|
|
@@ -20481,6 +21209,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20481
21209
|
v1?: {
|
|
20482
21210
|
wallet: string;
|
|
20483
21211
|
minter: string;
|
|
21212
|
+
depositForHandler?: string | undefined;
|
|
20484
21213
|
} | undefined;
|
|
20485
21214
|
};
|
|
20486
21215
|
forwarderSupported: {
|
|
@@ -20493,6 +21222,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20493
21222
|
v1?: {
|
|
20494
21223
|
wallet: string;
|
|
20495
21224
|
minter: string;
|
|
21225
|
+
depositForHandler?: string | undefined;
|
|
20496
21226
|
} | undefined;
|
|
20497
21227
|
};
|
|
20498
21228
|
forwarderSupported: {
|
|
@@ -20531,6 +21261,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20531
21261
|
v1?: {
|
|
20532
21262
|
wallet: string;
|
|
20533
21263
|
minter: string;
|
|
21264
|
+
depositForHandler?: string | undefined;
|
|
20534
21265
|
} | undefined;
|
|
20535
21266
|
};
|
|
20536
21267
|
forwarderSupported: {
|
|
@@ -20566,6 +21297,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20566
21297
|
v1?: {
|
|
20567
21298
|
wallet: string;
|
|
20568
21299
|
minter: string;
|
|
21300
|
+
depositForHandler?: string | undefined;
|
|
20569
21301
|
} | undefined;
|
|
20570
21302
|
};
|
|
20571
21303
|
forwarderSupported: {
|
|
@@ -20613,22 +21345,27 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20613
21345
|
v1: z.ZodOptional<z.ZodObject<{
|
|
20614
21346
|
wallet: z.ZodString;
|
|
20615
21347
|
minter: z.ZodString;
|
|
21348
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
20616
21349
|
}, "strict", z.ZodTypeAny, {
|
|
20617
21350
|
wallet: string;
|
|
20618
21351
|
minter: string;
|
|
21352
|
+
depositForHandler?: string | undefined;
|
|
20619
21353
|
}, {
|
|
20620
21354
|
wallet: string;
|
|
20621
21355
|
minter: string;
|
|
21356
|
+
depositForHandler?: string | undefined;
|
|
20622
21357
|
}>>;
|
|
20623
21358
|
}, "strict", z.ZodTypeAny, {
|
|
20624
21359
|
v1?: {
|
|
20625
21360
|
wallet: string;
|
|
20626
21361
|
minter: string;
|
|
21362
|
+
depositForHandler?: string | undefined;
|
|
20627
21363
|
} | undefined;
|
|
20628
21364
|
}, {
|
|
20629
21365
|
v1?: {
|
|
20630
21366
|
wallet: string;
|
|
20631
21367
|
minter: string;
|
|
21368
|
+
depositForHandler?: string | undefined;
|
|
20632
21369
|
} | undefined;
|
|
20633
21370
|
}>;
|
|
20634
21371
|
forwarderSupported: z.ZodObject<{
|
|
@@ -20647,6 +21384,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20647
21384
|
v1?: {
|
|
20648
21385
|
wallet: string;
|
|
20649
21386
|
minter: string;
|
|
21387
|
+
depositForHandler?: string | undefined;
|
|
20650
21388
|
} | undefined;
|
|
20651
21389
|
};
|
|
20652
21390
|
forwarderSupported: {
|
|
@@ -20659,6 +21397,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20659
21397
|
v1?: {
|
|
20660
21398
|
wallet: string;
|
|
20661
21399
|
minter: string;
|
|
21400
|
+
depositForHandler?: string | undefined;
|
|
20662
21401
|
} | undefined;
|
|
20663
21402
|
};
|
|
20664
21403
|
forwarderSupported: {
|
|
@@ -20695,6 +21434,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20695
21434
|
v1?: {
|
|
20696
21435
|
wallet: string;
|
|
20697
21436
|
minter: string;
|
|
21437
|
+
depositForHandler?: string | undefined;
|
|
20698
21438
|
} | undefined;
|
|
20699
21439
|
};
|
|
20700
21440
|
forwarderSupported: {
|
|
@@ -20729,6 +21469,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20729
21469
|
v1?: {
|
|
20730
21470
|
wallet: string;
|
|
20731
21471
|
minter: string;
|
|
21472
|
+
depositForHandler?: string | undefined;
|
|
20732
21473
|
} | undefined;
|
|
20733
21474
|
};
|
|
20734
21475
|
forwarderSupported: {
|
|
@@ -20764,6 +21505,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20764
21505
|
v1?: {
|
|
20765
21506
|
wallet: string;
|
|
20766
21507
|
minter: string;
|
|
21508
|
+
depositForHandler?: string | undefined;
|
|
20767
21509
|
} | undefined;
|
|
20768
21510
|
};
|
|
20769
21511
|
forwarderSupported: {
|
|
@@ -20798,6 +21540,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20798
21540
|
v1?: {
|
|
20799
21541
|
wallet: string;
|
|
20800
21542
|
minter: string;
|
|
21543
|
+
depositForHandler?: string | undefined;
|
|
20801
21544
|
} | undefined;
|
|
20802
21545
|
};
|
|
20803
21546
|
forwarderSupported: {
|
|
@@ -20833,6 +21576,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20833
21576
|
v1?: {
|
|
20834
21577
|
wallet: string;
|
|
20835
21578
|
minter: string;
|
|
21579
|
+
depositForHandler?: string | undefined;
|
|
20836
21580
|
} | undefined;
|
|
20837
21581
|
};
|
|
20838
21582
|
forwarderSupported: {
|
|
@@ -20867,6 +21611,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20867
21611
|
v1?: {
|
|
20868
21612
|
wallet: string;
|
|
20869
21613
|
minter: string;
|
|
21614
|
+
depositForHandler?: string | undefined;
|
|
20870
21615
|
} | undefined;
|
|
20871
21616
|
};
|
|
20872
21617
|
forwarderSupported: {
|
|
@@ -20918,6 +21663,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20918
21663
|
v1?: {
|
|
20919
21664
|
wallet: string;
|
|
20920
21665
|
minter: string;
|
|
21666
|
+
depositForHandler?: string | undefined;
|
|
20921
21667
|
} | undefined;
|
|
20922
21668
|
};
|
|
20923
21669
|
forwarderSupported: {
|
|
@@ -20952,6 +21698,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20952
21698
|
v1?: {
|
|
20953
21699
|
wallet: string;
|
|
20954
21700
|
minter: string;
|
|
21701
|
+
depositForHandler?: string | undefined;
|
|
20955
21702
|
} | undefined;
|
|
20956
21703
|
};
|
|
20957
21704
|
forwarderSupported: {
|
|
@@ -20998,6 +21745,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
20998
21745
|
v1?: {
|
|
20999
21746
|
wallet: string;
|
|
21000
21747
|
minter: string;
|
|
21748
|
+
depositForHandler?: string | undefined;
|
|
21001
21749
|
} | undefined;
|
|
21002
21750
|
};
|
|
21003
21751
|
forwarderSupported: {
|
|
@@ -21032,6 +21780,7 @@ declare const exploreVaultsIteratorParamsSchema: z.ZodObject<Omit<{
|
|
|
21032
21780
|
v1?: {
|
|
21033
21781
|
wallet: string;
|
|
21034
21782
|
minter: string;
|
|
21783
|
+
depositForHandler?: string | undefined;
|
|
21035
21784
|
} | undefined;
|
|
21036
21785
|
};
|
|
21037
21786
|
forwarderSupported: {
|
|
@@ -21153,22 +21902,27 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21153
21902
|
v1: z.ZodOptional<z.ZodObject<{
|
|
21154
21903
|
wallet: z.ZodString;
|
|
21155
21904
|
minter: z.ZodString;
|
|
21905
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
21156
21906
|
}, "strict", z.ZodTypeAny, {
|
|
21157
21907
|
wallet: string;
|
|
21158
21908
|
minter: string;
|
|
21909
|
+
depositForHandler?: string | undefined;
|
|
21159
21910
|
}, {
|
|
21160
21911
|
wallet: string;
|
|
21161
21912
|
minter: string;
|
|
21913
|
+
depositForHandler?: string | undefined;
|
|
21162
21914
|
}>>;
|
|
21163
21915
|
}, "strict", z.ZodTypeAny, {
|
|
21164
21916
|
v1?: {
|
|
21165
21917
|
wallet: string;
|
|
21166
21918
|
minter: string;
|
|
21919
|
+
depositForHandler?: string | undefined;
|
|
21167
21920
|
} | undefined;
|
|
21168
21921
|
}, {
|
|
21169
21922
|
v1?: {
|
|
21170
21923
|
wallet: string;
|
|
21171
21924
|
minter: string;
|
|
21925
|
+
depositForHandler?: string | undefined;
|
|
21172
21926
|
} | undefined;
|
|
21173
21927
|
}>;
|
|
21174
21928
|
forwarderSupported: z.ZodObject<{
|
|
@@ -21187,6 +21941,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21187
21941
|
v1?: {
|
|
21188
21942
|
wallet: string;
|
|
21189
21943
|
minter: string;
|
|
21944
|
+
depositForHandler?: string | undefined;
|
|
21190
21945
|
} | undefined;
|
|
21191
21946
|
};
|
|
21192
21947
|
forwarderSupported: {
|
|
@@ -21199,6 +21954,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21199
21954
|
v1?: {
|
|
21200
21955
|
wallet: string;
|
|
21201
21956
|
minter: string;
|
|
21957
|
+
depositForHandler?: string | undefined;
|
|
21202
21958
|
} | undefined;
|
|
21203
21959
|
};
|
|
21204
21960
|
forwarderSupported: {
|
|
@@ -21237,6 +21993,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21237
21993
|
v1?: {
|
|
21238
21994
|
wallet: string;
|
|
21239
21995
|
minter: string;
|
|
21996
|
+
depositForHandler?: string | undefined;
|
|
21240
21997
|
} | undefined;
|
|
21241
21998
|
};
|
|
21242
21999
|
forwarderSupported: {
|
|
@@ -21272,6 +22029,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21272
22029
|
v1?: {
|
|
21273
22030
|
wallet: string;
|
|
21274
22031
|
minter: string;
|
|
22032
|
+
depositForHandler?: string | undefined;
|
|
21275
22033
|
} | undefined;
|
|
21276
22034
|
};
|
|
21277
22035
|
forwarderSupported: {
|
|
@@ -21319,22 +22077,27 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21319
22077
|
v1: z.ZodOptional<z.ZodObject<{
|
|
21320
22078
|
wallet: z.ZodString;
|
|
21321
22079
|
minter: z.ZodString;
|
|
22080
|
+
depositForHandler: z.ZodOptional<z.ZodString>;
|
|
21322
22081
|
}, "strict", z.ZodTypeAny, {
|
|
21323
22082
|
wallet: string;
|
|
21324
22083
|
minter: string;
|
|
22084
|
+
depositForHandler?: string | undefined;
|
|
21325
22085
|
}, {
|
|
21326
22086
|
wallet: string;
|
|
21327
22087
|
minter: string;
|
|
22088
|
+
depositForHandler?: string | undefined;
|
|
21328
22089
|
}>>;
|
|
21329
22090
|
}, "strict", z.ZodTypeAny, {
|
|
21330
22091
|
v1?: {
|
|
21331
22092
|
wallet: string;
|
|
21332
22093
|
minter: string;
|
|
22094
|
+
depositForHandler?: string | undefined;
|
|
21333
22095
|
} | undefined;
|
|
21334
22096
|
}, {
|
|
21335
22097
|
v1?: {
|
|
21336
22098
|
wallet: string;
|
|
21337
22099
|
minter: string;
|
|
22100
|
+
depositForHandler?: string | undefined;
|
|
21338
22101
|
} | undefined;
|
|
21339
22102
|
}>;
|
|
21340
22103
|
forwarderSupported: z.ZodObject<{
|
|
@@ -21353,6 +22116,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21353
22116
|
v1?: {
|
|
21354
22117
|
wallet: string;
|
|
21355
22118
|
minter: string;
|
|
22119
|
+
depositForHandler?: string | undefined;
|
|
21356
22120
|
} | undefined;
|
|
21357
22121
|
};
|
|
21358
22122
|
forwarderSupported: {
|
|
@@ -21365,6 +22129,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21365
22129
|
v1?: {
|
|
21366
22130
|
wallet: string;
|
|
21367
22131
|
minter: string;
|
|
22132
|
+
depositForHandler?: string | undefined;
|
|
21368
22133
|
} | undefined;
|
|
21369
22134
|
};
|
|
21370
22135
|
forwarderSupported: {
|
|
@@ -21401,6 +22166,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21401
22166
|
v1?: {
|
|
21402
22167
|
wallet: string;
|
|
21403
22168
|
minter: string;
|
|
22169
|
+
depositForHandler?: string | undefined;
|
|
21404
22170
|
} | undefined;
|
|
21405
22171
|
};
|
|
21406
22172
|
forwarderSupported: {
|
|
@@ -21435,6 +22201,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21435
22201
|
v1?: {
|
|
21436
22202
|
wallet: string;
|
|
21437
22203
|
minter: string;
|
|
22204
|
+
depositForHandler?: string | undefined;
|
|
21438
22205
|
} | undefined;
|
|
21439
22206
|
};
|
|
21440
22207
|
forwarderSupported: {
|
|
@@ -21470,6 +22237,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21470
22237
|
v1?: {
|
|
21471
22238
|
wallet: string;
|
|
21472
22239
|
minter: string;
|
|
22240
|
+
depositForHandler?: string | undefined;
|
|
21473
22241
|
} | undefined;
|
|
21474
22242
|
};
|
|
21475
22243
|
forwarderSupported: {
|
|
@@ -21504,6 +22272,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21504
22272
|
v1?: {
|
|
21505
22273
|
wallet: string;
|
|
21506
22274
|
minter: string;
|
|
22275
|
+
depositForHandler?: string | undefined;
|
|
21507
22276
|
} | undefined;
|
|
21508
22277
|
};
|
|
21509
22278
|
forwarderSupported: {
|
|
@@ -21539,6 +22308,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21539
22308
|
v1?: {
|
|
21540
22309
|
wallet: string;
|
|
21541
22310
|
minter: string;
|
|
22311
|
+
depositForHandler?: string | undefined;
|
|
21542
22312
|
} | undefined;
|
|
21543
22313
|
};
|
|
21544
22314
|
forwarderSupported: {
|
|
@@ -21573,6 +22343,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21573
22343
|
v1?: {
|
|
21574
22344
|
wallet: string;
|
|
21575
22345
|
minter: string;
|
|
22346
|
+
depositForHandler?: string | undefined;
|
|
21576
22347
|
} | undefined;
|
|
21577
22348
|
};
|
|
21578
22349
|
forwarderSupported: {
|
|
@@ -21611,6 +22382,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21611
22382
|
v1?: {
|
|
21612
22383
|
wallet: string;
|
|
21613
22384
|
minter: string;
|
|
22385
|
+
depositForHandler?: string | undefined;
|
|
21614
22386
|
} | undefined;
|
|
21615
22387
|
};
|
|
21616
22388
|
forwarderSupported: {
|
|
@@ -21645,6 +22417,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21645
22417
|
v1?: {
|
|
21646
22418
|
wallet: string;
|
|
21647
22419
|
minter: string;
|
|
22420
|
+
depositForHandler?: string | undefined;
|
|
21648
22421
|
} | undefined;
|
|
21649
22422
|
};
|
|
21650
22423
|
forwarderSupported: {
|
|
@@ -21683,6 +22456,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21683
22456
|
v1?: {
|
|
21684
22457
|
wallet: string;
|
|
21685
22458
|
minter: string;
|
|
22459
|
+
depositForHandler?: string | undefined;
|
|
21686
22460
|
} | undefined;
|
|
21687
22461
|
};
|
|
21688
22462
|
forwarderSupported: {
|
|
@@ -21717,6 +22491,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21717
22491
|
v1?: {
|
|
21718
22492
|
wallet: string;
|
|
21719
22493
|
minter: string;
|
|
22494
|
+
depositForHandler?: string | undefined;
|
|
21720
22495
|
} | undefined;
|
|
21721
22496
|
};
|
|
21722
22497
|
forwarderSupported: {
|
|
@@ -21769,6 +22544,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21769
22544
|
v1?: {
|
|
21770
22545
|
wallet: string;
|
|
21771
22546
|
minter: string;
|
|
22547
|
+
depositForHandler?: string | undefined;
|
|
21772
22548
|
} | undefined;
|
|
21773
22549
|
};
|
|
21774
22550
|
forwarderSupported: {
|
|
@@ -21803,6 +22579,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21803
22579
|
v1?: {
|
|
21804
22580
|
wallet: string;
|
|
21805
22581
|
minter: string;
|
|
22582
|
+
depositForHandler?: string | undefined;
|
|
21806
22583
|
} | undefined;
|
|
21807
22584
|
};
|
|
21808
22585
|
forwarderSupported: {
|
|
@@ -21851,6 +22628,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21851
22628
|
v1?: {
|
|
21852
22629
|
wallet: string;
|
|
21853
22630
|
minter: string;
|
|
22631
|
+
depositForHandler?: string | undefined;
|
|
21854
22632
|
} | undefined;
|
|
21855
22633
|
};
|
|
21856
22634
|
forwarderSupported: {
|
|
@@ -21885,6 +22663,7 @@ declare const anyDepositParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
21885
22663
|
v1?: {
|
|
21886
22664
|
wallet: string;
|
|
21887
22665
|
minter: string;
|
|
22666
|
+
depositForHandler?: string | undefined;
|
|
21888
22667
|
} | undefined;
|
|
21889
22668
|
};
|
|
21890
22669
|
forwarderSupported: {
|
|
@@ -23987,30 +24766,43 @@ interface AppKitContext {
|
|
|
23987
24766
|
* Event handlers registered for AppKit operations.
|
|
23988
24767
|
*
|
|
23989
24768
|
* This property stores event handlers that are registered via the AppKit's
|
|
23990
|
-
* `on()` method. Handlers are grouped by operation type. The
|
|
23991
|
-
*
|
|
23992
|
-
* wires action handlers for additional kits.
|
|
24769
|
+
* `on()` method. Handlers are grouped by operation type. The runtime buckets
|
|
24770
|
+
* are `bridge` and `earn`; the context can add more operation buckets as
|
|
24771
|
+
* AppKit wires action handlers for additional kits.
|
|
23993
24772
|
*
|
|
23994
|
-
* Within each operation bucket, handlers are keyed by action name (for
|
|
23995
|
-
* `bridge.approve`) or `*` for wildcard handlers.
|
|
23996
|
-
* handlers registered, allowing multiple
|
|
24773
|
+
* Within each operation bucket, handlers are keyed by action name (for
|
|
24774
|
+
* example, `bridge.approve` or `earn.deposit`) or `*` for wildcard handlers.
|
|
24775
|
+
* Each action can have multiple handlers registered, allowing multiple
|
|
24776
|
+
* subscribers to listen to the same event.
|
|
23997
24777
|
*
|
|
23998
24778
|
* The handlers are stored in the context to allow deferred registration with
|
|
23999
|
-
* underlying operation kits, enabling a clean separation between event
|
|
24000
|
-
* and operation execution.
|
|
24779
|
+
* underlying operation kits, enabling a clean separation between event
|
|
24780
|
+
* registration and operation execution.
|
|
24001
24781
|
*
|
|
24002
24782
|
* @example
|
|
24003
24783
|
* ```typescript
|
|
24004
24784
|
* const context = createContext()
|
|
24005
24785
|
* // Handlers registered via kit.on() are stored by operation type
|
|
24006
|
-
* // Bridge handlers are registered with BridgeKit when bridge()
|
|
24786
|
+
* // Bridge handlers are registered with BridgeKit when bridge() runs
|
|
24787
|
+
* // Earn handlers are registered with EarnKit when earn operations run
|
|
24007
24788
|
* ```
|
|
24008
24789
|
*/
|
|
24009
|
-
actions: Record<'bridge', Record<string, ((payload: unknown) => void)[]>>;
|
|
24790
|
+
actions: Record<'bridge' | 'earn', Record<string, ((payload: unknown) => void)[]>>;
|
|
24791
|
+
/**
|
|
24792
|
+
* Disable success analytics for the underlying EarnKit, SwapKit, and
|
|
24793
|
+
* UnifiedBalanceKit.
|
|
24794
|
+
*
|
|
24795
|
+
* When `true`, completed earn, swap, and unified balance operations will not
|
|
24796
|
+
* POST analytics events. This does not disable error reporting; use
|
|
24797
|
+
* {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
|
|
24798
|
+
*
|
|
24799
|
+
* @defaultValue false
|
|
24800
|
+
*/
|
|
24801
|
+
disableAnalytics?: boolean;
|
|
24010
24802
|
/**
|
|
24011
24803
|
* Disable error telemetry for all sub-kits.
|
|
24012
24804
|
*
|
|
24013
|
-
* When `true`, none of the underlying kits (BridgeKit, SwapKit,
|
|
24805
|
+
* When `true`, none of the underlying kits (BridgeKit, SwapKit, EarnKit,
|
|
24014
24806
|
* UnifiedBalanceKit) will POST error details to the telemetry
|
|
24015
24807
|
* endpoint when operations throw. Defaults to `false` (enabled).
|
|
24016
24808
|
*
|
|
@@ -24032,6 +24824,7 @@ interface AppKitContext {
|
|
|
24032
24824
|
* Earn operation namespace exposed as `kit.earn`.
|
|
24033
24825
|
*
|
|
24034
24826
|
* Mirrors the operations currently available from `@circle-fin/earn-kit`.
|
|
24827
|
+
* Step events use the AppKit event API (`kit.on('earn.*')` / `kit.on('*')`).
|
|
24035
24828
|
*
|
|
24036
24829
|
* @example
|
|
24037
24830
|
* ```typescript
|
|
@@ -24279,6 +25072,40 @@ interface AppKitEarnOperations {
|
|
|
24279
25072
|
* @internal
|
|
24280
25073
|
*/
|
|
24281
25074
|
getClaimRewardsQuote<TFromAdapterCapabilities extends AdapterCapabilities = AdapterCapabilities>(params: GetClaimRewardsQuoteParams<TFromAdapterCapabilities>): Promise<EarnClaimRewardsQuoteInfo>;
|
|
25075
|
+
/**
|
|
25076
|
+
* Resume a multi-phase earn operation that previously failed.
|
|
25077
|
+
*
|
|
25078
|
+
* Pass the {@link KitError} caught from `deposit`, `withdraw`, or
|
|
25079
|
+
* `claimRewards`. The error carries the original inputs and step
|
|
25080
|
+
* progress, so completed phases (for example a successful token
|
|
25081
|
+
* approval) can be skipped. Call `isRetryableError(error)` first.
|
|
25082
|
+
*
|
|
25083
|
+
* @remarks
|
|
25084
|
+
* Retry re-fetches execution params and may re-submit the execute
|
|
25085
|
+
* transaction. Treat this as best-effort recovery: if a prior attempt
|
|
25086
|
+
* broadcast execute but failed before observing the receipt, that
|
|
25087
|
+
* transaction may still be in flight.
|
|
25088
|
+
*
|
|
25089
|
+
* @param error - The error caught from a previous multi-phase earn operation
|
|
25090
|
+
* @returns Promise resolving to the result of the resumed operation
|
|
25091
|
+
* @throws If the error is not retryable or lacks earn retry context
|
|
25092
|
+
*
|
|
25093
|
+
* @example
|
|
25094
|
+
* ```typescript
|
|
25095
|
+
* import { AppKit, isRetryableError } from '@circle-fin/app-kit'
|
|
25096
|
+
*
|
|
25097
|
+
* const kit = new AppKit()
|
|
25098
|
+
*
|
|
25099
|
+
* try {
|
|
25100
|
+
* await kit.earn.deposit(params)
|
|
25101
|
+
* } catch (error) {
|
|
25102
|
+
* if (isRetryableError(error)) {
|
|
25103
|
+
* const result = await kit.earn.retry(error)
|
|
25104
|
+
* }
|
|
25105
|
+
* }
|
|
25106
|
+
* ```
|
|
25107
|
+
*/
|
|
25108
|
+
retry(error: unknown): Promise<EarnDepositOutcome | EarnWithdrawResult | EarnClaimRewardsResult>;
|
|
24282
25109
|
}
|
|
24283
25110
|
/**
|
|
24284
25111
|
* Type for event handler functions that can be registered with the AppKit.
|
|
@@ -24426,21 +25253,31 @@ type AppKitBridgeActions = PrefixActions<'bridge', DefaultBridgeKitActions>;
|
|
|
24426
25253
|
* to namespace them within the AppKit event system.
|
|
24427
25254
|
*/
|
|
24428
25255
|
type AppKitUnifiedBalanceActions = PrefixActions<'unifiedBalance', GatewayV1Actions>;
|
|
25256
|
+
/**
|
|
25257
|
+
* Prefixed earn actions for AppKit.
|
|
25258
|
+
*
|
|
25259
|
+
* Earn step events are exposed under the `earn.` namespace (for example
|
|
25260
|
+
* `earn.deposit`, `earn.approve`, `earn.withdraw`) so they can be
|
|
25261
|
+
* subscribed to via `kit.on()` alongside bridge and unified balance
|
|
25262
|
+
* events.
|
|
25263
|
+
*/
|
|
25264
|
+
type AppKitEarnActions = PrefixActions<'earn', EarnActions>;
|
|
24429
25265
|
/**
|
|
24430
25266
|
* Union of all AppKit action names.
|
|
24431
25267
|
*/
|
|
24432
|
-
type AppKitActionName = keyof AppKitBridgeActions | keyof AppKitUnifiedBalanceActions;
|
|
25268
|
+
type AppKitActionName = keyof AppKitBridgeActions | keyof AppKitUnifiedBalanceActions | keyof AppKitEarnActions;
|
|
24433
25269
|
/**
|
|
24434
25270
|
* All actions available in AppKit.
|
|
24435
25271
|
*/
|
|
24436
|
-
type AppKitActions = AppKitBridgeActions & AppKitUnifiedBalanceActions;
|
|
25272
|
+
type AppKitActions = AppKitBridgeActions & AppKitUnifiedBalanceActions & AppKitEarnActions;
|
|
24437
25273
|
|
|
24438
25274
|
/**
|
|
24439
25275
|
* Parameters for creating a AppKit context.
|
|
24440
25276
|
*
|
|
24441
25277
|
* This type allows partial customization of the context while ensuring
|
|
24442
25278
|
* that all required properties have sensible defaults. Users can override
|
|
24443
|
-
* specific methods while keeping the rest intact.
|
|
25279
|
+
* specific methods while keeping the rest intact. Action handler buckets
|
|
25280
|
+
* may also be supplied partially; missing buckets default to empty maps.
|
|
24444
25281
|
*
|
|
24445
25282
|
* @example
|
|
24446
25283
|
* ```typescript
|
|
@@ -24452,7 +25289,9 @@ type AppKitActions = AppKitBridgeActions & AppKitUnifiedBalanceActions;
|
|
|
24452
25289
|
* })
|
|
24453
25290
|
* ```
|
|
24454
25291
|
*/
|
|
24455
|
-
type CreateContextParams = Partial<AppKitContext
|
|
25292
|
+
type CreateContextParams = Omit<Partial<AppKitContext>, 'actions'> & {
|
|
25293
|
+
actions?: Partial<AppKitContext['actions']>;
|
|
25294
|
+
};
|
|
24456
25295
|
|
|
24457
25296
|
/**
|
|
24458
25297
|
* Destination for a Gateway spend (mint) operation.
|
|
@@ -24830,10 +25669,13 @@ interface ResolvedSpendParams<TFromAdapterCapabilities extends AdapterCapabiliti
|
|
|
24830
25669
|
*/
|
|
24831
25670
|
type SpendFeeFunction = (params: ResolvedSpendParams) => Promise<string> | string;
|
|
24832
25671
|
/**
|
|
24833
|
-
* Function that resolves the fee recipient address for a
|
|
24834
|
-
* Called once per
|
|
25672
|
+
* Function that resolves the fee recipient address for a spend.
|
|
25673
|
+
* Called once per spend, against the resolved **destination** chain —
|
|
25674
|
+
* every fee burn intent in a spend mints to that single chain
|
|
25675
|
+
* regardless of which source chain(s) funded it, so only one
|
|
25676
|
+
* recipient address (valid on the destination chain) is ever needed.
|
|
24835
25677
|
*/
|
|
24836
|
-
type SpendFeeRecipientFunction = (
|
|
25678
|
+
type SpendFeeRecipientFunction = (destinationChain: ChainDefinition, params: ResolvedSpendParams) => Promise<string> | string;
|
|
24837
25679
|
/**
|
|
24838
25680
|
* Policy for computing and routing custom developer fees.
|
|
24839
25681
|
*
|
|
@@ -24843,11 +25685,54 @@ type SpendFeeRecipientFunction = (feePayoutChain: ChainDefinition, params: Resol
|
|
|
24843
25685
|
* Fields that only exist after resolution (e.g. per-source allocations)
|
|
24844
25686
|
* may be `undefined`. Implementations should only rely on top-level
|
|
24845
25687
|
* fields such as `to`, `token`, and `amount`.
|
|
25688
|
+
*
|
|
25689
|
+
* @remarks
|
|
25690
|
+
* `resolveFeeRecipientAddress` is optional when you configure
|
|
25691
|
+
* {@link UnifiedBalanceKit.setFeeRecipients} instead — the declarative
|
|
25692
|
+
* map takes priority over this callback when both are present. Provide
|
|
25693
|
+
* exactly one of the two; a policy with neither throws at spend time.
|
|
24846
25694
|
*/
|
|
24847
25695
|
interface CustomFeePolicy {
|
|
24848
25696
|
computeFee: SpendFeeFunction;
|
|
24849
|
-
resolveFeeRecipientAddress
|
|
25697
|
+
resolveFeeRecipientAddress?: SpendFeeRecipientFunction;
|
|
24850
25698
|
}
|
|
25699
|
+
/**
|
|
25700
|
+
* Chain type group used to key {@link FeeRecipientsConfig}.
|
|
25701
|
+
*
|
|
25702
|
+
* @remarks
|
|
25703
|
+
* Only `'evm'` and `'solana'` are live today (the only chain types the
|
|
25704
|
+
* kit's provider currently supports). This is deliberately a narrow
|
|
25705
|
+
* subset of `@core/chains`' broader `ChainType` union rather than a
|
|
25706
|
+
* hardcoded two-field struct, so that support for additional non-EVM
|
|
25707
|
+
* chain types (e.g. Stellar, Starknet) can be added later by adding
|
|
25708
|
+
* new union members here — no restructuring of `FeeRecipientsConfig`
|
|
25709
|
+
* or its consumers required.
|
|
25710
|
+
*/
|
|
25711
|
+
type FeeRecipientChainType = 'evm' | 'solana';
|
|
25712
|
+
/**
|
|
25713
|
+
* Declarative map of fee recipient addresses, keyed by chain type.
|
|
25714
|
+
*
|
|
25715
|
+
* @remarks
|
|
25716
|
+
* Set via {@link UnifiedBalanceKit.setFeeRecipients}. At spend time the
|
|
25717
|
+
* kit resolves the spend's destination chain to its
|
|
25718
|
+
* {@link FeeRecipientChainType} and looks up the matching entry —
|
|
25719
|
+
* exactly one recipient is used per spend (see
|
|
25720
|
+
* {@link SpendFeeRecipientFunction}). Provide entries for every chain
|
|
25721
|
+
* type you expect to spend to; a spend to a destination chain type
|
|
25722
|
+
* with no matching entry throws before any fee collection is
|
|
25723
|
+
* attempted.
|
|
25724
|
+
*
|
|
25725
|
+
* @example
|
|
25726
|
+
* ```typescript
|
|
25727
|
+
* import type { FeeRecipientsConfig } from '@circle-fin/unified-balance-kit'
|
|
25728
|
+
*
|
|
25729
|
+
* const feeRecipients: FeeRecipientsConfig = {
|
|
25730
|
+
* evm: '0x1234567890123456789012345678901234567890',
|
|
25731
|
+
* solana: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
|
|
25732
|
+
* }
|
|
25733
|
+
* ```
|
|
25734
|
+
*/
|
|
25735
|
+
type FeeRecipientsConfig = Partial<Record<FeeRecipientChainType, string>>;
|
|
24851
25736
|
/**
|
|
24852
25737
|
* Fee category describing the origin of a fee line item.
|
|
24853
25738
|
*
|
|
@@ -25684,10 +26569,13 @@ interface GetDelegateStatusParams<TAdapterCapabilities extends AdapterCapabiliti
|
|
|
25684
26569
|
}
|
|
25685
26570
|
|
|
25686
26571
|
/**
|
|
25687
|
-
* Parameters for initiating a delayed fund removal from a Gateway
|
|
26572
|
+
* Parameters for initiating a delayed recovery fund removal from a Gateway
|
|
25688
26573
|
* account.
|
|
25689
26574
|
*
|
|
25690
26575
|
* @remarks
|
|
26576
|
+
* Use fund removal only as a trustless fallback when the normal spend flow is
|
|
26577
|
+
* unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
|
|
26578
|
+
*
|
|
25691
26579
|
* Fund removals have a mandatory 7-day delay before they can be
|
|
25692
26580
|
* completed. Only one removal may be pending per chain at a
|
|
25693
26581
|
* time. Initiating a second removal on the same chain adds the
|
|
@@ -25770,7 +26658,12 @@ interface InitiateRemoveFundResult {
|
|
|
25770
26658
|
explorerUrl?: string;
|
|
25771
26659
|
}
|
|
25772
26660
|
/**
|
|
25773
|
-
* Parameters for completing a fund removal after the
|
|
26661
|
+
* Parameters for completing a recovery fund removal after the withdrawal
|
|
26662
|
+
* delay.
|
|
26663
|
+
*
|
|
26664
|
+
* @remarks
|
|
26665
|
+
* Use fund removal only as a trustless fallback when the normal spend flow is
|
|
26666
|
+
* unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
|
|
25774
26667
|
*
|
|
25775
26668
|
* @typeParam TAdapterCapabilities - Adapter capability constraints.
|
|
25776
26669
|
* @typeParam TChainIdentifier - Accepted chain identifier type.
|
|
@@ -25867,6 +26760,11 @@ interface GetSupportedChainsOptions {
|
|
|
25867
26760
|
* Internally holds a persistent {@link UnifiedBalanceKit} instance so that
|
|
25868
26761
|
* event dispatchers and custom fee policies are preserved across calls.
|
|
25869
26762
|
*
|
|
26763
|
+
* Use {@link AppKitUnifiedBalance.spend} for normal movement out of a Unified
|
|
26764
|
+
* Balance. {@link AppKitUnifiedBalance.removeFund} is a trustless recovery path
|
|
26765
|
+
* for situations where the normal spend flow is unavailable, and it requires a
|
|
26766
|
+
* 7-day withdrawal delay after {@link AppKitUnifiedBalance.initiateRemoveFund}.
|
|
26767
|
+
*
|
|
25870
26768
|
* @example
|
|
25871
26769
|
* ```typescript
|
|
25872
26770
|
* import { AppKit } from '@circle-fin/app-kit'
|
|
@@ -26068,7 +26966,12 @@ declare class AppKitUnifiedBalance {
|
|
|
26068
26966
|
*/
|
|
26069
26967
|
removeDelegate(params: UpdateDelegateParams): Promise<UpdateDelegateResult>;
|
|
26070
26968
|
/**
|
|
26071
|
-
*
|
|
26969
|
+
* Initiate a trustless recovery removal from an account.
|
|
26970
|
+
*
|
|
26971
|
+
* Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
|
|
26972
|
+
* recovery path for situations where the normal spend flow is unavailable.
|
|
26973
|
+
* Calling this method starts the 7-day withdrawal delay before the removal can
|
|
26974
|
+
* be completed.
|
|
26072
26975
|
*
|
|
26073
26976
|
* @param params - The account owner's adapter context, amount, and token.
|
|
26074
26977
|
* @returns Promise resolving to the initiation details.
|
|
@@ -26086,11 +26989,16 @@ declare class AppKitUnifiedBalance {
|
|
|
26086
26989
|
*/
|
|
26087
26990
|
initiateRemoveFund(params: InitiateRemoveFundParams): Promise<InitiateRemoveFundResult>;
|
|
26088
26991
|
/**
|
|
26089
|
-
* Complete a
|
|
26992
|
+
* Complete a trustless recovery removal after the withdrawal delay.
|
|
26993
|
+
*
|
|
26994
|
+
* Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
|
|
26995
|
+
* recovery path for situations where the normal spend flow is unavailable.
|
|
26996
|
+
* Both EVM and Solana removals require a 7-day withdrawal delay after
|
|
26997
|
+
* `initiateRemoveFund` before funds can be removed.
|
|
26090
26998
|
*
|
|
26091
26999
|
* @param params - The account owner context matching the original initiation.
|
|
26092
27000
|
* @returns Promise resolving to the fund removal details.
|
|
26093
|
-
* @throws {KitError} If the
|
|
27001
|
+
* @throws {KitError} If the withdrawal delay has not elapsed or the
|
|
26094
27002
|
* on-chain transaction fails.
|
|
26095
27003
|
*
|
|
26096
27004
|
* @example
|
|
@@ -26161,6 +27069,43 @@ declare class AppKitUnifiedBalance {
|
|
|
26161
27069
|
* ```
|
|
26162
27070
|
*/
|
|
26163
27071
|
removeCustomFeePolicy(): void;
|
|
27072
|
+
/**
|
|
27073
|
+
* Set a declarative fee recipient map, keyed by chain type.
|
|
27074
|
+
*
|
|
27075
|
+
* Once set, `spend()`/`estimateSpend()` resolve the fee recipient by
|
|
27076
|
+
* looking up the spend's destination chain type in this map — taking
|
|
27077
|
+
* priority over `customFeePolicy`'s `resolveFeeRecipientAddress`
|
|
27078
|
+
* callback.
|
|
27079
|
+
*
|
|
27080
|
+
* @remarks
|
|
27081
|
+
* This only controls which address a fee is sent to — it does not by
|
|
27082
|
+
* itself cause any fee to be charged. You still need
|
|
27083
|
+
* `setCustomFeePolicy`'s `computeFee` to determine the fee amount;
|
|
27084
|
+
* calling `setFeeRecipients` without ever calling `setCustomFeePolicy`
|
|
27085
|
+
* throws at spend time (there is no `computeFee` to determine an
|
|
27086
|
+
* amount).
|
|
27087
|
+
*
|
|
27088
|
+
* @param config - Fee recipient addresses keyed by chain type (e.g.
|
|
27089
|
+
* `{ evm: '0x...', solana: 'Sol...' }`).
|
|
27090
|
+
*
|
|
27091
|
+
* @example
|
|
27092
|
+
* ```typescript
|
|
27093
|
+
* kit.unifiedBalance.setFeeRecipients({
|
|
27094
|
+
* evm: '0x1234567890123456789012345678901234567890',
|
|
27095
|
+
* solana: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
|
|
27096
|
+
* })
|
|
27097
|
+
* ```
|
|
27098
|
+
*/
|
|
27099
|
+
setFeeRecipients(config: FeeRecipientsConfig): void;
|
|
27100
|
+
/**
|
|
27101
|
+
* Remove the declarative fee recipient map.
|
|
27102
|
+
*
|
|
27103
|
+
* @example
|
|
27104
|
+
* ```typescript
|
|
27105
|
+
* kit.unifiedBalance.removeFeeRecipients()
|
|
27106
|
+
* ```
|
|
27107
|
+
*/
|
|
27108
|
+
removeFeeRecipients(): void;
|
|
26164
27109
|
}
|
|
26165
27110
|
|
|
26166
27111
|
interface DeveloperFeeHooks {
|
|
@@ -26174,10 +27119,21 @@ type AppKitConfig = CreateContextParams & {
|
|
|
26174
27119
|
developerFee?: Partial<DeveloperFeeHooks>;
|
|
26175
27120
|
/** Optional config forwarded to the underlying {@link UnifiedBalanceKit}. */
|
|
26176
27121
|
unifiedBalance?: UnifiedBalanceKitConfig;
|
|
27122
|
+
/**
|
|
27123
|
+
* Disable success analytics for the underlying EarnKit, SwapKit, and
|
|
27124
|
+
* UnifiedBalanceKit.
|
|
27125
|
+
*
|
|
27126
|
+
* When `true`, completed earn, swap, and unified balance operations will not
|
|
27127
|
+
* POST analytics events. This does not disable error reporting; use
|
|
27128
|
+
* {@link AppKitConfig.disableErrorReporting} for that. Defaults to `false`.
|
|
27129
|
+
*
|
|
27130
|
+
* @defaultValue false
|
|
27131
|
+
*/
|
|
27132
|
+
disableAnalytics?: boolean;
|
|
26177
27133
|
/**
|
|
26178
27134
|
* Disable error telemetry for all underlying kits.
|
|
26179
27135
|
*
|
|
26180
|
-
* When `true`, BridgeKit, SwapKit, and UnifiedBalanceKit will not
|
|
27136
|
+
* When `true`, BridgeKit, SwapKit, EarnKit, and UnifiedBalanceKit will not
|
|
26181
27137
|
* POST error details to the telemetry endpoint. Defaults to `false`.
|
|
26182
27138
|
*
|
|
26183
27139
|
* @defaultValue false
|
|
@@ -26559,7 +27515,8 @@ declare class AppKit {
|
|
|
26559
27515
|
* or `'NOT_FOUND'`). Use {@link AppKit.waitForSwap} if you'd rather
|
|
26560
27516
|
* not write the polling loop yourself.
|
|
26561
27517
|
*
|
|
26562
|
-
* @param params - `txHash
|
|
27518
|
+
* @param params - `txHash` and `chainIn`, plus optional `chainOut` and
|
|
27519
|
+
* `kitKey`.
|
|
26563
27520
|
* @returns A snapshot of the swap's status at the time of the call.
|
|
26564
27521
|
* @throws \{KitError\} If `chainIn` or `chainOut` is malformed.
|
|
26565
27522
|
*
|
|
@@ -26671,7 +27628,7 @@ declare class AppKit {
|
|
|
26671
27628
|
* translates to the chain's native sentinel address — `0xEee…` for EVM,
|
|
26672
27629
|
* `1111…` for Solana — before querying the service.
|
|
26673
27630
|
*
|
|
26674
|
-
* @param params - `chain`, optional `tokens
|
|
27631
|
+
* @param params - `chain`, plus optional `tokens` and `kitKey`.
|
|
26675
27632
|
* @returns A nested map of `[chain][address] → { priceUSD, fetchedAt }`.
|
|
26676
27633
|
* @throws \{KitError\} If `chain` is malformed, `tokens` exceeds 100
|
|
26677
27634
|
* entries, or any entry is neither a registered symbol nor a
|
|
@@ -26725,17 +27682,16 @@ declare class AppKit {
|
|
|
26725
27682
|
/**
|
|
26726
27683
|
* Register an event handler for a specific AppKit action.
|
|
26727
27684
|
*
|
|
26728
|
-
* Subscribe to events
|
|
26729
|
-
*
|
|
26730
|
-
*
|
|
27685
|
+
* Subscribe to step events from bridge, earn, or unified balance
|
|
27686
|
+
* operations. Action names are namespaced: `bridge.*`, `earn.*`, and
|
|
27687
|
+
* `unifiedBalance.*`. Use `'*'` to receive every action.
|
|
26731
27688
|
*
|
|
26732
|
-
* Handlers receive strongly-typed payloads
|
|
26733
|
-
* handlers
|
|
26734
|
-
* the action occurs. Use the wildcard '*' to listen to all actions.
|
|
27689
|
+
* Handlers receive strongly-typed payloads for the chosen action.
|
|
27690
|
+
* Multiple handlers may be registered for the same action.
|
|
26735
27691
|
*
|
|
26736
27692
|
* @typeParam K - The action name to listen for
|
|
26737
27693
|
* @param action - The namespaced action name or '*' for all actions
|
|
26738
|
-
* @param handler - Callback
|
|
27694
|
+
* @param handler - Callback invoked when the action occurs
|
|
26739
27695
|
*
|
|
26740
27696
|
* @example
|
|
26741
27697
|
* ```typescript
|
|
@@ -26748,6 +27704,11 @@ declare class AppKit {
|
|
|
26748
27704
|
* console.log('Approval transaction:', payload.values.txHash)
|
|
26749
27705
|
* })
|
|
26750
27706
|
*
|
|
27707
|
+
* // Listen to earn deposit steps
|
|
27708
|
+
* kit.on('earn.deposit', (payload) => {
|
|
27709
|
+
* console.log('Earn deposit step:', payload.values.state)
|
|
27710
|
+
* })
|
|
27711
|
+
*
|
|
26751
27712
|
* // Listen to unified balance action
|
|
26752
27713
|
* kit.on('unifiedBalance.gateway.spend.succeeded', (payload) => {
|
|
26753
27714
|
* console.log('Spend succeeded:', payload.data)
|
|
@@ -26792,6 +27753,16 @@ declare class AppKit {
|
|
|
26792
27753
|
*/
|
|
26793
27754
|
off<K extends AppKitActionName>(action: K, handler: (payload: AppKitActions[K]) => void): void;
|
|
26794
27755
|
off(action: '*', handler: (payload: AppKitActions[keyof AppKitActions]) => void): void;
|
|
27756
|
+
/**
|
|
27757
|
+
* Remove one handler from a deferred AppKit action bucket.
|
|
27758
|
+
*
|
|
27759
|
+
* Deletes the action key when its handler list becomes empty.
|
|
27760
|
+
*
|
|
27761
|
+
* @param handlers - Action bucket to update (`bridge` or `earn`)
|
|
27762
|
+
* @param action - Stored action key, including namespace or `*`
|
|
27763
|
+
* @param handler - Handler reference previously passed to {@link on}
|
|
27764
|
+
*/
|
|
27765
|
+
private removeStoredActionHandler;
|
|
26795
27766
|
}
|
|
26796
27767
|
|
|
26797
27768
|
/**
|
|
@@ -26911,4 +27882,4 @@ declare function isTokenAddress(token: string, chain: ChainDefinition): token is
|
|
|
26911
27882
|
declare function validateToken(token: string, chain: ChainDefinition): TokenValidationResult;
|
|
26912
27883
|
|
|
26913
27884
|
export { AppKit, AppKitUnifiedBalance, BalanceError, Blockchain, BridgeChain, EarnChain, EarnError, EarnKit, InputError, KitError, NetworkError, OnchainError, RateLimitError, RpcError, ServiceError, SwapChain, TOKEN_ALIASES, TransferSpeed, UnifiedBalanceChain, anyDepositParamsSchema, claimRewardsParamsSchema, createEarnKitContext, depositParamsSchema, claimRewards as earnClaimRewards, deposit as earnDeposit, exploreVaults as earnExploreVaults, exploreVaultsIterator as earnExploreVaultsIterator, getClaimRewardsQuote as earnGetClaimRewardsQuote, getCrossChainDepositStatus as earnGetCrossChainDepositStatus, getCrossChainDepositStatusOutcome as earnGetCrossChainDepositStatusOutcome, getDepositQuote as earnGetDepositQuote, getPosition as earnGetPosition, getSupportedChains as earnGetSupportedChains, getVaults as earnGetVaults, getWithdrawalQuote as earnGetWithdrawalQuote, waitForCrossChainDeposit as earnWaitForCrossChainDeposit, withdraw as earnWithdraw, exploreVaultsIteratorParamsSchema, exploreVaultsParamsSchema, getClaimRewardsQuoteParamsSchema, getCrossChainDepositStatusParamsSchema, getDepositQuoteParamsSchema, getErrorCode, getErrorMessage, getPositionParamsSchema, getTokenDecimals, getVaultsParamsSchema, getWithdrawalQuoteParamsSchema, isBalanceError, isFatalError, isInputError, isKitError, isNetworkError, isOnchainError, isRateLimitError, isRetryableError, isRpcError, isServiceError, isTerminalCrossChainDepositStatus as isTerminalEarnCrossChainDepositStatus, isTokenAddress, isTokenAlias, isUserCancellationError, setExternalPrefix, validateToken, waitForCrossChainDepositParamsSchema, withdrawParamsSchema };
|
|
26914
|
-
export type { ActionHandler, AdapterContext, AllowanceStrategy$2 as AllowanceStrategy, AppKitActionName, AppKitActions, AppKitBridgeActions, AppKitConfig, AppKitContext, AppKitEarnOperations, AppKitUnifiedBalanceActions, BaseChainDefinition, BridgeConfig, CustomFeePolicy$2 as BridgeCustomFeePolicy, BridgeParams, BridgeResult, BridgeStep, CCTPConfig, CCTPMergedConfig, CCTPSplitConfig, ChainDefinition, Currency, DelegateStatus, DepositForParams, DepositParams, DepositResult, DeveloperFeeHooks, EVMChainDefinition, EarnAccruedRewardInfo, EarnAdapterContext, AnyDepositParams as EarnAnyDepositParams, EarnAssetAmount, EarnBridgeCctpStatus, EarnBridgeHopStatus, ClaimRewardsParams as EarnClaimRewardsParams, EarnClaimRewardsQuoteInfo, EarnClaimRewardsResult, EarnClaimedAmount, EarnClaimedRewardsResult, EarnConfig, EarnCrossChainDepositDestination, CrossChainDepositParams as EarnCrossChainDepositParams, EarnCrossChainDepositResult, EarnCrossChainDepositStatus, EarnCrossChainDepositWaitOutcome, EarnCrossChainDepositWaitResult, CrossChainGetDepositQuoteParams as EarnCrossChainGetDepositQuoteParams, EarnDepositOutcome, DepositParams$2 as EarnDepositParams, EarnDepositQuoteInfo, EarnDepositResult, ExploreVaultsIteratorParams as EarnExploreVaultsIteratorParams, ExploreVaultsPagination as EarnExploreVaultsPagination, ExploreVaultsParams as EarnExploreVaultsParams, EarnExploreVaultsResult, ExploreVaultsSortBy as EarnExploreVaultsSortBy, EarnGasFeeEstimate, EarnGasFeeEstimateBase, GetClaimRewardsQuoteParams as EarnGetClaimRewardsQuoteParams, GetCrossChainDepositStatusParams as EarnGetCrossChainDepositStatusParams, GetDepositQuoteParams as EarnGetDepositQuoteParams, GetPositionParams as EarnGetPositionParams, GetVaultsParams as EarnGetVaultsParams, EarnGetVaultsResult, GetWithdrawalQuoteParams as EarnGetWithdrawalQuoteParams, EarnKitConfig, EarnKitContext, EarnOperationParams, EarnPositionInfo, EarnPositionPnLInfo, EarningProvider as EarnProvider, SameChainDepositParams as EarnSameChainDepositParams, EarnSameChainDepositResult, SameChainGetDepositQuoteParams as EarnSameChainGetDepositQuoteParams, EarnServiceConfig, EarnVaultInfo, VaultQuery as EarnVaultQuery, WaitForCrossChainDepositParams as EarnWaitForCrossChainDepositParams, WithdrawParams as EarnWithdrawParams, EarnWithdrawResult, EarnWithdrawalQuoteInfo, ErrorDetails, EstimateResult$1 as EstimateResult, EstimateSpendResult, EstimatedGas, FeeOperationType, GetBalancesParams, GetBalancesResult, GetDelegateStatusParams, GetSupportedChainsOptions, GetSwapStatusParams, GetTokenRatesParams, GetTokenRatesResult, InitiateRemoveFundParams, InitiateRemoveFundResult, KitContractType, NonEVMChainDefinition, OperationParamsMap, OperationType, Recoverability, RemoveFundParams, RemoveFundResult, RetryContext, SendParams, SpendDestination, SpendParams, SpendResult, SwapConfig, CustomFeePolicy$1 as SwapCustomFeePolicy, SwapDestinationLeg, SwapEstimate, SwapFeeContext, SwapKitConfig, SwapKitContext, SwapParams, SwapProgress, SwapResult, SwapSourceLeg, SwapStatus, SwapStatusResult, SwapTerminalStatus, TokenInfo, TokenRate, UnifiedBalanceChainIdentifier, CustomFeePolicy as UnifiedBalanceCustomFeePolicy, UnifiedBalanceKitConfig, SupportedToken as UnifiedBalanceSupportedToken, UpdateDelegateParams, UpdateDelegateResult, VersionConfig, WaitForSwapDiscreteParams, WaitForSwapParams, WaitForSwapResultParams };
|
|
27885
|
+
export type { ActionHandler, AdapterContext, AllowanceStrategy$2 as AllowanceStrategy, AppKitActionName, AppKitActions, AppKitBridgeActions, AppKitConfig, AppKitContext, AppKitEarnActions, AppKitEarnOperations, AppKitUnifiedBalanceActions, BaseChainDefinition, BridgeConfig, CustomFeePolicy$2 as BridgeCustomFeePolicy, BridgeParams, BridgeResult, BridgeStep, CCTPConfig, CCTPMergedConfig, CCTPSplitConfig, ChainDefinition, Currency, DelegateStatus, DepositForParams, DepositParams, DepositResult, DeveloperFeeHooks, EVMChainDefinition, EarnAccruedRewardInfo, EarnAdapterContext, AnyDepositParams as EarnAnyDepositParams, EarnAssetAmount, EarnBridgeCctpStatus, EarnBridgeHopStatus, EarnBridgeQuoteExpiry, ClaimRewardsParams as EarnClaimRewardsParams, EarnClaimRewardsQuoteInfo, EarnClaimRewardsResult, EarnClaimedAmount, EarnClaimedRewardsResult, EarnConfig, EarnCrossChainDepositDestination, CrossChainDepositParams as EarnCrossChainDepositParams, EarnCrossChainDepositResult, EarnCrossChainDepositStatus, EarnCrossChainDepositWaitOutcome, EarnCrossChainDepositWaitResult, CrossChainGetDepositQuoteParams as EarnCrossChainGetDepositQuoteParams, EarnDepositOutcome, DepositParams$2 as EarnDepositParams, EarnDepositQuoteInfo, EarnDepositResult, ExploreVaultsIteratorParams as EarnExploreVaultsIteratorParams, ExploreVaultsPagination as EarnExploreVaultsPagination, ExploreVaultsParams as EarnExploreVaultsParams, EarnExploreVaultsResult, ExploreVaultsSortBy as EarnExploreVaultsSortBy, EarnGasFeeEstimate, EarnGasFeeEstimateBase, GetClaimRewardsQuoteParams as EarnGetClaimRewardsQuoteParams, GetCrossChainDepositStatusParams as EarnGetCrossChainDepositStatusParams, GetDepositQuoteParams as EarnGetDepositQuoteParams, GetPositionParams as EarnGetPositionParams, GetVaultsParams as EarnGetVaultsParams, EarnGetVaultsResult, GetWithdrawalQuoteParams as EarnGetWithdrawalQuoteParams, EarnKitConfig, EarnKitContext, EarnOperationParams, EarnPositionInfo, EarnPositionPnLInfo, EarningProvider as EarnProvider, SameChainDepositParams as EarnSameChainDepositParams, EarnSameChainDepositResult, SameChainGetDepositQuoteParams as EarnSameChainGetDepositQuoteParams, EarnServiceConfig, EarnVaultInfo, VaultQuery as EarnVaultQuery, WaitForCrossChainDepositParams as EarnWaitForCrossChainDepositParams, WithdrawParams as EarnWithdrawParams, EarnWithdrawResult, EarnWithdrawalQuoteInfo, ErrorDetails, EstimateResult$1 as EstimateResult, EstimateSpendResult, EstimatedGas, FeeOperationType, GetBalancesParams, GetBalancesResult, GetDelegateStatusParams, GetSupportedChainsOptions, GetSwapStatusParams, GetTokenRatesParams, GetTokenRatesResult, InitiateRemoveFundParams, InitiateRemoveFundResult, KitContractType, NonEVMChainDefinition, OperationParamsMap, OperationType, Recoverability, RemoveFundParams, RemoveFundResult, RetryContext, SendParams, SpendDestination, SpendParams, SpendResult, SwapConfig, CustomFeePolicy$1 as SwapCustomFeePolicy, SwapDestinationLeg, SwapEstimate, SwapFeeContext, SwapKitConfig, SwapKitContext, SwapParams, SwapProgress, SwapResult, SwapSourceLeg, SwapStatus, SwapStatusResult, SwapTerminalStatus, TokenInfo, TokenRate, UnifiedBalanceChainIdentifier, CustomFeePolicy as UnifiedBalanceCustomFeePolicy, FeeRecipientsConfig as UnifiedBalanceFeeRecipientsConfig, UnifiedBalanceKitConfig, SupportedToken as UnifiedBalanceSupportedToken, UpdateDelegateParams, UpdateDelegateResult, VersionConfig, WaitForSwapDiscreteParams, WaitForSwapParams, WaitForSwapResultParams };
|