@arkade-os/sdk 0.4.56 → 0.4.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +5 -5
  6. package/dist/adapters/indexedDB.js +4 -4
  7. package/dist/{ark-Cgsd9tMd.d.cts → ark-ClaVUg4e.d.cts} +31 -1
  8. package/dist/{ark-Cgsd9tMd.d.ts → ark-ClaVUg4e.d.ts} +31 -1
  9. package/dist/{asyncStorageTaskQueue-CXz4PRBW.d.ts → asyncStorageTaskQueue-Bgau-mvD.d.ts} +2 -2
  10. package/dist/{asyncStorageTaskQueue-C0ZsDE60.d.cts → asyncStorageTaskQueue-CnYrhpS-.d.cts} +2 -2
  11. package/dist/{chunk-ENRRZFZ4.cjs → chunk-6PY4WYXI.cjs} +618 -425
  12. package/dist/chunk-6PY4WYXI.cjs.map +1 -0
  13. package/dist/{chunk-VNDVUM2W.js → chunk-AGWZXGG2.js} +4 -4
  14. package/dist/{chunk-VNDVUM2W.js.map → chunk-AGWZXGG2.js.map} +1 -1
  15. package/dist/{chunk-37XKN5DZ.cjs → chunk-COLJARV4.cjs} +40 -40
  16. package/dist/{chunk-37XKN5DZ.cjs.map → chunk-COLJARV4.cjs.map} +1 -1
  17. package/dist/{chunk-CDWLZQQW.cjs → chunk-D6RGHPZ5.cjs} +4 -3
  18. package/dist/chunk-D6RGHPZ5.cjs.map +1 -0
  19. package/dist/{chunk-24YNIQSW.cjs → chunk-F4C67JYB.cjs} +15 -15
  20. package/dist/{chunk-24YNIQSW.cjs.map → chunk-F4C67JYB.cjs.map} +1 -1
  21. package/dist/{chunk-MXPBHDOI.cjs → chunk-I4YEGI2R.cjs} +17 -17
  22. package/dist/{chunk-MXPBHDOI.cjs.map → chunk-I4YEGI2R.cjs.map} +1 -1
  23. package/dist/{chunk-OOPDT2WV.js → chunk-IPPASJE5.js} +3 -3
  24. package/dist/{chunk-OOPDT2WV.js.map → chunk-IPPASJE5.js.map} +1 -1
  25. package/dist/{chunk-T22257HW.js → chunk-S3BFUTC5.js} +243 -60
  26. package/dist/chunk-S3BFUTC5.js.map +1 -0
  27. package/dist/{chunk-5IMBONCK.js → chunk-SGWMB4W2.js} +4 -4
  28. package/dist/{chunk-5IMBONCK.js.map → chunk-SGWMB4W2.js.map} +1 -1
  29. package/dist/{chunk-IMVKQQHU.cjs → chunk-SYZEQF5D.cjs} +9 -9
  30. package/dist/{chunk-IMVKQQHU.cjs.map → chunk-SYZEQF5D.cjs.map} +1 -1
  31. package/dist/{chunk-NN7BNNF5.js → chunk-TV2RLVOB.js} +3 -3
  32. package/dist/{chunk-NN7BNNF5.js.map → chunk-TV2RLVOB.js.map} +1 -1
  33. package/dist/{chunk-IFGN2GB2.js → chunk-VROHHJL4.js} +4 -3
  34. package/dist/chunk-VROHHJL4.js.map +1 -0
  35. package/dist/contracts/handlers/index.cjs +8 -8
  36. package/dist/contracts/handlers/index.d.cts +3 -3
  37. package/dist/contracts/handlers/index.d.ts +3 -3
  38. package/dist/contracts/handlers/index.js +2 -2
  39. package/dist/{delegate-xXT8O-Kn.d.cts → delegate-CVrkEepn.d.cts} +1 -1
  40. package/dist/{delegate-CZPXtd2F.d.ts → delegate-YDYq1El_.d.ts} +1 -1
  41. package/dist/{index-BYG2eKOA.d.cts → index-BmqkJBAf.d.cts} +2 -2
  42. package/dist/{index-BBJ466mM.d.ts → index-CuSHBkq7.d.ts} +2 -2
  43. package/dist/index.cjs +253 -213
  44. package/dist/index.d.cts +29 -10
  45. package/dist/index.d.ts +29 -10
  46. package/dist/index.js +4 -4
  47. package/dist/repositories/realm/index.cjs +19 -19
  48. package/dist/repositories/realm/index.d.cts +2 -2
  49. package/dist/repositories/realm/index.d.ts +2 -2
  50. package/dist/repositories/realm/index.js +5 -5
  51. package/dist/repositories/sqlite/index.cjs +18 -18
  52. package/dist/repositories/sqlite/index.d.cts +2 -2
  53. package/dist/repositories/sqlite/index.d.ts +2 -2
  54. package/dist/repositories/sqlite/index.js +5 -5
  55. package/dist/{taskRunner-C46NnRsY.d.ts → taskRunner-CFN61bBM.d.ts} +2 -2
  56. package/dist/{taskRunner-BG1PRFps.d.cts → taskRunner-CFkGkD85.d.cts} +2 -2
  57. package/dist/wallet/expo/background.cjs +14 -14
  58. package/dist/wallet/expo/background.d.cts +3 -3
  59. package/dist/wallet/expo/background.d.ts +3 -3
  60. package/dist/wallet/expo/background.js +6 -6
  61. package/dist/wallet/expo/index.cjs +14 -14
  62. package/dist/wallet/expo/index.d.cts +4 -4
  63. package/dist/wallet/expo/index.d.ts +4 -4
  64. package/dist/wallet/expo/index.js +5 -5
  65. package/dist/{wallet-DuCm55EC.d.ts → wallet-DnK09TtT.d.ts} +107 -4
  66. package/dist/{wallet-1yWg75gN.d.cts → wallet-hQp2qC_M.d.cts} +107 -4
  67. package/dist/worker/expo/index.cjs +9 -9
  68. package/dist/worker/expo/index.d.cts +4 -4
  69. package/dist/worker/expo/index.d.ts +4 -4
  70. package/dist/worker/expo/index.js +5 -5
  71. package/package.json +2 -2
  72. package/dist/chunk-CDWLZQQW.cjs.map +0 -1
  73. package/dist/chunk-ENRRZFZ4.cjs.map +0 -1
  74. package/dist/chunk-IFGN2GB2.js.map +0 -1
  75. package/dist/chunk-T22257HW.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, BufferReader, BufferWriter, AssetRef, RestIndexerProvider } from './chunk-NN7BNNF5.js';
