@arkade-os/sdk 0.4.59 → 0.4.60
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 +34 -6
- 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/{ark-C9DsPSm8.d.cts → ark-D2_yNhfz.d.cts} +1009 -523
- package/dist/{ark-C9DsPSm8.d.ts → ark-D2_yNhfz.d.ts} +1009 -523
- package/dist/{asyncStorageTaskQueue-CYHXFfvn.d.cts → asyncStorageTaskQueue-CqijAAPG.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-BwuWQ1Qc.d.ts → asyncStorageTaskQueue-Vsp6uk8e.d.ts} +1 -1
- package/dist/{chunk-PN5RD7ZI.js → chunk-2DINXHGQ.js} +1665 -1149
- package/dist/chunk-2DINXHGQ.js.map +1 -0
- package/dist/{chunk-IPFGYVF3.cjs → chunk-2XLNQHG4.cjs} +10 -10
- package/dist/chunk-2XLNQHG4.cjs.map +1 -0
- package/dist/{chunk-VSHY5TBY.js → chunk-3Q7BBUWO.js} +4 -4
- package/dist/{chunk-VSHY5TBY.js.map → chunk-3Q7BBUWO.js.map} +1 -1
- package/dist/{chunk-DSTYXT2D.cjs → chunk-4A4GRSTB.cjs} +44 -6
- package/dist/chunk-4A4GRSTB.cjs.map +1 -0
- package/dist/{chunk-H342JPPZ.js → chunk-B66RYHTB.js} +5 -5
- package/dist/chunk-B66RYHTB.js.map +1 -0
- package/dist/{chunk-YEHGCHIL.js → chunk-FSKANUV4.js} +12 -5
- package/dist/chunk-FSKANUV4.js.map +1 -0
- package/dist/{chunk-7FA36NOA.cjs → chunk-H7JCHFM6.cjs} +17 -17
- package/dist/{chunk-7FA36NOA.cjs.map → chunk-H7JCHFM6.cjs.map} +1 -1
- package/dist/{chunk-FIMOVH25.js → chunk-JBULXTCC.js} +40 -7
- package/dist/chunk-JBULXTCC.js.map +1 -0
- package/dist/{chunk-DYNB6POO.cjs → chunk-KNS5MTTI.cjs} +3820 -2915
- package/dist/chunk-KNS5MTTI.cjs.map +1 -0
- package/dist/{chunk-2XO43UHI.cjs → chunk-MZNLCMUP.cjs} +1686 -1169
- package/dist/chunk-MZNLCMUP.cjs.map +1 -0
- package/dist/{chunk-V2KENVN6.cjs → chunk-PRFL62ID.cjs} +22 -15
- package/dist/chunk-PRFL62ID.cjs.map +1 -0
- package/dist/{chunk-OVSNY3HC.js → chunk-Y54MUBT7.js} +3476 -2584
- package/dist/chunk-Y54MUBT7.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +12 -8
- 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-D0eGaz3J.d.cts → delegate-DNEuM_nK.d.cts} +1 -1
- package/dist/{delegate-B_oKWm1k.d.ts → delegate-DidNTsKm.d.ts} +1 -1
- package/dist/{index-BmK6tEqf.d.ts → index-BP8-zniX.d.cts} +182 -26
- package/dist/{index-BG2AL2Ie.d.cts → index-DzQbNQUG.d.ts} +182 -26
- package/dist/index.cjs +302 -230
- package/dist/index.d.cts +286 -48
- package/dist/index.d.ts +286 -48
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +43 -23
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +21 -9
- package/dist/repositories/realm/index.d.ts +21 -9
- package/dist/repositories/realm/index.js +29 -9
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +48 -23
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +9 -3
- package/dist/repositories/sqlite/index.d.ts +9 -3
- package/dist/repositories/sqlite/index.js +35 -10
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-Cy4Gh8n7.d.ts → taskRunner-9gnlYEpb.d.ts} +1 -1
- package/dist/{taskRunner-CBvKIttE.d.cts → taskRunner-BEQNFEa4.d.cts} +1 -1
- 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 +17 -14
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +5 -4
- package/dist/wallet/expo/index.d.ts +5 -4
- package/dist/wallet/expo/index.js +8 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-EyVDhqzP.d.ts → wallet-C_MYHyOj.d.ts} +155 -17
- package/dist/{wallet-DlXemAzP.d.cts → wallet-ipUA1XCp.d.cts} +155 -17
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +5 -5
- package/dist/worker/expo/index.d.ts +5 -5
- package/dist/worker/expo/index.js +5 -5
- package/package.json +4 -2
- package/dist/chunk-2XO43UHI.cjs.map +0 -1
- package/dist/chunk-DSTYXT2D.cjs.map +0 -1
- package/dist/chunk-DYNB6POO.cjs.map +0 -1
- package/dist/chunk-FIMOVH25.js.map +0 -1
- package/dist/chunk-H342JPPZ.js.map +0 -1
- package/dist/chunk-IPFGYVF3.cjs.map +0 -1
- package/dist/chunk-OVSNY3HC.js.map +0 -1
- package/dist/chunk-PN5RD7ZI.js.map +0 -1
- package/dist/chunk-V2KENVN6.cjs.map +0 -1
- package/dist/chunk-YEHGCHIL.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as Identity, p as RelativeTimelock, J as Network, K as CSVMultisigTapscript, L as
|
|
1
|
+
import { a as Identity, p as RelativeTimelock, J as Network, K as CSVMultisigTapscript, L as BatchStartedEvent, M as TreeSigningStartedEvent, P as TxTree, Q as TreeNoncesEvent, U as BatchFinalizationEvent, X as BatchFinalizedEvent, Y as BatchFailedEvent, Z as TreeTxEvent, _ as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, $ as DescriptorProvider, f as IContractManager, a0 as IReadonlyWallet, a1 as ReadonlyIdentity, a2 as OnchainProvider, o as IndexerProvider, a3 as DelegateProvider, a4 as ReadonlyWalletConfig, x as IntentRepository, B as VirtualTxRepository, a5 as ExitCaptureMode, a6 as ExitDataSource, d as ActivityRegistry, a7 as IReadonlyAssetManager, a8 as ContractSyncState, a9 as RecipientAddressContext, n as ArkProvider, aa as NetworkName, ab as ArkInfo, ac as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ad as ContractWithVtxos, ae as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, af as Coin, t as ExtendedVirtualCoin, ag as ContractManager, ah as ContractManagerConfig, I as IWallet, ai as SettlementConfig, j as IAssetManager, aj as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, ak as SignerSession, al as SignedIntent, am as Intent, an as TimeHeight } from './ark-D2_yNhfz.cjs';
|
|
2
2
|
import { Transaction } from '@scure/btc-signer';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
4
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DNEuM_nK.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Capability a wallet exposes so descriptor-blind consumers — Boltz swaps and
|
|
@@ -24,8 +24,14 @@ interface HDWalletCapable {
|
|
|
24
24
|
* Every descriptor the wallet may hold keys under, ascending by index:
|
|
25
25
|
* the allocation watermark's band plus any descriptor persisted on a
|
|
26
26
|
* contract. Empty for static wallets.
|
|
27
|
+
*
|
|
28
|
+
* `lookAhead` appends that many descriptors past the watermark without
|
|
29
|
+
* advancing it, for a restore that must probe indices no local state
|
|
30
|
+
* mentions yet.
|
|
27
31
|
*/
|
|
28
|
-
getUsedSigningDescriptors(
|
|
32
|
+
getUsedSigningDescriptors(opts?: {
|
|
33
|
+
lookAhead?: number;
|
|
34
|
+
}): Promise<string[]>;
|
|
29
35
|
/**
|
|
30
36
|
* An {@link Identity} whose keys and signatures are those of `descriptor`.
|
|
31
37
|
* Returns the wallet identity itself when the wallet has no descriptor
|
|
@@ -35,6 +41,39 @@ interface HDWalletCapable {
|
|
|
35
41
|
}
|
|
36
42
|
/** Structural type guard for {@link HDWalletCapable}. */
|
|
37
43
|
declare function isHDWalletCapable(value: unknown): value is HDWalletCapable;
|
|
44
|
+
/**
|
|
45
|
+
* Allocating a *fresh* index, which is strictly more than
|
|
46
|
+
* {@link HDWalletCapable}'s descriptor awareness.
|
|
47
|
+
*
|
|
48
|
+
* Deliberately a separate probe rather than three more methods on
|
|
49
|
+
* `HDWalletCapable`: widening that guard would silently demote every wallet
|
|
50
|
+
* implementing only its original surface — including one built by an older
|
|
51
|
+
* SDK — from HD-capable to static, which is exactly the breakage it documents
|
|
52
|
+
* itself as avoiding. Consumers that only read descriptors keep the narrow
|
|
53
|
+
* probe; anything deriving per-artifact secrets asks for this one.
|
|
54
|
+
*/
|
|
55
|
+
interface HDAllocationCapable {
|
|
56
|
+
/**
|
|
57
|
+
* Allocate the next descriptor, advancing the watermark. `undefined` for
|
|
58
|
+
* static / `auto` wallets, which cannot allocate.
|
|
59
|
+
*
|
|
60
|
+
* Distinct from {@link HDWalletCapable.getCurrentSigningDescriptor}, which
|
|
61
|
+
* peeks: two artifacts bound to a peek share a key.
|
|
62
|
+
*/
|
|
63
|
+
getNextSigningDescriptor(): Promise<string | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Move the allocation watermark to `descriptor`'s index so later
|
|
66
|
+
* allocations cannot reissue it. Monotonic — a lower index is a no-op.
|
|
67
|
+
*
|
|
68
|
+
* Throws on a descriptor this wallet cannot derive, or one with no
|
|
69
|
+
* parseable trailing child index: silently mapping those to index 0 would
|
|
70
|
+
* move the watermark nowhere and let a restored artifact's index be handed
|
|
71
|
+
* out again.
|
|
72
|
+
*/
|
|
73
|
+
advanceSigningDescriptorWatermark(descriptor: string): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
/** Structural type guard for {@link HDAllocationCapable}. */
|
|
76
|
+
declare function isHDAllocationCapable(value: unknown): value is HDAllocationCapable;
|
|
38
77
|
|
|
39
78
|
/** Wall-clock floor for `batchExpiry` outside regtest. */
|
|
40
79
|
declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
|
|
@@ -152,17 +191,6 @@ declare function resolveCheckpointExitDelayPolicy(network: Network, overrides?:
|
|
|
152
191
|
*/
|
|
153
192
|
declare function assertValidServerUnrollScript(checkpointTapscript: string, policy: CheckpointExitDelayPolicy): CSVMultisigTapscript.Type;
|
|
154
193
|
|
|
155
|
-
declare function getRandomId(): string;
|
|
156
|
-
/**
|
|
157
|
-
* What a recipient Arkade address must match. An address failing either check
|
|
158
|
-
* belongs to another network or operator, so this wallet's operator cannot
|
|
159
|
-
* create the VTXO where the recipient's wallet expects it.
|
|
160
|
-
*/
|
|
161
|
-
type RecipientAddressContext = {
|
|
162
|
-
hrp: string;
|
|
163
|
-
signerSet: SignerSet;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
194
|
declare class ArkError extends Error {
|
|
167
195
|
readonly code: number;
|
|
168
196
|
readonly message: string;
|
|
@@ -443,6 +471,21 @@ interface ReceiveRotatorBootResult {
|
|
|
443
471
|
interface ReceiveRotatorFactory {
|
|
444
472
|
createReceiveRotator(opts: ReceiveRotatorBootOpts): Promise<ReceiveRotatorBoot | undefined>;
|
|
445
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* Parse the trailing HD child index from a materialized signing
|
|
476
|
+
* descriptor (`tr(...xpub.../0/<index>)`). Returns 0 when the
|
|
477
|
+
* descriptor is absent or carries no parseable child index — restore
|
|
478
|
+
* registers the index-0 baseline untagged, so a missing descriptor
|
|
479
|
+
* legitimately maps to 0.
|
|
480
|
+
*/
|
|
481
|
+
declare function signingDescriptorIndex(descriptor: unknown): number;
|
|
482
|
+
/**
|
|
483
|
+
* Strict sibling of {@link signingDescriptorIndex}: `undefined` instead of
|
|
484
|
+
* the 0 fallback, for callers that must tell "no parseable index" apart from
|
|
485
|
+
* index 0 — a watermark move mapped to 0 would move nothing while reporting
|
|
486
|
+
* success.
|
|
487
|
+
*/
|
|
488
|
+
declare function strictSigningDescriptorIndex(descriptor: string): number | undefined;
|
|
446
489
|
/**
|
|
447
490
|
* Minimal logging surface the rotator needs. `console` satisfies it
|
|
448
491
|
* out of the box; SDK consumers can pass a structured logger
|
|
@@ -638,6 +681,12 @@ declare class WalletReceiveRotator {
|
|
|
638
681
|
private rotate;
|
|
639
682
|
}
|
|
640
683
|
|
|
684
|
+
/**
|
|
685
|
+
* Maximum caller-requested HD descriptors materialized past the watermark by
|
|
686
|
+
* getUsedSigningDescriptors(). Bounds plugin/restore probes without changing
|
|
687
|
+
* the wallet's actual allocation watermark.
|
|
688
|
+
*/
|
|
689
|
+
declare const MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD = 1000;
|
|
641
690
|
type IncomingFunds = {
|
|
642
691
|
type: "utxo";
|
|
643
692
|
coins: Coin[];
|
|
@@ -647,6 +696,13 @@ type IncomingFunds = {
|
|
|
647
696
|
spentVtxos: ExtendedVirtualCoin[];
|
|
648
697
|
};
|
|
649
698
|
|
|
699
|
+
/**
|
|
700
|
+
* What signer classification needs of a snapshot: contract params and the coins
|
|
701
|
+
* under them. Structural rather than {@link ContractWithVtxos} so a repository-
|
|
702
|
+
* built snapshot — the worker's, whose VTXOs carry no `contractScript` — can be
|
|
703
|
+
* classified without allocating a parallel array to satisfy the nominal type.
|
|
704
|
+
*/
|
|
705
|
+
type PendingRecoverySnapshot = Parameters<typeof selectPendingRecoveryOutpoints>[0];
|
|
650
706
|
/**
|
|
651
707
|
* Boarding UTXOs grouped by the boarding address they sit on, carrying that
|
|
652
708
|
* address's signer association explicitly. Returned by
|
|
@@ -976,18 +1032,80 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
976
1032
|
/**
|
|
977
1033
|
* Return virtual outputs tracked by the wallet.
|
|
978
1034
|
*
|
|
1035
|
+
* The raw reporting/recovery read: escrowed, locked and awaiting-recovery
|
|
1036
|
+
* funds are all present. Coin selection must use
|
|
1037
|
+
* {@link getSpendableVtxos} instead — feeding this straight into
|
|
1038
|
+
* `settle({ inputs })` or `sendBitcoin({ selectedVtxos })` bypasses the
|
|
1039
|
+
* generic-spending gate.
|
|
1040
|
+
*
|
|
979
1041
|
* @param filter - Optional flags controlling whether recoverable or unrolled VTXOs are included
|
|
980
1042
|
*/
|
|
981
1043
|
getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1044
|
+
/** @inheritdoc */
|
|
1045
|
+
getSpendableVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Debug-log any explicit input generic selection would have excluded, for
|
|
1048
|
+
* each of the three reasons it excludes on. Explicit-input APIs stay ungated
|
|
1049
|
+
* on purpose (naming an outpoint *is* the intent the gate protects, and it
|
|
1050
|
+
* is how an escrowed deposit is recovered once generic selection stops
|
|
1051
|
+
* covering it), so this only makes the crossing visible — notably
|
|
1052
|
+
* `settle({ inputs: await wallet.getVtxos() })`, which launders the raw read
|
|
1053
|
+
* into a spend. Never throws into a spend path.
|
|
1054
|
+
*
|
|
1055
|
+
* Public so the worker handler and plugins can report their own
|
|
1056
|
+
* explicit-input crossings through the same three checks.
|
|
1057
|
+
*/
|
|
1058
|
+
logUngatedInputs(source: string, inputs: readonly {
|
|
1059
|
+
txid: string;
|
|
1060
|
+
vout: number;
|
|
1061
|
+
script?: string;
|
|
1062
|
+
}[]): Promise<void>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Contracts whose operator signer is past its rotation cutoff, as an
|
|
1065
|
+
* exclusion over scripts. The outpoint-level `pendingRecovery` set needs a
|
|
1066
|
+
* synced VTXO snapshot to also drop already-swept coins; this answers the
|
|
1067
|
+
* same question about a caller-supplied input without one, and a swept
|
|
1068
|
+
* outpoint is unspendable regardless.
|
|
1069
|
+
*/
|
|
1070
|
+
private expiredSignerExclusion;
|
|
1071
|
+
/** The intent store's lock set. Fails open, like every other read of it. */
|
|
1072
|
+
private lockedOutpoints;
|
|
1073
|
+
/**
|
|
1074
|
+
* One contract+VTXO read. `getContractsWithVtxos` opportunistically syncs
|
|
1075
|
+
* against the indexer, so every caller that needs more than one view of the
|
|
1076
|
+
* wallet's coins takes a single snapshot and derives them all from it —
|
|
1077
|
+
* otherwise the gate and the pending-recovery set answer about two different
|
|
1078
|
+
* points in time, and each read costs another sync.
|
|
1079
|
+
*/
|
|
1080
|
+
protected contractSnapshot(): Promise<ContractWithVtxos[]>;
|
|
1081
|
+
/**
|
|
1082
|
+
* The two exclusion sets the gate is made of, derived from one snapshot so
|
|
1083
|
+
* {@link getSpendableVtxos} and the balance answer about the same instant.
|
|
1084
|
+
*/
|
|
1085
|
+
private spendabilityView;
|
|
1086
|
+
/** The capability probes {@link computeOffchainBalance} needs, over one snapshot. */
|
|
1087
|
+
private balanceCapabilities;
|
|
982
1088
|
/**
|
|
983
1089
|
* Outpoints of VTXOs whose deprecated signer is past its cutoff (EXPIRED) and
|
|
984
1090
|
* which have not yet been swept — unspendable until they recover. Offline:
|
|
985
1091
|
* classifies the repo's contracts against the cached signer set (active +
|
|
986
1092
|
* {@link _deprecatedSigners}, cutoffs included). Empty fast-path when no
|
|
987
1093
|
* signer is deprecated. Consumed by {@link getBalance} (the `pendingRecovery`
|
|
988
|
-
* bucket) and
|
|
1094
|
+
* bucket) and by {@link getSpendableVtxos} so neither counts nor spends them.
|
|
1095
|
+
*
|
|
1096
|
+
* Takes a fresh {@link contractSnapshot}, which syncs against the indexer.
|
|
1097
|
+
* Callers that already hold a snapshot — or that must not sync at all, like
|
|
1098
|
+
* the worker's balance read — pass it to
|
|
1099
|
+
* {@link pendingRecoveryOutpointsIn} instead.
|
|
989
1100
|
*/
|
|
990
1101
|
pendingRecoveryOutpoints(): Promise<Set<string>>;
|
|
1102
|
+
/**
|
|
1103
|
+
* {@link pendingRecoveryOutpoints} over a snapshot the caller already has:
|
|
1104
|
+
* pure classification against the cached signer set, no repository or
|
|
1105
|
+
* network read of its own.
|
|
1106
|
+
*/
|
|
1107
|
+
pendingRecoveryOutpointsIn(snapshot: PendingRecoverySnapshot): Set<string>;
|
|
1108
|
+
private selectPendingRecovery;
|
|
991
1109
|
/**
|
|
992
1110
|
* Return wallet transaction history derived from Arkade state and boarding transactions.
|
|
993
1111
|
*/
|
|
@@ -1330,6 +1448,14 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable
|
|
|
1330
1448
|
* @see HDWalletCapable.getCurrentSigningDescriptor
|
|
1331
1449
|
*/
|
|
1332
1450
|
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
1451
|
+
/**
|
|
1452
|
+
* @see HDWalletCapable.getNextSigningDescriptor
|
|
1453
|
+
*/
|
|
1454
|
+
getNextSigningDescriptor(): Promise<string | undefined>;
|
|
1455
|
+
/**
|
|
1456
|
+
* @see HDWalletCapable.advanceSigningDescriptorWatermark
|
|
1457
|
+
*/
|
|
1458
|
+
advanceSigningDescriptorWatermark(descriptor: string): Promise<void>;
|
|
1333
1459
|
/**
|
|
1334
1460
|
* @see HDWalletCapable.getUsedSigningDescriptors
|
|
1335
1461
|
*
|
|
@@ -1338,7 +1464,9 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable
|
|
|
1338
1464
|
* alone would miss indices allocated for something the wallet never
|
|
1339
1465
|
* persisted (a swap, an externally issued invoice).
|
|
1340
1466
|
*/
|
|
1341
|
-
getUsedSigningDescriptors(
|
|
1467
|
+
getUsedSigningDescriptors(opts?: {
|
|
1468
|
+
lookAhead?: number;
|
|
1469
|
+
}): Promise<string[]>;
|
|
1342
1470
|
/**
|
|
1343
1471
|
* @see HDWalletCapable.signerForDescriptor
|
|
1344
1472
|
*/
|
|
@@ -1479,6 +1607,13 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable
|
|
|
1479
1607
|
/**
|
|
1480
1608
|
* Settle boarding inputs and/or virtual outputs into a finalized mainnet transaction.
|
|
1481
1609
|
*
|
|
1610
|
+
* `params.inputs` is **ungated**: whatever the caller names is settled,
|
|
1611
|
+
* including VTXOs generic selection would skip. That is what makes an
|
|
1612
|
+
* escrowed or otherwise gated deposit recoverable by hand — but it also
|
|
1613
|
+
* means `settle({ inputs: await wallet.getVtxos() })` silently bypasses the
|
|
1614
|
+
* gate. Pass {@link getSpendableVtxos} instead when the intent is "settle
|
|
1615
|
+
* whatever is spendable".
|
|
1616
|
+
*
|
|
1482
1617
|
* @param params - Optional settlement inputs and outputs. When omitted, the wallet settles all eligible funds.
|
|
1483
1618
|
* @param eventCallback - Optional callback invoked for settlement stream events.
|
|
1484
1619
|
* @returns The finalized Arkade transaction id
|
|
@@ -1681,6 +1816,9 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable
|
|
|
1681
1816
|
/**
|
|
1682
1817
|
* Build an offchain transaction from the given inputs and outputs,
|
|
1683
1818
|
* sign it, submit to the Arkade provider, and finalize.
|
|
1819
|
+
*
|
|
1820
|
+
* Signs whatever it is handed, ungated — see {@link settle} for the trade.
|
|
1821
|
+
*
|
|
1684
1822
|
* @returns The Arkade transaction id and server-signed checkpoint PSBTs (for bookkeeping)
|
|
1685
1823
|
*/
|
|
1686
1824
|
buildAndSubmitOffchainTx(inputs: ExtendedVirtualCoin[], outputs: TransactionOutput[], serverUnrollScript?: CSVMultisigTapscript.Type): Promise<{
|
|
@@ -1707,4 +1845,4 @@ declare function selectVirtualCoins(coins: ExtendedVirtualCoin[], targetAmount:
|
|
|
1707
1845
|
*/
|
|
1708
1846
|
declare function waitForIncomingFunds(wallet: Wallet): Promise<IncomingFunds>;
|
|
1709
1847
|
|
|
1710
|
-
export { ArkError as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D,
|
|
1848
|
+
export { ArkError as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, maybeArkError as E, resolveBatchExpiryPolicy as F, resolveCheckpointExitDelayPolicy as G, type HDWalletCapable as H, type IncomingFunds as I, selectVirtualCoins as J, signingDescriptorIndex as K, strictSigningDescriptorIndex as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, waitForIncomingFunds as N, type ProviderConnectionState as P, ReadonlyWallet as R, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as S, Wallet as W, type ReceiveRotatorFactory as a, type ReceiveRotatorBootOpts as b, type ReceiveRotatorBoot as c, type HDAllocationCapable as d, Batch as e, ArkErrorName as f, type ArkadeCashClaimResult as g, ArkadeCashCreateError as h, type ArkadeCashUnclaimedReason as i, type ArkadeCashUnclaimedVtxo as j, type BoardingUtxoGroup as k, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as l, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as m, type ProviderKind as n, ProviderUnavailableError as o, REGTEST_MIN_BATCH_EXPIRY_SECONDS as p, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as q, type ServerInfoSource as r, ServerResponseMismatchError as s, assertValidBatchExpiry as t, assertValidServerUnrollScript as u, defaultBatchExpiryPolicy as v, defaultCheckpointExitDelayPolicy as w, isArkError as x, isHDAllocationCapable as y, isHDWalletCapable as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunk2XLNQHG4_cjs = require('../../chunk-2XLNQHG4.cjs');
|
|
4
|
+
require('../../chunk-KNS5MTTI.cjs');
|
|
5
|
+
require('../../chunk-PRFL62ID.cjs');
|
|
6
|
+
require('../../chunk-MZNLCMUP.cjs');
|
|
7
|
+
require('../../chunk-4A4GRSTB.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
|
|
10
10
|
// src/worker/expo/taskQueue.ts
|
|
@@ -121,19 +121,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
121
121
|
|
|
122
122
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunk2XLNQHG4_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunk2XLNQHG4_cjs.contractPollProcessor; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunk2XLNQHG4_cjs.createTaskDependencies; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "runTasks", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunk2XLNQHG4_cjs.runTasks; }
|
|
137
137
|
});
|
|
138
138
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
139
139
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-
|
|
3
|
-
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-BEQNFEa4.cjs';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-BEQNFEa4.cjs';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CqijAAPG.cjs';
|
|
4
|
+
import '../../ark-D2_yNhfz.cjs';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
7
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -13,7 +13,7 @@ declare const CONTRACT_POLL_TASK_TYPE = "contract-poll";
|
|
|
13
13
|
* persists the results to the wallet repository.
|
|
14
14
|
*
|
|
15
15
|
* Replicates the polling subset of @see ContractManager.initialize:
|
|
16
|
-
* 1. Load
|
|
16
|
+
* 1. Load every watched contract from the contract repository.
|
|
17
17
|
* 2. Paginated fetch of every VTXO (including spent) from the indexer.
|
|
18
18
|
* 3. Extend each VTXO with tapscript data.
|
|
19
19
|
* 4. Save to the wallet repository.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-
|
|
3
|
-
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-9gnlYEpb.js';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-9gnlYEpb.js';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Vsp6uk8e.js';
|
|
4
|
+
import '../../ark-D2_yNhfz.js';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
7
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -13,7 +13,7 @@ declare const CONTRACT_POLL_TASK_TYPE = "contract-poll";
|
|
|
13
13
|
* persists the results to the wallet repository.
|
|
14
14
|
*
|
|
15
15
|
* Replicates the polling subset of @see ContractManager.initialize:
|
|
16
|
-
* 1. Load
|
|
16
|
+
* 1. Load every watched contract from the contract repository.
|
|
17
17
|
* 2. Paginated fetch of every VTXO (including spent) from the indexer.
|
|
18
18
|
* 3. Extend each VTXO with tapscript data.
|
|
19
19
|
* 4. Save to the wallet repository.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-B66RYHTB.js';
|
|
2
|
+
import '../../chunk-Y54MUBT7.js';
|
|
3
|
+
import '../../chunk-FSKANUV4.js';
|
|
4
|
+
import '../../chunk-2DINXHGQ.js';
|
|
5
|
+
import '../../chunk-JBULXTCC.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/worker/expo/taskQueue.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkade-os/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.60",
|
|
4
4
|
"description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -156,7 +156,9 @@
|
|
|
156
156
|
"@types/better-sqlite3": "7.6.13",
|
|
157
157
|
"@vitest/coverage-v8": "3.2.7",
|
|
158
158
|
"better-sqlite3": "12.6.2",
|
|
159
|
-
"
|
|
159
|
+
"tsup": "^8.5.0",
|
|
160
|
+
"typedoc": "^0.28.19",
|
|
161
|
+
"typescript": "5.9.2"
|
|
160
162
|
},
|
|
161
163
|
"peerDependencies": {
|
|
162
164
|
"@react-native-async-storage/async-storage": ">=1.0.0",
|