@arkade-os/sdk 0.4.66 → 0.4.68

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 (80) hide show
  1. package/README.md +71 -15
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{asyncStorageTaskQueue-BZcIN7sA.d.cts → asyncStorageTaskQueue-B2CcXIHU.d.cts} +1 -1
  9. package/dist/{asyncStorageTaskQueue-B6SijMi3.d.ts → asyncStorageTaskQueue-DaZlVTbM.d.ts} +1 -1
  10. package/dist/{chunk-2JZGPXU4.js → chunk-33Q2RFET.js} +3 -3
  11. package/dist/{chunk-2JZGPXU4.js.map → chunk-33Q2RFET.js.map} +1 -1
  12. package/dist/{chunk-CYOI4PEA.js → chunk-45FKMOJH.js} +160 -114
  13. package/dist/chunk-45FKMOJH.js.map +1 -0
  14. package/dist/{chunk-J33ZEM3A.js → chunk-4CMXV5SF.js} +45 -14
  15. package/dist/chunk-4CMXV5SF.js.map +1 -0
  16. package/dist/{chunk-LL47QIHD.cjs → chunk-4KCVS4ZN.cjs} +10 -10
  17. package/dist/{chunk-LL47QIHD.cjs.map → chunk-4KCVS4ZN.cjs.map} +1 -1
  18. package/dist/{chunk-PXPPZF5K.cjs → chunk-6YUACVX4.cjs} +205 -159
  19. package/dist/chunk-6YUACVX4.cjs.map +1 -0
  20. package/dist/{chunk-ZIRFXBKL.cjs → chunk-EJOFL5WH.cjs} +47 -13
  21. package/dist/chunk-EJOFL5WH.cjs.map +1 -0
  22. package/dist/{chunk-R5POS3RS.js → chunk-G4I6PU5H.js} +4 -4
  23. package/dist/{chunk-R5POS3RS.js.map → chunk-G4I6PU5H.js.map} +1 -1
  24. package/dist/{chunk-55ZZ6RBL.js → chunk-GQ4NMQGR.js} +4 -4
  25. package/dist/{chunk-55ZZ6RBL.js.map → chunk-GQ4NMQGR.js.map} +1 -1
  26. package/dist/{chunk-IM6IKNSL.cjs → chunk-JGMSZIE4.cjs} +17 -17
  27. package/dist/{chunk-IM6IKNSL.cjs.map → chunk-JGMSZIE4.cjs.map} +1 -1
  28. package/dist/{chunk-3S3JZUEN.cjs → chunk-PJR63FTK.cjs} +17 -17
  29. package/dist/{chunk-3S3JZUEN.cjs.map → chunk-PJR63FTK.cjs.map} +1 -1
  30. package/dist/{chunk-DSC3G6QZ.js → chunk-VBHXBI7F.js} +1060 -185
  31. package/dist/chunk-VBHXBI7F.js.map +1 -0
  32. package/dist/{chunk-5E6IZNRG.cjs → chunk-WCJVKFAP.cjs} +1467 -581
  33. package/dist/chunk-WCJVKFAP.cjs.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-T-vgxMYZ.d.ts → delegate-AomVWxO_.d.ts} +1 -1
  39. package/dist/{delegate-YXupcWWJ.d.cts → delegate-Bffc5f54.d.cts} +1 -1
  40. package/dist/{wallet-CNibc3yJ.d.ts → hdWalletCapable-B5nRs3RH.d.cts} +318 -127
  41. package/dist/{wallet-DJN1QgFt.d.cts → hdWalletCapable-DZdIVa23.d.ts} +318 -127
  42. package/dist/{index-uUE_uQPn.d.ts → index-C7RZCfoY.d.cts} +222 -19
  43. package/dist/{index-uUE_uQPn.d.cts → index-C7RZCfoY.d.ts} +222 -19
  44. package/dist/{index-e7LYXk1d.d.cts → index-jouvy8FD.d.ts} +172 -99
  45. package/dist/{index-D_FgwLH9.d.ts → index-nfyQM33h.d.cts} +172 -99
  46. package/dist/index.cjs +326 -278
  47. package/dist/index.d.cts +295 -41
  48. package/dist/index.d.ts +295 -41
  49. package/dist/index.js +4 -4
  50. package/dist/repositories/realm/index.cjs +19 -19
  51. package/dist/repositories/realm/index.d.cts +2 -2
  52. package/dist/repositories/realm/index.d.ts +2 -2
  53. package/dist/repositories/realm/index.js +5 -5
  54. package/dist/repositories/sqlite/index.cjs +18 -18
  55. package/dist/repositories/sqlite/index.d.cts +2 -2
  56. package/dist/repositories/sqlite/index.d.ts +2 -2
  57. package/dist/repositories/sqlite/index.js +5 -5
  58. package/dist/{taskRunner-BOVcIH1N.d.cts → taskRunner-D2vnpPBT.d.cts} +1 -1
  59. package/dist/{taskRunner-DNyD1kXG.d.ts → taskRunner-DuwK9t8O.d.ts} +1 -1
  60. package/dist/wallet/expo/background.cjs +14 -14
  61. package/dist/wallet/expo/background.d.cts +3 -3
  62. package/dist/wallet/expo/background.d.ts +3 -3
  63. package/dist/wallet/expo/background.js +6 -6
  64. package/dist/wallet/expo/index.cjs +18 -14
  65. package/dist/wallet/expo/index.cjs.map +1 -1
  66. package/dist/wallet/expo/index.d.cts +7 -5
  67. package/dist/wallet/expo/index.d.ts +7 -5
  68. package/dist/wallet/expo/index.js +10 -6
  69. package/dist/wallet/expo/index.js.map +1 -1
  70. package/dist/worker/expo/index.cjs +9 -9
  71. package/dist/worker/expo/index.d.cts +4 -4
  72. package/dist/worker/expo/index.d.ts +4 -4
  73. package/dist/worker/expo/index.js +5 -5
  74. package/package.json +3 -3
  75. package/dist/chunk-5E6IZNRG.cjs.map +0 -1
  76. package/dist/chunk-CYOI4PEA.js.map +0 -1
  77. package/dist/chunk-DSC3G6QZ.js.map +0 -1
  78. package/dist/chunk-J33ZEM3A.js.map +0 -1
  79. package/dist/chunk-PXPPZF5K.cjs.map +0 -1
  80. package/dist/chunk-ZIRFXBKL.cjs.map +0 -1