2
- import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, deriveDescriptorLeafPubKey, deriveDescriptorLeafCompressedPubKey, DefaultVtxo, speculativeReceiveMetadata, DelegateVtxo, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-OOPDT2WV.js';
3
- import { VtxoScript, Transaction, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, setArkPsbtField, PrevArkTxField, ConditionWitness, craftToSpendTx, ArkAddress, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ServerResponseMismatchError, OP_RETURN_EMPTY_PKSCRIPT, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, VtxoTaprootTree, timelockToSequence, baseFetch, Intent, rateGate, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, maybeArkError, isArkError, ArkErrorName, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, isEventSourceError, isRetryableProviderError, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, RestArkProvider, canSpendOffchain, toVirtualStatus, ArkError, resolveTimeHeight, parseLegacyExpiry, isExpired, DEFAULT_ARKADE_SERVER_URL, ProviderUnavailableError, networks as networks$1, isPastExpiry, fetchVtxoCreatedAtByTxid } from './chunk-IFGN2GB2.js';
1
+ import { AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, BufferReader, BufferWriter, AssetRef, RestIndexerProvider } from './chunk-TV2RLVOB.js';
2
+ import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, deriveDescriptorLeafPubKey, deriveDescriptorLeafCompressedPubKey, DefaultVtxo, speculativeReceiveMetadata, DelegateVtxo, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-IPPASJE5.js';
3
+ import { VtxoScript, Transaction, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, setArkPsbtField, PrevArkTxField, ConditionWitness, craftToSpendTx, ArkAddress, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ServerResponseMismatchError, OP_RETURN_EMPTY_PKSCRIPT, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, VtxoTaprootTree, timelockToSequence, baseFetch, Intent, rateGate, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, maybeArkError, isArkError, ArkErrorName, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, isEventSourceError, isRetryableProviderError, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, RestArkProvider, canSpendOffchain, toVirtualStatus, ArkError, resolveTimeHeight, parseLegacyExpiry, isExpired, DEFAULT_ARKADE_SERVER_URL, ProviderUnavailableError, networks as networks$1, isPastExpiry, fetchVtxoCreatedAtByTxid } from './chunk-VROHHJL4.js';
4
4
  import { __export } from './chunk-NSBPE2FW.js';
5
5
  import { sha256, equalBytes, hash160, sha256x2, concatBytes, randomPrivateKeyBytes, pubECDSA, pubSchnorr } from '@scure/btc-signer/utils.js';
6
6
  import { SigHash, Script, OP, OutScript, Address, RawWitness, p2tr, p2wpkh, TaprootControlBlock, DEFAULT_SEQUENCE, Transaction as Transaction$2 } from '@scure/btc-signer';
