@circle-fin/app-kit 1.10.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.
@@ -18,6 +18,17 @@
18
18
 
19
19
  'use strict';
20
20
 
21
+ // Buffer polyfill setup - executes before any other code
22
+ // Ensures globalThis.Buffer is available for Solana libraries
23
+ const { Buffer } = require('buffer');
24
+ if (typeof globalThis !== 'undefined' && typeof globalThis.Buffer === 'undefined') {
25
+ globalThis.Buffer = Buffer;
26
+ }
27
+ if (typeof window !== 'undefined' && typeof window.Buffer === 'undefined') {
28
+ window.Buffer = Buffer;
29
+ }
30
+
31
+
21
32
  var zod = require('zod');
22
33
  var web3_js = require('@solana/web3.js');
23
34
  require('bn.js');
@@ -47,6 +58,27 @@ var bs58__default = /*#__PURE__*/_interopDefault(bs58);
47
58
  * }
48
59
  * ```
49
60
  */ const isNodeEnvironment = ()=>typeof process !== 'undefined' && typeof process.versions === 'object' && typeof process.versions.node === 'string';
61
+ /**
62
+ * Return the SDK User-Agent request header only when running in Node.js.
63
+ *
64
+ * Browsers forbid manually setting `User-Agent`, and a custom fallback header
65
+ * can trigger CORS preflight. Non-Node server runtimes also omit this optional
66
+ * attribution header because they cannot set it reliably.
67
+ *
68
+ * @returns A User-Agent header in Node.js, or an empty object otherwise.
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * import { getNodeUserAgentHeader } from '@core/utils'
73
+ *
74
+ * const headers = {
75
+ * 'Content-Type': 'application/json',
76
+ * ...getNodeUserAgentHeader(),
77
+ * }
78
+ * ```
79
+ */ const getNodeUserAgentHeader = ()=>isNodeEnvironment() ? {
80
+ 'User-Agent': getUserAgent()
81
+ } : {};
50
82
  /**
51
83
  * Detect the runtime environment and return a shortened identifier.
52
84
  *
@@ -7086,13 +7118,12 @@ const swapTokenEnumSchema = zod.z.enum([
7086
7118
  headers: {
7087
7119
  ...DEFAULT_CONFIG.headers,
7088
7120
  ...config.headers ?? {},
7089
- // In browser environments, directly setting the 'User-Agent' or similar headers is restricted and may be ignored or cause errors.
7090
- // This is why we use the 'X-User-Agent' header instead.
7091
- ...typeof window === 'undefined' ? {
7092
- 'User-Agent': getUserAgent()
7093
- } : {
7094
- 'X-User-Agent': getUserAgent()
7095
- }
7121
+ // Browsers forbid setting a user-agent request header, and the custom
7122
+ // fallback header the SDK used instead trips CORS preflight against the
7123
+ // Circle APIs (it isn't in their `Access-Control-Allow-Headers`),
7124
+ // blocking the request. So send the SDK user agent only in Node;
7125
+ // browsers omit it entirely.
7126
+ ...getNodeUserAgentHeader()
7096
7127
  }
7097
7128
  };
7098
7129
  let lastError;
@@ -8364,6 +8395,7 @@ function parseOrThrow(value, schema, context) {
8364
8395
  if (payload.tokenIn !== undefined) safe['tokenIn'] = payload.tokenIn;
8365
8396
  if (payload.tokenOut !== undefined) safe['tokenOut'] = payload.tokenOut;
8366
8397
  if (payload.txHash !== undefined) safe['txHash'] = payload.txHash;
8398
+ if (payload.correlationId !== undefined) safe['correlationId'] = payload.correlationId;
8367
8399
  if (payload.errorDetails !== undefined) {
8368
8400
  const errorDetails = {
8369
8401
  ...payload.errorDetails.errorCode !== undefined && {
@@ -8434,18 +8466,15 @@ function parseOrThrow(value, schema, context) {
8434
8466
  timeoutHandle.unref();
8435
8467
  }
8436
8468
  try {
8437
- const isNode = isNodeEnvironment();
8438
- const userAgent = getUserAgent();
8439
8469
  await fetch(getLogsUrl(), {
8440
8470
  method: 'POST',
8441
8471
  headers: {
8442
8472
  'Content-Type': 'application/json',
8443
- // Browser restricts setting User-Agent; use X-User-Agent instead.
8444
- ...isNode ? {
8445
- 'User-Agent': userAgent
8446
- } : {
8447
- 'X-User-Agent': userAgent
8448
- }
8473
+ // Browsers forbid setting a user-agent request header, and the custom
8474
+ // fallback header the SDK used instead trips CORS preflight (it isn't
8475
+ // in the telemetry endpoint's `Access-Control-Allow-Headers`), so send
8476
+ // it only in Node; browsers omit it entirely.
8477
+ ...getNodeUserAgentHeader()
8449
8478
  },
8450
8479
  body: JSON.stringify(toSafePayload(payload)),
8451
8480
  signal: controller.signal
@@ -8658,7 +8687,7 @@ function parseOrThrow(value, schema, context) {
8658
8687
  // discards the stack trace, nested `cause`, and any custom Error
8659
8688
  // properties — exactly the context an on-call needs when a
8660
8689
  // resolver-closure regression triggers this path.
8661
- console.warn(`[stablecoin-kits telemetry] dropped error event '${eventType}':`, cause);
8690
+ console.warn(`[stablecoin-kits telemetry] dropped event '${eventType}':`, cause);
8662
8691
  } catch {
8663
8692
  // console.warn itself throwing is the user's environment; nothing more we
8664
8693
  // can do without risking the original operation error.
@@ -8674,7 +8703,9 @@ function parseOrThrow(value, schema, context) {
8674
8703
  sdkVersion: config.sdkVersion,
8675
8704
  eventType,
8676
8705
  timestamp: new Date().toISOString(),
8677
- errorDetails,
8706
+ ...errorDetails !== undefined && {
8707
+ errorDetails
8708
+ },
8678
8709
  clientContext: buildClientContext(),
8679
8710
  ...context?.sourceChain != null && {
8680
8711
  sourceChain: context.sourceChain
@@ -8690,6 +8721,9 @@ function parseOrThrow(value, schema, context) {
8690
8721
  },
8691
8722
  ...context?.txHash != null && {
8692
8723
  txHash: context.txHash
8724
+ },
8725
+ ...context?.correlationId != null && {
8726
+ correlationId: context.correlationId
8693
8727
  }
8694
8728
  };
8695
8729
  }
@@ -8751,7 +8785,7 @@ function parseOrThrow(value, schema, context) {
8751
8785
  }
8752
8786
 
8753
8787
  var name = "@circle-fin/unified-balance-kit";
8754
- var version = "1.3.0";
8788
+ var version = "1.3.1";
8755
8789
  var pkg = {
8756
8790
  name: name,
8757
8791
  version: version};
@@ -20429,7 +20463,11 @@ const removeFundParamsSchema = zod.z.object({
20429
20463
  // Remove Fund Operations
20430
20464
  // ---------------------------------------------------------------------------
20431
20465
  /**
20432
- * Kick off a delayed fund removal from an account.
20466
+ * Kick off a delayed recovery fund removal from an account.
20467
+ *
20468
+ * Use `initiateRemoveFund` only as a trustless fallback when the normal spend
20469
+ * flow is unavailable. For day-to-day movement out of a Unified Balance, use
20470
+ * `spend`.
20433
20471
  *
20434
20472
  * Validates `from` and `amount`, resolves the chain and token via
20435
20473
  * {@link resolveRemoveFundParams}, selects the matching provider, then calls
@@ -20466,7 +20504,10 @@ const removeFundParamsSchema = zod.z.object({
20466
20504
  return provider.initiateRemoveFund(resolved);
20467
20505
  }
20468
20506
  /**
20469
- * Complete a fund removal once the 7-day activation period has passed.
20507
+ * Complete a recovery fund removal once the 7-day withdrawal delay has passed.
20508
+ *
20509
+ * Use `removeFund` only as a trustless fallback when the normal spend flow is
20510
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
20470
20511
  *
20471
20512
  * Validates `from`, resolves the chain and token via
20472
20513
  * {@link resolveRemoveFundParams}, selects the matching provider, then calls
@@ -20555,13 +20596,18 @@ const removeFundParamsSchema = zod.z.object({
20555
20596
  /** SDK name used in telemetry payloads. */ const SDK_NAME = resolveKitSdkName(pkg.name);
