@arkade-os/sdk 0.4.66 → 0.4.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -15
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-BZcIN7sA.d.cts → asyncStorageTaskQueue-LTpeXYaD.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-B6SijMi3.d.ts → asyncStorageTaskQueue-Za-e_zMk.d.ts} +2 -2
- package/dist/{chunk-ZIRFXBKL.cjs → chunk-2JV4VQ7C.cjs} +33 -13
- package/dist/chunk-2JV4VQ7C.cjs.map +1 -0
- package/dist/{chunk-J33ZEM3A.js → chunk-3WIWNE4P.js} +33 -14
- package/dist/chunk-3WIWNE4P.js.map +1 -0
- package/dist/{chunk-CYOI4PEA.js → chunk-6TAQF6EV.js} +107 -13
- package/dist/chunk-6TAQF6EV.js.map +1 -0
- package/dist/{chunk-DSC3G6QZ.js → chunk-AEWJU6NZ.js} +1006 -167
- package/dist/chunk-AEWJU6NZ.js.map +1 -0
- package/dist/{chunk-3S3JZUEN.cjs → chunk-CO3KKSWM.cjs} +17 -17
- package/dist/{chunk-3S3JZUEN.cjs.map → chunk-CO3KKSWM.cjs.map} +1 -1
- package/dist/{chunk-55ZZ6RBL.js → chunk-EALWOVHK.js} +4 -4
- package/dist/{chunk-55ZZ6RBL.js.map → chunk-EALWOVHK.js.map} +1 -1
- package/dist/{chunk-5E6IZNRG.cjs → chunk-MJUTO3PY.cjs} +1413 -563
- package/dist/chunk-MJUTO3PY.cjs.map +1 -0
- package/dist/{chunk-R5POS3RS.js → chunk-MZFUZUTQ.js} +4 -4
- package/dist/{chunk-R5POS3RS.js.map → chunk-MZFUZUTQ.js.map} +1 -1
- package/dist/{chunk-PXPPZF5K.cjs → chunk-OIZ2V2VD.cjs} +152 -58
- package/dist/chunk-OIZ2V2VD.cjs.map +1 -0
- package/dist/{chunk-IM6IKNSL.cjs → chunk-R2YAMONM.cjs} +17 -17
- package/dist/{chunk-IM6IKNSL.cjs.map → chunk-R2YAMONM.cjs.map} +1 -1
- package/dist/{chunk-2JZGPXU4.js → chunk-X3VEMUVV.js} +3 -3
- package/dist/{chunk-2JZGPXU4.js.map → chunk-X3VEMUVV.js.map} +1 -1
- package/dist/{chunk-LL47QIHD.cjs → chunk-YDRZDZPP.cjs} +10 -10
- package/dist/{chunk-LL47QIHD.cjs.map → chunk-YDRZDZPP.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-YXupcWWJ.d.cts → delegate-Bz2e2zXY.d.cts} +1 -1
- package/dist/{delegate-T-vgxMYZ.d.ts → delegate-cdmzb2f9.d.ts} +1 -1
- package/dist/{wallet-CNibc3yJ.d.ts → hdWalletCapable-BSjuUYOO.d.cts} +318 -127
- package/dist/{wallet-DJN1QgFt.d.cts → hdWalletCapable-Hi12xjCJ.d.ts} +318 -127
- package/dist/{index-e7LYXk1d.d.cts → index-BiACuWaf.d.ts} +109 -13
- package/dist/{index-D_FgwLH9.d.ts → index-D2GjZxBr.d.cts} +109 -13
- package/dist/{index-uUE_uQPn.d.ts → index-DU5o_hz7.d.cts} +206 -19
- package/dist/{index-uUE_uQPn.d.cts → index-DU5o_hz7.d.ts} +206 -19
- package/dist/index.cjs +322 -278
- package/dist/index.d.cts +291 -41
- package/dist/index.d.ts +291 -41
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BOVcIH1N.d.cts → taskRunner-BZJMLQ6g.d.cts} +2 -2
- package/dist/{taskRunner-DNyD1kXG.d.ts → taskRunner-DATaRQus.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +18 -14
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +7 -5
- package/dist/wallet/expo/index.d.ts +7 -5
- package/dist/wallet/expo/index.js +10 -6
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +3 -3
- package/dist/chunk-5E6IZNRG.cjs.map +0 -1
- package/dist/chunk-CYOI4PEA.js.map +0 -1
- package/dist/chunk-DSC3G6QZ.js.map +0 -1
- package/dist/chunk-J33ZEM3A.js.map +0 -1
- package/dist/chunk-PXPPZF5K.cjs.map +0 -1
- package/dist/chunk-ZIRFXBKL.cjs.map +0 -1
|
@@ -641,6 +641,86 @@ interface FeeOutput {
|
|
|
641
641
|
script: string;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
+
/**
|
|
645
|
+
* Off-chain source of previous transactions: ark, tree and checkpoint txs, as
|
|
646
|
+
* base64 PSBTs keyed by txid. Structurally satisfied by `IndexerProvider`.
|
|
647
|
+
*/
|
|
648
|
+
interface PrevTxSource {
|
|
649
|
+
getVirtualTxs(txids: string[]): Promise<{
|
|
650
|
+
txs: string[];
|
|
651
|
+
}>;
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* On-chain source of previous transactions — boarding and commitment txs, which
|
|
655
|
+
* `getVirtualTxs` does not serve. Structurally satisfied by `OnchainProvider`.
|
|
656
|
+
*/
|
|
657
|
+
interface RawTxSource {
|
|
658
|
+
getRawTransaction(txid: string): Promise<Uint8Array>;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* A previous transaction could not be resolved, so the emulator would reject the
|
|
662
|
+
* submission with `missing prevout tx for input N`. Distinguishes "no source is
|
|
663
|
+
* wired up" from "the source did not have it" — the remedies differ.
|
|
664
|
+
*/
|
|
665
|
+
declare class PrevTxUnavailableError extends Error {
|
|
666
|
+
readonly txids: string[];
|
|
667
|
+
constructor(message: string, txids?: string[]);
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Resolve raw wire-format bytes for each txid, batched and de-duplicated.
|
|
671
|
+
*
|
|
672
|
+
* Emulator v0.0.7+ requires the raw tx behind every input of a submitted ark tx
|
|
673
|
+
* or intent proof (`PrevArkTxField`) and of an onchain tx (`PrevoutTxField`).
|
|
674
|
+
* The value is a serialized `wire.MsgTx`, *not* a PSBT — `Transaction.toBytes()`
|
|
675
|
+
* with the default `(withScriptSig=false, withWitness=false)` is exactly the
|
|
676
|
+
* preimage the emulator hashes to check the tx against the outpoint.
|
|
677
|
+
*
|
|
678
|
+
* Off-chain txs are fetched in one batched call; anything the indexer does not
|
|
679
|
+
* serve (a commitment or boarding tx) falls through to `onchain` when supplied.
|
|
680
|
+
*/
|
|
681
|
+
declare function resolvePrevTxs(txids: string[], source: PrevTxSource, onchain?: RawTxSource): Promise<Map<string, Uint8Array>>;
|
|
682
|
+
/**
|
|
683
|
+
* Attach `PrevArkTxField` to every input of `tx` that does not already carry
|
|
684
|
+
* one, resolving the bytes for `txids[i]` — the coin input `i` ultimately
|
|
685
|
+
* spends.
|
|
686
|
+
*
|
|
687
|
+
* Inputs already carrying the field are skipped rather than overwritten: the
|
|
688
|
+
* emulator rejects an input with more than one field of the same type, so a
|
|
689
|
+
* caller-supplied value (`Utxo.sourceTx`) must win outright. Nothing is fetched
|
|
690
|
+
* when every input is already covered.
|
|
691
|
+
*/
|
|
692
|
+
declare function attachPrevArkTxs(tx: Transaction, txids: string[], source: PrevTxSource, onchain?: RawTxSource): Promise<void>;
|
|
693
|
+
/**
|
|
694
|
+
* Attach `PrevoutTxField` to every input of an onchain PSBT, reading each
|
|
695
|
+
* input's own outpoint — unlike an ark tx, an onchain tx spends its prevout
|
|
696
|
+
* directly, so the txid is in the PSBT already.
|
|
697
|
+
*/
|
|
698
|
+
declare function attachPrevoutTxs(tx: Transaction, source: RawTxSource): Promise<void>;
|
|
699
|
+
/**
|
|
700
|
+
* A coin an intent proof spends, carrying the raw previous tx the emulator needs
|
|
701
|
+
* to resolve its prevout pkScript.
|
|
702
|
+
*/
|
|
703
|
+
type WithPrevTx<T> = T & {
|
|
704
|
+
prevTx?: Uint8Array;
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* Fill in `prevTx` on every coin an intent proof will spend, in one batched
|
|
708
|
+
* lookup. The proof's synthetic input 0 needs nothing — the emulator synthesises
|
|
709
|
+
* a one-output tx for it — so this covers exactly the coins, which land on proof
|
|
710
|
+
* inputs `1..n`.
|
|
711
|
+
*/
|
|
712
|
+
declare function withPrevTxs<T extends {
|
|
713
|
+
txid: string;
|
|
714
|
+
prevTx?: Uint8Array;
|
|
715
|
+
}>(coins: T[], source: PrevTxSource, onchain?: RawTxSource): Promise<T[]>;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* A coin an intent proof proves ownership of. `prevTx` carries the raw wire
|
|
719
|
+
* bytes of the transaction that created it — required by emulator v0.0.7+ on
|
|
720
|
+
* every real input of a submitted proof. {@link Intent.create} is synchronous,
|
|
721
|
+
* so the bytes are supplied rather than fetched; `withPrevTxs` fills them in.
|
|
722
|
+
*/
|
|
723
|
+
type IntentCoin = WithPrevTx<ExtendedCoin>;
|
|
644
724
|
/**
|
|
645
725
|
* Intent proof implementation for Bitcoin message signing.
|
|
646
726
|
*
|
|
@@ -679,7 +759,7 @@ declare namespace Intent {
|
|
|
679
759
|
* @param outputs - Optional array of transaction outputs
|
|
680
760
|
* @returns An unsigned Intent proof transaction
|
|
681
761
|
*/
|
|
682
|
-
function create(message: string | Message, ins: (TransactionInput |
|
|
762
|
+
function create(message: string | Message, ins: (TransactionInput | IntentCoin)[], outputs?: TransactionOutput[]): Proof;
|
|
683
763
|
/**
|
|
684
764
|
* Compute the fee paid by an intent proof transaction.
|
|
685
765
|
*
|
|
@@ -973,17 +1053,17 @@ declare class RestArkProvider implements ArkProvider {
|
|
|
973
1053
|
protected readonly eventSource?: EventSourceFactory;
|
|
974
1054
|
constructor(serverUrl?: string, options?: EventSourceCapable);
|
|
975
1055
|
/**
|
|
976
|
-
* Last server-info digest seen
|
|
977
|
-
*
|
|
978
|
-
* stale. Empty until the first {@link getInfo}.
|
|
1056
|
+
* Last server-info digest seen from {@link getInfo}. Sent as `X-Digest`
|
|
1057
|
+
* so arkd can reject stale client configuration.
|
|
979
1058
|
*/
|
|
980
1059
|
private _digest;
|
|
1060
|
+
private _hasServerInfo;
|
|
1061
|
+
private _suppressNextGetInfoChangeEmit;
|
|
981
1062
|
private _serverInfoListeners;
|
|
982
1063
|
/**
|
|
983
|
-
* Subscribe to server-info changes. Fired
|
|
984
|
-
* `DIGEST_MISMATCH`
|
|
985
|
-
*
|
|
986
|
-
* an unsubscribe function.
|
|
1064
|
+
* Subscribe to server-info changes. Fired after a stale-info
|
|
1065
|
+
* `DIGEST_MISMATCH` refresh or when {@link getInfo} observes a changed digest.
|
|
1066
|
+
* Returns an unsubscribe function.
|
|
987
1067
|
*/
|
|
988
1068
|
onServerInfoChanged(listener: (info: ArkInfo) => void): () => void;
|
|
989
1069
|
private emitServerInfoChanged;
|
|
@@ -1662,6 +1742,17 @@ interface OnchainProvider {
|
|
|
1662
1742
|
* @see ExplorerTransaction
|
|
1663
1743
|
*/
|
|
1664
1744
|
getTransactions(address: string): Promise<ExplorerTransaction[]>;
|
|
1745
|
+
/**
|
|
1746
|
+
* Fetch the raw wire-format bytes of a transaction.
|
|
1747
|
+
*
|
|
1748
|
+
* @param txid - Transaction id to fetch
|
|
1749
|
+
* @returns Serialized transaction bytes
|
|
1750
|
+
* @throws Error if the transaction is unknown to the backend
|
|
1751
|
+
* @remarks
|
|
1752
|
+
* Needed to carry a boarding or commitment tx as a PSBT prevout field —
|
|
1753
|
+
* those have no off-chain source, so the indexer cannot serve them.
|
|
1754
|
+
*/
|
|
1755
|
+
getRawTransaction(txid: string): Promise<Uint8Array>;
|
|
1665
1756
|
/**
|
|
1666
1757
|
* Fetch confirmation status for a transaction.
|
|
1667
1758
|
*
|
|
@@ -1726,6 +1817,7 @@ declare class EsploraProvider implements OnchainProvider {
|
|
|
1726
1817
|
txid?: string;
|
|
1727
1818
|
}[]>;
|
|
1728
1819
|
getTransactions(address: string): Promise<ExplorerTransaction[]>;
|
|
1820
|
+
getRawTransaction(txid: string): Promise<Uint8Array>;
|
|
1729
1821
|
getTxStatus(txid: string): Promise<{
|
|
1730
1822
|
confirmed: false;
|
|
1731
1823
|
} | {
|
|
@@ -1780,6 +1872,10 @@ type NormalizedExtendedVirtualCoin = ExtendedVirtualCoin & NormalizedVirtualCoin
|
|
|
1780
1872
|
* `isSpent: true` with an empty `spentBy` (settlement inputs needing no forfeit are written that
|
|
1781
1873
|
* way), so a `spentBy || settledBy` definition would classify a spent VTXO as spendable — inflating
|
|
1782
1874
|
* balance and selecting it for a send that must fail.
|
|
1875
|
+
*
|
|
1876
|
+
* `isUnrolled` is deliberately **not** part of this union: it says where the output lives, not that
|
|
1877
|
+
* it was consumed. Mirrors NArk's `ArkVtxo.IsSpent()`. The location axis is {@link canSweepOnchain},
|
|
1878
|
+
* which the two capability predicates below subtract instead.
|
|
1783
1879
|
*/
|
|
1784
1880
|
declare function hasTerminalSpend(vtxo: VirtualCoin): boolean;
|
|
1785
1881
|
/**
|
|
@@ -1801,6 +1897,18 @@ declare function canSpendOffchain(vtxo: VirtualCoin, now: TimeHeight): boolean;
|
|
|
1801
1897
|
* recovery/renewal test and the `recoverable` balance bucket.
|
|
1802
1898
|
*/
|
|
1803
1899
|
declare function canRecoverOnchain(vtxo: VirtualCoin, now: TimeHeight): boolean;
|
|
1900
|
+
/**
|
|
1901
|
+
* Whether a virtual output's exit already happened: the output lives onchain and `completeUnroll`
|
|
1902
|
+
* is the only remedy. The third and last capability, on the location axis rather than the spend
|
|
1903
|
+
* one — together the three partition the live set, since this claims every unrolled coin and the
|
|
1904
|
+
* other two refuse them.
|
|
1905
|
+
*
|
|
1906
|
+
* @remarks
|
|
1907
|
+
* The ts-sdk analogue of NArk's `OnchainSweepService` filter, minus the expiry clause: the relevant
|
|
1908
|
+
* maturity here is the exit tx's CSV timelock, which `prepareUnrollTransaction` checks against the
|
|
1909
|
+
* chain tip, not the batch expiry.
|
|
1910
|
+
*/
|
|
1911
|
+
declare function canSweepOnchain(vtxo: VirtualCoin): boolean;
|
|
1804
1912
|
/**
|
|
1805
1913
|
* Narrow a settle input to a virtual output.
|
|
1806
1914
|
*
|
|
@@ -1818,8 +1926,8 @@ declare function isVirtualCoin<T>(input: T): input is T & VirtualCoin;
|
|
|
1818
1926
|
* @param vtxo - virtual output to inspect
|
|
1819
1927
|
* @returns `true` when the virtual output has not been consumed
|
|
1820
1928
|
*
|
|
1821
|
-
* @deprecated Ambiguous: `true` for swept or
|
|
1822
|
-
* offchain. Use {@link canSpendOffchain}.
|
|
1929
|
+
* @deprecated Ambiguous: `true` for swept, expired or unrolled virtual outputs, none of which can
|
|
1930
|
+
* in fact be spent offchain. Use {@link canSpendOffchain}.
|
|
1823
1931
|
*/
|
|
1824
1932
|
declare function isSpendable(vtxo: VirtualCoin): boolean;
|
|
1825
1933
|
/**
|
|
@@ -1829,7 +1937,8 @@ declare function isSpendable(vtxo: VirtualCoin): boolean;
|
|
|
1829
1937
|
* @returns `true` when the virtual output is swept but not yet consumed
|
|
1830
1938
|
*
|
|
1831
1939
|
* @deprecated Swept-only: ignores virtual outputs that are past expiry but not yet swept, which are
|
|
1832
|
-
* equally recoverable
|
|
1940
|
+
* equally recoverable, and claims unrolled ones, which are not recoverable at all. Use
|
|
1941
|
+
* {@link canRecoverOnchain}.
|
|
1833
1942
|
*/
|
|
1834
1943
|
declare function isRecoverable(vtxo: VirtualCoin): boolean;
|
|
1835
1944
|
/**
|
|
@@ -2227,7 +2336,12 @@ interface MigrationLegReport {
|
|
|
2227
2336
|
* separate settle-backed migration. They are never combined into one intent.
|
|
2228
2337
|
*/
|
|
2229
2338
|
interface DeprecatedSignerMigrationReport {
|
|
2230
|
-
/**
|
|
2339
|
+
/**
|
|
2340
|
+
* Whether this pass moved the wallet's receive state onto the active
|
|
2341
|
+
* signer — directly, or through the server-info refresh it opens with.
|
|
2342
|
+
* `false` when the wallet was already there, which includes a rotation an
|
|
2343
|
+
* earlier refresh elsewhere in the session already applied.
|
|
2344
|
+
*/
|
|
2231
2345
|
rotated: boolean;
|
|
2232
2346
|
/** Global skip; when set, neither leg is present. */
|
|
2233
2347
|
skipped?: MigrationGlobalSkipReason;
|
|
@@ -5005,6 +5119,59 @@ declare class ContractWatcher {
|
|
|
5005
5119
|
* provider.
|
|
5006
5120
|
*/
|
|
5007
5121
|
type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
|
|
5122
|
+
/**
|
|
5123
|
+
* Address flavours {@link Wallet.getNewAddresses} can mint. Both derive from
|
|
5124
|
+
* the same HD index within one call — `default` is the offchain Arkade
|
|
5125
|
+
* receive script, `boarding` the onchain deposit script.
|
|
5126
|
+
*/
|
|
5127
|
+
type NewAddressType = "default" | "boarding";
|
|
5128
|
+
/** Options for {@link Wallet.getNewAddresses}. */
|
|
5129
|
+
interface GetNewAddressesOptions {
|
|
5130
|
+
/**
|
|
5131
|
+
* Flavours to mint, in the order they are returned.
|
|
5132
|
+
*
|
|
5133
|
+
* @defaultValue `["default"]`
|
|
5134
|
+
*/
|
|
5135
|
+
types?: readonly NewAddressType[];
|
|
5136
|
+
/**
|
|
5137
|
+
* Require a genuinely fresh index. A wallet with no HD stream to advance
|
|
5138
|
+
* (`walletMode: 'static'` / `'auto'`, or a provider that declines to
|
|
5139
|
+
* allocate) throws {@link WalletCannotAllocateAddressError} rather than
|
|
5140
|
+
* silently handing back the address it already gave you — which, for a
|
|
5141
|
+
* caller issuing one address per counterparty, surfaces only as two
|
|
5142
|
+
* people paying the same script.
|
|
5143
|
+
*
|
|
5144
|
+
* @defaultValue `false`
|
|
5145
|
+
*/
|
|
5146
|
+
forceNew?: boolean;
|
|
5147
|
+
}
|
|
5148
|
+
/** One minted address and the contract row backing it. */
|
|
5149
|
+
interface NewAddress {
|
|
5150
|
+
/**
|
|
5151
|
+
* The address to hand out: the onchain address for `boarding`, the Arkade
|
|
5152
|
+
* address for `default`.
|
|
5153
|
+
*
|
|
5154
|
+
* Not always `contract.address`. A boarding row persists the *ark*
|
|
5155
|
+
* encoding of its script, so reading `contract.address` on a boarding
|
|
5156
|
+
* entry yields an address no onchain sender can pay.
|
|
5157
|
+
*/
|
|
5158
|
+
address: string;
|
|
5159
|
+
/**
|
|
5160
|
+
* The descriptor this address was derived from — hand it to
|
|
5161
|
+
* `signerForDescriptor` to recover the key later. Every entry from a
|
|
5162
|
+
* single call carries the same one, because they share an index.
|
|
5163
|
+
*
|
|
5164
|
+
* Also present on `contract.metadata.signingDescriptor`, but surfaced here
|
|
5165
|
+
* typed: `Contract.metadata` is `Record<string, unknown>`, so reading it
|
|
5166
|
+
* there costs the caller an `as string` on the one field they are most
|
|
5167
|
+
* likely to persist beside an invoice.
|
|
5168
|
+
*/
|
|
5169
|
+
signingDescriptor: string;
|
|
5170
|
+
/**
|
|
5171
|
+
* The persisted, watched contract row — script, type, state and metadata.
|
|
5172
|
+
*/
|
|
5173
|
+
contract: Contract;
|
|
5174
|
+
}
|
|
5008
5175
|
/**
|
|
5009
5176
|
* Base configuration options shared by all wallet types.
|
|
5010
5177
|
*
|
|
@@ -5293,9 +5460,9 @@ interface WalletBalance {
|
|
|
5293
5460
|
* obtainable split under a different predicate and is not counted here.
|
|
5294
5461
|
*
|
|
5295
5462
|
* Subtract this from `settled + preconfirmed`, never from `total`. `total`
|
|
5296
|
-
* also carries {@link boarding}, {@link recoverable}
|
|
5297
|
-
* {@link
|
|
5298
|
-
*
|
|
5463
|
+
* also carries {@link boarding}, {@link recoverable}, {@link pendingRecovery}
|
|
5464
|
+
* and {@link unrolled}, which are still the user's funds — netting a bucket
|
|
5465
|
+
* out of it drops them from the figure with no signal.
|
|
5299
5466
|
*/
|
|
5300
5467
|
gated: number;
|
|
5301
5468
|
/**
|
|
@@ -5323,7 +5490,18 @@ interface WalletBalance {
|
|
|
5323
5490
|
* still the wallet's funds, so counted in `total`.
|
|
5324
5491
|
*/
|
|
5325
5492
|
pendingRecovery: number;
|
|
5326
|
-
/**
|
|
5493
|
+
/**
|
|
5494
|
+
* Funds whose unilateral exit already happened — the output is onchain
|
|
5495
|
+
* behind its CSV timelock, so `Unroll.completeUnroll` is the only thing
|
|
5496
|
+
* that moves it. Excluded from `available`/`settled`/`preconfirmed`, from
|
|
5497
|
+
* `recoverable` (no batch can lift an onchain output), and from coin
|
|
5498
|
+
* selection — but still the wallet's funds, so counted in `total`.
|
|
5499
|
+
*/
|
|
5500
|
+
unrolled: number;
|
|
5501
|
+
/**
|
|
5502
|
+
* Total balance across offchain, recoverable, pending-recovery, unrolled,
|
|
5503
|
+
* and boarding funds.
|
|
5504
|
+
*/
|
|
5327
5505
|
total: number;
|
|
5328
5506
|
/** Asset balance entries (`assetId` & `amount`) the wallet owns. */
|
|
5329
5507
|
assets: Asset[];
|
|
@@ -5331,7 +5509,8 @@ interface WalletBalance {
|
|
|
5331
5509
|
* The subset of {@link assets} generic spending will accept, i.e. the asset
|
|
5332
5510
|
* analogue of {@link available}. `assets - availableAssets` is what is held
|
|
5333
5511
|
* but not selectable, for the {@link gated} and {@link intentLocked} causes
|
|
5334
|
-
* plus recovery — assets have no per-cause split of
|
|
5512
|
+
* plus recovery and {@link unrolled} — assets have no per-cause split of
|
|
5513
|
+
* their own.
|
|
5335
5514
|
*/
|
|
5336
5515
|
availableAssets: Asset[];
|
|
5337
5516
|
}
|
|
@@ -5790,7 +5969,15 @@ declare function isSubdust(vtxo: {
|
|
|
5790
5969
|
type GetVtxosFilter = {
|
|
5791
5970
|
/** Include swept but still unspent virtual outputs. */
|
|
5792
5971
|
withRecoverable?: boolean;
|
|
5793
|
-
/**
|
|
5972
|
+
/**
|
|
5973
|
+
* Include virtual outputs that have been unrolled onchain.
|
|
5974
|
+
*
|
|
5975
|
+
* Authoritative on the *location* axis and only that: an exited output is
|
|
5976
|
+
* returned whatever else is true of it, spent ones included. So unlike
|
|
5977
|
+
* {@link withRecoverable}, this flag does not narrow to a capability —
|
|
5978
|
+
* test {@link canSweepOnchain} before acting on what comes back.
|
|
5979
|
+
* `Unroll.prepareUnrollTransaction`, the flag's main consumer, does.
|
|
5980
|
+
*/
|
|
5794
5981
|
withUnrolled?: boolean;
|
|
5795
5982
|
};
|
|
5796
5983
|
/**
|
|
@@ -5972,4 +6159,4 @@ interface IReadonlyWallet {
|
|
|
5972
6159
|
clear(): Promise<void>;
|
|
5973
6160
|
}
|
|
5974
6161
|
|
|
5975
|
-
export { type
|
|
6162
|
+
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, resolvePrevTxs 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, configureEventSource as cA, createDefaultActivityRegistry as cB, createExitChainResolver as cC, decodeTapscript as cD, defaultEmulatorPubkey as cE, getConfiguredEventSource as cF, getNetwork as cG, getRandomId as cH, getSequence as cI, hasCandidates as cJ, hasTerminalSpend as cK, isBatchSignable as cL, isCooperativelyMigratable as cM, isDiscoverable as cN, isEventSourceUnavailableError as cO, isExpired as cP, isPastExpiry as cQ, isRecoverable as cR, isSigningIdentity as cS, isSpendable as cT, isSubdust as cU, isTerminalIntentState as cV, isVirtualCoin as cW, isVtxoExpiringSoon as cX, networks as cY, resolveEmulatorPubkey as cZ, resolveEventSource 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, assetMintResolver as cq, attachPrevArkTxs as cr, attachPrevoutTxs as cs, boardingResolver as ct, canRecoverOnchain as cu, canSpendOffchain as cv, canSweepOnchain as cw, classifyAgainstSignerSet as cx, classifyContractSigner as cy, collabExitResolver as cz, ActivityRegistry as d, scriptFromTapLeafScript as d0, signerSetFromInfo as d1, toXOnlySignerHex as d2, withPrevTxs as d3, type TapscriptDeriving as d4, 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 };
|