@arkade-os/sdk 0.4.51 → 0.4.53
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 +4 -2
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +4 -4
- package/dist/adapters/indexedDB.js +3 -3
- package/dist/{ark-9V45Anrs.d.cts → ark-B69ugeJw.d.cts} +31 -3
- package/dist/{ark-9V45Anrs.d.ts → ark-B69ugeJw.d.ts} +31 -3
- package/dist/{asyncStorageTaskQueue-B6nXJv7m.d.cts → asyncStorageTaskQueue-B0SUQMXw.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-BZjR843B.d.ts → asyncStorageTaskQueue-DWqxuIAs.d.ts} +1 -1
- package/dist/{chunk-TS2MTRP4.js → chunk-3MMUKLCI.js} +59 -29
- package/dist/chunk-3MMUKLCI.js.map +1 -0
- package/dist/{chunk-6T5BBPKO.js → chunk-3XWDMLOI.js} +3 -3
- package/dist/{chunk-6T5BBPKO.js.map → chunk-3XWDMLOI.js.map} +1 -1
- package/dist/{chunk-6XF6ZATZ.cjs → chunk-3YC3LQ2E.cjs} +246 -213
- package/dist/chunk-3YC3LQ2E.cjs.map +1 -0
- package/dist/{chunk-5AT2NV5G.cjs → chunk-4GB73TRR.cjs} +11 -11
- package/dist/{chunk-5AT2NV5G.cjs.map → chunk-4GB73TRR.cjs.map} +1 -1
- package/dist/{chunk-4KGT3IP2.js → chunk-B4WZOJAI.js} +3 -3
- package/dist/{chunk-4KGT3IP2.js.map → chunk-B4WZOJAI.js.map} +1 -1
- package/dist/{chunk-3E4GDBYU.cjs → chunk-CZTQLA55.cjs} +7 -7
- package/dist/{chunk-3E4GDBYU.cjs.map → chunk-CZTQLA55.cjs.map} +1 -1
- package/dist/{chunk-LJQ2VQBE.cjs → chunk-IEMPH7J6.cjs} +52 -44
- package/dist/chunk-IEMPH7J6.cjs.map +1 -0
- package/dist/{chunk-3AOTJZQ4.js → chunk-LHYNNDY6.js} +3 -3
- package/dist/{chunk-3AOTJZQ4.js.map → chunk-LHYNNDY6.js.map} +1 -1
- package/dist/{chunk-FHDUEBBC.cjs → chunk-RNMLFY2V.cjs} +3 -3
- package/dist/{chunk-FHDUEBBC.cjs.map → chunk-RNMLFY2V.cjs.map} +1 -1
- package/dist/{chunk-MBSYQ3WX.js → chunk-UZLQUWYP.js} +52 -45
- package/dist/chunk-UZLQUWYP.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +7 -7
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +1 -1
- package/dist/{delegate-CJkolr2s.d.ts → delegate-BU-Cpyjw.d.ts} +1 -1
- package/dist/{delegate-tVTPM4fm.d.cts → delegate-C_Y2YrXC.d.cts} +1 -1
- package/dist/{index-B5Fdwzs_.d.ts → index-BWF-C9eh.d.ts} +2 -2
- package/dist/{index-BBAffp_8.d.cts → index-tzAInyiX.d.cts} +2 -2
- package/dist/index.cjs +169 -157
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +3 -3
- package/dist/repositories/realm/index.cjs +18 -18
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +4 -4
- package/dist/repositories/sqlite/index.cjs +17 -17
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +4 -4
- package/dist/{taskRunner-4CrJaWHv.d.cts → taskRunner-B7svzMhT.d.cts} +1 -1
- package/dist/{taskRunner-TgdjRf_b.d.ts → taskRunner-nzJFH8qb.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.cjs.map +1 -1
- 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/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +13 -13
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +4 -4
- package/dist/{wallet-BBfhZx_Z.d.cts → wallet-B6Xiferv.d.cts} +16 -5
- package/dist/{wallet-CSSTN8Yc.d.ts → wallet-CuHAI-eW.d.ts} +16 -5
- package/dist/worker/expo/index.cjs +8 -8
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-6XF6ZATZ.cjs.map +0 -1
- package/dist/chunk-LJQ2VQBE.cjs.map +0 -1
- package/dist/chunk-MBSYQ3WX.js.map +0 -1
- package/dist/chunk-TS2MTRP4.js.map +0 -1
package/README.md
CHANGED
|
@@ -1255,7 +1255,9 @@ When you call `wallet.notifyIncomingFunds()` or use `waitForIncomingFunds()`, it
|
|
|
1255
1255
|
|
|
1256
1256
|
#### HD look-ahead window
|
|
1257
1257
|
|
|
1258
|
-
HD wallets (`walletMode: 'hd'`, or an explicit HD `DescriptorProvider`) also watch a band of *unused* offchain receive scripts around their allocation watermark, so a payment to an address that some other party issued from the same seed — a merchant backend such as BTCPay Server — arrives without the user calling `restore()`. `lookAheadWindow` (default `20`) is the per-side width of that band: the wallet watches `[watermark - N, watermark + N]`. Speculative entries are subscription-only; they become contract rows, and enter balances, only once funded.
|
|
1258
|
+
HD wallets (`walletMode: 'hd'`, or an explicit HD `DescriptorProvider`) also watch a band of *unused* offchain receive scripts around their allocation watermark, so a payment to an address that some other party issued from the same seed — a merchant backend such as BTCPay Server, or the .NET SDK driving the same wallet — arrives without the user calling `restore()`. `lookAheadWindow` (default `20`) is the per-side width of that band: the wallet watches `[watermark - N, watermark + N]`. Speculative entries are subscription-only; they become contract rows, and enter balances, only once funded.
|
|
1259
|
+
|
|
1260
|
+
The issuer, not the wallet, picks the contract shape, so each index is watched at *every* variant the wallet could own there: `default` and `delegate`, crossed with the unilateral-exit timelock matrix and the operator's current plus deprecated signers. That is the candidate set `restore()` probes too, so watching and restoring cover identical scripts.
|
|
1259
1261
|
|
|
1260
1262
|
```typescript
|
|
1261
1263
|
const wallet = await Wallet.create({
|
|
@@ -1273,7 +1275,7 @@ const swWallet = await ServiceWorkerWallet.setup({
|
|
|
1273
1275
|
})
|
|
1274
1276
|
```
|
|
1275
1277
|
|
|
1276
|
-
Raise it when the external issuer is expected to burn more than `N` consecutive addresses without any of them being paid — every index in such a run is a miss, and the funded one sits past the band. When that happens the funds are invisible until a `restore()` whose `gapLimit` is large enough to cross the run (`wallet.restore({ gapLimit: 200 })`); a default restore closes its gap window before reaching the funded index. Keep the value modest: the band adds up to `2N + 1`
|
|
1278
|
+
Raise it when the external issuer is expected to burn more than `N` consecutive addresses without any of them being paid — every index in such a run is a miss, and the funded one sits past the band. When that happens the funds are invisible until a `restore()` whose `gapLimit` is large enough to cross the run (`wallet.restore({ gapLimit: 200 })`); a default restore closes its gap window before reaching the funded index. Keep the value modest: the band adds up to `2N + 1` indices × the candidate matrix (typically 1-4 scripts each) to the wallet's subscription.
|
|
1277
1279
|
|
|
1278
1280
|
For advanced use cases, you can access the ContractManager directly to register external contracts:
|
|
1279
1281
|
|
package/dist/adapters/expo.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk4GB73TRR_cjs = require('../chunk-4GB73TRR.cjs');
|
|
4
|
+
require('../chunk-RNMLFY2V.cjs');
|
|
5
5
|
require('../chunk-E7HB3GKK.cjs');
|
|
6
6
|
require('../chunk-5BLDMQED.cjs');
|
|
7
7
|
|
|
@@ -9,11 +9,11 @@ require('../chunk-5BLDMQED.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ExpoArkProvider", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk4GB73TRR_cjs.ExpoArkProvider; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ExpoIndexerProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk4GB73TRR_cjs.ExpoIndexerProvider; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=expo.cjs.map
|
|
19
19
|
//# sourceMappingURL=expo.cjs.map
|
package/dist/adapters/expo.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-B69ugeJw.cjs';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-B69ugeJw.cjs';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-B69ugeJw.js';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-B69ugeJw.js';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-3XWDMLOI.js';
|
|
2
|
+
import '../chunk-LHYNNDY6.js';
|
|
3
3
|
import '../chunk-EFNLTS6Q.js';
|
|
4
4
|
import '../chunk-NSBPE2FW.js';
|
|
5
5
|
//# sourceMappingURL=expo.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunk3YC3LQ2E_cjs = require('../chunk-3YC3LQ2E.cjs');
|
|
4
|
+
require('../chunk-RNMLFY2V.cjs');
|
|
5
|
+
require('../chunk-IEMPH7J6.cjs');
|
|
6
6
|
require('../chunk-E7HB3GKK.cjs');
|
|
7
7
|
require('../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
|
|
|
11
11
|
dbName;
|
|
12
12
|
version;
|
|
13
13
|
db = null;
|
|
14
|
-
constructor(dbName, version =
|
|
14
|
+
constructor(dbName, version = chunk3YC3LQ2E_cjs.DB_VERSION) {
|
|
15
15
|
this.dbName = dbName;
|
|
16
16
|
this.version = version;
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DB_VERSION } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { DB_VERSION } from '../chunk-3MMUKLCI.js';
|
|
2
|
+
import '../chunk-LHYNNDY6.js';
|
|
3
|
+
import '../chunk-UZLQUWYP.js';
|
|
4
4
|
import '../chunk-EFNLTS6Q.js';
|
|
5
5
|
import '../chunk-NSBPE2FW.js';
|
|
6
6
|
|
|
@@ -2218,8 +2218,14 @@ interface LookAheadConfig {
|
|
|
2218
2218
|
size: number;
|
|
2219
2219
|
/** Current allocation watermark (`lastIndexUsed ?? -1`). */
|
|
2220
2220
|
currentWatermark(): Promise<number>;
|
|
2221
|
-
/**
|
|
2222
|
-
materialize(index: number):
|
|
2221
|
+
/** Signing descriptor at an HD index. Pure derivation. */
|
|
2222
|
+
materialize(index: number): string;
|
|
2223
|
+
/**
|
|
2224
|
+
* Key and timelock axes an externally issued receive script could be
|
|
2225
|
+
* anchored to. Read once per refill, so a band rebuilt after
|
|
2226
|
+
* `rotateServerSigner` fans the new signer set.
|
|
2227
|
+
*/
|
|
2228
|
+
candidateDeps(): CandidateDeps;
|
|
2223
2229
|
/** Fired after a speculative entry at `index` is promoted to a real row. */
|
|
2224
2230
|
onPromoted?(index: number): Promise<void>;
|
|
2225
2231
|
}
|
|
@@ -2360,6 +2366,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2360
2366
|
*
|
|
2361
2367
|
* Entries are registered with the watcher but NOT persisted: they become
|
|
2362
2368
|
* repository rows only once funded (see {@link promoteLookAheadHits}).
|
|
2369
|
+
*
|
|
2370
|
+
* Each index contributes every {@link Discoverable.candidatesAt} candidate —
|
|
2371
|
+
* the same set `restore()`'s gap scan probes, since the wallet cannot know
|
|
2372
|
+
* which variant a third-party issuer handed out.
|
|
2363
2373
|
*/
|
|
2364
2374
|
private ensureLookAhead;
|
|
2365
2375
|
/**
|
|
@@ -2877,6 +2887,12 @@ interface DiscoveryDeps {
|
|
|
2877
2887
|
/** Present only for delegate wallets. */
|
|
2878
2888
|
delegatePubKey?: Uint8Array;
|
|
2879
2889
|
}
|
|
2890
|
+
/**
|
|
2891
|
+
* The I/O-free subset of {@link DiscoveryDeps}: the axes a receive script can
|
|
2892
|
+
* be anchored to. `DiscoveryDeps` satisfies it structurally, so one
|
|
2893
|
+
* {@link Discoverable.candidatesAt} serves the scan and the look-ahead band.
|
|
2894
|
+
*/
|
|
2895
|
+
type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey">;
|
|
2880
2896
|
/**
|
|
2881
2897
|
* Optional capability a {@link ContractHandler} implements to participate
|
|
2882
2898
|
* in `wallet.restore()`'s gap-limit scan. The scanner owns the index
|
|
@@ -2908,7 +2924,19 @@ interface Discoverable {
|
|
|
2908
2924
|
index: number;
|
|
2909
2925
|
descriptor: string;
|
|
2910
2926
|
}[], deps: DiscoveryDeps): Promise<Map<number, DiscoveredContract[]>>;
|
|
2927
|
+
/**
|
|
2928
|
+
* Optional: every unverified contract this handler could own at one HD
|
|
2929
|
+
* index — pure derivation, no I/O, no metadata. `discoverRange` probes
|
|
2930
|
+
* these scripts and the look-ahead band subscribes to them, so the two
|
|
2931
|
+
* cannot cover different sets.
|
|
2932
|
+
*
|
|
2933
|
+
* `boarding` omits it: its probe is an on-chain address lookup, and that
|
|
2934
|
+
* keeps it out of the band (deposits are watched on their own channel).
|
|
2935
|
+
*/
|
|
2936
|
+
candidatesAt?(index: number, descriptor: string, deps: CandidateDeps): DiscoveredContract[];
|
|
2911
2937
|
}
|
|
2938
|
+
/** Duck-typed guard for the pure candidate surface. @see Discoverable.candidatesAt */
|
|
2939
|
+
declare function hasCandidates(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Required<Pick<Discoverable, "candidatesAt">>;
|
|
2912
2940
|
/** Duck-typed guard (mirrors `hasReceiveRotatorFactory`). */
|
|
2913
2941
|
declare function isDiscoverable(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Discoverable;
|
|
2914
2942
|
/**
|
|
@@ -5138,4 +5166,4 @@ declare namespace ProtoTypes {
|
|
|
5138
5166
|
export { };
|
|
5139
5167
|
}
|
|
5140
5168
|
|
|
5141
|
-
export { type
|
|
5169
|
+
export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, CLTVMultisigTapscript as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, type ContractManagerConfig as a4, CSVMultisigTapscript as a5, type SettlementConfig as a6, VtxoManager as a7, type SignerSession as a8, type SignedIntent as a9, type ReissuanceParams as aA, type BurnParams as aB, type RenewVtxosOptions as aC, type ContractWithVtxos as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type StorageConfig as aM, type IVtxoManager as aN, type ExplorerTransaction as aO, type EncodedVtxoScript as aP, type Status as aQ, type ChainTx as aR, type PathContext as aS, type ActivityIntent as aT, type ActivityResolver as aU, type ArkIntentState as aV, type ArkTapscript as aW, type AssetMetadata as aX, type BaseWalletConfig as aY, type BatchInfo as aZ, type BatchSignableIdentity as a_, Intent as aa, type TimeHeight as ab, type VtxoRepositoryKey as ac, type WalletState as ad, type ContractFilter as ae, type ArkIntent as af, type IntentFilter as ag, type Outpoint as ah, type VirtualTx as ai, type VtxoBranch as aj, ChainedTxType as ak, type DescriptorSigningRequest as al, Transaction as am, type IntentFeeConfig as an, type OffchainInput as ao, FeeAmount as ap, type OnchainInput as aq, type FeeOutput as ar, type ContractWatcherConfig as as, type Asset as at, type FeeInfo as au, type CreateContractParams as av, type GetContractsFilter as aw, type GetSpendablePathsOptions as ax, type GetAllSpendingPathsOptions as ay, type IssuanceParams as az, type WalletConfig as b, type Vtxo as b$, type CandidateDeps as b0, ChainTxType as b1, type CommitmentTx as b2, ConditionCSVMultisigTapscript as b3, ConditionMultisigTapscript as b4, type ContractBalance as b5, type ContractEventCallback as b6, type ContractHandler as b7, type ContractState as b8, type ContractVtxo as b9, type Output as bA, type PageResponse as bB, type PaginationOptions as bC, PartialSig as bD, type ProviderClass as bE, RestDelegateProvider as bF, RestDelegatorProvider as bG, type ScanContractsOptions as bH, type ScanResult as bI, type ScheduledSession as bJ, SettlementEventType as bK, type SignRequest as bL, type SignerClassification as bM, type SignerSet as bN, type SubscriptionEvent as bO, type SubscriptionHeartbeat as bP, type TapLeaves as bQ, TapTreeCoder as bR, TapscriptType as bS, type TreeNonces as bT, type TreePartialSigs as bU, type Tx as bV, type TxHistoryRecord as bW, type TxKey as bX, type TxTreeNode as bY, TxType as bZ, type VirtualStatus as b_, ContractWatcher as ba, DelegateManagerImpl as bb, type DelegateOptions as bc, DelegatorManagerImpl as bd, type DelegatorProvider as be, type DeprecatedSignerMigrationReport as bf, type DeprecatedSignerReport as bg, DigestMismatchError as bh, type Discoverable as bi, type DiscoveredContract as bj, type DiscoveryDeps as bk, ESPLORA_URL as bl, EsploraProvider as bm, type ExitChainResolver as bn, type ExtendedContractVtxo as bo, type GroupMembership as bp, type HandlerError as bq, type IDelegatorManager as br, INTENT_TERMINAL_STATES as bs, IndexerTxType as bt, type KnownMetadata as bu, type MigrateDeprecatedSignerOptions as bv, type MigrationLegReport as bw, type MigrationVtxoRef as bx, MultisigTapscript as by, type Nonces as bz, type WalletBalance as c, type VtxoChain as c0, type VtxoType as c1, type WalletMode as c2, boardingResolver as c3, canRecoverOnchain as c4, canSpendOffchain as c5, classifyAgainstSignerSet as c6, classifyContractSigner as c7, createDefaultActivityRegistry as c8, createExitChainResolver as c9, decodeTapscript as ca, getNetwork as cb, getSequence as cc, hasCandidates as cd, hasTerminalSpend as ce, isBatchSignable as cf, isCooperativelyMigratable as cg, isDiscoverable as ch, isExpired as ci, isPastExpiry as cj, isRecoverable as ck, isSpendable as cl, isSubdust as cm, isTerminalIntentState as cn, isVirtualCoin as co, isVtxoExpiringSoon as cp, networks as cq, signerSetFromInfo as cr, toXOnlySignerHex as cs, type TapscriptDeriving as ct, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
|
|
@@ -2218,8 +2218,14 @@ interface LookAheadConfig {
|
|
|
2218
2218
|
size: number;
|
|
2219
2219
|
/** Current allocation watermark (`lastIndexUsed ?? -1`). */
|
|
2220
2220
|
currentWatermark(): Promise<number>;
|
|
2221
|
-
/**
|
|
2222
|
-
materialize(index: number):
|
|
2221
|
+
/** Signing descriptor at an HD index. Pure derivation. */
|
|
2222
|
+
materialize(index: number): string;
|
|
2223
|
+
/**
|
|
2224
|
+
* Key and timelock axes an externally issued receive script could be
|
|
2225
|
+
* anchored to. Read once per refill, so a band rebuilt after
|
|
2226
|
+
* `rotateServerSigner` fans the new signer set.
|
|
2227
|
+
*/
|
|
2228
|
+
candidateDeps(): CandidateDeps;
|
|
2223
2229
|
/** Fired after a speculative entry at `index` is promoted to a real row. */
|
|
2224
2230
|
onPromoted?(index: number): Promise<void>;
|
|
2225
2231
|
}
|
|
@@ -2360,6 +2366,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2360
2366
|
*
|
|
2361
2367
|
* Entries are registered with the watcher but NOT persisted: they become
|
|
2362
2368
|
* repository rows only once funded (see {@link promoteLookAheadHits}).
|
|
2369
|
+
*
|
|
2370
|
+
* Each index contributes every {@link Discoverable.candidatesAt} candidate —
|
|
2371
|
+
* the same set `restore()`'s gap scan probes, since the wallet cannot know
|
|
2372
|
+
* which variant a third-party issuer handed out.
|
|
2363
2373
|
*/
|
|
2364
2374
|
private ensureLookAhead;
|
|
2365
2375
|
/**
|
|
@@ -2877,6 +2887,12 @@ interface DiscoveryDeps {
|
|
|
2877
2887
|
/** Present only for delegate wallets. */
|
|
2878
2888
|
delegatePubKey?: Uint8Array;
|
|
2879
2889
|
}
|
|
2890
|
+
/**
|
|
2891
|
+
* The I/O-free subset of {@link DiscoveryDeps}: the axes a receive script can
|
|
2892
|
+
* be anchored to. `DiscoveryDeps` satisfies it structurally, so one
|
|
2893
|
+
* {@link Discoverable.candidatesAt} serves the scan and the look-ahead band.
|
|
2894
|
+
*/
|
|
2895
|
+
type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey">;
|
|
2880
2896
|
/**
|
|
2881
2897
|
* Optional capability a {@link ContractHandler} implements to participate
|
|
2882
2898
|
* in `wallet.restore()`'s gap-limit scan. The scanner owns the index
|
|
@@ -2908,7 +2924,19 @@ interface Discoverable {
|
|
|
2908
2924
|
index: number;
|
|
2909
2925
|
descriptor: string;
|
|
2910
2926
|
}[], deps: DiscoveryDeps): Promise<Map<number, DiscoveredContract[]>>;
|
|
2927
|
+
/**
|
|
2928
|
+
* Optional: every unverified contract this handler could own at one HD
|
|
2929
|
+
* index — pure derivation, no I/O, no metadata. `discoverRange` probes
|
|
2930
|
+
* these scripts and the look-ahead band subscribes to them, so the two
|
|
2931
|
+
* cannot cover different sets.
|
|
2932
|
+
*
|
|
2933
|
+
* `boarding` omits it: its probe is an on-chain address lookup, and that
|
|
2934
|
+
* keeps it out of the band (deposits are watched on their own channel).
|
|
2935
|
+
*/
|
|
2936
|
+
candidatesAt?(index: number, descriptor: string, deps: CandidateDeps): DiscoveredContract[];
|
|
2911
2937
|
}
|
|
2938
|
+
/** Duck-typed guard for the pure candidate surface. @see Discoverable.candidatesAt */
|
|
2939
|
+
declare function hasCandidates(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Required<Pick<Discoverable, "candidatesAt">>;
|
|
2912
2940
|
/** Duck-typed guard (mirrors `hasReceiveRotatorFactory`). */
|
|
2913
2941
|
declare function isDiscoverable(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Discoverable;
|
|
2914
2942
|
/**
|
|
@@ -5138,4 +5166,4 @@ declare namespace ProtoTypes {
|
|
|
5138
5166
|
export { };
|
|
5139
5167
|
}
|
|
5140
5168
|
|
|
5141
|
-
export { type
|
|
5169
|
+
export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, CLTVMultisigTapscript as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, type ContractManagerConfig as a4, CSVMultisigTapscript as a5, type SettlementConfig as a6, VtxoManager as a7, type SignerSession as a8, type SignedIntent as a9, type ReissuanceParams as aA, type BurnParams as aB, type RenewVtxosOptions as aC, type ContractWithVtxos as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type StorageConfig as aM, type IVtxoManager as aN, type ExplorerTransaction as aO, type EncodedVtxoScript as aP, type Status as aQ, type ChainTx as aR, type PathContext as aS, type ActivityIntent as aT, type ActivityResolver as aU, type ArkIntentState as aV, type ArkTapscript as aW, type AssetMetadata as aX, type BaseWalletConfig as aY, type BatchInfo as aZ, type BatchSignableIdentity as a_, Intent as aa, type TimeHeight as ab, type VtxoRepositoryKey as ac, type WalletState as ad, type ContractFilter as ae, type ArkIntent as af, type IntentFilter as ag, type Outpoint as ah, type VirtualTx as ai, type VtxoBranch as aj, ChainedTxType as ak, type DescriptorSigningRequest as al, Transaction as am, type IntentFeeConfig as an, type OffchainInput as ao, FeeAmount as ap, type OnchainInput as aq, type FeeOutput as ar, type ContractWatcherConfig as as, type Asset as at, type FeeInfo as au, type CreateContractParams as av, type GetContractsFilter as aw, type GetSpendablePathsOptions as ax, type GetAllSpendingPathsOptions as ay, type IssuanceParams as az, type WalletConfig as b, type Vtxo as b$, type CandidateDeps as b0, ChainTxType as b1, type CommitmentTx as b2, ConditionCSVMultisigTapscript as b3, ConditionMultisigTapscript as b4, type ContractBalance as b5, type ContractEventCallback as b6, type ContractHandler as b7, type ContractState as b8, type ContractVtxo as b9, type Output as bA, type PageResponse as bB, type PaginationOptions as bC, PartialSig as bD, type ProviderClass as bE, RestDelegateProvider as bF, RestDelegatorProvider as bG, type ScanContractsOptions as bH, type ScanResult as bI, type ScheduledSession as bJ, SettlementEventType as bK, type SignRequest as bL, type SignerClassification as bM, type SignerSet as bN, type SubscriptionEvent as bO, type SubscriptionHeartbeat as bP, type TapLeaves as bQ, TapTreeCoder as bR, TapscriptType as bS, type TreeNonces as bT, type TreePartialSigs as bU, type Tx as bV, type TxHistoryRecord as bW, type TxKey as bX, type TxTreeNode as bY, TxType as bZ, type VirtualStatus as b_, ContractWatcher as ba, DelegateManagerImpl as bb, type DelegateOptions as bc, DelegatorManagerImpl as bd, type DelegatorProvider as be, type DeprecatedSignerMigrationReport as bf, type DeprecatedSignerReport as bg, DigestMismatchError as bh, type Discoverable as bi, type DiscoveredContract as bj, type DiscoveryDeps as bk, ESPLORA_URL as bl, EsploraProvider as bm, type ExitChainResolver as bn, type ExtendedContractVtxo as bo, type GroupMembership as bp, type HandlerError as bq, type IDelegatorManager as br, INTENT_TERMINAL_STATES as bs, IndexerTxType as bt, type KnownMetadata as bu, type MigrateDeprecatedSignerOptions as bv, type MigrationLegReport as bw, type MigrationVtxoRef as bx, MultisigTapscript as by, type Nonces as bz, type WalletBalance as c, type VtxoChain as c0, type VtxoType as c1, type WalletMode as c2, boardingResolver as c3, canRecoverOnchain as c4, canSpendOffchain as c5, classifyAgainstSignerSet as c6, classifyContractSigner as c7, createDefaultActivityRegistry as c8, createExitChainResolver as c9, decodeTapscript as ca, getNetwork as cb, getSequence as cc, hasCandidates as cd, hasTerminalSpend as ce, isBatchSignable as cf, isCooperativelyMigratable as cg, isDiscoverable as ch, isExpired as ci, isPastExpiry as cj, isRecoverable as ck, isSpendable as cl, isSubdust as cm, isTerminalIntentState as cn, isVirtualCoin as co, isVtxoExpiringSoon as cp, networks as cq, signerSetFromInfo as cr, toXOnlySignerHex as cs, type TapscriptDeriving as ct, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Transaction, setArkPsbtField, PrevArkTxField, ConditionWitness, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, craftToSpendTx, getArkPsbtFields, CosignerPublicKey, BufferReader, BufferWriter, OP_RETURN_EMPTY_PKSCRIPT, VtxoTaprootTree, baseFetch, Intent, rateGate, maybeArkError, isArkError, ArkErrorName, ProviderUnavailableError, FetchError, isFetchTimeoutError, AssetRef, isEventSourceError, RestArkProvider, RestIndexerProvider, ArkError } from './chunk-
|
|
2
|
-
import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, DefaultVtxo, DelegateVtxo, deriveDescriptorLeafPubKey, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-
|
|
1
|
+
import { Transaction, setArkPsbtField, PrevArkTxField, ConditionWitness, AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, craftToSpendTx, getArkPsbtFields, CosignerPublicKey, BufferReader, BufferWriter, OP_RETURN_EMPTY_PKSCRIPT, VtxoTaprootTree, baseFetch, Intent, rateGate, maybeArkError, isArkError, ArkErrorName, ProviderUnavailableError, FetchError, isFetchTimeoutError, AssetRef, isEventSourceError, RestArkProvider, RestIndexerProvider, ArkError } from './chunk-LHYNNDY6.js';
|
|
2
|
+
import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, DefaultVtxo, speculativeReceiveMetadata, DelegateVtxo, deriveDescriptorLeafPubKey, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-UZLQUWYP.js';
|
|
3
3
|
import { VtxoScript, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, isVirtualCoin, ArkAddress, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, timelockToSequence, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, canSpendOffchain, toVirtualStatus, resolveTimeHeight, parseLegacyExpiry, networks as networks$1, isExpired, DEFAULT_ARKADE_SERVER_URL, isPastExpiry } from './chunk-EFNLTS6Q.js';
|
|
4
4
|
import { __export } from './chunk-NSBPE2FW.js';
|
|
5
5
|
import { sha256, equalBytes, hash160, sha256x2, concatBytes, randomPrivateKeyBytes, pubECDSA, pubSchnorr } from '@scure/btc-signer/utils.js';
|
|
@@ -2589,6 +2589,9 @@ function parseProgram(text, env) {
|
|
|
2589
2589
|
}
|
|
2590
2590
|
|
|
2591
2591
|
// src/contracts/types.ts
|
|
2592
|
+
function hasCandidates(handler) {
|
|
2593
|
+
return !!handler && typeof handler.candidatesAt === "function";
|
|
2594
|
+
}
|
|
2592
2595
|
function isDiscoverable(handler) {
|
|
2593
2596
|
return !!handler && typeof handler.discoverAt === "function";
|
|
2594
2597
|
}
|
|
@@ -8889,6 +8892,10 @@ var ContractManager = class _ContractManager {
|
|
|
8889
8892
|
*
|
|
8890
8893
|
* Entries are registered with the watcher but NOT persisted: they become
|
|
8891
8894
|
* repository rows only once funded (see {@link promoteLookAheadHits}).
|
|
8895
|
+
*
|
|
8896
|
+
* Each index contributes every {@link Discoverable.candidatesAt} candidate —
|
|
8897
|
+
* the same set `restore()`'s gap scan probes, since the wallet cannot know
|
|
8898
|
+
* which variant a third-party issuer handed out.
|
|
8892
8899
|
*/
|
|
8893
8900
|
async ensureLookAhead() {
|
|
8894
8901
|
const lookAhead = this.config.lookAhead;
|
|
@@ -8896,10 +8903,23 @@ var ContractManager = class _ContractManager {
|
|
|
8896
8903
|
const watermark = await lookAhead.currentWatermark();
|
|
8897
8904
|
const from = Math.max(0, watermark - lookAhead.size);
|
|
8898
8905
|
const to = watermark + lookAhead.size;
|
|
8906
|
+
const deps = lookAhead.candidateDeps();
|
|
8907
|
+
const handlers = contractHandlers.getRegisteredTypes().map((t) => contractHandlers.get(t)).filter(hasCandidates);
|
|
8899
8908
|
const band = /* @__PURE__ */ new Map();
|
|
8900
8909
|
for (let index = from; index <= to; index++) {
|
|
8901
|
-
const
|
|
8902
|
-
|
|
8910
|
+
const descriptor = lookAhead.materialize(index);
|
|
8911
|
+
for (const handler of handlers) {
|
|
8912
|
+
for (const candidate of handler.candidatesAt(index, descriptor, deps)) {
|
|
8913
|
+
if (band.has(candidate.script)) continue;
|
|
8914
|
+
band.set(candidate.script, {
|
|
8915
|
+
index,
|
|
8916
|
+
params: {
|
|
8917
|
+
...candidate,
|
|
8918
|
+
...speculativeReceiveMetadata(descriptor)
|
|
8919
|
+
}
|
|
8920
|
+
});
|
|
8921
|
+
}
|
|
8922
|
+
}
|
|
8903
8923
|
}
|
|
8904
8924
|
await this.watcher.withCoalescedSubscription(async () => {
|
|
8905
8925
|
const persisted = await this.config.contractRepository.getContracts({
|
|
@@ -10168,9 +10188,7 @@ var WalletReceiveRotator = class _WalletReceiveRotator {
|
|
|
10168
10188
|
const { tapscript: newTapscript, params } = buildReceiveContract(
|
|
10169
10189
|
wallet.offchainTapscript,
|
|
10170
10190
|
descriptor,
|
|
10171
|
-
wallet.network.hrp
|
|
10172
|
-
true
|
|
10173
|
-
);
|
|
10191
|
+
wallet.network.hrp);
|
|
10174
10192
|
const newScript = params.script;
|
|
10175
10193
|
const manager = await wallet.getContractManager();
|
|
10176
10194
|
await manager.createContract(params);
|
|
@@ -10212,7 +10230,7 @@ function buildReceiveContract(current, descriptor, hrp, tagSource) {
|
|
|
10212
10230
|
// index-0 key. Without it, spends produce unsigned PSBTs that the
|
|
10213
10231
|
// server rejects with `INVALID_PSBT_INPUT (5): missing tapscript spend sig`.
|
|
10214
10232
|
metadata: {
|
|
10215
|
-
...
|
|
10233
|
+
...{ source: WALLET_RECEIVE_SOURCE },
|
|
10216
10234
|
signingDescriptor: descriptor
|
|
10217
10235
|
}
|
|
10218
10236
|
};
|
|
@@ -11752,9 +11770,9 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
|
|
|
11752
11770
|
* Only HD wallets have a watermark to look ahead of; static / `auto`
|
|
11753
11771
|
* wallets keep a single index-0 receive address, so the feature stays off.
|
|
11754
11772
|
*
|
|
11755
|
-
* `
|
|
11756
|
-
*
|
|
11757
|
-
*
|
|
11773
|
+
* `candidateDeps` is read at refill time, so a band rebuilt after
|
|
11774
|
+
* {@link rotateServerSigner} fans the active signer set (persisted
|
|
11775
|
+
* old-signer rows stay watched through the repository).
|
|
11758
11776
|
*/
|
|
11759
11777
|
lookAheadConfig() {
|
|
11760
11778
|
const provider = this._descriptorProvider;
|
|
@@ -11762,18 +11780,30 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
|
|
|
11762
11780
|
return {
|
|
11763
11781
|
size: this._lookAheadWindow,
|
|
11764
11782
|
currentWatermark: async () => await provider.getLastIndexUsed() ?? -1,
|
|
11765
|
-
materialize: (index) =>
|
|
11766
|
-
|
|
11767
|
-
provider.materializeDescriptorAt(index),
|
|
11768
|
-
this.network.hrp,
|
|
11769
|
-
// Never tagged: a promoted entry was generated by someone
|
|
11770
|
-
// else, and the tag would make the next boot advertise a
|
|
11771
|
-
// third party's invoice address as our own.
|
|
11772
|
-
false
|
|
11773
|
-
).params,
|
|
11783
|
+
materialize: (index) => provider.materializeDescriptorAt(index),
|
|
11784
|
+
candidateDeps: () => this.receiveCandidateDeps(),
|
|
11774
11785
|
onPromoted: (index) => provider.advanceLastIndexUsed(index)
|
|
11775
11786
|
};
|
|
11776
11787
|
}
|
|
11788
|
+
/**
|
|
11789
|
+
* Every axis an externally issued receive script could be anchored to, not
|
|
11790
|
+
* just the wallet's own current shape: an issuer sharing the seed (NArk, a
|
|
11791
|
+
* merchant backend) picks its own contract type, and a band derived from one
|
|
11792
|
+
* variant silently misses the rest until a `restore()`.
|
|
11793
|
+
*
|
|
11794
|
+
* Read from cached state, not a fresh `getInfo`, to stay synchronous and
|
|
11795
|
+
* offline-safe; {@link refreshDeprecatedSigners} and
|
|
11796
|
+
* {@link rotateServerSigner} keep it current and re-trigger a refill.
|
|
11797
|
+
*/
|
|
11798
|
+
receiveCandidateDeps() {
|
|
11799
|
+
return {
|
|
11800
|
+
network: { hrp: this.network.hrp },
|
|
11801
|
+
serverPubKey: this.offchainTapscript.options.serverPubKey,
|
|
11802
|
+
deprecatedSignerPubKeys: [...this._deprecatedSigners.keys()].map((h) => hex.decode(h)),
|
|
11803
|
+
csvTimelocks: this.walletContractTimelocks,
|
|
11804
|
+
delegatePubKey: this.offchainTapscript instanceof DelegateVtxo.Script ? this.offchainTapscript.options.delegatePubKey : void 0
|
|
11805
|
+
};
|
|
11806
|
+
}
|
|
11777
11807
|
_signerRouter;
|
|
11778
11808
|
/**
|
|
11779
11809
|
* @internal Sole write path for `offchainTapscript` after construction.
|
|
@@ -14053,6 +14083,12 @@ var ServiceWorkerTimeoutError = class extends Error {
|
|
|
14053
14083
|
super(detail);
|
|
14054
14084
|
}
|
|
14055
14085
|
};
|
|
14086
|
+
function isMessageBusNotInitializedError(error) {
|
|
14087
|
+
return error instanceof Error && error.message.includes(MESSAGE_BUS_NOT_INITIALIZED);
|
|
14088
|
+
}
|
|
14089
|
+
function isMessageBusInitializingError(error) {
|
|
14090
|
+
return error instanceof Error && error.message.includes(MESSAGE_BUS_INITIALIZING);
|
|
14091
|
+
}
|
|
14056
14092
|
|
|
14057
14093
|
// src/worker/messageBus.ts
|
|
14058
14094
|
var LATE_DELIVERY_GRACE_MS = 5 * 6e4;
|
|
@@ -15823,12 +15859,6 @@ var WalletMessageHandler = class {
|
|
|
15823
15859
|
};
|
|
15824
15860
|
|
|
15825
15861
|
// src/wallet/serviceWorker/wallet.ts
|
|
15826
|
-
function isMessageBusNotInitializedError(error) {
|
|
15827
|
-
return error instanceof Error && error.message.includes(MESSAGE_BUS_NOT_INITIALIZED);
|
|
15828
|
-
}
|
|
15829
|
-
function isMessageBusInitializingError(error) {
|
|
15830
|
-
return error instanceof Error && error.message.includes(MESSAGE_BUS_INITIALIZING);
|
|
15831
|
-
}
|
|
15832
15862
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
15833
15863
|
var INIT_WAIT_BACKOFF_CAP_MS = 2e3;
|
|
15834
15864
|
var MAX_INIT_WAITS = 8;
|
|
@@ -20141,6 +20171,6 @@ function isArkContract(str) {
|
|
|
20141
20171
|
return str.startsWith(ARKCONTRACT_PREFIX + "=");
|
|
20142
20172
|
}
|
|
20143
20173
|
|
|
20144
|
-
export { ARKADE_MAGIC, ActivityRegistry, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkade_exports, assertIntentIdUnique, boardingResolver, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, intentMatchesFilter, intentPageBounds, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isRetryableProviderError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, mergeChainedTxType, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
|
|
20145
|
-
//# sourceMappingURL=chunk-
|
|
20146
|
-
//# sourceMappingURL=chunk-
|
|
20174
|
+
export { ARKADE_MAGIC, ActivityRegistry, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkade_exports, assertIntentIdUnique, boardingResolver, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, intentPageBounds, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, mergeChainedTxType, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
|
|
20175
|
+
//# sourceMappingURL=chunk-3MMUKLCI.js.map
|
|
20176
|
+
//# sourceMappingURL=chunk-3MMUKLCI.js.map
|