@arkade-os/sdk 0.5.0-rc.21 → 0.5.0-rc.23
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 +31 -0
- 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/{asyncStorageTaskQueue-x8ok3tJy.d.cts → asyncStorageTaskQueue-DUu3VwBE.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-aL7K14e4.d.ts → asyncStorageTaskQueue-Dm71_6ID.d.ts} +2 -2
- package/dist/{chunk-LNJPVLIC.js → chunk-B4CZLBE6.js} +4 -4
- package/dist/{chunk-LNJPVLIC.js.map → chunk-B4CZLBE6.js.map} +1 -1
- package/dist/{chunk-EXFU6MTA.js → chunk-ENGV6VZF.js} +511 -89
- package/dist/chunk-ENGV6VZF.js.map +1 -0
- package/dist/{chunk-R5OFJ23O.cjs → chunk-H7W2KLN2.cjs} +990 -565
- package/dist/chunk-H7W2KLN2.cjs.map +1 -0
- package/dist/{chunk-VZMLADXQ.cjs → chunk-JETDFDWV.cjs} +10 -10
- package/dist/{chunk-VZMLADXQ.cjs.map → chunk-JETDFDWV.cjs.map} +1 -1
- package/dist/{chunk-5XBH5SAL.cjs → chunk-KR6FLFIH.cjs} +3 -3
- package/dist/{chunk-5XBH5SAL.cjs.map → chunk-KR6FLFIH.cjs.map} +1 -1
- package/dist/{chunk-GVF4OCTL.cjs → chunk-QLJXXVRO.cjs} +48 -48
- package/dist/{chunk-GVF4OCTL.cjs.map → chunk-QLJXXVRO.cjs.map} +1 -1
- package/dist/{chunk-JZAEFOE4.js → chunk-SPJA7XMU.js} +3 -3
- package/dist/{chunk-JZAEFOE4.js.map → chunk-SPJA7XMU.js.map} +1 -1
- package/dist/{chunk-CXHJGED6.js → chunk-UDQ3QE4C.js} +3 -3
- package/dist/{chunk-CXHJGED6.js.map → chunk-UDQ3QE4C.js.map} +1 -1
- package/dist/{chunk-S2WWOVFC.js → chunk-W2VYRZLB.js} +4 -4
- package/dist/{chunk-S2WWOVFC.js.map → chunk-W2VYRZLB.js.map} +1 -1
- package/dist/{chunk-4FDNOLBO.js → chunk-XZEQV5FE.js} +3 -3
- package/dist/{chunk-4FDNOLBO.js.map → chunk-XZEQV5FE.js.map} +1 -1
- package/dist/{chunk-Q7PC3NHX.cjs → chunk-YFHGGSII.cjs} +18 -18
- package/dist/{chunk-Q7PC3NHX.cjs.map → chunk-YFHGGSII.cjs.map} +1 -1
- package/dist/{chunk-HIZNPHB2.cjs → chunk-ZDLFQ7ZH.cjs} +15 -15
- package/dist/{chunk-HIZNPHB2.cjs.map → chunk-ZDLFQ7ZH.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-BT5iON1T.d.ts → delegate-DATx5c2o.d.ts} +1 -1
- package/dist/{delegate-u6kXTtWY.d.cts → delegate-DRoyCz4n.d.cts} +1 -1
- package/dist/{index-CK5QbTmZ.d.ts → index-BKBoBSKX.d.cts} +83 -9
- package/dist/{index-CK5QbTmZ.d.cts → index-BKBoBSKX.d.ts} +83 -9
- package/dist/{index-D1D4cR-G.d.ts → index-BjDUwnH-.d.ts} +2 -2
- package/dist/{index-BCnhItOQ.d.cts → index-CLgF0km0.d.cts} +2 -2
- package/dist/index.cjs +321 -309
- package/dist/index.d.cts +78 -16
- package/dist/index.d.ts +78 -16
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- 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 +33 -33
- 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-BeYR6NpQ.d.ts → taskRunner-B78rNRXB.d.ts} +2 -2
- package/dist/{taskRunner-Csey3EYJ.d.cts → taskRunner-CoGRmz1U.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +15 -15
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-DzSLMxBZ.d.ts → wallet-CdUjdg15.d.cts} +23 -5
- package/dist/{wallet-DG3Qmbmt.d.cts → wallet-yKzfCUfY.d.ts} +23 -5
- 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-EXFU6MTA.js.map +0 -1
- package/dist/chunk-R5OFJ23O.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-
|
|
2
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
1
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-B4CZLBE6.js';
|
|
2
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-W2VYRZLB.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-ENGV6VZF.js';
|
|
4
|
+
import '../../chunk-SPJA7XMU.js';
|
|
5
|
+
import '../../chunk-UDQ3QE4C.js';
|
|
6
|
+
import '../../chunk-XZEQV5FE.js';
|
|
7
7
|
import * as TaskManager from 'expo-task-manager';
|
|
8
8
|
import * as BackgroundTask from 'expo-background-task';
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
3
|
+
var chunkJETDFDWV_cjs = require('../../chunk-JETDFDWV.cjs');
|
|
4
|
+
var chunkH7W2KLN2_cjs = require('../../chunk-H7W2KLN2.cjs');
|
|
5
|
+
require('../../chunk-YFHGGSII.cjs');
|
|
6
|
+
require('../../chunk-QLJXXVRO.cjs');
|
|
7
|
+
var chunkKR6FLFIH_cjs = require('../../chunk-KR6FLFIH.cjs');
|
|
8
8
|
var base = require('@scure/base');
|
|
9
9
|
|
|
10
10
|
function warnOnRemovedBackgroundFields(bg) {
|
|
@@ -56,20 +56,20 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
56
56
|
* by the consumer.
|
|
57
57
|
*/
|
|
58
58
|
static async setup(config) {
|
|
59
|
-
|
|
59
|
+
chunkKR6FLFIH_cjs.assertTimerMs("foregroundIntervalMs", config.background.foregroundIntervalMs);
|
|
60
60
|
warnOnRemovedBackgroundFields(config.background);
|
|
61
|
-
const wallet = await
|
|
62
|
-
const processors = config.background.processors ?? [
|
|
61
|
+
const wallet = await chunkH7W2KLN2_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunkJETDFDWV_cjs.contractPollProcessor];
|
|
63
63
|
const deps = {
|
|
64
64
|
walletRepository: wallet.walletRepository,
|
|
65
65
|
contractRepository: wallet.contractRepository,
|
|
66
66
|
indexerProvider: wallet.indexerProvider,
|
|
67
67
|
arkProvider: wallet.arkProvider,
|
|
68
|
-
extendVtxo: (vtxo, contract) =>
|
|
68
|
+
extendVtxo: (vtxo, contract) => chunkH7W2KLN2_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl =
|
|
72
|
+
const arkServerUrl = chunkH7W2KLN2_cjs.extractArkProviderUrl(wallet.arkProvider);
|
|
73
73
|
if (typeof arkServerUrl === "string" && arkServerUrl.length > 0) {
|
|
74
74
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
75
75
|
const bgConfig = {
|
|
@@ -100,7 +100,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
100
100
|
}
|
|
101
101
|
async runForegroundPoll() {
|
|
102
102
|
if (this.cleared) return;
|
|
103
|
-
await
|
|
103
|
+
await chunkJETDFDWV_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
104
104
|
const results = await this.taskQueue.getResults();
|
|
105
105
|
if (results.length > 0) {
|
|
106
106
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -109,18 +109,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
109
109
|
await this.seedContractPollTask();
|
|
110
110
|
}
|
|
111
111
|
async seedContractPollTask() {
|
|
112
|
-
const existing = await this.taskQueue.getTasks(
|
|
112
|
+
const existing = await this.taskQueue.getTasks(chunkJETDFDWV_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunkH7W2KLN2_cjs.getRandomId(),
|
|
116
|
+
type: chunkJETDFDWV_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
117
117
|
data: {},
|
|
118
118
|
createdAt: Date.now()
|
|
119
119
|
};
|
|
120
120
|
await this.taskQueue.addTask(task);
|
|
121
121
|
}
|
|
122
122
|
async removeContractPollTasks() {
|
|
123
|
-
const tasks = await this.taskQueue.getTasks(
|
|
123
|
+
const tasks = await this.taskQueue.getTasks(chunkJETDFDWV_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
124
124
|
for (const task of tasks) {
|
|
125
125
|
await this.taskQueue.removeTask(task.id);
|
|
126
126
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, E as ExtendedCoin, h as ArkTransaction, i as ActivityRegistry, j as Activity, k as IContractManager, l as GetNewAddressesOptions, m as NewAddress, n as IDelegateManager, S as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-CdUjdg15.cjs';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, E as ExtendedCoin, h as ArkTransaction, i as ActivityRegistry, j as Activity, k as IContractManager, l as GetNewAddressesOptions, m as NewAddress, n as IDelegateManager, S as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-BKBoBSKX.cjs';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-CoGRmz1U.cjs';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
|
-
import '../../delegate-
|
|
6
|
+
import '../../delegate-DRoyCz4n.cjs';
|
|
7
7
|
import '@scure/btc-signer';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, E as ExtendedCoin, h as ArkTransaction, i as ActivityRegistry, j as Activity, k as IContractManager, l as GetNewAddressesOptions, m as NewAddress, n as IDelegateManager, S as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-yKzfCUfY.js';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, E as ExtendedCoin, h as ArkTransaction, i as ActivityRegistry, j as Activity, k as IContractManager, l as GetNewAddressesOptions, m as NewAddress, n as IDelegateManager, S as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-BKBoBSKX.js';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-B78rNRXB.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
|
-
import '../../delegate-
|
|
6
|
+
import '../../delegate-DATx5c2o.js';
|
|
7
7
|
import '@scure/btc-signer';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import { assertTimerMs } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-W2VYRZLB.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-ENGV6VZF.js';
|
|
3
|
+
import '../../chunk-SPJA7XMU.js';
|
|
4
|
+
import '../../chunk-UDQ3QE4C.js';
|
|
5
|
+
import { assertTimerMs } from '../../chunk-XZEQV5FE.js';
|
|
6
6
|
import { hex } from '@scure/base';
|
|
7
7
|
|
|
8
8
|
function warnOnRemovedBackgroundFields(bg) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as WalletRepository, P as PageRequest, O as Outpoint, D as PageResult, B as ExtendedVirtualCoin, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, E as ExtendedCoin, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, h as ArkTransaction, Q as WalletState, a2 as DescriptorProvider, a3 as DescriptorSigningRequest, a4 as Transaction, l as GetNewAddressesOptions, m as NewAddress, a as Identity, w as RelativeTimelock, a5 as Network, a6 as CSVMultisigTapscript, a7 as BatchStartedEvent, a8 as TreeSigningStartedEvent, a9 as TxTree, aa as TreeNoncesEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, ad as BatchFailedEvent, ae as TreeTxEvent, af as TreeSignatureEvent, o as SettlementEvent, b as WalletConfig, C as ContractRepository, k as IContractManager, ag as IReadonlyWallet, ah as ReadonlyIdentity, ai as OnchainProvider, u as ArkProvider, v as IndexerProvider, aj as DelegateProvider, ak as ReadonlyWalletConfig, X as IntentRepository, _ as VirtualTxRepository, al as ExitCaptureMode, am as ExitDataSource, i as ActivityRegistry, an as IReadonlyAssetManager, ao as ContractSyncState, ap as RecipientArkadeAddressContext, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, aq as NetworkName, ar as ArkAddress, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, as as ContractWithVtxos, at as selectPendingRecoveryOutpoints, j as Activity, au as Coin, av as ContractManager, aw as ContractManagerConfig, I as IWallet, ax as SettlementConfig, d as ArkadeBroadcaster, q as IAssetManager, ay as VtxoManager, n as IDelegateManager, S as SettleParams, R as Recipient, az as SignerSession, aA as SignedIntent, aB as Intent, p as SendParams, aC as TimeHeight } from './index-
|
|
1
|
+
import { W as WalletRepository, P as PageRequest, O as Outpoint, D as PageResult, B as ExtendedVirtualCoin, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, E as ExtendedCoin, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, h as ArkTransaction, Q as WalletState, a2 as DescriptorProvider, a3 as DescriptorSigningRequest, a4 as Transaction, l as GetNewAddressesOptions, m as NewAddress, a as Identity, w as RelativeTimelock, a5 as Network, a6 as CSVMultisigTapscript, a7 as BatchStartedEvent, a8 as TreeSigningStartedEvent, a9 as TxTree, aa as TreeNoncesEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, ad as BatchFailedEvent, ae as TreeTxEvent, af as TreeSignatureEvent, o as SettlementEvent, b as WalletConfig, C as ContractRepository, k as IContractManager, ag as IReadonlyWallet, ah as ReadonlyIdentity, ai as OnchainProvider, u as ArkProvider, v as IndexerProvider, aj as DelegateProvider, ak as ReadonlyWalletConfig, X as IntentRepository, _ as VirtualTxRepository, al as ExitCaptureMode, am as ExitDataSource, i as ActivityRegistry, an as IReadonlyAssetManager, ao as ContractSyncState, ap as RecipientArkadeAddressContext, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, aq as NetworkName, ar as ArkAddress, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, as as ContractWithVtxos, at as selectPendingRecoveryOutpoints, j as Activity, au as Coin, av as ContractManager, aw as ContractManagerConfig, I as IWallet, ax as SettlementConfig, d as ArkadeBroadcaster, q as IAssetManager, ay as VtxoManager, n as IDelegateManager, S as SettleParams, R as Recipient, az as SignerSession, aA as SignedIntent, aB as Intent, p as SendParams, aC as TimeHeight } from './index-BKBoBSKX.cjs';
|
|
2
2
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DRoyCz4n.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* IndexedDB-based implementation of WalletRepository.
|
|
@@ -849,14 +849,17 @@ declare class ArkadeCashCreateError extends Error {
|
|
|
849
849
|
}
|
|
850
850
|
/**
|
|
851
851
|
* Freshness of provider-backed sync (server-info source + indexer-sync health). Balances/VTXOs
|
|
852
|
-
* are always served from the repository regardless.
|
|
852
|
+
* are always served from the repository regardless. `syncing` says a provider sync is in flight
|
|
853
|
+
* right now; optional so adding it breaks no implementer, {@link ReadonlyWallet} always sets it.
|
|
853
854
|
*/
|
|
854
855
|
type ProviderConnectionState = {
|
|
855
856
|
mode: "online";
|
|
857
|
+
syncing?: boolean;
|
|
856
858
|
source: "live";
|
|
857
859
|
lastOnlineAt: number;
|
|
858
860
|
} | {
|
|
859
861
|
mode: "degraded";
|
|
862
|
+
syncing?: boolean;
|
|
860
863
|
source: "cache" | "repository";
|
|
861
864
|
provider: ProviderKind;
|
|
862
865
|
reason: string;
|
|
@@ -873,6 +876,8 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
873
876
|
readonly walletRepository: WalletRepository;
|
|
874
877
|
readonly contractRepository: ContractRepository;
|
|
875
878
|
readonly delegateProvider?: DelegateProvider | undefined;
|
|
879
|
+
protected lazyInitialization: boolean;
|
|
880
|
+
private boardingLoaded;
|
|
876
881
|
private _contractManager?;
|
|
877
882
|
private _contractManagerInitializing?;
|
|
878
883
|
protected readonly watcherConfig?: ReadonlyWalletConfig["watcherConfig"];
|
|
@@ -1048,6 +1053,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1048
1053
|
* Return the wallet's combined onchain and offchain balances.
|
|
1049
1054
|
*/
|
|
1050
1055
|
getBalance(): Promise<WalletBalance>;
|
|
1056
|
+
/** Cached balance; inspect connection state and boarding.loaded before displaying zeros. */
|
|
1057
|
+
getStoredBalance(): Promise<WalletBalance>;
|
|
1058
|
+
private balanceFromSnapshot;
|
|
1051
1059
|
/**
|
|
1052
1060
|
* Return virtual outputs tracked by the wallet, including escrowed, locked and
|
|
1053
1061
|
* awaiting-recovery funds. Coin selection must use {@link getSpendableVtxos}: feeding this
|
|
@@ -1056,6 +1064,8 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1056
1064
|
* @param filter - Optional flags controlling whether recoverable or unrolled VTXOs are included
|
|
1057
1065
|
*/
|
|
1058
1066
|
getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1067
|
+
/** Cached VTXOs; may be empty before the first sync. Never use for coin selection. */
|
|
1068
|
+
getStoredVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1059
1069
|
/** @inheritdoc */
|
|
1060
1070
|
getSpendableVtxos(filter?: GetSpendableVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1061
1071
|
/**
|
|
@@ -1083,6 +1093,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1083
1093
|
protected contractSnapshot(filter?: GetSpendableVtxosFilter, options?: {
|
|
1084
1094
|
unspentOnly?: boolean;
|
|
1085
1095
|
}): Promise<ContractWithVtxos[]>;
|
|
1096
|
+
protected contractSnapshotStored(): Promise<ContractWithVtxos[]>;
|
|
1086
1097
|
/**
|
|
1087
1098
|
* The two exclusion sets the gate is made of, derived from one snapshot so
|
|
1088
1099
|
* {@link getSpendableVtxos} and the balance answer about the same instant.
|
|
@@ -1159,6 +1170,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1159
1170
|
* recovery goes through the deprecated-signer migration API.
|
|
1160
1171
|
*/
|
|
1161
1172
|
getBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
1173
|
+
getStoredBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
1162
1174
|
/**
|
|
1163
1175
|
* Subscribe to onchain and offchain notifications for newly received funds.
|
|
1164
1176
|
*
|
|
@@ -1577,9 +1589,12 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1577
1589
|
*
|
|
1578
1590
|
* @param params - Optional settlement inputs and outputs. When omitted, the wallet settles all eligible funds.
|
|
1579
1591
|
* @param eventCallback - Optional callback invoked for settlement stream events.
|
|
1592
|
+
* @param hooks - Optional phases for preparation and intent registration.
|
|
1580
1593
|
* @returns The finalized Arkade transaction id
|
|
1581
1594
|
*/
|
|
1582
|
-
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void
|
|
1595
|
+
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void, hooks?: {
|
|
1596
|
+
onPhase?: (phase: "preparing" | "registration_attempt") => void;
|
|
1597
|
+
}): Promise<string>;
|
|
1583
1598
|
private _settleImpl;
|
|
1584
1599
|
/**
|
|
1585
1600
|
* Rotate-on-board: the boarding analogue of {@link WalletReceiveRotator}'s L2 rotation.
|
|
@@ -1783,10 +1798,13 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1783
1798
|
*
|
|
1784
1799
|
* @returns The Arkade transaction id and server-signed checkpoint PSBTs (for bookkeeping)
|
|
1785
1800
|
*/
|
|
1786
|
-
buildAndSubmitOffchainTx(inputs: ExtendedVirtualCoin[], outputs: TransactionOutput[], serverUnrollScript?: CSVMultisigTapscript.Type
|
|
1801
|
+
buildAndSubmitOffchainTx(inputs: ExtendedVirtualCoin[], outputs: TransactionOutput[], serverUnrollScript?: CSVMultisigTapscript.Type, options?: {
|
|
1802
|
+
validUntil?: number;
|
|
1803
|
+
}): Promise<{
|
|
1787
1804
|
arkTxid: string;
|
|
1788
1805
|
signedCheckpointTxs: string[];
|
|
1789
1806
|
}>;
|
|
1807
|
+
private _buildAndSubmitOffchainTx;
|
|
1790
1808
|
private updateDbAfterOffchainTx;
|
|
1791
1809
|
private updateDbAfterSettle;
|
|
1792
1810
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as WalletRepository, P as PageRequest, O as Outpoint, D as PageResult, B as ExtendedVirtualCoin, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, E as ExtendedCoin, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, h as ArkTransaction, Q as WalletState, a2 as DescriptorProvider, a3 as DescriptorSigningRequest, a4 as Transaction, l as GetNewAddressesOptions, m as NewAddress, a as Identity, w as RelativeTimelock, a5 as Network, a6 as CSVMultisigTapscript, a7 as BatchStartedEvent, a8 as TreeSigningStartedEvent, a9 as TxTree, aa as TreeNoncesEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, ad as BatchFailedEvent, ae as TreeTxEvent, af as TreeSignatureEvent, o as SettlementEvent, b as WalletConfig, C as ContractRepository, k as IContractManager, ag as IReadonlyWallet, ah as ReadonlyIdentity, ai as OnchainProvider, u as ArkProvider, v as IndexerProvider, aj as DelegateProvider, ak as ReadonlyWalletConfig, X as IntentRepository, _ as VirtualTxRepository, al as ExitCaptureMode, am as ExitDataSource, i as ActivityRegistry, an as IReadonlyAssetManager, ao as ContractSyncState, ap as RecipientArkadeAddressContext, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, aq as NetworkName, ar as ArkAddress, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, as as ContractWithVtxos, at as selectPendingRecoveryOutpoints, j as Activity, au as Coin, av as ContractManager, aw as ContractManagerConfig, I as IWallet, ax as SettlementConfig, d as ArkadeBroadcaster, q as IAssetManager, ay as VtxoManager, n as IDelegateManager, S as SettleParams, R as Recipient, az as SignerSession, aA as SignedIntent, aB as Intent, p as SendParams, aC as TimeHeight } from './index-
|
|
1
|
+
import { W as WalletRepository, P as PageRequest, O as Outpoint, D as PageResult, B as ExtendedVirtualCoin, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, E as ExtendedCoin, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, h as ArkTransaction, Q as WalletState, a2 as DescriptorProvider, a3 as DescriptorSigningRequest, a4 as Transaction, l as GetNewAddressesOptions, m as NewAddress, a as Identity, w as RelativeTimelock, a5 as Network, a6 as CSVMultisigTapscript, a7 as BatchStartedEvent, a8 as TreeSigningStartedEvent, a9 as TxTree, aa as TreeNoncesEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, ad as BatchFailedEvent, ae as TreeTxEvent, af as TreeSignatureEvent, o as SettlementEvent, b as WalletConfig, C as ContractRepository, k as IContractManager, ag as IReadonlyWallet, ah as ReadonlyIdentity, ai as OnchainProvider, u as ArkProvider, v as IndexerProvider, aj as DelegateProvider, ak as ReadonlyWalletConfig, X as IntentRepository, _ as VirtualTxRepository, al as ExitCaptureMode, am as ExitDataSource, i as ActivityRegistry, an as IReadonlyAssetManager, ao as ContractSyncState, ap as RecipientArkadeAddressContext, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, aq as NetworkName, ar as ArkAddress, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, g as GetSpendableVtxosFilter, as as ContractWithVtxos, at as selectPendingRecoveryOutpoints, j as Activity, au as Coin, av as ContractManager, aw as ContractManagerConfig, I as IWallet, ax as SettlementConfig, d as ArkadeBroadcaster, q as IAssetManager, ay as VtxoManager, n as IDelegateManager, S as SettleParams, R as Recipient, az as SignerSession, aA as SignedIntent, aB as Intent, p as SendParams, aC as TimeHeight } from './index-BKBoBSKX.js';
|
|
2
2
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DATx5c2o.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* IndexedDB-based implementation of WalletRepository.
|
|
@@ -849,14 +849,17 @@ declare class ArkadeCashCreateError extends Error {
|
|
|
849
849
|
}
|
|
850
850
|
/**
|
|
851
851
|
* Freshness of provider-backed sync (server-info source + indexer-sync health). Balances/VTXOs
|
|
852
|
-
* are always served from the repository regardless.
|
|
852
|
+
* are always served from the repository regardless. `syncing` says a provider sync is in flight
|
|
853
|
+
* right now; optional so adding it breaks no implementer, {@link ReadonlyWallet} always sets it.
|
|
853
854
|
*/
|
|
854
855
|
type ProviderConnectionState = {
|
|
855
856
|
mode: "online";
|
|
857
|
+
syncing?: boolean;
|
|
856
858
|
source: "live";
|
|
857
859
|
lastOnlineAt: number;
|
|
858
860
|
} | {
|
|
859
861
|
mode: "degraded";
|
|
862
|
+
syncing?: boolean;
|
|
860
863
|
source: "cache" | "repository";
|
|
861
864
|
provider: ProviderKind;
|
|
862
865
|
reason: string;
|
|
@@ -873,6 +876,8 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
873
876
|
readonly walletRepository: WalletRepository;
|
|
874
877
|
readonly contractRepository: ContractRepository;
|
|
875
878
|
readonly delegateProvider?: DelegateProvider | undefined;
|
|
879
|
+
protected lazyInitialization: boolean;
|
|
880
|
+
private boardingLoaded;
|
|
876
881
|
private _contractManager?;
|
|
877
882
|
private _contractManagerInitializing?;
|
|
878
883
|
protected readonly watcherConfig?: ReadonlyWalletConfig["watcherConfig"];
|
|
@@ -1048,6 +1053,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1048
1053
|
* Return the wallet's combined onchain and offchain balances.
|
|
1049
1054
|
*/
|
|
1050
1055
|
getBalance(): Promise<WalletBalance>;
|
|
1056
|
+
/** Cached balance; inspect connection state and boarding.loaded before displaying zeros. */
|
|
1057
|
+
getStoredBalance(): Promise<WalletBalance>;
|
|
1058
|
+
private balanceFromSnapshot;
|
|
1051
1059
|
/**
|
|
1052
1060
|
* Return virtual outputs tracked by the wallet, including escrowed, locked and
|
|
1053
1061
|
* awaiting-recovery funds. Coin selection must use {@link getSpendableVtxos}: feeding this
|
|
@@ -1056,6 +1064,8 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1056
1064
|
* @param filter - Optional flags controlling whether recoverable or unrolled VTXOs are included
|
|
1057
1065
|
*/
|
|
1058
1066
|
getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1067
|
+
/** Cached VTXOs; may be empty before the first sync. Never use for coin selection. */
|
|
1068
|
+
getStoredVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1059
1069
|
/** @inheritdoc */
|
|
1060
1070
|
getSpendableVtxos(filter?: GetSpendableVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
|
|
1061
1071
|
/**
|
|
@@ -1083,6 +1093,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1083
1093
|
protected contractSnapshot(filter?: GetSpendableVtxosFilter, options?: {
|
|
1084
1094
|
unspentOnly?: boolean;
|
|
1085
1095
|
}): Promise<ContractWithVtxos[]>;
|
|
1096
|
+
protected contractSnapshotStored(): Promise<ContractWithVtxos[]>;
|
|
1086
1097
|
/**
|
|
1087
1098
|
* The two exclusion sets the gate is made of, derived from one snapshot so
|
|
1088
1099
|
* {@link getSpendableVtxos} and the balance answer about the same instant.
|
|
@@ -1159,6 +1170,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1159
1170
|
* recovery goes through the deprecated-signer migration API.
|
|
1160
1171
|
*/
|
|
1161
1172
|
getBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
1173
|
+
getStoredBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
1162
1174
|
/**
|
|
1163
1175
|
* Subscribe to onchain and offchain notifications for newly received funds.
|
|
1164
1176
|
*
|
|
@@ -1577,9 +1589,12 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1577
1589
|
*
|
|
1578
1590
|
* @param params - Optional settlement inputs and outputs. When omitted, the wallet settles all eligible funds.
|
|
1579
1591
|
* @param eventCallback - Optional callback invoked for settlement stream events.
|
|
1592
|
+
* @param hooks - Optional phases for preparation and intent registration.
|
|
1580
1593
|
* @returns The finalized Arkade transaction id
|
|
1581
1594
|
*/
|
|
1582
|
-
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void
|
|
1595
|
+
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void, hooks?: {
|
|
1596
|
+
onPhase?: (phase: "preparing" | "registration_attempt") => void;
|
|
1597
|
+
}): Promise<string>;
|
|
1583
1598
|
private _settleImpl;
|
|
1584
1599
|
/**
|
|
1585
1600
|
* Rotate-on-board: the boarding analogue of {@link WalletReceiveRotator}'s L2 rotation.
|
|
@@ -1783,10 +1798,13 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1783
1798
|
*
|
|
1784
1799
|
* @returns The Arkade transaction id and server-signed checkpoint PSBTs (for bookkeeping)
|
|
1785
1800
|
*/
|
|
1786
|
-
buildAndSubmitOffchainTx(inputs: ExtendedVirtualCoin[], outputs: TransactionOutput[], serverUnrollScript?: CSVMultisigTapscript.Type
|
|
1801
|
+
buildAndSubmitOffchainTx(inputs: ExtendedVirtualCoin[], outputs: TransactionOutput[], serverUnrollScript?: CSVMultisigTapscript.Type, options?: {
|
|
1802
|
+
validUntil?: number;
|
|
1803
|
+
}): Promise<{
|
|
1787
1804
|
arkTxid: string;
|
|
1788
1805
|
signedCheckpointTxs: string[];
|
|
1789
1806
|
}>;
|
|
1807
|
+
private _buildAndSubmitOffchainTx;
|
|
1790
1808
|
private updateDbAfterOffchainTx;
|
|
1791
1809
|
private updateDbAfterSettle;
|
|
1792
1810
|
}
|
|
@@ -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 chunkJETDFDWV_cjs = require('../../chunk-JETDFDWV.cjs');
|
|
4
|
+
require('../../chunk-H7W2KLN2.cjs');
|
|
5
|
+
require('../../chunk-YFHGGSII.cjs');
|
|
6
|
+
require('../../chunk-QLJXXVRO.cjs');
|
|
7
|
+
require('../../chunk-KR6FLFIH.cjs');
|
|
8
8
|
|
|
9
9
|
// src/worker/expo/taskQueue.ts
|
|
10
10
|
var InMemoryTaskQueue = class {
|
|
@@ -120,19 +120,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
120
120
|
|
|
121
121
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkJETDFDWV_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkJETDFDWV_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkJETDFDWV_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkJETDFDWV_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../index-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-CoGRmz1U.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-CoGRmz1U.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DUu3VwBE.cjs';
|
|
4
|
+
import '../../index-BKBoBSKX.cjs';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
7
|
import '@scure/btc-signer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../index-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-B78rNRXB.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-B78rNRXB.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Dm71_6ID.js';
|
|
4
|
+
import '../../index-BKBoBSKX.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
7
|
import '@scure/btc-signer';
|
|
@@ -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-W2VYRZLB.js';
|
|
2
|
+
import '../../chunk-ENGV6VZF.js';
|
|
3
|
+
import '../../chunk-SPJA7XMU.js';
|
|
4
|
+
import '../../chunk-UDQ3QE4C.js';
|
|
5
|
+
import '../../chunk-XZEQV5FE.js';
|
|
6
6
|
|
|
7
7
|
// src/worker/expo/taskQueue.ts
|
|
8
8
|
var InMemoryTaskQueue = class {
|