@@ -13,6 +13,12 @@ declare class Transaction extends Transaction$1 {
13
13
  static fromPSBT(psbt_: Bytes, opts?: TxOpts): Transaction;
14
14
  static fromRaw(raw: Bytes, opts?: TxOpts): Transaction;
15
15
  }
16
+ /**
17
+ * Reject a PSBT that declares a sighash type outside `allowedSighashTypes` on
18
+ * any input, before it reaches a signer. An input carrying no explicit type is
19
+ * left alone: the signer treats a taproot input as {@link SigHash.DEFAULT}.
20
+ */
21
+ declare function assertAllowedSighashTypes(tx: Transaction$1, allowedSighashTypes?: number[]): void;
16
22
 
17
23
  /**
18
24
  * MuSig2 nonce pair containing public and secret values.
@@ -641,6 +647,86 @@ interface FeeOutput {
641
647
  script: string;
642
648
  }
643
649
 
650
+ /**
651
+ * Off-chain source of previous transactions: ark, tree and checkpoint txs, as
652
+ * base64 PSBTs keyed by txid. Structurally satisfied by `IndexerProvider`.
653
+ */
654
+ interface PrevTxSource {
655
+ getVirtualTxs(txids: string[]): Promise<{
656
+ txs: string[];
657
+ }>;
658
+ }
659
+ /**
660
+ * On-chain source of previous transactions — boarding and commitment txs, which
661
+ * `getVirtualTxs` does not serve. Structurally satisfied by `OnchainProvider`.
662
+ */
663
+ interface RawTxSource {
664
+ getRawTransaction(txid: string): Promise<Uint8Array>;
665
+ }
666
+ /**
667
+ * A previous transaction could not be resolved, so the emulator would reject the
668
+ * submission with `missing prevout tx for input N`. Distinguishes "no source is
669
+ * wired up" from "the source did not have it" — the remedies differ.
670
+ */
671
+ declare class PrevTxUnavailableError extends Error {
672
+ readonly txids: string[];
673
+ constructor(message: string, txids?: string[]);
674
+ }
675
+ /**
676
+ * Resolve raw wire-format bytes for each txid, batched and de-duplicated.
677
+ *
678
+ * Emulator v0.0.7+ requires the raw tx behind every input of a submitted ark tx
679
+ * or intent proof (`PrevArkTxField`) and of an onchain tx (`PrevoutTxField`).
680
+ * The value is a serialized `wire.MsgTx`, *not* a PSBT — `Transaction.toBytes()`
681
+ * with the default `(withScriptSig=false, withWitness=false)` is exactly the
682
+ * preimage the emulator hashes to check the tx against the outpoint.
683
+ *
684
+ * Off-chain txs are fetched in one batched call; anything the indexer does not
685
+ * serve (a commitment or boarding tx) falls through to `onchain` when supplied.
686
+ */
687
+ declare function resolvePrevTxs(txids: string[], source: PrevTxSource, onchain?: RawTxSource): Promise<Map<string, Uint8Array>>;
688
+ /**
689
+ * Attach `PrevArkTxField` to every input of `tx` that does not already carry
690
+ * one, resolving the bytes for `txids[i]` — the coin input `i` ultimately
691
+ * spends.
692
+ *
693
+ * Inputs already carrying the field are skipped rather than overwritten: the
694
+ * emulator rejects an input with more than one field of the same type, so a
695
+ * caller-supplied value (`Utxo.sourceTx`) must win outright. Nothing is fetched
696
+ * when every input is already covered.
697
+ */
698
+ declare function attachPrevArkTxs(tx: Transaction, txids: string[], source: PrevTxSource, onchain?: RawTxSource): Promise<void>;
699
+ /**
700
+ * Attach `PrevoutTxField` to every input of an onchain PSBT, reading each
701
+ * input's own outpoint — unlike an ark tx, an onchain tx spends its prevout
702
+ * directly, so the txid is in the PSBT already.
703
+ */
704
+ declare function attachPrevoutTxs(tx: Transaction, source: RawTxSource): Promise<void>;
705
+ /**
706
+ * A coin an intent proof spends, carrying the raw previous tx the emulator needs
707
+ * to resolve its prevout pkScript.
708
+ */
709
+ type WithPrevTx<T> = T & {
710
+ prevTx?: Uint8Array;
711
+ };
712
+ /**
713
+ * Fill in `prevTx` on every coin an intent proof will spend, in one batched
714
+ * lookup. The proof's synthetic input 0 needs nothing — the emulator synthesises
715
+ * a one-output tx for it — so this covers exactly the coins, which land on proof
716
+ * inputs `1..n`.
717
+ */
718
+ declare function withPrevTxs<T extends {
719
+ txid: string;
720
+ prevTx?: Uint8Array;
721
+ }>(coins: T[], source: PrevTxSource, onchain?: RawTxSource): Promise<T[]>;
722
+
723
+ /**
724
+ * A coin an intent proof proves ownership of. `prevTx` carries the raw wire
725
+ * bytes of the transaction that created it — required by emulator v0.0.7+ on
726
+ * every real input of a submitted proof. {@link Intent.create} is synchronous,
727
+ * so the bytes are supplied rather than fetched; `withPrevTxs` fills them in.
728
+ */
729
+ type IntentCoin = WithPrevTx<ExtendedCoin>;
644
730
  /**
645
731
  * Intent proof implementation for Bitcoin message signing.
646
732
  *
@@ -679,7 +765,7 @@ declare namespace Intent {
679
765
  * @param outputs - Optional array of transaction outputs
680
766
  * @returns An unsigned Intent proof transaction
681
767
  */