20556
20597
  /**
20557
20598
  * A high-level class-based interface for cross-chain USDC deposits,
20558
- * spending, balance queries, delegation management, and withdrawals.
20599
+ * spending, balance queries, delegation management, and recovery fund removals.
20559
20600
  *
20560
20601
  * UnifiedBalanceKit provides a familiar class-based API for developers who
20561
20602
  * prefer traditional object-oriented patterns. The class maintains an
20562
20603
  * internal context and provides methods that delegate to the standalone
20563
20604
  * operation functions exported by this package.
20564
20605
  *
20606
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
20607
+ * trustless recovery path for situations where the normal spend flow is
20608
+ * unavailable, and it requires a 7-day withdrawal delay before funds can be
20609
+ * removed.
20610
+ *
20565
20611
  * @remarks
20566
20612
  * For functional usage, import and use the operations directly:
20567
20613
  * ```typescript
@@ -20782,7 +20828,11 @@ const removeFundParamsSchema = zod.z.object({
20782
20828
  });
20783
20829
  }
20784
20830
  /**
20785
- * Kick off a delayed fund removal from an account.
20831
+ * Kick off a delayed recovery fund removal from an account.
20832
+ *
20833
+ * Use this only as a trustless fallback when the normal spend flow is
20834
+ * unavailable. For day-to-day movement out of a Unified Balance, use
20835
+ * `spend`.
20786
20836
  *
20787
20837
  * @param params - The account owner's adapter context, amount, and
20788
20838
  * optional token type.
@@ -20796,7 +20846,12 @@ const removeFundParamsSchema = zod.z.object({
20796
20846
  });
20797
20847
  }
20798
20848
  /**
20799
- * Complete a fund removal once the activation period has passed.
20849
+ * Complete a recovery fund removal once the 7-day withdrawal delay has
20850
+ * passed.
20851
+ *
20852
+ * Use this only as a trustless fallback when the normal spend flow is
20853
+ * unavailable. For day-to-day movement out of a Unified Balance, use
20854
+ * `spend`.
20800
20855
  *
20801
20856
  * @param params - The account owner context matching the original
20802
20857
  * fund removal initiation.
@@ -20923,6 +20978,11 @@ registerKit(`${pkg.name}/${pkg.version}`);
20923
20978
  * Internally holds a persistent {@link UnifiedBalanceKit} instance so that
20924
20979
  * event dispatchers and custom fee policies are preserved across calls.
20925
20980
  *
20981
+ * Use {@link AppKitUnifiedBalance.spend} for normal movement out of a Unified
20982
+ * Balance. {@link AppKitUnifiedBalance.removeFund} is a trustless recovery path
20983
+ * for situations where the normal spend flow is unavailable, and it requires a
20984
+ * 7-day withdrawal delay after {@link AppKitUnifiedBalance.initiateRemoveFund}.
20985
+ *
20926
20986
  * @example
20927
20987
  * ```typescript
20928
20988
  * import { AppKit } from '@circle-fin/app-kit'
@@ -21134,7 +21194,12 @@ registerKit(`${pkg.name}/${pkg.version}`);
21134
21194
  return this.kit.removeDelegate(params);
21135
21195
  }
21136
21196
  /**
21137
- * Kick off a delayed fund removal from an account.
21197
+ * Initiate a trustless recovery removal from an account.
21198
+ *
21199
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
21200
+ * recovery path for situations where the normal spend flow is unavailable.
21201
+ * Calling this method starts the 7-day withdrawal delay before the removal can
21202
+ * be completed.
21138
21203
  *
21139
21204
  * @param params - The account owner's adapter context, amount, and token.
21140
21205
  * @returns Promise resolving to the initiation details.
@@ -21153,11 +21218,16 @@ registerKit(`${pkg.name}/${pkg.version}`);
21153
21218
  return this.kit.initiateRemoveFund(params);
21154
21219
  }
21155
21220
  /**
21156
- * Complete a fund removal once the activation period has passed.
21221
+ * Complete a trustless recovery removal after the withdrawal delay.
21222
+ *
21223
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
21224
+ * recovery path for situations where the normal spend flow is unavailable.
21225
+ * Both EVM and Solana removals require a 7-day withdrawal delay after
21226
+ * `initiateRemoveFund` before funds can be removed.
21157
21227
  *
21158
21228
  * @param params - The account owner context matching the original initiation.
21159
21229
  * @returns Promise resolving to the fund removal details.
21160
- * @throws {KitError} If the activation period has not elapsed or the
21230
+ * @throws {KitError} If the withdrawal delay has not elapsed or the
21161
21231
  * on-chain transaction fails.
21162
21232
  *
21163
21233
  * @example
@@ -6977,10 +6977,13 @@ interface GetDelegateStatusParams<TAdapterCapabilities extends AdapterCapabiliti
6977
6977
  }
6978
6978
 
6979
6979
  /**
6980
- * Parameters for initiating a delayed fund removal from a Gateway
6980
+ * Parameters for initiating a delayed recovery fund removal from a Gateway
6981
6981
  * account.
6982
6982
  *
6983
6983
  * @remarks
6984
+ * Use fund removal only as a trustless fallback when the normal spend flow is
6985
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
6986
+ *
6984
6987
  * Fund removals have a mandatory 7-day delay before they can be
6985
6988
  * completed. Only one removal may be pending per chain at a
6986
6989
  * time. Initiating a second removal on the same chain adds the
@@ -7063,7 +7066,12 @@ interface InitiateRemoveFundResult {
7063
7066
  explorerUrl?: string;
7064
7067
  }
7065
7068
  /**
7066
- * Parameters for completing a fund removal after the activation period.
7069
+ * Parameters for completing a recovery fund removal after the withdrawal
7070
+ * delay.
7071
+ *
7072
+ * @remarks
7073
+ * Use fund removal only as a trustless fallback when the normal spend flow is
7074
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
7067
7075
  *
7068
7076
  * @typeParam TAdapterCapabilities - Adapter capability constraints.
7069
7077
  * @typeParam TChainIdentifier - Accepted chain identifier type.
@@ -7160,6 +7168,11 @@ interface GetSupportedChainsOptions {
7160
7168
  * Internally holds a persistent {@link UnifiedBalanceKit} instance so that
7161
7169
  * event dispatchers and custom fee policies are preserved across calls.
7162
7170
  *
7171
+ * Use {@link AppKitUnifiedBalance.spend} for normal movement out of a Unified
7172
+ * Balance. {@link AppKitUnifiedBalance.removeFund} is a trustless recovery path
7173
+ * for situations where the normal spend flow is unavailable, and it requires a
7174
+ * 7-day withdrawal delay after {@link AppKitUnifiedBalance.initiateRemoveFund}.
7175
+ *
7163
7176
  * @example
7164
7177
  * ```typescript
7165
7178
  * import { AppKit } from '@circle-fin/app-kit'
@@ -7361,7 +7374,12 @@ declare class AppKitUnifiedBalance {
7361
7374
  */
