@arkade-os/sdk 0.4.67 → 0.4.68
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 +5 -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/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-LTpeXYaD.d.cts → asyncStorageTaskQueue-B2CcXIHU.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Za-e_zMk.d.ts → asyncStorageTaskQueue-DaZlVTbM.d.ts} +2 -2
- package/dist/{chunk-X3VEMUVV.js → chunk-33Q2RFET.js} +3 -3
- package/dist/{chunk-X3VEMUVV.js.map → chunk-33Q2RFET.js.map} +1 -1
- package/dist/{chunk-6TAQF6EV.js → chunk-45FKMOJH.js} +72 -120
- package/dist/chunk-45FKMOJH.js.map +1 -0
- package/dist/{chunk-3WIWNE4P.js → chunk-4CMXV5SF.js} +16 -4
- package/dist/chunk-4CMXV5SF.js.map +1 -0
- package/dist/{chunk-YDRZDZPP.cjs → chunk-4KCVS4ZN.cjs} +10 -10
- package/dist/{chunk-YDRZDZPP.cjs.map → chunk-4KCVS4ZN.cjs.map} +1 -1
- package/dist/{chunk-OIZ2V2VD.cjs → chunk-6YUACVX4.cjs} +118 -166
- package/dist/chunk-6YUACVX4.cjs.map +1 -0
- package/dist/{chunk-2JV4VQ7C.cjs → chunk-EJOFL5WH.cjs} +17 -3
- package/dist/chunk-EJOFL5WH.cjs.map +1 -0
- package/dist/{chunk-MZFUZUTQ.js → chunk-G4I6PU5H.js} +4 -4
- package/dist/{chunk-MZFUZUTQ.js.map → chunk-G4I6PU5H.js.map} +1 -1
- package/dist/{chunk-EALWOVHK.js → chunk-GQ4NMQGR.js} +4 -4
- package/dist/{chunk-EALWOVHK.js.map → chunk-GQ4NMQGR.js.map} +1 -1
- package/dist/{chunk-R2YAMONM.cjs → chunk-JGMSZIE4.cjs} +17 -17
- package/dist/{chunk-R2YAMONM.cjs.map → chunk-JGMSZIE4.cjs.map} +1 -1
- package/dist/{chunk-CO3KKSWM.cjs → chunk-PJR63FTK.cjs} +17 -17
- package/dist/{chunk-CO3KKSWM.cjs.map → chunk-PJR63FTK.cjs.map} +1 -1
- package/dist/{chunk-AEWJU6NZ.js → chunk-VBHXBI7F.js} +59 -23
- package/dist/chunk-VBHXBI7F.js.map +1 -0
- package/dist/{chunk-MJUTO3PY.cjs → chunk-WCJVKFAP.cjs} +480 -444
- package/dist/chunk-WCJVKFAP.cjs.map +1 -0
- 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-cdmzb2f9.d.ts → delegate-AomVWxO_.d.ts} +1 -1
- package/dist/{delegate-Bz2e2zXY.d.cts → delegate-Bffc5f54.d.cts} +1 -1
- package/dist/{hdWalletCapable-BSjuUYOO.d.cts → hdWalletCapable-B5nRs3RH.d.cts} +2 -2
- package/dist/{hdWalletCapable-Hi12xjCJ.d.ts → hdWalletCapable-DZdIVa23.d.ts} +2 -2
- package/dist/{index-DU5o_hz7.d.cts → index-C7RZCfoY.d.cts} +17 -1
- package/dist/{index-DU5o_hz7.d.ts → index-C7RZCfoY.d.ts} +17 -1
- package/dist/{index-BiACuWaf.d.ts → index-jouvy8FD.d.ts} +96 -119
- package/dist/{index-D2GjZxBr.d.cts → index-nfyQM33h.d.cts} +96 -119
- package/dist/index.cjs +293 -289
- package/dist/index.d.cts +12 -8
- package/dist/index.d.ts +12 -8
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BZJMLQ6g.d.cts → taskRunner-D2vnpPBT.d.cts} +2 -2
- package/dist/{taskRunner-DATaRQus.d.ts → taskRunner-DuwK9t8O.d.ts} +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 +14 -14
- 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/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-2JV4VQ7C.cjs.map +0 -1
- package/dist/chunk-3WIWNE4P.js.map +0 -1
- package/dist/chunk-6TAQF6EV.js.map +0 -1
- package/dist/chunk-AEWJU6NZ.js.map +0 -1
- package/dist/chunk-MJUTO3PY.cjs.map +0 -1
- package/dist/chunk-OIZ2V2VD.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-GQ4NMQGR.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-G4I6PU5H.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-VBHXBI7F.js';
|
|
4
|
+
import '../../chunk-33Q2RFET.js';
|
|
5
|
+
import '../../chunk-45FKMOJH.js';
|
|
6
|
+
import '../../chunk-4CMXV5SF.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
8
8
|
import * as TaskManager from 'expo-task-manager';
|
|
9
9
|
import * as BackgroundTask from 'expo-background-task';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunk4KCVS4ZN_cjs = require('../../chunk-4KCVS4ZN.cjs');
|
|
4
|
+
var chunkWCJVKFAP_cjs = require('../../chunk-WCJVKFAP.cjs');
|
|
5
|
+
require('../../chunk-PJR63FTK.cjs');
|
|
6
|
+
require('../../chunk-6YUACVX4.cjs');
|
|
7
|
+
require('../../chunk-EJOFL5WH.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
var base = require('@scure/base');
|
|
10
10
|
|
|
@@ -58,18 +58,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
58
58
|
*/
|
|
59
59
|
static async setup(config) {
|
|
60
60
|
warnOnRemovedBackgroundFields(config.background);
|
|
61
|
-
const wallet = await
|
|
62
|
-
const processors = config.background.processors ?? [
|
|
61
|
+
const wallet = await chunkWCJVKFAP_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunk4KCVS4ZN_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) => chunkWCJVKFAP_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl = config.arkServerUrl ||
|
|
72
|
+
const arkServerUrl = config.arkServerUrl || chunkWCJVKFAP_cjs.extractArkProviderUrl(wallet.arkProvider);
|
|
73
73
|
if (arkServerUrl) {
|
|
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 chunk4KCVS4ZN_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(chunk4KCVS4ZN_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunkWCJVKFAP_cjs.getRandomId(),
|
|
116
|
+
type: chunk4KCVS4ZN_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(chunk4KCVS4ZN_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
124
124
|
for (const task of tasks) {
|
|
125
125
|
await this.taskQueue.removeTask(task.id);
|
|
126
126
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-B5nRs3RH.cjs';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-C7RZCfoY.cjs';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-D2vnpPBT.cjs';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-Bffc5f54.cjs';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-DZdIVa23.js';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-C7RZCfoY.js';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-DuwK9t8O.js';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-AomVWxO_.js';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -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 '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-GQ4NMQGR.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-VBHXBI7F.js';
|
|
3
|
+
import '../../chunk-33Q2RFET.js';
|
|
4
|
+
import '../../chunk-45FKMOJH.js';
|
|
5
|
+
import '../../chunk-4CMXV5SF.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
import { hex } from '@scure/base';
|
|
8
8
|
|
|
@@ -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 chunk4KCVS4ZN_cjs = require('../../chunk-4KCVS4ZN.cjs');
|
|
4
|
+
require('../../chunk-WCJVKFAP.cjs');
|
|
5
|
+
require('../../chunk-PJR63FTK.cjs');
|
|
6
|
+
require('../../chunk-6YUACVX4.cjs');
|
|
7
|
+
require('../../chunk-EJOFL5WH.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
|
|
10
10
|
// src/worker/expo/taskQueue.ts
|
|
@@ -121,19 +121,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
121
121
|
|
|
122
122
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunk4KCVS4ZN_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunk4KCVS4ZN_cjs.contractPollProcessor; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunk4KCVS4ZN_cjs.createTaskDependencies; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "runTasks", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunk4KCVS4ZN_cjs.runTasks; }
|
|
137
137
|
});
|
|
138
138
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
139
139
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../index-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-D2vnpPBT.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-D2vnpPBT.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B2CcXIHU.cjs';
|
|
4
|
+
import '../../index-C7RZCfoY.cjs';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/transaction.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-DuwK9t8O.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-DuwK9t8O.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DaZlVTbM.js';
|
|
4
|
+
import '../../index-C7RZCfoY.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/transaction.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-GQ4NMQGR.js';
|
|
2
|
+
import '../../chunk-VBHXBI7F.js';
|
|
3
|
+
import '../../chunk-33Q2RFET.js';
|
|
4
|
+
import '../../chunk-45FKMOJH.js';
|
|
5
|
+
import '../../chunk-4CMXV5SF.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/worker/expo/taskQueue.ts
|