@arkade-os/sdk 0.5.0-rc.21 → 0.5.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-x8ok3tJy.d.cts → asyncStorageTaskQueue-C9Ab5DyR.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-aL7K14e4.d.ts → asyncStorageTaskQueue-CbQryNK9.d.ts} +2 -2
- package/dist/{chunk-R5OFJ23O.cjs → chunk-4X3ZGHWW.cjs} +496 -493
- package/dist/chunk-4X3ZGHWW.cjs.map +1 -0
- package/dist/{chunk-S2WWOVFC.js → chunk-EBUSHD43.js} +4 -4
- package/dist/{chunk-S2WWOVFC.js.map → chunk-EBUSHD43.js.map} +1 -1
- package/dist/{chunk-EXFU6MTA.js → chunk-MN22OMVC.js} +18 -15
- package/dist/chunk-MN22OMVC.js.map +1 -0
- package/dist/{chunk-LNJPVLIC.js → chunk-OACS4QUR.js} +4 -4
- package/dist/{chunk-LNJPVLIC.js.map → chunk-OACS4QUR.js.map} +1 -1
- package/dist/{chunk-5XBH5SAL.cjs → chunk-OJ5W7L6Q.cjs} +3 -3
- package/dist/{chunk-5XBH5SAL.cjs.map → chunk-OJ5W7L6Q.cjs.map} +1 -1
- package/dist/{chunk-GVF4OCTL.cjs → chunk-OSRXKF7B.cjs} +48 -48
- package/dist/{chunk-GVF4OCTL.cjs.map → chunk-OSRXKF7B.cjs.map} +1 -1
- package/dist/{chunk-HIZNPHB2.cjs → chunk-QFT7X26G.cjs} +15 -15
- package/dist/{chunk-HIZNPHB2.cjs.map → chunk-QFT7X26G.cjs.map} +1 -1
- package/dist/{chunk-4FDNOLBO.js → chunk-QUR5ENRP.js} +3 -3
- package/dist/{chunk-4FDNOLBO.js.map → chunk-QUR5ENRP.js.map} +1 -1
- package/dist/{chunk-JZAEFOE4.js → chunk-W27URLQ5.js} +3 -3
- package/dist/{chunk-JZAEFOE4.js.map → chunk-W27URLQ5.js.map} +1 -1
- package/dist/{chunk-VZMLADXQ.cjs → chunk-W4TZBRG3.cjs} +10 -10
- package/dist/{chunk-VZMLADXQ.cjs.map → chunk-W4TZBRG3.cjs.map} +1 -1
- package/dist/{chunk-CXHJGED6.js → chunk-WJKVNBUN.js} +3 -3
- package/dist/{chunk-CXHJGED6.js.map → chunk-WJKVNBUN.js.map} +1 -1
- package/dist/{chunk-Q7PC3NHX.cjs → chunk-XWUJBHYW.cjs} +18 -18
- package/dist/{chunk-Q7PC3NHX.cjs.map → chunk-XWUJBHYW.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/index.cjs +309 -309
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +33 -33
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BeYR6NpQ.d.ts → taskRunner-BDAZSNyd.d.ts} +1 -1
- package/dist/{taskRunner-Csey3EYJ.d.cts → taskRunner-D5ObtxWZ.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +2 -2
- package/dist/wallet/expo/background.d.ts +2 -2
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +15 -15
- package/dist/wallet/expo/index.d.cts +1 -1
- package/dist/wallet/expo/index.d.ts +1 -1
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +3 -3
- package/dist/worker/expo/index.d.ts +3 -3
- 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,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
3
|
+
var chunkW4TZBRG3_cjs = require('../../chunk-W4TZBRG3.cjs');
|
|
4
|
+
var chunk4X3ZGHWW_cjs = require('../../chunk-4X3ZGHWW.cjs');
|
|
5
|
+
require('../../chunk-XWUJBHYW.cjs');
|
|
6
|
+
require('../../chunk-OSRXKF7B.cjs');
|
|
7
|
+
var chunkOJ5W7L6Q_cjs = require('../../chunk-OJ5W7L6Q.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
|
+
chunkOJ5W7L6Q_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 chunk4X3ZGHWW_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunkW4TZBRG3_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) => chunk4X3ZGHWW_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl =
|
|
72
|
+
const arkServerUrl = chunk4X3ZGHWW_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 chunkW4TZBRG3_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(chunkW4TZBRG3_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunk4X3ZGHWW_cjs.getRandomId(),
|
|
116
|
+
type: chunkW4TZBRG3_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(chunkW4TZBRG3_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
124
124
|
for (const task of tasks) {
|
|
125
125
|
await this.taskQueue.removeTask(task.id);
|
|
126
126
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-DG3Qmbmt.cjs';
|
|
2
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-CK5QbTmZ.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-D5ObtxWZ.cjs';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '../../delegate-u6kXTtWY.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../wallet-DzSLMxBZ.js';
|
|
2
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-CK5QbTmZ.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-BDAZSNyd.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '../../delegate-BT5iON1T.js';
|
|
@@ -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-EBUSHD43.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-MN22OMVC.js';
|
|
3
|
+
import '../../chunk-W27URLQ5.js';
|
|
4
|
+
import '../../chunk-WJKVNBUN.js';
|
|
5
|
+
import { assertTimerMs } from '../../chunk-QUR5ENRP.js';
|
|
6
6
|
import { hex } from '@scure/base';
|
|
7
7
|
|
|
8
8
|
function warnOnRemovedBackgroundFields(bg) {
|
|
@@ -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 chunkW4TZBRG3_cjs = require('../../chunk-W4TZBRG3.cjs');
|
|
4
|
+
require('../../chunk-4X3ZGHWW.cjs');
|
|
5
|
+
require('../../chunk-XWUJBHYW.cjs');
|
|
6
|
+
require('../../chunk-OSRXKF7B.cjs');
|
|
7
|
+
require('../../chunk-OJ5W7L6Q.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 chunkW4TZBRG3_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 chunkW4TZBRG3_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkW4TZBRG3_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkW4TZBRG3_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-D5ObtxWZ.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-D5ObtxWZ.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C9Ab5DyR.cjs';
|
|
4
4
|
import '../../index-CK5QbTmZ.cjs';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-BDAZSNyd.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-BDAZSNyd.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CbQryNK9.js';
|
|
4
4
|
import '../../index-CK5QbTmZ.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-EBUSHD43.js';
|
|
2
|
+
import '../../chunk-MN22OMVC.js';
|
|
3
|
+
import '../../chunk-W27URLQ5.js';
|
|
4
|
+
import '../../chunk-WJKVNBUN.js';
|
|
5
|
+
import '../../chunk-QUR5ENRP.js';
|
|
6
6
|
|
|
7
7
|
// src/worker/expo/taskQueue.ts
|
|
8
8
|
var InMemoryTaskQueue = class {
|