@arkade-os/sdk 0.4.38 → 0.4.40
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 +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 +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{ark-BzUNnkoc.d.cts → ark-BaZ6da8C.d.cts} +17 -4
- package/dist/{ark-BzUNnkoc.d.ts → ark-BaZ6da8C.d.ts} +17 -4
- package/dist/{asyncStorageTaskQueue-CIYeI6GM.d.ts → asyncStorageTaskQueue-CvV50MjV.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-C0kQoY1x.d.cts → asyncStorageTaskQueue-trKcQM7q.d.cts} +2 -2
- package/dist/{chunk-A25NYZT5.js → chunk-5TSUGRHP.js} +3 -3
- package/dist/{chunk-A25NYZT5.js.map → chunk-5TSUGRHP.js.map} +1 -1
- package/dist/{chunk-PXMV7RPT.cjs → chunk-6EZY43WE.cjs} +14 -5
- package/dist/chunk-6EZY43WE.cjs.map +1 -0
- package/dist/{chunk-ISWKPRX3.js → chunk-GF6NPAOJ.js} +14 -5
- package/dist/chunk-GF6NPAOJ.js.map +1 -0
- package/dist/{chunk-ZLDWJQIY.cjs → chunk-GWISMFO5.cjs} +11 -11
- package/dist/{chunk-ZLDWJQIY.cjs.map → chunk-GWISMFO5.cjs.map} +1 -1
- package/dist/{chunk-CCUUO2GR.js → chunk-I2O4Q2EL.js} +175 -78
- package/dist/chunk-I2O4Q2EL.js.map +1 -0
- package/dist/{chunk-JSTCR7PQ.cjs → chunk-I4Z6KKUH.cjs} +251 -152
- package/dist/chunk-I4Z6KKUH.cjs.map +1 -0
- package/dist/{chunk-RJK63VVZ.js → chunk-SWJBV4UB.js} +3 -3
- package/dist/{chunk-RJK63VVZ.js.map → chunk-SWJBV4UB.js.map} +1 -1
- package/dist/{chunk-KHUOY3QD.cjs → chunk-TSG74BHI.cjs} +7 -7
- package/dist/{chunk-KHUOY3QD.cjs.map → chunk-TSG74BHI.cjs.map} +1 -1
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-DHAgMIS9.d.cts → delegate-Bt5H1gbW.d.cts} +1 -1
- package/dist/{delegate-BjPbX-MR.d.ts → delegate-ClaZWxlA.d.ts} +1 -1
- package/dist/{index-BOQKDCmS.d.ts → index-ByYBDr1g.d.ts} +2 -2
- package/dist/{index-YkMAtSfw.d.cts → index-D6kIRfBy.d.cts} +2 -2
- package/dist/index.cjs +121 -113
- package/dist/index.d.cts +49 -10
- package/dist/index.d.ts +49 -10
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +11 -11
- package/dist/repositories/realm/index.d.cts +1 -1
- package/dist/repositories/realm/index.d.ts +1 -1
- package/dist/repositories/realm/index.js +2 -2
- package/dist/repositories/sqlite/index.cjs +11 -11
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +2 -2
- package/dist/{taskRunner-Dfmt7ZPN.d.ts → taskRunner-Bwss4MUW.d.ts} +2 -2
- package/dist/{taskRunner-CVEgBO6d.d.cts → taskRunner-D7SuOTOa.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +11 -11
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +3 -3
- package/dist/{wallet-_PTv-lMe.d.cts → wallet-V5C4Nlhz.d.cts} +2 -2
- package/dist/{wallet-C4Pide44.d.ts → wallet-l-2dKXVh.d.ts} +2 -2
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-CCUUO2GR.js.map +0 -1
- package/dist/chunk-ISWKPRX3.js.map +0 -1
- package/dist/chunk-JSTCR7PQ.cjs.map +0 -1
- package/dist/chunk-PXMV7RPT.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-5TSUGRHP.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-SWJBV4UB.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-I2O4Q2EL.js';
|
|
4
|
+
import '../../chunk-GF6NPAOJ.js';
|
|
5
5
|
import '../../chunk-CUSABEUQ.js';
|
|
6
6
|
import '../../chunk-OUVTG72A.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkTSG74BHI_cjs = require('../../chunk-TSG74BHI.cjs');
|
|
4
|
+
var chunkI4Z6KKUH_cjs = require('../../chunk-I4Z6KKUH.cjs');
|
|
5
|
+
var chunk6EZY43WE_cjs = require('../../chunk-6EZY43WE.cjs');
|
|
6
6
|
require('../../chunk-GUTKJMSF.cjs');
|
|
7
7
|
require('../../chunk-CMPJR3HS.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
@@ -52,18 +52,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
52
52
|
*/
|
|
53
53
|
static async setup(config) {
|
|
54
54
|
warnOnRemovedBackgroundFields(config.background);
|
|
55
|
-
const wallet = await
|
|
56
|
-
const processors = config.background.processors ?? [
|
|
55
|
+
const wallet = await chunkI4Z6KKUH_cjs.Wallet.create(config);
|
|
56
|
+
const processors = config.background.processors ?? [chunkTSG74BHI_cjs.contractPollProcessor];
|
|
57
57
|
const deps = {
|
|
58
58
|
walletRepository: wallet.walletRepository,
|
|
59
59
|
contractRepository: wallet.contractRepository,
|
|
60
60
|
indexerProvider: wallet.indexerProvider,
|
|
61
61
|
arkProvider: wallet.arkProvider,
|
|
62
|
-
extendVtxo: (vtxo, contract) =>
|
|
62
|
+
extendVtxo: (vtxo, contract) => chunkI4Z6KKUH_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
63
63
|
};
|
|
64
64
|
const { taskQueue } = config.background;
|
|
65
65
|
if ("persistConfig" in taskQueue) {
|
|
66
|
-
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof
|
|
66
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunk6EZY43WE_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
67
67
|
if (arkServerUrl) {
|
|
68
68
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
69
69
|
const bgConfig = {
|
|
@@ -93,7 +93,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
93
93
|
}, intervalMs);
|
|
94
94
|
}
|
|
95
95
|
async runForegroundPoll() {
|
|
96
|
-
await
|
|
96
|
+
await chunkTSG74BHI_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
97
97
|
const results = await this.taskQueue.getResults();
|
|
98
98
|
if (results.length > 0) {
|
|
99
99
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -101,11 +101,11 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
101
101
|
await this.seedContractPollTask();
|
|
102
102
|
}
|
|
103
103
|
async seedContractPollTask() {
|
|
104
|
-
const existing = await this.taskQueue.getTasks(
|
|
104
|
+
const existing = await this.taskQueue.getTasks(chunkTSG74BHI_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
105
105
|
if (existing.length > 0) return;
|
|
106
106
|
const task = {
|
|
107
|
-
id:
|
|
108
|
-
type:
|
|
107
|
+
id: chunkI4Z6KKUH_cjs.getRandomId(),
|
|
108
|
+
type: chunkTSG74BHI_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
109
109
|
data: {},
|
|
110
110
|
createdAt: Date.now()
|
|
111
111
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as Wallet } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-
|
|
3
|
-
import {
|
|
1
|
+
import { W as Wallet } from '../../wallet-V5C4Nlhz.cjs';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-BaZ6da8C.cjs';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-D7SuOTOa.cjs';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-Bt5H1gbW.cjs';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as Wallet } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-
|
|
3
|
-
import {
|
|
1
|
+
import { W as Wallet } from '../../wallet-l-2dKXVh.js';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-BaZ6da8C.js';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-Bwss4MUW.js';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-ClaZWxlA.js';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
3
|
-
import { RestArkProvider } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-5TSUGRHP.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-I2O4Q2EL.js';
|
|
3
|
+
import { RestArkProvider } from '../../chunk-GF6NPAOJ.js';
|
|
4
4
|
import '../../chunk-CUSABEUQ.js';
|
|
5
5
|
import '../../chunk-OUVTG72A.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import { B as BatchStartedEvent,
|
|
3
|
+
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, J as DescriptorProvider, e as IContractManager, K as IReadonlyWallet, L as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, o as RelativeTimelock, Q as IReadonlyAssetManager, m as ArkProvider, U as NetworkName, X as ArkInfo, Y as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, Z as Coin, _ as ContractManager, I as IWallet, a as Identity, $ as CSVMultisigTapscript, a0 as SettlementConfig, i as IAssetManager, a1 as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, a2 as SignerSession, a3 as SignedIntent, a4 as Intent } from './ark-BaZ6da8C.cjs';
|
|
4
4
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Bt5H1gbW.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import { B as BatchStartedEvent,
|
|
3
|
+
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, J as DescriptorProvider, e as IContractManager, K as IReadonlyWallet, L as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, o as RelativeTimelock, Q as IReadonlyAssetManager, m as ArkProvider, U as NetworkName, X as ArkInfo, Y as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, Z as Coin, _ as ContractManager, I as IWallet, a as Identity, $ as CSVMultisigTapscript, a0 as SettlementConfig, i as IAssetManager, a1 as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, a2 as SignerSession, a3 as SignedIntent, a4 as Intent } from './ark-BaZ6da8C.js';
|
|
4
4
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-ClaZWxlA.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
3
|
+
var chunkTSG74BHI_cjs = require('../../chunk-TSG74BHI.cjs');
|
|
4
|
+
require('../../chunk-I4Z6KKUH.cjs');
|
|
5
|
+
require('../../chunk-6EZY43WE.cjs');
|
|
6
6
|
require('../../chunk-GUTKJMSF.cjs');
|
|
7
7
|
require('../../chunk-CMPJR3HS.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
@@ -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 chunkTSG74BHI_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 chunkTSG74BHI_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkTSG74BHI_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkTSG74BHI_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 '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-D7SuOTOa.cjs';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-D7SuOTOa.cjs';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-trKcQM7q.cjs';
|
|
4
|
+
import '../../ark-BaZ6da8C.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,
|
|
3
|
-
export {
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-Bwss4MUW.js';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-Bwss4MUW.js';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CvV50MjV.js';
|
|
4
|
+
import '../../ark-BaZ6da8C.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,6 +1,6 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-5TSUGRHP.js';
|
|
2
|
+
import '../../chunk-I2O4Q2EL.js';
|
|
3
|
+
import '../../chunk-GF6NPAOJ.js';
|
|
4
4
|
import '../../chunk-CUSABEUQ.js';
|
|
5
5
|
import '../../chunk-OUVTG72A.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|