7362
7375
  removeDelegate(params: UpdateDelegateParams): Promise<UpdateDelegateResult>;
7363
7376
  /**
7364
- * Kick off a delayed fund removal from an account.
7377
+ * Initiate a trustless recovery removal from an account.
7378
+ *
7379
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7380
+ * recovery path for situations where the normal spend flow is unavailable.
7381
+ * Calling this method starts the 7-day withdrawal delay before the removal can
7382
+ * be completed.
7365
7383
  *
7366
7384
  * @param params - The account owner's adapter context, amount, and token.
7367
7385
  * @returns Promise resolving to the initiation details.
@@ -7379,11 +7397,16 @@ declare class AppKitUnifiedBalance {
7379
7397
  */
7380
7398
  initiateRemoveFund(params: InitiateRemoveFundParams): Promise<InitiateRemoveFundResult>;
7381
7399
  /**
7382
- * Complete a fund removal once the activation period has passed.
7400
+ * Complete a trustless recovery removal after the withdrawal delay.
7401
+ *
7402
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7403
+ * recovery path for situations where the normal spend flow is unavailable.
7404
+ * Both EVM and Solana removals require a 7-day withdrawal delay after
7405
+ * `initiateRemoveFund` before funds can be removed.
7383
7406
  *
7384
7407
  * @param params - The account owner context matching the original initiation.
7385
7408
  * @returns Promise resolving to the fund removal details.
7386
- * @throws {KitError} If the activation period has not elapsed or the
7409
+ * @throws {KitError} If the withdrawal delay has not elapsed or the
7387
7410
  * on-chain transaction fails.
7388
7411
  *
7389
7412
  * @example
@@ -6977,10 +6977,13 @@ interface GetDelegateStatusParams<TAdapterCapabilities extends AdapterCapabiliti
6977
6977
  }
6978
6978
 
6979
6979
  /**
6980
- * Parameters for initiating a delayed fund removal from a Gateway
6980
+ * Parameters for initiating a delayed recovery fund removal from a Gateway
6981
6981
  * account.
6982
6982
  *
6983
6983
  * @remarks
6984
+ * Use fund removal only as a trustless fallback when the normal spend flow is
6985
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
6986
+ *
6984
6987
  * Fund removals have a mandatory 7-day delay before they can be
6985
6988
  * completed. Only one removal may be pending per chain at a
6986
6989
  * time. Initiating a second removal on the same chain adds the
@@ -7063,7 +7066,12 @@ interface InitiateRemoveFundResult {
7063
7066
  explorerUrl?: string;
7064
7067
  }
7065
7068
  /**
7066
- * Parameters for completing a fund removal after the activation period.
7069
+ * Parameters for completing a recovery fund removal after the withdrawal
7070
+ * delay.
7071
+ *
7072
+ * @remarks
7073
+ * Use fund removal only as a trustless fallback when the normal spend flow is
7074
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
7067
7075
  *
7068
7076
  * @typeParam TAdapterCapabilities - Adapter capability constraints.
7069
7077
  * @typeParam TChainIdentifier - Accepted chain identifier type.
@@ -7160,6 +7168,11 @@ interface GetSupportedChainsOptions {
7160
7168
  * Internally holds a persistent {@link UnifiedBalanceKit} instance so that
7161
7169
  * event dispatchers and custom fee policies are preserved across calls.
7162
7170
  *
7171
+ * Use {@link AppKitUnifiedBalance.spend} for normal movement out of a Unified
7172
+ * Balance. {@link AppKitUnifiedBalance.removeFund} is a trustless recovery path
7173
+ * for situations where the normal spend flow is unavailable, and it requires a
7174
+ * 7-day withdrawal delay after {@link AppKitUnifiedBalance.initiateRemoveFund}.
7175
+ *
7163
7176
  * @example
7164
7177
  * ```typescript
7165
7178
  * import { AppKit } from '@circle-fin/app-kit'
@@ -7361,7 +7374,12 @@ declare class AppKitUnifiedBalance {
7361
7374
  */
