@arkade-os/sdk 0.4.53 → 0.4.55
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/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-B69ugeJw.d.cts → ark-Do9Lqfsp.d.cts} +36 -2
- package/dist/{ark-B69ugeJw.d.ts → ark-Do9Lqfsp.d.ts} +36 -2
- package/dist/{asyncStorageTaskQueue-B0SUQMXw.d.cts → asyncStorageTaskQueue-C3DYxvAT.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-DWqxuIAs.d.ts → asyncStorageTaskQueue-DOnBOEDn.d.ts} +1 -1
- package/dist/{chunk-CZTQLA55.cjs → chunk-C6UYPHTQ.cjs} +9 -9
- package/dist/{chunk-CZTQLA55.cjs.map → chunk-C6UYPHTQ.cjs.map} +1 -1
- package/dist/{chunk-4GB73TRR.cjs → chunk-CSS74VCN.cjs} +17 -17
- package/dist/{chunk-4GB73TRR.cjs.map → chunk-CSS74VCN.cjs.map} +1 -1
- package/dist/{chunk-LHYNNDY6.js → chunk-ENWR2F2P.js} +8 -1327
- package/dist/chunk-ENWR2F2P.js.map +1 -0
- package/dist/{chunk-RNMLFY2V.cjs → chunk-G7DOBFQN.cjs} +19 -1367
- package/dist/chunk-G7DOBFQN.cjs.map +1 -0
- package/dist/chunk-JCJ5WFS3.js +2326 -0
- package/dist/chunk-JCJ5WFS3.js.map +1 -0
- package/dist/{chunk-B4WZOJAI.js → chunk-LAONNMM5.js} +4 -4
- package/dist/{chunk-B4WZOJAI.js.map → chunk-LAONNMM5.js.map} +1 -1
- package/dist/chunk-OWCPXRGP.cjs +2415 -0
- package/dist/chunk-OWCPXRGP.cjs.map +1 -0
- package/dist/{chunk-UZLQUWYP.js → chunk-QMPNPZ2T.js} +23 -4
- package/dist/chunk-QMPNPZ2T.js.map +1 -0
- package/dist/{chunk-3MMUKLCI.js → chunk-QO3IKBYL.js} +827 -130
- package/dist/chunk-QO3IKBYL.js.map +1 -0
- package/dist/{chunk-3XWDMLOI.js → chunk-SG4X7SEC.js} +4 -4
- package/dist/{chunk-3XWDMLOI.js.map → chunk-SG4X7SEC.js.map} +1 -1
- package/dist/{chunk-IEMPH7J6.cjs → chunk-V2TOHHPW.cjs} +60 -40
- package/dist/chunk-V2TOHHPW.cjs.map +1 -0
- package/dist/{chunk-3YC3LQ2E.cjs → chunk-ZPL34T2Q.cjs} +1191 -471
- package/dist/chunk-ZPL34T2Q.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +8 -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-C_Y2YrXC.d.cts → delegate-C0iIBxen.d.cts} +1 -1
- package/dist/{delegate-BU-Cpyjw.d.ts → delegate-DmhFrtdq.d.ts} +1 -1
- package/dist/{index-BWF-C9eh.d.ts → index-BNt4wcSh.d.ts} +2 -2
- package/dist/{index-tzAInyiX.d.cts → index-BnLM1XxA.d.cts} +2 -2
- package/dist/index.cjs +348 -240
- package/dist/index.d.cts +424 -14
- package/dist/index.d.ts +424 -14
- 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-nzJFH8qb.d.ts → taskRunner-Bgs-0I3x.d.ts} +1 -1
- package/dist/{taskRunner-B7svzMhT.d.cts → taskRunner-RwUvgQ5M.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 +14 -14
- package/dist/wallet/expo/index.d.cts +5 -5
- package/dist/wallet/expo/index.d.ts +5 -5
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-B6Xiferv.d.cts → wallet-5Aou-V5n.d.ts} +83 -6
- package/dist/{wallet-CuHAI-eW.d.ts → wallet-Ck7BH8zR.d.cts} +83 -6
- 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 +1 -1
- package/dist/chunk-3MMUKLCI.js.map +0 -1
- package/dist/chunk-3YC3LQ2E.cjs.map +0 -1
- package/dist/chunk-E7HB3GKK.cjs +0 -1030
- package/dist/chunk-E7HB3GKK.cjs.map +0 -1
- package/dist/chunk-EFNLTS6Q.js +0 -976
- package/dist/chunk-EFNLTS6Q.js.map +0 -1
- package/dist/chunk-IEMPH7J6.cjs.map +0 -1
- package/dist/chunk-LHYNNDY6.js.map +0 -1
- package/dist/chunk-RNMLFY2V.cjs.map +0 -1
- package/dist/chunk-UZLQUWYP.js.map +0 -1
|
@@ -1,8 +1,40 @@
|
|
|
1
|
+
import { a as Identity, J as BatchStartedEvent, K as TreeSigningStartedEvent, L as TxTree, M as TreeNoncesEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, U as BatchFailedEvent, X as TreeTxEvent, Y as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, Z as DescriptorProvider, f as IContractManager, _ as IReadonlyWallet, $ as ReadonlyIdentity, a0 as Network, a1 as OnchainProvider, o as IndexerProvider, a2 as DelegateProvider, a3 as ReadonlyWalletConfig, x as IntentRepository, B as VirtualTxRepository, a4 as ExitCaptureMode, a5 as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, a6 as IReadonlyAssetManager, a7 as ContractSyncState, n as ArkProvider, a8 as NetworkName, a9 as ArkInfo, aa as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, ab as Coin, t as ExtendedVirtualCoin, ac as ContractManager, ad as ContractManagerConfig, I as IWallet, ae as CSVMultisigTapscript, af as SettlementConfig, j as IAssetManager, ag as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, ah as SignerSession, ai as SignedIntent, aj as Intent, ak as TimeHeight } from './ark-Do9Lqfsp.js';
|
|
1
2
|
import { Transaction } from '@scure/btc-signer';
|
|
2
|
-
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.cjs';
|
|
4
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import {
|
|
4
|
+
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DmhFrtdq.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Capability a wallet exposes so descriptor-blind consumers — Boltz swaps and
|
|
9
|
+
* other plugins — can bind the artifacts they create to the wallet's current
|
|
10
|
+
* HD index and later enumerate every index that has been used.
|
|
11
|
+
*
|
|
12
|
+
* Probed structurally ({@link isHDWalletCapable}) rather than widening
|
|
13
|
+
* `IWallet`: plugins must keep working against wallets that predate it, and a
|
|
14
|
+
* static wallet answers "no HD state" through the same three methods.
|
|
15
|
+
*/
|
|
16
|
+
interface HDWalletCapable {
|
|
17
|
+
/**
|
|
18
|
+
* The descriptor at the wallet's current receive index, or `undefined` for
|
|
19
|
+
* static / `auto` wallets and HD wallets that have never rotated. Callers
|
|
20
|
+
* fall back to the identity key.
|
|
21
|
+
*/
|
|
22
|
+
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Every descriptor the wallet may hold keys under, ascending by index:
|
|
25
|
+
* the allocation watermark's band plus any descriptor persisted on a
|
|
26
|
+
* contract. Empty for static wallets.
|
|
27
|
+
*/
|
|
28
|
+
getUsedSigningDescriptors(): Promise<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* An {@link Identity} whose keys and signatures are those of `descriptor`.
|
|
31
|
+
* Returns the wallet identity itself when the wallet has no descriptor
|
|
32
|
+
* signer.
|
|
33
|
+
*/
|
|
34
|
+
signerForDescriptor(descriptor: string): Promise<Identity>;
|
|
35
|
+
}
|
|
36
|
+
/** Structural type guard for {@link HDWalletCapable}. */
|
|
37
|
+
declare function isHDWalletCapable(value: unknown): value is HDWalletCapable;
|
|
6
38
|
|
|
7
39
|
declare class ArkError extends Error {
|
|
8
40
|
readonly code: number;
|
|
@@ -50,7 +82,9 @@ declare function isArkError(error: unknown, name?: ArkErrorName): error is ArkEr
|
|
|
50
82
|
* {@link ProviderUnavailableError} message and the wallet's
|
|
51
83
|
* `ProviderConnectionState`; it is deliberately *not* carried as a structured
|
|
52
84
|
* field on the error, since custom `Error` own-properties do not survive the
|
|
53
|
-
* service-worker `postMessage` boundary
|
|
85
|
+
* service-worker `postMessage` boundary. Structured clone keeps `message`,
|
|
86
|
+
* `stack` and `cause`, drops own-properties, and normalizes a custom `name` to
|
|
87
|
+
* `"Error"` — only the built-in error names survive it.
|
|
54
88
|
*/
|
|
55
89
|
type ProviderKind = "arkade" | "indexer";
|
|
56
90
|
/**
|
|
@@ -68,6 +102,24 @@ declare class ProviderUnavailableError extends Error {
|
|
|
68
102
|
cause?: unknown;
|
|
69
103
|
});
|
|
70
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A response does not reconcile with what the SDK submitted or already
|
|
107
|
+
* validated — a checkpoint tx whose txid is not among those submitted, a
|
|
108
|
+
* commitment tx that differs from the one validated at tree signing. Terminal
|
|
109
|
+
* rather than retryable: the two are equal by construction in a well-formed
|
|
110
|
+
* exchange, so the same request would produce the same outcome.
|
|
111
|
+
*
|
|
112
|
+
* Neither own-properties nor a custom `name` cross the service-worker
|
|
113
|
+
* `postMessage` boundary (see {@link ProviderKind}), so `retryable` and `name`
|
|
114
|
+
* are in-process conveniences and every distinguishing detail belongs in
|
|
115
|
+
* `message` — the one field a consumer past the boundary can still branch on.
|
|
116
|
+
*/
|
|
117
|
+
declare class ServerResponseMismatchError extends Error {
|
|
118
|
+
readonly retryable = false;
|
|
119
|
+
constructor(message: string, options?: {
|
|
120
|
+
cause?: unknown;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
71
123
|
/**
|
|
72
124
|
* Try to convert an error to an ArkError class, returning undefined if the error is not an ArkError
|
|
73
125
|
* @param error - The error to parse
|
|
@@ -989,7 +1041,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
989
1041
|
* });
|
|
990
1042
|
* ```
|
|
991
1043
|
*/
|
|
992
|
-
declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
1044
|
+
declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable {
|
|
993
1045
|
readonly arkProvider: ArkProvider;
|
|
994
1046
|
readonly forfeitOutputScript: Bytes;
|
|
995
1047
|
readonly forfeitPubkey: Bytes;
|
|
@@ -1137,6 +1189,23 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1137
1189
|
* (no rotation, no index burned).
|
|
1138
1190
|
*/
|
|
1139
1191
|
getNewBoardingAddress(): Promise<string>;
|
|
1192
|
+
/**
|
|
1193
|
+
* @see HDWalletCapable.getCurrentSigningDescriptor
|
|
1194
|
+
*/
|
|
1195
|
+
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
1196
|
+
/**
|
|
1197
|
+
* @see HDWalletCapable.getUsedSigningDescriptors
|
|
1198
|
+
*
|
|
1199
|
+
* Union of the watermark band and the descriptors persisted on contracts:
|
|
1200
|
+
* the band alone would miss rows a restore scan wrote, and the contracts
|
|
1201
|
+
* alone would miss indices allocated for something the wallet never
|
|
1202
|
+
* persisted (a swap, an externally issued invoice).
|
|
1203
|
+
*/
|
|
1204
|
+
getUsedSigningDescriptors(): Promise<string[]>;
|
|
1205
|
+
/**
|
|
1206
|
+
* @see HDWalletCapable.signerForDescriptor
|
|
1207
|
+
*/
|
|
1208
|
+
signerForDescriptor(descriptor: string): Promise<Identity>;
|
|
1140
1209
|
/**
|
|
1141
1210
|
* Mid-session server-signer rotation (plan §4). When arkd rotates its
|
|
1142
1211
|
* active signer mid-session — the case the long-lived service worker and
|
|
@@ -1348,6 +1417,14 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1348
1417
|
finalized: string[];
|
|
1349
1418
|
pending: string[];
|
|
1350
1419
|
}>;
|
|
1420
|
+
/**
|
|
1421
|
+
* The server unroll scripts a pending checkpoint may legitimately have been
|
|
1422
|
+
* built under: this wallet's configured one, the server's current one, and
|
|
1423
|
+
* one per deprecated signer (same closure, deprecated key). A tx submitted
|
|
1424
|
+
* before a signer rotation was built under the old key, so rebuilding
|
|
1425
|
+
* against the current key alone would leave it pending forever.
|
|
1426
|
+
*/
|
|
1427
|
+
private checkpointUnrollCandidates;
|
|
1351
1428
|
private hasPendingTxFlag;
|
|
1352
1429
|
private setPendingTxFlag;
|
|
1353
1430
|
/**
|
|
@@ -1489,4 +1566,4 @@ declare function selectVirtualCoins(coins: ExtendedVirtualCoin[], targetAmount:
|
|
|
1489
1566
|
*/
|
|
1490
1567
|
declare function waitForIncomingFunds(wallet: Wallet): Promise<IncomingFunds>;
|
|
1491
1568
|
|
|
1492
|
-
export { ArkError as A, Batch as B, type IncomingFunds as I, type ProviderConnectionState as P, ReadonlyWallet as R, type ServerInfoSource as S, Wallet as W, type ReceiveRotatorFactory as a, type ReceiveRotatorBootOpts as b, type ReceiveRotatorBoot as c, ArkErrorName as d, type ArkadeCashClaimResult as e, ArkadeCashCreateError as f, type ArkadeCashUnclaimedReason as g, type ArkadeCashUnclaimedVtxo as h, type BoardingUtxoGroup as i, type ProviderKind as j, ProviderUnavailableError as k,
|
|
1569
|
+
export { ArkError as A, Batch as B, type HDWalletCapable as H, type IncomingFunds as I, type ProviderConnectionState as P, ReadonlyWallet as R, type ServerInfoSource as S, Wallet as W, type ReceiveRotatorFactory as a, type ReceiveRotatorBootOpts as b, type ReceiveRotatorBoot as c, ArkErrorName as d, type ArkadeCashClaimResult as e, ArkadeCashCreateError as f, type ArkadeCashUnclaimedReason as g, type ArkadeCashUnclaimedVtxo as h, type BoardingUtxoGroup as i, type ProviderKind as j, ProviderUnavailableError as k, ServerResponseMismatchError as l, isArkError as m, isHDWalletCapable as n, maybeArkError as o, selectVirtualCoins as s, waitForIncomingFunds as w };
|
|
@@ -1,8 +1,40 @@
|
|
|
1
|
+
import { a as Identity, J as BatchStartedEvent, K as TreeSigningStartedEvent, L as TxTree, M as TreeNoncesEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, U as BatchFailedEvent, X as TreeTxEvent, Y as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, Z as DescriptorProvider, f as IContractManager, _ as IReadonlyWallet, $ as ReadonlyIdentity, a0 as Network, a1 as OnchainProvider, o as IndexerProvider, a2 as DelegateProvider, a3 as ReadonlyWalletConfig, x as IntentRepository, B as VirtualTxRepository, a4 as ExitCaptureMode, a5 as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, a6 as IReadonlyAssetManager, a7 as ContractSyncState, n as ArkProvider, a8 as NetworkName, a9 as ArkInfo, aa as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, ab as Coin, t as ExtendedVirtualCoin, ac as ContractManager, ad as ContractManagerConfig, I as IWallet, ae as CSVMultisigTapscript, af as SettlementConfig, j as IAssetManager, ag as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, ah as SignerSession, ai as SignedIntent, aj as Intent, ak as TimeHeight } from './ark-Do9Lqfsp.cjs';
|
|
1
2
|
import { Transaction } from '@scure/btc-signer';
|
|
2
|
-
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.js';
|
|
4
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import {
|
|
4
|
+
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-C0iIBxen.cjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Capability a wallet exposes so descriptor-blind consumers — Boltz swaps and
|
|
9
|
+
* other plugins — can bind the artifacts they create to the wallet's current
|
|
10
|
+
* HD index and later enumerate every index that has been used.
|
|
11
|
+
*
|
|
12
|
+
* Probed structurally ({@link isHDWalletCapable}) rather than widening
|
|
13
|
+
* `IWallet`: plugins must keep working against wallets that predate it, and a
|
|
14
|
+
* static wallet answers "no HD state" through the same three methods.
|
|
15
|
+
*/
|
|
16
|
+
interface HDWalletCapable {
|
|
17
|
+
/**
|
|
18
|
+
* The descriptor at the wallet's current receive index, or `undefined` for
|
|
19
|
+
* static / `auto` wallets and HD wallets that have never rotated. Callers
|
|
20
|
+
* fall back to the identity key.
|
|
21
|
+
*/
|
|
22
|
+
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Every descriptor the wallet may hold keys under, ascending by index:
|
|
25
|
+
* the allocation watermark's band plus any descriptor persisted on a
|
|
26
|
+
* contract. Empty for static wallets.
|
|
27
|
+
*/
|
|
28
|
+
getUsedSigningDescriptors(): Promise<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* An {@link Identity} whose keys and signatures are those of `descriptor`.
|
|
31
|
+
* Returns the wallet identity itself when the wallet has no descriptor
|
|
32
|
+
* signer.
|
|
33
|
+
*/
|
|
34
|
+
signerForDescriptor(descriptor: string): Promise<Identity>;
|
|
35
|
+
}
|
|
36
|
+
/** Structural type guard for {@link HDWalletCapable}. */
|
|
37
|
+
declare function isHDWalletCapable(value: unknown): value is HDWalletCapable;
|
|
6
38
|
|
|
7
39
|
declare class ArkError extends Error {
|
|
8
40
|
readonly code: number;
|
|
@@ -50,7 +82,9 @@ declare function isArkError(error: unknown, name?: ArkErrorName): error is ArkEr
|
|
|
50
82
|
* {@link ProviderUnavailableError} message and the wallet's
|
|
51
83
|
* `ProviderConnectionState`; it is deliberately *not* carried as a structured
|
|
52
84
|
* field on the error, since custom `Error` own-properties do not survive the
|
|
53
|
-
* service-worker `postMessage` boundary
|
|
85
|
+
* service-worker `postMessage` boundary. Structured clone keeps `message`,
|
|
86
|
+
* `stack` and `cause`, drops own-properties, and normalizes a custom `name` to
|
|
87
|
+
* `"Error"` — only the built-in error names survive it.
|
|
54
88
|
*/
|
|
55
89
|
type ProviderKind = "arkade" | "indexer";
|
|
56
90
|
/**
|
|
@@ -68,6 +102,24 @@ declare class ProviderUnavailableError extends Error {
|
|
|
68
102
|
cause?: unknown;
|
|
69
103
|
});
|
|
70
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A response does not reconcile with what the SDK submitted or already
|
|
107
|
+
* validated — a checkpoint tx whose txid is not among those submitted, a
|
|
108
|
+
* commitment tx that differs from the one validated at tree signing. Terminal
|
|
109
|
+
* rather than retryable: the two are equal by construction in a well-formed
|
|
110
|
+
* exchange, so the same request would produce the same outcome.
|
|
111
|
+
*
|
|
112
|
+
* Neither own-properties nor a custom `name` cross the service-worker
|
|
113
|
+
* `postMessage` boundary (see {@link ProviderKind}), so `retryable` and `name`
|
|
114
|
+
* are in-process conveniences and every distinguishing detail belongs in
|
|
115
|
+
* `message` — the one field a consumer past the boundary can still branch on.
|
|
116
|
+
*/
|
|
117
|
+
declare class ServerResponseMismatchError extends Error {
|
|
118
|
+
readonly retryable = false;
|
|
119
|
+
constructor(message: string, options?: {
|
|
120
|
+
cause?: unknown;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
71
123
|
/**
|
|
72
124
|
* Try to convert an error to an ArkError class, returning undefined if the error is not an ArkError
|
|
73
125
|
* @param error - The error to parse
|
|
@@ -989,7 +1041,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
989
1041
|
* });
|
|
990
1042
|
* ```
|
|
991
1043
|
*/
|
|
992
|
-
declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
1044
|
+
declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable {
|
|
993
1045
|
readonly arkProvider: ArkProvider;
|
|
994
1046
|
readonly forfeitOutputScript: Bytes;
|
|
995
1047
|
readonly forfeitPubkey: Bytes;
|
|
@@ -1137,6 +1189,23 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1137
1189
|
* (no rotation, no index burned).
|
|
1138
1190
|
*/
|
|
1139
1191
|
getNewBoardingAddress(): Promise<string>;
|
|
1192
|
+
/**
|
|
1193
|
+
* @see HDWalletCapable.getCurrentSigningDescriptor
|
|
1194
|
+
*/
|
|
1195
|
+
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
1196
|
+
/**
|
|
1197
|
+
* @see HDWalletCapable.getUsedSigningDescriptors
|
|
1198
|
+
*
|
|
1199
|
+
* Union of the watermark band and the descriptors persisted on contracts:
|
|
1200
|
+
* the band alone would miss rows a restore scan wrote, and the contracts
|
|
1201
|
+
* alone would miss indices allocated for something the wallet never
|
|
1202
|
+
* persisted (a swap, an externally issued invoice).
|
|
1203
|
+
*/
|
|
1204
|
+
getUsedSigningDescriptors(): Promise<string[]>;
|
|
1205
|
+
/**
|
|
1206
|
+
* @see HDWalletCapable.signerForDescriptor
|
|
1207
|
+
*/
|
|
1208
|
+
signerForDescriptor(descriptor: string): Promise<Identity>;
|
|
1140
1209
|
/**
|
|
1141
1210
|
* Mid-session server-signer rotation (plan §4). When arkd rotates its
|
|
1142
1211
|
* active signer mid-session — the case the long-lived service worker and
|
|
@@ -1348,6 +1417,14 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1348
1417
|
finalized: string[];
|
|
1349
1418
|
pending: string[];
|
|
1350
1419
|
}>;
|
|
1420
|
+
/**
|
|
1421
|
+
* The server unroll scripts a pending checkpoint may legitimately have been
|
|
1422
|
+
* built under: this wallet's configured one, the server's current one, and
|
|
1423
|
+
* one per deprecated signer (same closure, deprecated key). A tx submitted
|
|
1424
|
+
* before a signer rotation was built under the old key, so rebuilding
|
|
1425
|
+
* against the current key alone would leave it pending forever.
|
|
1426
|
+
*/
|
|
1427
|
+
private checkpointUnrollCandidates;
|
|
1351
1428
|
private hasPendingTxFlag;
|
|
1352
1429
|
private setPendingTxFlag;
|
|
1353
1430
|
/**
|
|
@@ -1489,4 +1566,4 @@ declare function selectVirtualCoins(coins: ExtendedVirtualCoin[], targetAmount:
|
|
|
1489
1566
|
*/
|
|
1490
1567
|
declare function waitForIncomingFunds(wallet: Wallet): Promise<IncomingFunds>;
|
|
1491
1568
|
|
|
1492
|
-
export { ArkError as A, Batch as B, type IncomingFunds as I, type ProviderConnectionState as P, ReadonlyWallet as R, type ServerInfoSource as S, Wallet as W, type ReceiveRotatorFactory as a, type ReceiveRotatorBootOpts as b, type ReceiveRotatorBoot as c, ArkErrorName as d, type ArkadeCashClaimResult as e, ArkadeCashCreateError as f, type ArkadeCashUnclaimedReason as g, type ArkadeCashUnclaimedVtxo as h, type BoardingUtxoGroup as i, type ProviderKind as j, ProviderUnavailableError as k,
|
|
1569
|
+
export { ArkError as A, Batch as B, type HDWalletCapable as H, type IncomingFunds as I, type ProviderConnectionState as P, ReadonlyWallet as R, type ServerInfoSource as S, Wallet as W, type ReceiveRotatorFactory as a, type ReceiveRotatorBootOpts as b, type ReceiveRotatorBoot as c, ArkErrorName as d, type ArkadeCashClaimResult as e, ArkadeCashCreateError as f, type ArkadeCashUnclaimedReason as g, type ArkadeCashUnclaimedVtxo as h, type BoardingUtxoGroup as i, type ProviderKind as j, ProviderUnavailableError as k, ServerResponseMismatchError as l, isArkError as m, isHDWalletCapable as n, maybeArkError as o, selectVirtualCoins as s, waitForIncomingFunds as w };
|
|
@@ -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 chunkC6UYPHTQ_cjs = require('../../chunk-C6UYPHTQ.cjs');
|
|
4
|
+
require('../../chunk-ZPL34T2Q.cjs');
|
|
5
|
+
require('../../chunk-G7DOBFQN.cjs');
|
|
6
|
+
require('../../chunk-V2TOHHPW.cjs');
|
|
7
|
+
require('../../chunk-OWCPXRGP.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 chunkC6UYPHTQ_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 chunkC6UYPHTQ_cjs.contractPollProcessor; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkC6UYPHTQ_cjs.createTaskDependencies; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "runTasks", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkC6UYPHTQ_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, b as TaskDependencies, c as TaskItem, a 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-RwUvgQ5M.cjs';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-RwUvgQ5M.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C3DYxvAT.cjs';
|
|
4
|
+
import '../../ark-Do9Lqfsp.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';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a 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-Bgs-0I3x.js';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-Bgs-0I3x.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DOnBOEDn.js';
|
|
4
|
+
import '../../ark-Do9Lqfsp.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';
|
|
@@ -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-LAONNMM5.js';
|
|
2
|
+
import '../../chunk-QO3IKBYL.js';
|
|
3
|
+
import '../../chunk-ENWR2F2P.js';
|
|
4
|
+
import '../../chunk-QMPNPZ2T.js';
|
|
5
|
+
import '../../chunk-JCJ5WFS3.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/worker/expo/taskQueue.ts
|