@circle-fin/app-kit 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -1566,7 +1566,7 @@ declare const ArcTestnet: {
1566
1566
  readonly chainId: 5042002;
1567
1567
  readonly isTestnet: true;
1568
1568
  readonly explorerUrl: "https://testnet.arcscan.app/tx/{hash}";
1569
- readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.network/"];
1569
+ readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.io"];
1570
1570
  readonly eurcAddress: "0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a";
1571
1571
  readonly usdcAddress: "0x3600000000000000000000000000000000000000";
1572
1572
  readonly usdtAddress: null;
@@ -15904,6 +15904,20 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
15904
15904
  * ```
15905
15905
  */
15906
15906
  bridge<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities>(params: CCTPV2BridgeParams<TFromAdapterCapabilities, TToAdapterCapabilities>): Promise<BridgeResult>;
15907
+ /**
15908
+ * Reject a forwarded transfer to Solana whose amount does not exceed the fee.
15909
+ *
15910
+ * CCTP v2 reverts a burn whose `maxFee` is not less than its amount, and the Solana
15911
+ * forwarding fee includes the recipient token account rent. Checking before the
15912
+ * approval avoids sending a transaction that can never be followed by a burn.
15913
+ * Skipped when the caller provides `config.maxFee`.
15914
+ *
15915
+ * @param params - The validated CCTP v2 bridge parameters.
15916
+ * @returns A promise that resolves when the amount covers the fee.
15917
+ * @throws {KitError} INPUT_INVALID_AMOUNT (FATAL) when the fee is greater than or equal
15918
+ * to the amount.
15919
+ */
15920
+ private assertAmountCoversRecipientSetupFee;
15907
15921
  /**
15908
15922
  * Retry a failed or incomplete CCTP v2 bridge operation.
15909
15923
  *
@@ -16311,6 +16325,9 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
16311
16325
  * | FAST | true | No | maxFee = calculatedBurnFee + forwardingFee |
16312
16326
  * | FAST | true | Yes | maxFee = config.maxFee |
16313
16327
  *
16328
+ * For forwarded burns to Solana, the forwarding fee includes the rent for creating the
16329
+ * recipient's token account. A caller-provided `maxFee` must cover it too.
16330
+ *
16314
16331
  * @param params - The bridge parameters object containing:
16315
16332
  * - `source`: The source wallet context with chain definition and adapter
16316
16333
  * - `destination`: The destination wallet context with chain definition and adapter
@@ -16603,6 +16620,18 @@ interface BridgeKitConfig<TExtraProviders extends FlexibleBridgingProvider[] = [
16603
16620
  * @defaultValue false
16604
16621
  */
16605
16622
  disableErrorReporting?: boolean;
16623
+ /**
16624
+ * Disable success analytics.
16625
+ *
16626
+ * When `true`, the SDK will not POST an event when `bridge()` or `retry()`
16627
+ * completes a transfer. The event carries the source and destination
16628
+ * chains, token, amount, and source transaction hash. It never includes
16629
+ * wallet addresses or keys. This does not disable error reporting; use
16630
+ * {@link BridgeKitConfig.disableErrorReporting} for that.
16631
+ *
16632
+ * @defaultValue false
16633
+ */
16634
+ disableAnalytics?: boolean;
16606
16635
  /**
16607
16636
  * Custom HTTP headers forwarded with the default providers' attestation
16608
16637
  * (Iris) API requests — both `CCTPV2BridgingProvider` (USDC routes) and
@@ -16790,6 +16819,11 @@ declare class BridgeKit<TExtraProviders extends FlexibleBridgingProvider[] = []>
16790
16819
  private readonly disableErrorReporting;
16791
16820
  /** Per-kit telemetry identity for shared helpers. */
16792
16821
  private readonly telemetryConfig;
16822
+ /**
16823
+ * Per-kit telemetry identity for success events. Gated by `disableAnalytics`
16824
+ * independently of `disableErrorReporting`.
16825
+ */
16826
+ private readonly analyticsTelemetryConfig;
16793
16827
  /**
16794
16828
  * Create a new BridgeKit instance.
16795
16829
  *
@@ -51537,11 +51571,11 @@ interface AppKitContext {
51537
51571
  */
51538
51572
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
51539
51573
  /**
51540
- * Disable success analytics for the underlying EarnKit, SwapKit,
51574
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
51541
51575
  * BorrowKit, and UnifiedBalanceKit.
51542
51576
  *
51543
- * When `true`, completed earn, swap, borrow, and unified balance operations
51544
- * will not POST analytics events. This does not disable error reporting; use
51577
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
51578
+ * operations will not POST analytics events. This does not disable error reporting; use
51545
51579
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
51546
51580
  *
51547
51581
  * @defaultValue false
@@ -52986,11 +53020,11 @@ type AppKitConfig = CreateContextParams & {
52986
53020
  /** Optional config forwarded to the underlying {@link UnifiedBalanceKit}. */
52987
53021
  unifiedBalance?: UnifiedBalanceKitConfig;
52988
53022
  /**
52989
- * Disable success analytics for the underlying EarnKit, SwapKit, and
52990
- * UnifiedBalanceKit.
53023
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
53024
+ * BorrowKit, and UnifiedBalanceKit.
52991
53025
  *
52992
- * When `true`, completed earn, swap, and unified balance operations will not
52993
- * POST analytics events. This does not disable error reporting; use
53026
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
53027
+ * operations will not POST analytics events. This does not disable error reporting; use
52994
53028
  * {@link AppKitConfig.disableErrorReporting} for that. Defaults to `false`.
52995
53029
  *
52996
53030
  * @defaultValue false
package/index.d.mts CHANGED
@@ -1566,7 +1566,7 @@ declare const ArcTestnet: {
1566
1566
  readonly chainId: 5042002;
1567
1567
  readonly isTestnet: true;
1568
1568
  readonly explorerUrl: "https://testnet.arcscan.app/tx/{hash}";
1569
- readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.network/"];
1569
+ readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.io"];
1570
1570
  readonly eurcAddress: "0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a";
1571
1571
  readonly usdcAddress: "0x3600000000000000000000000000000000000000";
1572
1572
  readonly usdtAddress: null;
@@ -15904,6 +15904,20 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
15904
15904
  * ```
15905
15905
  */
15906
15906
  bridge<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities>(params: CCTPV2BridgeParams<TFromAdapterCapabilities, TToAdapterCapabilities>): Promise<BridgeResult>;
15907
+ /**
15908
+ * Reject a forwarded transfer to Solana whose amount does not exceed the fee.
15909
+ *
15910
+ * CCTP v2 reverts a burn whose `maxFee` is not less than its amount, and the Solana
15911
+ * forwarding fee includes the recipient token account rent. Checking before the
15912
+ * approval avoids sending a transaction that can never be followed by a burn.
15913
+ * Skipped when the caller provides `config.maxFee`.
15914
+ *
15915
+ * @param params - The validated CCTP v2 bridge parameters.
15916
+ * @returns A promise that resolves when the amount covers the fee.
15917
+ * @throws {KitError} INPUT_INVALID_AMOUNT (FATAL) when the fee is greater than or equal
15918
+ * to the amount.
15919
+ */
15920
+ private assertAmountCoversRecipientSetupFee;
15907
15921
  /**
15908
15922
  * Retry a failed or incomplete CCTP v2 bridge operation.
15909
15923
  *
@@ -16311,6 +16325,9 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
16311
16325
  * | FAST | true | No | maxFee = calculatedBurnFee + forwardingFee |
16312
16326
  * | FAST | true | Yes | maxFee = config.maxFee |
16313
16327
  *
16328
+ * For forwarded burns to Solana, the forwarding fee includes the rent for creating the
16329
+ * recipient's token account. A caller-provided `maxFee` must cover it too.
16330
+ *
16314
16331
  * @param params - The bridge parameters object containing:
16315
16332
  * - `source`: The source wallet context with chain definition and adapter
16316
16333
  * - `destination`: The destination wallet context with chain definition and adapter
@@ -16603,6 +16620,18 @@ interface BridgeKitConfig<TExtraProviders extends FlexibleBridgingProvider[] = [
16603
16620
  * @defaultValue false
16604
16621
  */
16605
16622
  disableErrorReporting?: boolean;
16623
+ /**
16624
+ * Disable success analytics.
16625
+ *
16626
+ * When `true`, the SDK will not POST an event when `bridge()` or `retry()`
16627
+ * completes a transfer. The event carries the source and destination
16628
+ * chains, token, amount, and source transaction hash. It never includes
16629
+ * wallet addresses or keys. This does not disable error reporting; use
16630
+ * {@link BridgeKitConfig.disableErrorReporting} for that.
16631
+ *
16632
+ * @defaultValue false
16633
+ */
16634
+ disableAnalytics?: boolean;
16606
16635
  /**
16607
16636
  * Custom HTTP headers forwarded with the default providers' attestation
16608
16637
  * (Iris) API requests — both `CCTPV2BridgingProvider` (USDC routes) and
@@ -16790,6 +16819,11 @@ declare class BridgeKit<TExtraProviders extends FlexibleBridgingProvider[] = []>
16790
16819
  private readonly disableErrorReporting;
16791
16820
  /** Per-kit telemetry identity for shared helpers. */
16792
16821
  private readonly telemetryConfig;
16822
+ /**
16823
+ * Per-kit telemetry identity for success events. Gated by `disableAnalytics`
16824
+ * independently of `disableErrorReporting`.
16825
+ */
16826
+ private readonly analyticsTelemetryConfig;
16793
16827
  /**
16794
16828
  * Create a new BridgeKit instance.
16795
16829
  *
@@ -51537,11 +51571,11 @@ interface AppKitContext {
51537
51571
  */
51538
51572
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
51539
51573
  /**
51540
- * Disable success analytics for the underlying EarnKit, SwapKit,
51574
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
51541
51575
  * BorrowKit, and UnifiedBalanceKit.
51542
51576
  *
51543
- * When `true`, completed earn, swap, borrow, and unified balance operations
51544
- * will not POST analytics events. This does not disable error reporting; use
51577
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
51578
+ * operations will not POST analytics events. This does not disable error reporting; use
51545
51579
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
51546
51580
  *
51547
51581
  * @defaultValue false
@@ -52986,11 +53020,11 @@ type AppKitConfig = CreateContextParams & {
52986
53020
  /** Optional config forwarded to the underlying {@link UnifiedBalanceKit}. */
52987
53021
  unifiedBalance?: UnifiedBalanceKitConfig;
52988
53022
  /**
52989
- * Disable success analytics for the underlying EarnKit, SwapKit, and
52990
- * UnifiedBalanceKit.
53023
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
53024
+ * BorrowKit, and UnifiedBalanceKit.
52991
53025
  *
52992
- * When `true`, completed earn, swap, and unified balance operations will not
52993
- * POST analytics events. This does not disable error reporting; use
53026
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
53027
+ * operations will not POST analytics events. This does not disable error reporting; use
52994
53028
  * {@link AppKitConfig.disableErrorReporting} for that. Defaults to `false`.
52995
53029
  *
52996
53030
  * @defaultValue false
package/index.d.ts CHANGED
@@ -1566,7 +1566,7 @@ declare const ArcTestnet: {
1566
1566
  readonly chainId: 5042002;
1567
1567
  readonly isTestnet: true;
1568
1568
  readonly explorerUrl: "https://testnet.arcscan.app/tx/{hash}";
1569
- readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.network/"];
1569
+ readonly rpcEndpoints: readonly ["https://rpc.testnet.arc.io"];
1570
1570
  readonly eurcAddress: "0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a";
1571
1571
  readonly usdcAddress: "0x3600000000000000000000000000000000000000";
1572
1572
  readonly usdtAddress: null;
@@ -15904,6 +15904,20 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
15904
15904
  * ```
15905
15905
  */
15906
15906
  bridge<TFromAdapterCapabilities extends AdapterCapabilities, TToAdapterCapabilities extends AdapterCapabilities>(params: CCTPV2BridgeParams<TFromAdapterCapabilities, TToAdapterCapabilities>): Promise<BridgeResult>;
15907
+ /**
15908
+ * Reject a forwarded transfer to Solana whose amount does not exceed the fee.
15909
+ *
15910
+ * CCTP v2 reverts a burn whose `maxFee` is not less than its amount, and the Solana
15911
+ * forwarding fee includes the recipient token account rent. Checking before the
15912
+ * approval avoids sending a transaction that can never be followed by a burn.
15913
+ * Skipped when the caller provides `config.maxFee`.
15914
+ *
15915
+ * @param params - The validated CCTP v2 bridge parameters.
15916
+ * @returns A promise that resolves when the amount covers the fee.
15917
+ * @throws {KitError} INPUT_INVALID_AMOUNT (FATAL) when the fee is greater than or equal
15918
+ * to the amount.
15919
+ */
15920
+ private assertAmountCoversRecipientSetupFee;
15907
15921
  /**
15908
15922
  * Retry a failed or incomplete CCTP v2 bridge operation.
15909
15923
  *
@@ -16311,6 +16325,9 @@ declare class CCTPV2BridgingProvider extends BridgingProvider<CCTPV2Actions> imp
16311
16325
  * | FAST | true | No | maxFee = calculatedBurnFee + forwardingFee |
16312
16326
  * | FAST | true | Yes | maxFee = config.maxFee |
16313
16327
  *
16328
+ * For forwarded burns to Solana, the forwarding fee includes the rent for creating the
16329
+ * recipient's token account. A caller-provided `maxFee` must cover it too.
16330
+ *
16314
16331
  * @param params - The bridge parameters object containing:
16315
16332
  * - `source`: The source wallet context with chain definition and adapter
16316
16333
  * - `destination`: The destination wallet context with chain definition and adapter
@@ -16603,6 +16620,18 @@ interface BridgeKitConfig<TExtraProviders extends FlexibleBridgingProvider[] = [
16603
16620
  * @defaultValue false
16604
16621
  */
16605
16622
  disableErrorReporting?: boolean;
16623
+ /**
16624
+ * Disable success analytics.
16625
+ *
16626
+ * When `true`, the SDK will not POST an event when `bridge()` or `retry()`
16627
+ * completes a transfer. The event carries the source and destination
16628
+ * chains, token, amount, and source transaction hash. It never includes
16629
+ * wallet addresses or keys. This does not disable error reporting; use
16630
+ * {@link BridgeKitConfig.disableErrorReporting} for that.
16631
+ *
16632
+ * @defaultValue false
16633
+ */
16634
+ disableAnalytics?: boolean;
16606
16635
  /**
16607
16636
  * Custom HTTP headers forwarded with the default providers' attestation
16608
16637
  * (Iris) API requests — both `CCTPV2BridgingProvider` (USDC routes) and
@@ -16790,6 +16819,11 @@ declare class BridgeKit<TExtraProviders extends FlexibleBridgingProvider[] = []>
16790
16819
  private readonly disableErrorReporting;
16791
16820
  /** Per-kit telemetry identity for shared helpers. */
16792
16821
  private readonly telemetryConfig;
16822
+ /**
16823
+ * Per-kit telemetry identity for success events. Gated by `disableAnalytics`
16824
+ * independently of `disableErrorReporting`.
16825
+ */
16826
+ private readonly analyticsTelemetryConfig;
16793
16827
  /**
16794
16828
  * Create a new BridgeKit instance.
16795
16829
  *
@@ -51537,11 +51571,11 @@ interface AppKitContext {
51537
51571
  */
51538
51572
  actions: Record<'bridge' | 'earn' | 'borrow', Record<string, ((payload: unknown) => void)[]>>;
51539
51573
  /**
51540
- * Disable success analytics for the underlying EarnKit, SwapKit,
51574
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
51541
51575
  * BorrowKit, and UnifiedBalanceKit.
51542
51576
  *
51543
- * When `true`, completed earn, swap, borrow, and unified balance operations
51544
- * will not POST analytics events. This does not disable error reporting; use
51577
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
51578
+ * operations will not POST analytics events. This does not disable error reporting; use
51545
51579
  * {@link AppKitContext.disableErrorReporting} for that. Defaults to `false`.
51546
51580
  *
51547
51581
  * @defaultValue false
@@ -52986,11 +53020,11 @@ type AppKitConfig = CreateContextParams & {
52986
53020
  /** Optional config forwarded to the underlying {@link UnifiedBalanceKit}. */
52987
53021
  unifiedBalance?: UnifiedBalanceKitConfig;
52988
53022
  /**
52989
- * Disable success analytics for the underlying EarnKit, SwapKit, and
52990
- * UnifiedBalanceKit.
53023
+ * Disable success analytics for the underlying BridgeKit, EarnKit, SwapKit,
53024
+ * BorrowKit, and UnifiedBalanceKit.
52991
53025
  *
52992
- * When `true`, completed earn, swap, and unified balance operations will not
52993
- * POST analytics events. This does not disable error reporting; use
53026
+ * When `true`, completed bridge, earn, swap, borrow, and unified balance
53027
+ * operations will not POST analytics events. This does not disable error reporting; use
52994
53028
  * {@link AppKitConfig.disableErrorReporting} for that. Defaults to `false`.
52995
53029
  *
52996
53030
  * @defaultValue false