7362
7375
  removeDelegate(params: UpdateDelegateParams): Promise<UpdateDelegateResult>;
7363
7376
  /**
7364
- * Kick off a delayed fund removal from an account.
7377
+ * Initiate a trustless recovery removal from an account.
7378
+ *
7379
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7380
+ * recovery path for situations where the normal spend flow is unavailable.
7381
+ * Calling this method starts the 7-day withdrawal delay before the removal can
7382
+ * be completed.
7365
7383
  *
7366
7384
  * @param params - The account owner's adapter context, amount, and token.
7367
7385
  * @returns Promise resolving to the initiation details.
@@ -7379,11 +7397,16 @@ declare class AppKitUnifiedBalance {
7379
7397
  */
7380
7398
  initiateRemoveFund(params: InitiateRemoveFundParams): Promise<InitiateRemoveFundResult>;
7381
7399
  /**
7382
- * Complete a fund removal once the activation period has passed.
7400
+ * Complete a trustless recovery removal after the withdrawal delay.
7401
+ *
7402
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7403
+ * recovery path for situations where the normal spend flow is unavailable.
7404
+ * Both EVM and Solana removals require a 7-day withdrawal delay after
7405
+ * `initiateRemoveFund` before funds can be removed.
7383
7406
  *
7384
7407
  * @param params - The account owner context matching the original initiation.
7385
7408
  * @returns Promise resolving to the fund removal details.
7386
- * @throws {KitError} If the activation period has not elapsed or the
7409
+ * @throws {KitError} If the withdrawal delay has not elapsed or the
7387
7410
  * on-chain transaction fails.
7388
7411
  *
7389
7412
  * @example
@@ -6977,10 +6977,13 @@ interface GetDelegateStatusParams<TAdapterCapabilities extends AdapterCapabiliti
6977
6977
  }
6978
6978
 
6979
6979
  /**
6980
- * Parameters for initiating a delayed fund removal from a Gateway
6980
+ * Parameters for initiating a delayed recovery fund removal from a Gateway
6981
6981
  * account.
6982
6982
  *
6983
6983
  * @remarks
6984
+ * Use fund removal only as a trustless fallback when the normal spend flow is
6985
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
6986
+ *
6984
6987
  * Fund removals have a mandatory 7-day delay before they can be
6985
6988
  * completed. Only one removal may be pending per chain at a
6986
6989
  * time. Initiating a second removal on the same chain adds the
@@ -7063,7 +7066,12 @@ interface InitiateRemoveFundResult {
7063
7066
  explorerUrl?: string;
7064
7067
  }
7065
7068
  /**
7066
- * Parameters for completing a fund removal after the activation period.
7069
+ * Parameters for completing a recovery fund removal after the withdrawal
7070
+ * delay.
7071
+ *
7072
+ * @remarks
7073
+ * Use fund removal only as a trustless fallback when the normal spend flow is
7074
+ * unavailable. For day-to-day movement out of a Unified Balance, use `spend`.
7067
7075
  *
7068
7076
  * @typeParam TAdapterCapabilities - Adapter capability constraints.
7069
7077
  * @typeParam TChainIdentifier - Accepted chain identifier type.
@@ -7160,6 +7168,11 @@ interface GetSupportedChainsOptions {
7160
7168
  * Internally holds a persistent {@link UnifiedBalanceKit} instance so that
7161
7169
  * event dispatchers and custom fee policies are preserved across calls.
7162
7170
  *
7171
+ * Use {@link AppKitUnifiedBalance.spend} for normal movement out of a Unified
7172
+ * Balance. {@link AppKitUnifiedBalance.removeFund} is a trustless recovery path
7173
+ * for situations where the normal spend flow is unavailable, and it requires a
7174
+ * 7-day withdrawal delay after {@link AppKitUnifiedBalance.initiateRemoveFund}.
7175
+ *
7163
7176
  * @example
7164
7177
  * ```typescript
7165
7178
  * import { AppKit } from '@circle-fin/app-kit'
@@ -7361,7 +7374,12 @@ declare class AppKitUnifiedBalance {
7361
7374
  */