682
- function create(message: string | Message, ins: (TransactionInput | ExtendedCoin)[], outputs?: TransactionOutput[]): Proof;
768
+ function create(message: string | Message, ins: (TransactionInput | IntentCoin)[], outputs?: TransactionOutput[]): Proof;
683
769
  /**
684
770
  * Compute the fee paid by an intent proof transaction.
685
771
  *
@@ -973,17 +1059,17 @@ declare class RestArkProvider implements ArkProvider {
973
1059
  protected readonly eventSource?: EventSourceFactory;
974
1060
  constructor(serverUrl?: string, options?: EventSourceCapable);
975
1061
  /**
976
- * Last server-info digest seen (from {@link getInfo}). Sent as `X-Digest`
977
- * on outgoing requests so arkd can reject a client whose cached info is
978
- * stale. Empty until the first {@link getInfo}.
1062
+ * Last server-info digest seen from {@link getInfo}. Sent as `X-Digest`
1063
+ * so arkd can reject stale client configuration.
979
1064
  */
980
1065
  private _digest;
1066
+ private _hasServerInfo;
1067
+ private _suppressNextGetInfoChangeEmit;
981
1068
  private _serverInfoListeners;
982
1069
  /**
983
- * Subscribe to server-info changes. Fired when a request is rejected with
984
- * `DIGEST_MISMATCH` and fresh info is re-fetched, so consumers (the wallet)
985
- * can re-derive signer-dependent state mid-session without polling. Returns
986
- * an unsubscribe function.
1070
+ * Subscribe to server-info changes. Fired after a stale-info
1071
+ * `DIGEST_MISMATCH` refresh or when {@link getInfo} observes a changed digest.
1072
+ * Returns an unsubscribe function.
987
1073
  */
988
1074
  onServerInfoChanged(listener: (info: ArkInfo) => void): () => void;
989
1075
  private emitServerInfoChanged;