@@ -2304,6 +2304,83 @@ function classifyContractSigner(contractServerPubKeyHex, info, nowSeconds = Math
2304
2304
  function isCooperativelyMigratable(status) {
2305
2305
  return status === "MIGRATABLE" || status === "DUE_NOW";
2306
2306
  }
2307
+
2308
+ // src/wallet/timelockPolicy.ts
2309
+ var isRegtest = (network) => network.bech32 === "bcrt";
2310
+ var NOMINAL_BLOCK_SECONDS = 600n;
2311
+ var toTimelock = (value) => ({
2312
+ value,
2313
+ type: value >= 512n ? "seconds" : "blocks"
2314
+ });
2315
+ var toSeconds = (t) => t.type === "seconds" ? t.value : t.value * NOMINAL_BLOCK_SECONDS;
2316
+ function assertTimelockInPolicy(timelock, policy, label) {
2317
+ if (policy.requireSeconds && timelock.type === "blocks") {
2318
+ throw new ServerResponseMismatchError(
2319
+ `${label} rejected: block-typed timelocks are not accepted (got ${timelock.value})`
2320
+ );
2321
+ }
2322
+ const seconds = toSeconds(timelock);
2323
+ if (seconds < policy.minSeconds) {
2324
+ throw new ServerResponseMismatchError(
2325
+ `${label} rejected: ${timelock.value} ${timelock.type} is below the ${policy.minSeconds}s floor`
2326
+ );
2327
+ }
2328
+ return timelock;
2329
+ }
2330
+ function assertTimelockWithinFloor(value, policy, label) {
2331
+ return assertTimelockInPolicy(toTimelock(value), policy, label);
2332
+ }
2333
+
2334
+ // src/wallet/batchExpiry.ts
2335
+ var DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
2336
+ var REGTEST_MIN_BATCH_EXPIRY_SECONDS = 6000n;
2337
+ function defaultBatchExpiryPolicy(network) {
2338
+ return isRegtest(network) ? { minSeconds: REGTEST_MIN_BATCH_EXPIRY_SECONDS, requireSeconds: false } : { minSeconds: DEFAULT_MIN_BATCH_EXPIRY_SECONDS, requireSeconds: true };
2339
+ }
2340
+ function resolveBatchExpiryPolicy(network, overrides) {
2341
+ return { ...defaultBatchExpiryPolicy(network), ...overrides };
2342
+ }
2343
+ function assertValidBatchExpiry(batchExpiry, policy) {
2344
+ if (policy.advertisedVtxoTreeExpiry !== void 0 && batchExpiry !== policy.advertisedVtxoTreeExpiry) {
2345
+ throw new ServerResponseMismatchError(
2346
+ `batch expiry rejected: ${batchExpiry} does not match the advertised vtxoTreeExpiry ${policy.advertisedVtxoTreeExpiry}`
2347
+ );
2348
+ }
2349
+ return assertTimelockWithinFloor(batchExpiry, policy, "batch expiry");
2350
+ }
2351
+ var DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 86400n;
2352
+ var REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 1200n;
2353
+ function defaultCheckpointExitDelayPolicy(network) {
2354
+ return isRegtest(network) ? { minSeconds: REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, requireSeconds: false } : { minSeconds: DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, requireSeconds: true };
2355
+ }
2356
+ function resolveCheckpointExitDelayPolicy(network, overrides) {
2357
+ return { ...defaultCheckpointExitDelayPolicy(network), ...overrides };
2358
+ }
2359
+ function assertValidServerUnrollScript(checkpointTapscript, policy) {
2360
+ let script;
2361
+ try {
2362
+ script = CSVMultisigTapscript.decode(hex.decode(checkpointTapscript));
2363
+ } catch (e) {
2364
+ throw new ServerResponseMismatchError(
2365
+ `checkpoint exit delay rejected: invalid checkpointTapscript from server (${e instanceof Error ? e.message : String(e)})`
2366
+ );
2367
+ }
2368
+ if (policy.advertisedForfeitPubkey !== void 0) {
2369
+ const { pubkeys } = script.params;
2370
+ if (pubkeys.length !== 1) {
2371
+ throw new ServerResponseMismatchError(
2372
+ `checkpoint exit delay rejected: checkpointTapscript must commit to exactly one pubkey, got ${pubkeys.length} [${pubkeys.map(hex.encode).join(", ")}]`
2373
+ );
2374
+ }
2375
+ if (!equalBytes(pubkeys[0], policy.advertisedForfeitPubkey)) {
2376
+ throw new ServerResponseMismatchError(
2377
+ `checkpoint exit delay rejected: checkpointTapscript pubkey ${hex.encode(pubkeys[0])} does not match the advertised forfeitPubkey ${hex.encode(policy.advertisedForfeitPubkey)}`
2378
+ );
2379
+ }
2380
+ }
2381
+ assertTimelockInPolicy(script.params.timelock, policy, "checkpoint exit delay");
2382
+ return script;
2383
+ }
2307
2384
  function buildOffchainTx(inputs, outputs, serverUnrollScript) {
2308
2385
  const MAX_OP_RETURN = 2;
2309
2386
  let countOpReturn = 0;
@@ -3020,6 +3097,40 @@ function capSettlementBatch(sorted, maxAmount) {
3020
3097
  }
3021
3098
  return batch;
3022
3099
  }
3100
+ function priceSettlementInputs(vtxos, estimator) {
3101
+ const payable = [];
3102
+ const net = /* @__PURE__ */ new Map();
3103
+ for (const vtxo of vtxos) {
3104
+ const inputFee = estimator.evalOffchainInput(toOffchainInputFeeParams(vtxo));
3105
+ if (inputFee.satoshis >= vtxo.value) {
3106
+ continue;
3107
+ }
3108
+ payable.push(vtxo);
3109
+ net.set(`${vtxo.txid}:${vtxo.vout}`, BigInt(vtxo.value - inputFee.satoshis));
3110
+ }
3111
+ return { payable, net };
3112
+ }
3113
+ function subtotalOf(vtxos, net) {
3114
+ let subtotal = 0n;
3115
+ for (const vtxo of vtxos) {
3116
+ const priced = net.get(`${vtxo.txid}:${vtxo.vout}`);
3117
+ if (priced === void 0) {
3118
+ throw new Error(`Unpriced settlement input ${vtxo.txid}:${vtxo.vout}`);
3119
+ }
3120
+ subtotal += priced;
3121
+ }
3122
+ return subtotal;
3123
+ }
3124
+ function deductOffchainOutputFee(subtotal, estimator, arkAddress) {
3125
+ if (!estimator.config.offchainOutput) {
3126
+ return subtotal;
3127
+ }
3128
+ const outputFee = estimator.evalOffchainOutput({
3129
+ amount: subtotal,
3130
+ script: hex.encode(ArkAddress.decode(arkAddress).pkScript)
3131
+ });
3132
+ return subtotal - BigInt(outputFee.satoshis);
3133
+ }
3023
3134
  var DEFAULT_THRESHOLD_SECONDS = 259200;
3024
3135
  var DEFAULT_THRESHOLD_MS = DEFAULT_THRESHOLD_SECONDS * 1e3;
3025
3136
  var DEFAULT_RENEWAL_CONFIG = {
@@ -3227,19 +3338,27 @@ var VtxoManager = class _VtxoManager {
3227
3338
  });
3228
3339
  const dustAmount = getDustAmount(this.wallet);
3229
3340
  const now = await fetchTimeHeight(this.wallet);
3230
- let { vtxosToRecover, totalAmount } = getRecoverableWithSubdust(allVtxos, dustAmount, now);
3341
+ let { vtxosToRecover } = getRecoverableWithSubdust(allVtxos, dustAmount, now);
3231
3342
  if (vtxosToRecover.length === 0) {
3232
3343
  throw new Error("No recoverable VTXOs found");
3233
3344
  }
3234
3345
  const info = await this.getInfoProvider()?.getInfo();
3235
3346
  const vtxoMaxAmount = info?.vtxoMaxAmount ?? -1n;
3236
- const capped = capSettlementBatch(byValueDescending(vtxosToRecover), vtxoMaxAmount);
3347
+ const estimator = new Estimator(info?.fees.intentFee ?? {});
3348
+ const { payable, net } = priceSettlementInputs(vtxosToRecover, estimator);
3349
+ const capped = capSettlementBatch(byValueDescending(payable), vtxoMaxAmount);
3237
3350
  if (capped.length < vtxosToRecover.length) {
3238
3351
  const recoverableCount = vtxosToRecover.length;
3239
- ({ vtxosToRecover, totalAmount } = getRecoverableWithSubdust(capped, dustAmount, now));
3352
+ const cappedAway = capped.length < payable.length;
3353
+ ({ vtxosToRecover } = getRecoverableWithSubdust(capped, dustAmount, now));
3240
3354
  if (vtxosToRecover.length === 0) {
3355
+ if (!cappedAway) {
3356
+ throw new Error(
3357
+ `All ${recoverableCount} recoverable VTXOs that can pay their own intent fee total less than the dust threshold ${dustAmount}`
3358
+ );
3359
+ }
3241
3360
  throw new Error(
3242
- `Capped recovery batch (highest-value subset of ${recoverableCount} recoverable VTXOs within the ${MAX_VTXOS_PER_SETTLEMENT}-input and ${vtxoMaxAmount}-sat limits) is below the dust threshold ${dustAmount}`
3361
+ `Capped recovery batch (highest-value subset of ${recoverableCount} recoverable VTXOs within the ${MAX_VTXOS_PER_SETTLEMENT}-input and ${vtxoMaxAmount}-sat limits, net of intent fees) is below the dust threshold ${dustAmount}`
3243
3362
  );
3244
3363
  }
3245
3364
  }
@@ -3247,6 +3366,16 @@ var VtxoManager = class _VtxoManager {
3247
3366
  await this.rotateForRecoverableInputs(vtxosToRecover, info);
3248
3367
  }
3249
3368
  const arkAddress = await this.wallet.getAddress();
3369
+ const totalAmount = deductOffchainOutputFee(
3370
+ subtotalOf(vtxosToRecover, net),
3371
+ estimator,
3372
+ arkAddress
3373
+ );
3374
+ if (totalAmount < dustAmount) {
3375
+ throw new Error(
3376
+ `Recoverable amount ${totalAmount} net of intent fees is below dust threshold ${dustAmount}`
3377
+ );
3378
+ }
3250
3379
  return this.wallet.settle(
3251
3380
  {
3252
3381
  inputs: vtxosToRecover,
@@ -3265,6 +3394,17 @@ var VtxoManager = class _VtxoManager {
3265
3394
  *
3266
3395
  * Useful for displaying to users before they decide to recover funds.
3267
3396
  *
3397
+ * Both amounts are net of the operator's intent fees, so `recoverable` is
3398
+ * what {@link recoverVtxos} would actually hand back rather than the gross
3399
+ * sum of the inputs. `subdust` is net of the per-input fees only — the
3400
+ * output fee is charged on the batch as a whole and is not attributed per
3401
+ * coin — so it reports what the subdust coins are worth once each has paid
3402
+ * its own way, and is not strictly a slice of `recoverable`. It can exceed
3403
+ * `recoverable` where a flat output fee meets a wholly subdust wallet.
3404
+ *
3405
+ * The batch size caps are not applied here: they defer the overflow to the
3406
+ * next cycle rather than reducing what is recoverable.
3407
+ *
3268
3408
  * @returns Object containing recoverable amounts and subdust information
3269
3409
  *
3270
3410
  * @example
@@ -3286,17 +3426,29 @@ var VtxoManager = class _VtxoManager {
3286
3426
  withUnrolled: false
3287
3427
  });
3288
3428
  const dustAmount = getDustAmount(this.wallet);
3289
- const { vtxosToRecover, includesSubdust, totalAmount } = getRecoverableWithSubdust(
3429
+ const { vtxosToRecover, includesSubdust } = getRecoverableWithSubdust(
3290
3430
  allVtxos,
3291
3431
  dustAmount,
3292
3432
  await fetchTimeHeight(this.wallet)
3293
3433
  );
3294
- const subdustAmount = vtxosToRecover.filter((v) => BigInt(v.value) < dustAmount).reduce((sum, v) => sum + BigInt(v.value), 0n);
3434
+ const info = await this.getInfoProvider()?.getInfo();
3435
+ const estimator = new Estimator(info?.fees.intentFee ?? {});
3436
+ const { payable, net } = priceSettlementInputs(vtxosToRecover, estimator);
3437
+ const priced = deductOffchainOutputFee(
3438
+ subtotalOf(payable, net),
3439
+ estimator,
3440
+ await this.wallet.getAddress()
3441
+ );
3442
+ const recoverable = priced > 0n ? priced : 0n;
3443
+ const subdustAmount = subtotalOf(
3444
+ payable.filter((v) => BigInt(v.value) < dustAmount),
3445
+ net
3446
+ );
3295
3447
  return {
3296
- recoverable: totalAmount,
3448
+ recoverable,
3297
3449
  subdust: subdustAmount,
3298
3450
  includesSubdust,
3299
- vtxoCount: vtxosToRecover.length
3451
+ vtxoCount: payable.length
3300
3452
  };
3301
3453
  }
3302
3454
  // ========== Renewal Methods ==========
@@ -3414,6 +3566,14 @@ var VtxoManager = class _VtxoManager {
3414
3566
  }
3415
3567
  const info = await this.getInfoProvider()?.getInfo();
3416
3568
  const vtxoMaxAmount = info?.vtxoMaxAmount ?? -1n;
3569
+ const estimator = new Estimator(info?.fees.intentFee ?? {});
3570
+ const { payable, net } = priceSettlementInputs(vtxos, estimator);
3571
+ vtxos = payable;
3572
+ if (vtxos.length === 0) {
3573
+ throw new Error(
3574
+ "No VTXOs available to renew: every expiring VTXO is worth less than its own intent fee"
3575
+ );
3576
+ }
3417
3577
  const capped = capSettlementBatch(byExpiryAscending(vtxos, now), vtxoMaxAmount);
3418
3578
  if (vtxoMaxAmount >= 0n) {
3419
3579
  const oversized = vtxos.filter((vtxo) => BigInt(vtxo.value) > vtxoMaxAmount);
@@ -3431,24 +3591,28 @@ var VtxoManager = class _VtxoManager {
3431
3591
  );
3432
3592
  }
3433
3593
  }
3434
- const totalAmount = vtxos.reduce((sum, vtxo) => sum + vtxo.value, 0);
3435
3594
  const dustAmount = getDustAmount(this.wallet);
3436
- if (BigInt(totalAmount) < dustAmount) {
3437
- throw new Error(
3438
- `Total amount ${totalAmount} is below dust threshold ${dustAmount}`
3439
- );
3440
- }
3441
3595
  if (info && isMigrationCapable(this.wallet)) {
3442
3596
  await this.rotateForRecoverableInputs(vtxos, info);
3443
3597
  }
3444
3598
  const arkAddress = await this.wallet.getAddress();
3599
+ const totalAmount = deductOffchainOutputFee(
3600
+ subtotalOf(vtxos, net),
3601
+ estimator,
3602
+ arkAddress
3603
+ );
3604
+ if (totalAmount < dustAmount) {
3605
+ throw new Error(
3606
+ `Total amount ${totalAmount} is below dust threshold ${dustAmount}`
3607
+ );
3608
+ }
3445
3609
  const txid = await this.wallet.settle(
3446
3610
  {
3447
3611
  inputs: vtxos,
3448
3612
  outputs: [
3449
3613
  {
3450
3614
  address: arkAddress,
3451
- amount: BigInt(totalAmount)
3615
+ amount: totalAmount
3452
3616
  }
3453
3617
  ]
3454
3618
  },
@@ -5218,6 +5382,7 @@ function serializeArkInfoSnapshot(info, savedAt) {
5218
5382
  forfeitPubkey: info.forfeitPubkey,
5219
5383
  unilateralExitDelay: info.unilateralExitDelay.toString(),
5220
5384
  boardingExitDelay: info.boardingExitDelay.toString(),
5385
+ vtxoTreeExpiry: info.vtxoTreeExpiry?.toString(),
5221
5386
  sessionDuration: info.sessionDuration.toString(),
5222
5387
  dust: info.dust.toString(),
5223
5388
  fees: info.fees,
@@ -5267,6 +5432,7 @@ function hydrateArkInfo(snapshot) {
5267
5432
  sessionDuration: BigInt(a.sessionDuration),
5268
5433
  signerPubkey: a.signerPubkey,
5269
5434
  unilateralExitDelay: BigInt(a.unilateralExitDelay),
5435
+ vtxoTreeExpiry: a.vtxoTreeExpiry !== void 0 ? BigInt(a.vtxoTreeExpiry) : void 0,
5270
5436
  utxoMaxAmount: BigInt(a.utxoMaxAmount),
5271
5437
  utxoMinAmount: BigInt(a.utxoMinAmount),
5272
5438
  version: a.version,
@@ -5339,6 +5505,9 @@ function parseStoredArkInfoSnapshot(raw) {
5339
5505
  ]) {
5340
5506
  assertDecimalString(a[field], `arkInfo.${field}`);
5341
5507
  }
5508
+ if (a.vtxoTreeExpiry !== void 0) {
5509
+ assertDecimalString(a.vtxoTreeExpiry, "arkInfo.vtxoTreeExpiry");
5510
+ }
5342
5511
  assertFeeInfo(a.fees, "arkInfo.fees");
5343
5512
  if (!Array.isArray(a.deprecatedSigners)) {
5344
5513
  throw new MalformedArkInfoSnapshotError("arkInfo.deprecatedSigners must be an array");
@@ -11911,7 +12080,7 @@ var ReadonlyWallet = class _ReadonlyWallet {
11911
12080
  }
11912
12081
  };
11913
12082
  var Wallet2 = class _Wallet extends ReadonlyWallet {
11914
- constructor(identity, network, onchainProvider, arkProvider, indexerProvider, arkServerPublicKey, offchainTapscript, boardingTapscript, serverUnrollScript, forfeitOutputScript, forfeitPubkey, dustAmount, walletRepository, contractRepository, renewalConfig, delegateProvider, watcherConfig, settlementConfig, walletContractTimelocks, receiveRotator, descriptorProvider, lookAheadWindow) {
12083
+ constructor(identity, network, onchainProvider, arkProvider, indexerProvider, arkServerPublicKey, offchainTapscript, boardingTapscript, serverUnrollScript, forfeitOutputScript, forfeitPubkey, dustAmount, walletRepository, contractRepository, renewalConfig, delegateProvider, watcherConfig, settlementConfig, walletContractTimelocks, receiveRotator, descriptorProvider, lookAheadWindow, batchExpiryPolicy, checkpointExitDelayPolicy) {
11915
12084
  super(
11916
12085
  identity,
11917
12086
  network,
@@ -11930,6 +12099,8 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
11930
12099
  this.arkProvider = arkProvider;
11931
12100
  this.forfeitOutputScript = forfeitOutputScript;
11932
12101
  this.forfeitPubkey = forfeitPubkey;
12102
+ this.batchExpiryPolicy = batchExpiryPolicy;
12103
+ this.checkpointExitDelayPolicy = checkpointExitDelayPolicy;
11933
12104
  this.identity = identity;
11934
12105
  this.renewalConfig = {
11935
12106
  enabled: renewalConfig?.enabled ?? false,
@@ -11962,6 +12133,8 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
11962
12133
  arkProvider;
11963
12134
  forfeitOutputScript;
11964
12135
  forfeitPubkey;
12136
+ batchExpiryPolicy;
12137
+ checkpointExitDelayPolicy;
11965
12138
  static MIN_FEE_RATE = 1;
11966
12139
  // sats/vbyte
11967
12140
  identity;
@@ -12260,12 +12433,10 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12260
12433
  */
12261
12434
  async rotateServerSigner(newServerPubKey, checkpointTapscript) {
12262
12435
  const xonly = toXOnlyPubKey(newServerPubKey);
12263
- let newServerUnrollScript;
12264
- try {
12265
- newServerUnrollScript = CSVMultisigTapscript.decode(hex.decode(checkpointTapscript));
12266
- } catch (e) {
12267
- throw new Error("Invalid checkpointTapscript from server");
12268
- }
12436
+ const newServerUnrollScript = assertValidServerUnrollScript(
12437
+ checkpointTapscript,
12438
+ resolveCheckpointExitDelayPolicy(this.network, this.checkpointExitDelayPolicy)
12439
+ );
12269
12440
  if (equalBytes(xonly, this.arkServerPublicKey)) return;
12270
12441
  if (this._receiveRotator) {
12271
12442
  await this._receiveRotator.runExclusive(
@@ -12571,16 +12742,17 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12571
12742
  throw new Error("Invalid configured public key");
12572
12743
  }
12573
12744
  const setup = await ReadonlyWallet.setupWalletConfig(config, pubkey);
12574
- let serverUnrollScript;
12575
- try {
12576
- const raw = hex.decode(setup.info.checkpointTapscript);
12577
- serverUnrollScript = CSVMultisigTapscript.decode(raw);
12578
- } catch (e) {
12579
- throw new Error("Invalid checkpointTapscript from server");
12580
- }
12581
12745
  const forfeitPubkey = hex.decode(setup.info.forfeitPubkey).slice(1);
12582
12746
  const forfeitAddress = Address(setup.network).decode(setup.info.forfeitAddress);
12583
12747
  const forfeitOutputScript = OutScript.encode(forfeitAddress);
12748
+ const checkpointExitDelayOverrides = {
12749
+ advertisedForfeitPubkey: forfeitPubkey,
12750
+ ...config.minCheckpointExitDelaySeconds !== void 0 ? { minSeconds: config.minCheckpointExitDelaySeconds } : {}
12751
+ };
12752
+ const serverUnrollScript = assertValidServerUnrollScript(
12753
+ setup.info.checkpointTapscript,
12754
+ resolveCheckpointExitDelayPolicy(setup.network, checkpointExitDelayOverrides)
12755
+ );
12584
12756
  const boot = await WalletReceiveRotator.resolveBoot(config, setup);
12585
12757
  const wallet = new _Wallet(
12586
12758
  config.identity,
@@ -12604,7 +12776,13 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12604
12776
  setup.walletContractTimelocks,
12605
12777
  boot?.rotator,
12606
12778
  boot?.provider,
12607
- config.lookAheadWindow
12779
+ config.lookAheadWindow,
12780
+ // Pinned at setup rather than refetched per round.
12781
+ {
12782
+ advertisedVtxoTreeExpiry: setup.info.vtxoTreeExpiry,
12783
+ ...config.minBatchExpirySeconds !== void 0 ? { minSeconds: config.minBatchExpirySeconds } : {}
12784
+ },
12785
+ checkpointExitDelayOverrides
12608
12786
  );
12609
12787
  wallet._serverInfoSource = setup.serverInfoSource;
12610
12788
  if (setup.serverInfoSource === "live") {
@@ -13192,24 +13370,20 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13192
13370
  const utf8IntentId = new TextEncoder().encode(intentId);
13193
13371
  const intentIdHash = sha256(utf8IntentId);
13194
13372
  const intentIdHashStr = hex.encode(intentIdHash);
13195
- let skip = true;
13196
- for (const idHash of event.intentIdHashes) {
13197
- if (idHash === intentIdHashStr) {
13198
- if (!this.arkProvider) {
13199
- throw new Error("Arkade provider not configured");
13200
- }
13201
- await this.arkProvider.confirmRegistration(intentId);
13202
- skip = false;
13203
- }
13204
- }
13373
+ const skip = !event.intentIdHashes.includes(intentIdHashStr);
13205
13374
  if (skip) {
13206
13375
  return { skip };
13207
13376
  }
13377
+ if (!this.arkProvider) {
13378
+ throw new Error("Arkade provider not configured");
13379
+ }
13380
+ const timelock = assertValidBatchExpiry(
13381
+ event.batchExpiry,
13382
+ resolveBatchExpiryPolicy(this.network, this.batchExpiryPolicy)
13383
+ );
13384
+ await this.arkProvider.confirmRegistration(intentId);
13208
13385
  const sweepTapscript = CSVMultisigTapscript.encode({
13209
- timelock: {
13210
- value: event.batchExpiry,
13211
- type: event.batchExpiry >= 512n ? "seconds" : "blocks"
13212
- },
13386
+ timelock,
13213
13387
  pubkeys: [this.forfeitPubkey]
13214
13388
  }).script;
13215
13389
  sweepTapTreeRoot = tapLeafHash(sweepTapscript);
@@ -13645,8 +13819,9 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13645
13819
  }
13646
13820
  if (spendable.length > 0) {
13647
13821
  const info = await this.arkProvider.getInfo();
13648
- const serverUnrollScript = CSVMultisigTapscript.decode(
13649
- hex.decode(info.checkpointTapscript)
13822
+ const serverUnrollScript = assertValidServerUnrollScript(
13823
+ info.checkpointTapscript,
13824
+ resolveCheckpointExitDelayPolicy(this.network, this.checkpointExitDelayPolicy)
13650
13825
  );
13651
13826
  for (const vtxo of spendable) {
13652
13827
  try {
@@ -14683,7 +14858,9 @@ var MessageBus = class {
14683
14858
  settlementConfig: config.settlementConfig,
14684
14859
  walletMode: config.walletMode,
14685
14860
  watcherConfig: config.watcherConfig,
14686
- lookAheadWindow: config.lookAheadWindow
14861
+ lookAheadWindow: config.lookAheadWindow,
14862
+ minBatchExpirySeconds: config.minBatchExpirySeconds,
14863
+ minCheckpointExitDelaySeconds: config.minCheckpointExitDelaySeconds
14687
14864
  });
14688
14865
  return { wallet, arkProvider, readonlyWallet: wallet };
14689
14866
  }
@@ -17216,6 +17393,8 @@ var ServiceWorkerWallet = class _ServiceWorkerWallet extends ServiceWorkerReadon
17216
17393
  walletMode: options.walletMode,
17217
17394
  watcherConfig: options.watcherConfig,
17218
17395
  lookAheadWindow: options.lookAheadWindow,
17396
+ minBatchExpirySeconds: options.minBatchExpirySeconds,
17397
+ minCheckpointExitDelaySeconds: options.minCheckpointExitDelaySeconds,
17219
17398
  messageTimeouts
17220
17399
  };
17221
17400
  await initializeMessageBus(
@@ -19881,7 +20060,7 @@ __export(arkade_exports, {
19881
20060
  witnessRefToBytes: () => witnessRefToBytes
19882
20061
  });
19883
20062
  var isVtxoCoin = (input) => isVirtualCoin(input);
19884
- function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message, session, arkProvider, emulator, network, recipients) {
20063
+ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message, session, arkProvider, emulator, network, recipients, batchExpiryPolicy) {
19885
20064
  let batchId;
19886
20065
  let sweepTapTreeRoot;
19887
20066
  let validatedCommitmentTxid;
@@ -19891,15 +20070,19 @@ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message
19891
20070
  const intentIdHash = sha256(utf8IntentId);
19892
20071
  const intentIdHashStr = hex.encode(intentIdHash);
19893
20072
  if (!event.intentIdHashes.includes(intentIdHashStr)) return { skip: true };
20073
+ const info = await arkProvider.getInfo();
20074
+ const timelock = assertValidBatchExpiry(
20075
+ event.batchExpiry,
20076
+ resolveBatchExpiryPolicy(network, {
20077
+ advertisedVtxoTreeExpiry: info.vtxoTreeExpiry,
20078
+ ...batchExpiryPolicy
20079
+ })
20080
+ );
19894
20081
  await arkProvider.confirmRegistration(intentId);
19895
20082
  batchId = event.id;
19896
20083
  const sweepTapscript = CSVMultisigTapscript.encode({
19897
- timelock: {
19898
- value: event.batchExpiry,
19899
- // BIP-65: values >= 512 are interpreted as seconds, below as blocks
19900
- type: event.batchExpiry >= 512n ? "seconds" : "blocks"
19901
- },
19902
- pubkeys: [hex.decode((await arkProvider.getInfo()).forfeitPubkey).subarray(1)]
20084
+ timelock,
20085
+ pubkeys: [hex.decode(info.forfeitPubkey).subarray(1)]
19903
20086
  }).script;
19904
20087
  sweepTapTreeRoot = tapLeafHash(sweepTapscript);
19905
20088
  return { skip: false };
@@ -20919,6 +21102,6 @@ function isArkContract(str) {
20919
21102
  return str.startsWith(ARKCONTRACT_PREFIX + "=");
20920
21103
  }
20921
21104
 
20922
- export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports, assertFinalCommitmentMatchesValidated, assertIntentIdUnique, assertSendableAmount, assertSubmittedArkTxid, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, intentPageBounds, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, makeHandle, matchServerCheckpoints, mergeChainedTxType, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
20923
- //# sourceMappingURL=chunk-T22257HW.js.map
20924
- //# sourceMappingURL=chunk-T22257HW.js.map
21105
+ export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports, assertFinalCommitmentMatchesValidated, assertIntentIdUnique, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, intentPageBounds, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, makeHandle, matchServerCheckpoints, mergeChainedTxType, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveSendAmount, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
21106
+ //# sourceMappingURL=chunk-S3BFUTC5.js.map
21107
+ //# sourceMappingURL=chunk-S3BFUTC5.js.map