7362
7375
  removeDelegate(params: UpdateDelegateParams): Promise<UpdateDelegateResult>;
7363
7376
  /**
7364
- * Kick off a delayed fund removal from an account.
7377
+ * Initiate a trustless recovery removal from an account.
7378
+ *
7379
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7380
+ * recovery path for situations where the normal spend flow is unavailable.
7381
+ * Calling this method starts the 7-day withdrawal delay before the removal can
7382
+ * be completed.
7365
7383
  *
7366
7384
  * @param params - The account owner's adapter context, amount, and token.
7367
7385
  * @returns Promise resolving to the initiation details.
@@ -7379,11 +7397,16 @@ declare class AppKitUnifiedBalance {
7379
7397
  */
7380
7398
  initiateRemoveFund(params: InitiateRemoveFundParams): Promise<InitiateRemoveFundResult>;
7381
7399
  /**
7382
- * Complete a fund removal once the activation period has passed.
7400
+ * Complete a trustless recovery removal after the withdrawal delay.
7401
+ *
7402
+ * Use `spend` for normal movement out of a Unified Balance. `removeFund` is a
7403
+ * recovery path for situations where the normal spend flow is unavailable.
7404
+ * Both EVM and Solana removals require a 7-day withdrawal delay after
7405
+ * `initiateRemoveFund` before funds can be removed.
7383
7406
  *
7384
7407
  * @param params - The account owner context matching the original initiation.
7385
7408
  * @returns Promise resolving to the fund removal details.
7386
- * @throws {KitError} If the activation period has not elapsed or the
7409
+ * @throws {KitError} If the withdrawal delay has not elapsed or the
7387
7410
  * on-chain transaction fails.
7388
7411
  *
7389
7412
  * @example