@@ -1662,6 +1748,17 @@ interface OnchainProvider {
1662
1748
  * @see ExplorerTransaction
1663
1749
  */
1664
1750
  getTransactions(address: string): Promise<ExplorerTransaction[]>;
1751
+ /**
1752
+ * Fetch the raw wire-format bytes of a transaction.
1753
+ *
1754
+ * @param txid - Transaction id to fetch
1755
+ * @returns Serialized transaction bytes
1756
+ * @throws Error if the transaction is unknown to the backend
1757
+ * @remarks
1758
+ * Needed to carry a boarding or commitment tx as a PSBT prevout field —
1759
+ * those have no off-chain source, so the indexer cannot serve them.
1760
+ */
1761
+ getRawTransaction(txid: string): Promise<Uint8Array>;
1665
1762
  /**
1666
1763
  * Fetch confirmation status for a transaction.
1667
1764
  *
@@ -1726,6 +1823,7 @@ declare class EsploraProvider implements OnchainProvider {
1726
1823
  txid?: string;
1727
1824
  }[]>;
1728
1825
  getTransactions(address: string): Promise<ExplorerTransaction[]>;
1826
+ getRawTransaction(txid: string): Promise<Uint8Array>;
1729
1827
  getTxStatus(txid: string): Promise<{
1730
1828
  confirmed: false;
1731
1829
  } | {
@@ -1780,6 +1878,10 @@ type NormalizedExtendedVirtualCoin = ExtendedVirtualCoin & NormalizedVirtualCoin
1780
1878
  * `isSpent: true` with an empty `spentBy` (settlement inputs needing no forfeit are written that
1781
1879
  * way), so a `spentBy || settledBy` definition would classify a spent VTXO as spendable — inflating
1782
1880
  * balance and selecting it for a send that must fail.
1881
+ *
1882
+ * `isUnrolled` is deliberately **not** part of this union: it says where the output lives, not that
1883
+ * it was consumed. Mirrors NArk's `ArkVtxo.IsSpent()`. The location axis is {@link canSweepOnchain},
1884
+ * which the two capability predicates below subtract instead.
1783
1885
  */
1784
1886
  declare function hasTerminalSpend(vtxo: VirtualCoin): boolean;
1785
1887
  /**
@@ -1801,6 +1903,18 @@ declare function canSpendOffchain(vtxo: VirtualCoin, now: TimeHeight): boolean;
1801
1903
  * recovery/renewal test and the `recoverable` balance bucket.
1802
1904
  */
1803
1905
  declare function canRecoverOnchain(vtxo: VirtualCoin, now: TimeHeight): boolean;
1906
+ /**
1907
+ * Whether a virtual output's exit already happened: the output lives onchain and `completeUnroll`
1908
+ * is the only remedy. The third and last capability, on the location axis rather than the spend
1909
+ * one — together the three partition the live set, since this claims every unrolled coin and the
1910
+ * other two refuse them.
1911
+ *
1912
+ * @remarks
1913
+ * The ts-sdk analogue of NArk's `OnchainSweepService` filter, minus the expiry clause: the relevant
1914
+ * maturity here is the exit tx's CSV timelock, which `prepareUnrollTransaction` checks against the
1915
+ * chain tip, not the batch expiry.
1916
+ */
1917
+ declare function canSweepOnchain(vtxo: VirtualCoin): boolean;
1804
1918
  /**
1805
1919
  * Narrow a settle input to a virtual output.
1806
1920
  *
@@ -1818,8 +1932,8 @@ declare function isVirtualCoin<T>(input: T): input is T & VirtualCoin;
1818
1932
  * @param vtxo - virtual output to inspect
1819
1933
  * @returns `true` when the virtual output has not been consumed
1820
1934
  *
1821
- * @deprecated Ambiguous: `true` for swept or expired virtual outputs, which cannot in fact be spent
1822
- * offchain. Use {@link canSpendOffchain}.
1935
+ * @deprecated Ambiguous: `true` for swept, expired or unrolled virtual outputs, none of which can
1936
+ * in fact be spent offchain. Use {@link canSpendOffchain}.
1823
1937
  */
1824
1938
  declare function isSpendable(vtxo: VirtualCoin): boolean;
1825
1939
  /**
@@ -1829,7 +1943,8 @@ declare function isSpendable(vtxo: VirtualCoin): boolean;
1829
1943
  * @returns `true` when the virtual output is swept but not yet consumed
1830
1944
  *
1831
1945
  * @deprecated Swept-only: ignores virtual outputs that are past expiry but not yet swept, which are
1832
- * equally recoverable. Use {@link canRecoverOnchain}.
1946
+ * equally recoverable, and claims unrolled ones, which are not recoverable at all. Use
1947
+ * {@link canRecoverOnchain}.
1833
1948
  */
1834
1949
  declare function isRecoverable(vtxo: VirtualCoin): boolean;
1835
1950
  /**
@@ -2080,6 +2195,9 @@ interface SettlementConfig {
2080
2195
  /**
2081
2196
  * Check if a virtual output is expiring soon based on threshold
2082
2197
  *
2198
+ * Always `false` for an unilaterally exited output: "expiring soon" is a renewal
2199
+ * signal, and no batch can renew an output that already lives onchain.
2200
+ *
2083
2201
  * @param vtxo - The virtual output to check
2084
2202
  * @param thresholdMs - Threshold in milliseconds from now
2085
2203
  * @returns true if virtual output expires within threshold, false otherwise
@@ -2227,7 +2345,12 @@ interface MigrationLegReport {
2227
2345
  * separate settle-backed migration. They are never combined into one intent.
2228
2346
  */
2229
2347
  interface DeprecatedSignerMigrationReport {
2230
- /** Whether a mid-session server-signer rotation was applied first. */
2348
+ /**
2349
+ * Whether this pass moved the wallet's receive state onto the active
2350
+ * signer — directly, or through the server-info refresh it opens with.
2351
+ * `false` when the wallet was already there, which includes a rotation an
2352
+ * earlier refresh elsewhere in the session already applied.
2353
+ */
2231
2354
  rotated: boolean;
2232
2355
  /** Global skip; when set, neither leg is present. */
2233
2356
  skipped?: MigrationGlobalSkipReason;
@@ -5005,6 +5128,59 @@ declare class ContractWatcher {
5005
5128
  * provider.
5006
5129
  */
5007
5130
  type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
5131
+ /**
5132
+ * Address flavours {@link Wallet.getNewAddresses} can mint. Both derive from
5133
+ * the same HD index within one call — `default` is the offchain Arkade
5134
+ * receive script, `boarding` the onchain deposit script.
5135
+ */
5136
+ type NewAddressType = "default" | "boarding";
5137
+ /** Options for {@link Wallet.getNewAddresses}. */
5138
+ interface GetNewAddressesOptions {
5139
+ /**
5140
+ * Flavours to mint, in the order they are returned.
5141
+ *
5142
+ * @defaultValue `["default"]`
5143
+ */
5144
+ types?: readonly NewAddressType[];
5145
+ /**
5146
+ * Require a genuinely fresh index. A wallet with no HD stream to advance
5147
+ * (`walletMode: 'static'` / `'auto'`, or a provider that declines to
5148
+ * allocate) throws {@link WalletCannotAllocateAddressError} rather than
5149
+ * silently handing back the address it already gave you — which, for a
5150
+ * caller issuing one address per counterparty, surfaces only as two
5151
+ * people paying the same script.
5152
+ *
5153
+ * @defaultValue `false`
5154
+ */
5155
+ forceNew?: boolean;
5156
+ }
5157
+ /** One minted address and the contract row backing it. */
5158
+ interface NewAddress {
5159
+ /**
5160
+ * The address to hand out: the onchain address for `boarding`, the Arkade
5161
+ * address for `default`.
5162
+ *
5163
+ * Not always `contract.address`. A boarding row persists the *ark*
5164
+ * encoding of its script, so reading `contract.address` on a boarding
5165
+ * entry yields an address no onchain sender can pay.
5166
+ */
5167
+ address: string;
5168
+ /**
5169
+ * The descriptor this address was derived from — hand it to
5170
+ * `signerForDescriptor` to recover the key later. Every entry from a
5171
+ * single call carries the same one, because they share an index.
5172
+ *
5173
+ * Also present on `contract.metadata.signingDescriptor`, but surfaced here
5174
+ * typed: `Contract.metadata` is `Record<string, unknown>`, so reading it
5175
+ * there costs the caller an `as string` on the one field they are most
5176
+ * likely to persist beside an invoice.
5177
+ */
5178
+ signingDescriptor: string;
5179
+ /**
5180
+ * The persisted, watched contract row — script, type, state and metadata.
5181
+ */
5182
+ contract: Contract;
5183
+ }
5008
5184
  /**
5009
5185
  * Base configuration options shared by all wallet types.
5010
5186
  *
@@ -5293,9 +5469,9 @@ interface WalletBalance {
5293
5469
  * obtainable split under a different predicate and is not counted here.
5294
5470
  *
5295
5471
  * Subtract this from `settled + preconfirmed`, never from `total`. `total`
5296
- * also carries {@link boarding}, {@link recoverable} and
5297
- * {@link pendingRecovery}, which are still the user's funds — netting a
5298
- * bucket out of it drops them from the figure with no signal.
5472
+ * also carries {@link boarding}, {@link recoverable}, {@link pendingRecovery}
5473
+ * and {@link unrolled}, which are still the user's funds — netting a bucket
5474
+ * out of it drops them from the figure with no signal.
5299
5475
  */
5300
5476
  gated: number;
5301
5477
  /**
@@ -5323,7 +5499,25 @@ interface WalletBalance {
5323
5499
  * still the wallet's funds, so counted in `total`.
5324
5500
  */
5325
5501
  pendingRecovery: number;
5326
- /** Total balance across offchain, recoverable, pending-recovery, and boarding funds. */
5502
+ /**
5503
+ * Funds whose unilateral exit already happened — the output is onchain
5504
+ * behind its CSV timelock, so `Unroll.completeUnroll` is the only thing
5505
+ * that moves it. Excluded from `available`/`settled`/`preconfirmed`, from
5506
+ * `recoverable` (no batch can lift an onchain output), and from coin
5507
+ * selection — but still the wallet's funds, so counted in `total`.
5508
+ */
5509
+ unrolled: number;
5510
+ /**
5511
+ * Total balance across offchain, recoverable, pending-recovery, unrolled,
5512
+ * and boarding funds.
5513
+ *
5514
+ * One known main-thread-only wedge: while a spend is in flight — `send`,
5515
+ * `sendBitcoin` or `settle` — its VTXO inputs are withheld from every bucket,
5516
+ * including this one. Boarding inputs are not: only virtual coins enter the
5517
+ * set. That state lives on the `Wallet` instance driving the spend, so a
5518
+ * service-worker client reading the same repository still counts them until
5519
+ * the spend settles. Both sides converge when it does.
5520
+ */
5327
5521
  total: number;
5328
5522
  /** Asset balance entries (`assetId` & `amount`) the wallet owns. */
5329
5523
  assets: Asset[];
@@ -5331,7 +5525,8 @@ interface WalletBalance {
5331
5525
  * The subset of {@link assets} generic spending will accept, i.e. the asset
5332
5526
  * analogue of {@link available}. `assets - availableAssets` is what is held
5333
5527
  * but not selectable, for the {@link gated} and {@link intentLocked} causes
5334
- * plus recovery — assets have no per-cause split of their own.
5528
+ * plus recovery and {@link unrolled} — assets have no per-cause split of
5529
+ * their own.
5335
5530
  */
5336
5531
  availableAssets: Asset[];
5337
5532
  }
@@ -5790,7 +5985,15 @@ declare function isSubdust(vtxo: {
5790
5985
  type GetVtxosFilter = {
5791
5986
  /** Include swept but still unspent virtual outputs. */
5792
5987
  withRecoverable?: boolean;
5793
- /** Include virtual outputs that have been unrolled onchain. */
5988
+ /**
5989
+ * Include virtual outputs that have been unrolled onchain.
5990
+ *
5991
+ * Authoritative on the *location* axis and only that: an exited output is
5992
+ * returned whatever else is true of it, spent ones included. So unlike
5993
+ * {@link withRecoverable}, this flag does not narrow to a capability —
5994
+ * test {@link canSweepOnchain} before acting on what comes back.
5995
+ * `Unroll.prepareUnrollTransaction`, the flag's main consumer, does.
5996
+ */
5794
5997
  withUnrolled?: boolean;
5795
5998
  };
5796
5999
  /**
@@ -5972,4 +6175,4 @@ interface IReadonlyWallet {
5972
6175
  clear(): Promise<void>;
5973
6176
  }
5974
6177
 
5975
- export { type TreeTxEvent as $, type ArkTransaction as A, type IntentFilter as B, type ContractRepository as C, type VirtualTxRepository as D, type ExtendedCoin as E, type VirtualTx as F, type GetVtxosFilter as G, type VtxoBranch as H, type IWallet as I, ChainedTxType as J, type DescriptorProvider as K, type Network as L, CSVMultisigTapscript as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchStartedEvent as P, type TreeSigningStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotificationEvent as T, TxTree as U, VtxoScript as V, type WalletRepository as W, type TreeNoncesEvent as X, type BatchFinalizationEvent as Y, type BatchFinalizedEvent as Z, type BatchFailedEvent as _, type Identity as a, BITCOIN_EMULATOR_PUBKEY as a$, type TreeSignatureEvent as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type GetContractsFilter as aA, type GetSpendablePathsOptions as aB, type GetAllSpendingPathsOptions as aC, type IssuanceParams as aD, type ReissuanceParams as aE, type BurnParams as aF, type RenewVtxosOptions as aG, type PathSelection as aH, type ContractEvent as aI, type AssetDetails as aJ, type IssuanceResult as aK, type DelegateInfo as aL, type MigrationGlobalSkipReason as aM, type MigrationLegSkipReason as aN, type SignerStatus as aO, type StorageConfig as aP, type IVtxoManager as aQ, type ExplorerTransaction as aR, type EncodedVtxoScript as aS, type Status as aT, type ChainTx as aU, type PathContext as aV, type ActivityIntent as aW, type ActivityResolver as aX, type ArkIntentState as aY, type ArkTapscript as aZ, type AssetMetadata as a_, type RecipientAddressContext as aa, type NetworkName as ab, type ArkInfo as ac, ArkAddress as ad, type ContractWithVtxos as ae, selectPendingRecoveryOutpoints as af, type Coin as ag, ContractManager as ah, type ContractManagerConfig as ai, type SettlementConfig as aj, VtxoManager as ak, type SignerSession as al, type SignedIntent as am, Intent as an, type TimeHeight as ao, type DescriptorSigningRequest as ap, Transaction as aq, type IntentFeeConfig as ar, type OffchainInput as as, FeeAmount as at, type OnchainInput as au, type FeeOutput as av, type ContractWatcherConfig as aw, type Asset as ax, type FeeInfo as ay, type CreateContractParams as az, type WalletConfig as b, type SweepTxNotification as b$, type BaseWalletConfig as b0, type BatchInfo as b1, type BatchSignableIdentity as b2, CLTVMultisigTapscript as b3, type CandidateDeps as b4, ChainTxType as b5, type CommitmentTx as b6, ConditionCSVMultisigTapscript as b7, ConditionMultisigTapscript as b8, type ContractBalance as b9, type IDelegatorManager as bA, INTENT_TERMINAL_STATES as bB, IndexerTxType as bC, type KnownMetadata as bD, MUTINYNET_EMULATOR_PUBKEY as bE, type MigrateDeprecatedSignerOptions as bF, type MigrationLegReport as bG, type MigrationVtxoRef as bH, MultisigTapscript as bI, type Nonces as bJ, type Output as bK, type PageResponse as bL, type PaginationOptions as bM, PartialSig as bN, type ProviderClass as bO, REGTEST_EMULATOR_PUBKEY as bP, RestDelegateProvider as bQ, RestDelegatorProvider as bR, type ScanContractsOptions as bS, type ScanResult as bT, type ScheduledSession as bU, SettlementEventType as bV, type SignRequest as bW, type SignerClassification as bX, type SignerSet as bY, type SubscriptionEvent as bZ, type SubscriptionHeartbeat as b_, type ContractEventCallback as ba, type ContractHandler as bb, type ContractState as bc, type ContractVtxo as bd, ContractWatcher as be, DEFAULT_VTXO_PAGE_SIZE as bf, DelegateManagerImpl as bg, type DelegateOptions as bh, DelegatorManagerImpl as bi, type DelegatorProvider as bj, type DeprecatedSignerMigrationReport as bk, type DeprecatedSignerReport as bl, DigestMismatchError as bm, type Discoverable as bn, type DiscoveredContract as bo, type DiscoveryDeps as bp, ESPLORA_URL as bq, EsploraProvider as br, type EventSourceCapable as bs, type EventSourceFactory as bt, type EventSourceLike as bu, EventSourceUnavailableError as bv, type ExitChainResolver as bw, type ExtendedContractVtxo as bx, type GroupMembership as by, type HandlerError as bz, type WalletBalance as c, type TapLeaves as c0, TapTreeCoder as c1, TapscriptType as c2, type TreeNonces as c3, type TreePartialSigs as c4, type Tx as c5, type TxHistoryRecord as c6, type TxKey as c7, type TxNotification as c8, type TxTag as c9, isCooperativelyMigratable as cA, isDiscoverable as cB, isEventSourceUnavailableError as cC, isExpired as cD, isPastExpiry as cE, isRecoverable as cF, isSigningIdentity as cG, isSpendable as cH, isSubdust as cI, isTerminalIntentState as cJ, isVirtualCoin as cK, isVtxoExpiringSoon as cL, networks as cM, resolveEmulatorPubkey as cN, resolveEventSource as cO, scriptFromTapLeafScript as cP, signerSetFromInfo as cQ, toXOnlySignerHex as cR, type TapscriptDeriving as cS, type TxTreeNode as ca, TxType as cb, type VirtualStatus as cc, type Vtxo as cd, type VtxoChain as ce, type VtxoType as cf, type WalletMode as cg, assetMintResolver as ch, boardingResolver as ci, canRecoverOnchain as cj, canSpendOffchain as ck, classifyAgainstSignerSet as cl, classifyContractSigner as cm, collabExitResolver as cn, configureEventSource as co, createDefaultActivityRegistry as cp, createExitChainResolver as cq, decodeTapscript as cr, defaultEmulatorPubkey as cs, getConfiguredEventSource as ct, getNetwork as cu, getRandomId as cv, getSequence as cw, hasCandidates as cx, hasTerminalSpend as cy, isBatchSignable as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type SendParams as j, type IAssetManager as k, RestArkProvider as l, RestIndexerProvider as m, type SubscriptionResponse as n, type ArkProvider as o, type IndexerProvider as p, type RelativeTimelock as q, type TapLeafScript as r, type VirtualCoin as s, type Contract as t, type ExtendedVirtualCoin as u, type VtxoRepositoryKey as v, type WalletState as w, type ContractFilter as x, type IntentRepository as y, type ArkIntent as z };
6178
+ export { type BatchFailedEvent as $, type ArkTransaction as A, type IntentRepository as B, type ContractRepository as C, type ArkIntent as D, type ExtendedCoin as E, type IntentFilter as F, type GetVtxosFilter as G, type VirtualTxRepository as H, type IWallet as I, type VirtualTx as J, type VtxoBranch as K, ChainedTxType as L, type Network as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, CSVMultisigTapscript as P, type BatchStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotificationEvent as T, type TreeSigningStartedEvent as U, VtxoScript as V, type WalletRepository as W, TxTree as X, type TreeNoncesEvent as Y, type BatchFinalizationEvent as Z, type BatchFinalizedEvent as _, type Identity as a, type ActivityIntent as a$, type TreeTxEvent as a0, type TreeSignatureEvent as a1, type DescriptorProvider as a2, type IReadonlyWallet as a3, type ReadonlyIdentity as a4, type OnchainProvider as a5, type DelegateProvider as a6, type ReadonlyWalletConfig as a7, type ExitCaptureMode as a8, type ExitDataSource as a9, type FeeInfo as aA, type CreateContractParams as aB, type GetContractsFilter as aC, type GetSpendablePathsOptions as aD, type GetAllSpendingPathsOptions as aE, type IssuanceParams as aF, type ReissuanceParams as aG, type BurnParams as aH, type RenewVtxosOptions as aI, type PathSelection as aJ, type ContractEvent as aK, type AssetDetails as aL, type IssuanceResult as aM, type DelegateInfo as aN, type MigrationGlobalSkipReason as aO, type MigrationLegSkipReason as aP, type SignerStatus as aQ, type StorageConfig as aR, type IVtxoManager as aS, type ExplorerTransaction as aT, type TreeNonces as aU, type TreePartialSigs as aV, type PendingTx as aW, type EncodedVtxoScript as aX, type Status as aY, type ChainTx as aZ, type PathContext as a_, type IReadonlyAssetManager as aa, type ContractSyncState as ab, type RecipientAddressContext as ac, type NetworkName as ad, type ArkInfo as ae, ArkAddress as af, type ContractWithVtxos as ag, selectPendingRecoveryOutpoints as ah, type Coin as ai, ContractManager as aj, type ContractManagerConfig as ak, type SettlementConfig as al, VtxoManager as am, type SignerSession as an, type SignedIntent as ao, Intent as ap, type TimeHeight as aq, type DescriptorSigningRequest as ar, Transaction as as, type IntentFeeConfig as at, type OffchainInput as au, FeeAmount as av, type OnchainInput as aw, type FeeOutput as ax, type ContractWatcherConfig as ay, type Asset as az, type WalletConfig as b, RestDelegatorProvider as b$, type ActivityResolver as b0, type ArkIntentState as b1, type ArkTapscript as b2, type AssetMetadata as b3, BITCOIN_EMULATOR_PUBKEY as b4, type BaseWalletConfig as b5, type BatchInfo as b6, type BatchSignableIdentity as b7, CLTVMultisigTapscript as b8, type CandidateDeps as b9, EventSourceUnavailableError as bA, type ExitChainResolver as bB, type ExtendedContractVtxo as bC, type GroupMembership as bD, type HandlerError as bE, type IDelegatorManager as bF, INTENT_TERMINAL_STATES as bG, IndexerTxType as bH, type IntentCoin as bI, type KnownMetadata as bJ, MUTINYNET_EMULATOR_PUBKEY as bK, type MigrateDeprecatedSignerOptions as bL, type MigrationLegReport as bM, type MigrationVtxoRef as bN, MultisigTapscript as bO, type NewAddressType as bP, type Nonces as bQ, type Output as bR, type PageResponse as bS, type PaginationOptions as bT, PartialSig as bU, type PrevTxSource as bV, PrevTxUnavailableError as bW, type ProviderClass as bX, REGTEST_EMULATOR_PUBKEY as bY, type RawTxSource as bZ, RestDelegateProvider as b_, ChainTxType as ba, type CommitmentTx as bb, ConditionCSVMultisigTapscript as bc, ConditionMultisigTapscript as bd, type ContractBalance as be, type ContractEventCallback as bf, type ContractHandler as bg, type ContractState as bh, type ContractVtxo as bi, ContractWatcher as bj, DEFAULT_VTXO_PAGE_SIZE as bk, DelegateManagerImpl as bl, type DelegateOptions as bm, DelegatorManagerImpl as bn, type DelegatorProvider as bo, type DeprecatedSignerMigrationReport as bp, type DeprecatedSignerReport as bq, DigestMismatchError as br, type Discoverable as bs, type DiscoveredContract as bt, type DiscoveryDeps as bu, ESPLORA_URL as bv, EsploraProvider as bw, type EventSourceCapable as bx, type EventSourceFactory as by, type EventSourceLike as bz, type WalletBalance as c, resolveEventSource as c$, type ScanContractsOptions as c0, type ScanResult as c1, type ScheduledSession as c2, SettlementEventType as c3, type SignRequest as c4, type SignerClassification as c5, type SignerSet as c6, type SubscriptionEvent as c7, type SubscriptionHeartbeat as c8, type SweepTxNotification as c9, collabExitResolver as cA, configureEventSource as cB, createDefaultActivityRegistry as cC, createExitChainResolver as cD, decodeTapscript as cE, defaultEmulatorPubkey as cF, getConfiguredEventSource as cG, getNetwork as cH, getRandomId as cI, getSequence as cJ, hasCandidates as cK, hasTerminalSpend as cL, isBatchSignable as cM, isCooperativelyMigratable as cN, isDiscoverable as cO, isEventSourceUnavailableError as cP, isExpired as cQ, isPastExpiry as cR, isRecoverable as cS, isSigningIdentity as cT, isSpendable as cU, isSubdust as cV, isTerminalIntentState as cW, isVirtualCoin as cX, isVtxoExpiringSoon as cY, networks as cZ, resolveEmulatorPubkey as c_, type TapLeaves as ca, TapTreeCoder as cb, TapscriptType as cc, type Tx as cd, type TxHistoryRecord as ce, type TxKey as cf, type TxNotification as cg, type TxTag as ch, type TxTreeNode as ci, TxType as cj, type VirtualStatus as ck, type Vtxo as cl, type VtxoChain as cm, type VtxoType as cn, type WalletMode as co, type WithPrevTx as cp, assertAllowedSighashTypes as cq, assetMintResolver as cr, attachPrevArkTxs as cs, attachPrevoutTxs as ct, boardingResolver as cu, canRecoverOnchain as cv, canSpendOffchain as cw, canSweepOnchain as cx, classifyAgainstSignerSet as cy, classifyContractSigner as cz, ActivityRegistry as d, resolvePrevTxs as d0, scriptFromTapLeafScript as d1, signerSetFromInfo as d2, toXOnlySignerHex as d3, withPrevTxs as d4, type TapscriptDeriving as d5, type Activity as e, type IContractManager as f, type GetNewAddressesOptions as g, type NewAddress as h, type IDelegateManager as i, type SettleParams as j, type SettlementEvent as k, type SendParams as l, type IAssetManager as m, RestArkProvider as n, RestIndexerProvider as o, type SubscriptionResponse as p, type ArkProvider as q, type IndexerProvider as r, type RelativeTimelock as s, type TapLeafScript as t, type VirtualCoin as u, type Contract as v, type ExtendedVirtualCoin as w, type VtxoRepositoryKey as x, type WalletState as y, type ContractFilter as z };