@arkade-os/sdk 0.5.10 → 0.5.11
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 +6 -6
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-BSUY0Lz8.d.cts → asyncStorageTaskQueue-B6rFkXzW.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-CXKwLEgC.d.ts → asyncStorageTaskQueue-C0irgPwJ.d.ts} +2 -2
- package/dist/{chunk-UWPYUDO4.cjs → chunk-5HCDXBBG.cjs} +3 -3
- package/dist/{chunk-UWPYUDO4.cjs.map → chunk-5HCDXBBG.cjs.map} +1 -1
- package/dist/{chunk-6GEVB7AN.cjs → chunk-DMYHAUTA.cjs} +438 -438
- package/dist/{chunk-6GEVB7AN.cjs.map → chunk-DMYHAUTA.cjs.map} +1 -1
- package/dist/{chunk-SJBQW6P4.cjs → chunk-GEK6QBSY.cjs} +18 -18
- package/dist/{chunk-SJBQW6P4.cjs.map → chunk-GEK6QBSY.cjs.map} +1 -1
- package/dist/{chunk-QEREPVKU.js → chunk-HRFWODLP.js} +3 -3
- package/dist/{chunk-QEREPVKU.js.map → chunk-HRFWODLP.js.map} +1 -1
- package/dist/{chunk-4MC7NHQT.js → chunk-KRKREYKT.js} +3 -3
- package/dist/{chunk-4MC7NHQT.js.map → chunk-KRKREYKT.js.map} +1 -1
- package/dist/{chunk-ZTZH4KEF.js → chunk-LKVVWCIW.js} +4 -4
- package/dist/{chunk-ZTZH4KEF.js.map → chunk-LKVVWCIW.js.map} +1 -1
- package/dist/{chunk-XWKQEAZE.cjs → chunk-NC6TEEHZ.cjs} +11 -11
- package/dist/{chunk-XWKQEAZE.cjs.map → chunk-NC6TEEHZ.cjs.map} +1 -1
- package/dist/{chunk-MPE7FTKE.js → chunk-SS5BPVQL.js} +3 -3
- package/dist/{chunk-MPE7FTKE.js.map → chunk-SS5BPVQL.js.map} +1 -1
- package/dist/{chunk-FMX2FMYH.js → chunk-VJQMUKPZ.js} +4 -4
- package/dist/{chunk-FMX2FMYH.js.map → chunk-VJQMUKPZ.js.map} +1 -1
- package/dist/{chunk-KOXW2WGD.cjs → chunk-VLO3JAP3.cjs} +8 -8
- package/dist/{chunk-KOXW2WGD.cjs.map → chunk-VLO3JAP3.cjs.map} +1 -1
- package/dist/{chunk-4HCV67LR.js → chunk-W2C3KDQA.js} +5 -5
- package/dist/{chunk-4HCV67LR.js.map → chunk-W2C3KDQA.js.map} +1 -1
- package/dist/{chunk-UU6GNWEC.cjs → chunk-WZ2UHHQ7.cjs} +17 -17
- package/dist/{chunk-UU6GNWEC.cjs.map → chunk-WZ2UHHQ7.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/index.cjs +321 -321
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +37 -37
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +35 -35
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-C1maPp-c.d.ts → taskRunner-BYxEgwM5.d.ts} +1 -1
- package/dist/{taskRunner-1wolHThW.d.cts → taskRunner-Z3LnHfgs.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as WalletRepository, C as ContractRepository } from '../../index-Bq349_ly.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B6rFkXzW.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-Z3LnHfgs.cjs';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as WalletRepository, C as ContractRepository } from '../../index-Mn2POBPj.js';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C0irgPwJ.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-BYxEgwM5.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ExpoIndexerProvider, ExpoOperatorProvider } from '../../chunk-
|
|
2
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
1
|
+
import { ExpoIndexerProvider, ExpoOperatorProvider } from '../../chunk-VJQMUKPZ.js';
|
|
2
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-LKVVWCIW.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-W2C3KDQA.js';
|
|
4
4
|
import '../../chunk-PXEFYEKL.js';
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-KRKREYKT.js';
|
|
6
|
+
import '../../chunk-HRFWODLP.js';
|
|
7
7
|
import '../../chunk-4DUTRRXF.js';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-SS5BPVQL.js';
|
|
9
9
|
import '../../chunk-DPFD5KBK.js';
|
|
10
10
|
import * as TaskManager from 'expo-task-manager';
|
|
11
11
|
import * as BackgroundTask from 'expo-background-task';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkNC6TEEHZ_cjs = require('../../chunk-NC6TEEHZ.cjs');
|
|
4
|
+
var chunkDMYHAUTA_cjs = require('../../chunk-DMYHAUTA.cjs');
|
|
5
5
|
require('../../chunk-OMZZQTDM.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
6
|
+
require('../../chunk-GEK6QBSY.cjs');
|
|
7
|
+
require('../../chunk-VLO3JAP3.cjs');
|
|
8
8
|
require('../../chunk-UPIQZRNJ.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunk5HCDXBBG_cjs = require('../../chunk-5HCDXBBG.cjs');
|
|
10
10
|
require('../../chunk-WIZCF5IX.cjs');
|
|
11
11
|
var base = require('@scure/base');
|
|
12
12
|
|
|
@@ -59,20 +59,20 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
59
59
|
* by the consumer.
|
|
60
60
|
*/
|
|
61
61
|
static async setup(config) {
|
|
62
|
-
|
|
62
|
+
chunk5HCDXBBG_cjs.assertTimerMs("foregroundIntervalMs", config.background.foregroundIntervalMs);
|
|
63
63
|
warnOnRemovedBackgroundFields(config.background);
|
|
64
|
-
const wallet = await
|
|
65
|
-
const processors = config.background.processors ?? [
|
|
64
|
+
const wallet = await chunkDMYHAUTA_cjs.Wallet.create(config);
|
|
65
|
+
const processors = config.background.processors ?? [chunkNC6TEEHZ_cjs.contractPollProcessor];
|
|
66
66
|
const deps = {
|
|
67
67
|
walletRepository: wallet.walletRepository,
|
|
68
68
|
contractRepository: wallet.contractRepository,
|
|
69
69
|
indexerProvider: wallet.indexerProvider,
|
|
70
70
|
arkProvider: wallet.arkProvider,
|
|
71
|
-
extendVtxo: (vtxo, contract) =>
|
|
71
|
+
extendVtxo: (vtxo, contract) => chunkDMYHAUTA_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
72
72
|
};
|
|
73
73
|
const { taskQueue } = config.background;
|
|
74
74
|
if ("persistConfig" in taskQueue) {
|
|
75
|
-
const arkServerUrl =
|
|
75
|
+
const arkServerUrl = chunkDMYHAUTA_cjs.extractOperatorProviderUrl(wallet.arkProvider);
|
|
76
76
|
if (typeof arkServerUrl === "string" && arkServerUrl.length > 0) {
|
|
77
77
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
78
78
|
const bgConfig = {
|
|
@@ -103,7 +103,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
103
103
|
}
|
|
104
104
|
async runForegroundPoll() {
|
|
105
105
|
if (this.cleared) return;
|
|
106
|
-
await
|
|
106
|
+
await chunkNC6TEEHZ_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
107
107
|
const results = await this.taskQueue.getResults();
|
|
108
108
|
if (results.length > 0) {
|
|
109
109
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -112,18 +112,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
112
112
|
await this.seedContractPollTask();
|
|
113
113
|
}
|
|
114
114
|
async seedContractPollTask() {
|
|
115
|
-
const existing = await this.taskQueue.getTasks(
|
|
115
|
+
const existing = await this.taskQueue.getTasks(chunkNC6TEEHZ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
116
116
|
if (existing.length > 0) return;
|
|
117
117
|
const task = {
|
|
118
|
-
id:
|
|
119
|
-
type:
|
|
118
|
+
id: chunkDMYHAUTA_cjs.getRandomId(),
|
|
119
|
+
type: chunkNC6TEEHZ_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
120
120
|
data: {},
|
|
121
121
|
createdAt: Date.now()
|
|
122
122
|
};
|
|
123
123
|
await this.taskQueue.addTask(task);
|
|
124
124
|
}
|
|
125
125
|
async removeContractPollTasks() {
|
|
126
|
-
const tasks = await this.taskQueue.getTasks(
|
|
126
|
+
const tasks = await this.taskQueue.getTasks(chunkNC6TEEHZ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
127
127
|
for (const task of tasks) {
|
|
128
128
|
await this.taskQueue.removeTask(task.id);
|
|
129
129
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { I as IWallet, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, b as Identity, c as Wallet, d as WalletConfig, G as GetOperatorInfoOptions, O as OperatorInfo, e as ArkadeReader, f as ArkadeBroadcaster, g as WalletBalance, h as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, i as GetSpendableVtxosFilter, E as ExtendedCoin, j as ArkTransaction, k as ActivityRegistry, l as Activity, m as IContractManager, n as GetNewAddressesOptions, o as NewAddress, P as ProviderConnectionState, p as IDelegateManager, S as SettleParams, q as SettlementEvent, r as SendParams, R as Recipient, s as SendOnchainParams, t as IAssetManager } from '../../index-Bq349_ly.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-Z3LnHfgs.cjs';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '../../base-C-Y5t_0F.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { I as IWallet, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, b as Identity, c as Wallet, d as WalletConfig, G as GetOperatorInfoOptions, O as OperatorInfo, e as ArkadeReader, f as ArkadeBroadcaster, g as WalletBalance, h as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, i as GetSpendableVtxosFilter, E as ExtendedCoin, j as ArkTransaction, k as ActivityRegistry, l as Activity, m as IContractManager, n as GetNewAddressesOptions, o as NewAddress, P as ProviderConnectionState, p as IDelegateManager, S as SettleParams, q as SettlementEvent, r as SendParams, R as Recipient, s as SendOnchainParams, t as IAssetManager } from '../../index-Mn2POBPj.js';
|
|
3
|
-
import {
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-BYxEgwM5.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '../../base-C-Y5t_0F.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, extractOperatorProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-LKVVWCIW.js';
|
|
2
|
+
import { Wallet, extractOperatorProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-W2C3KDQA.js';
|
|
3
3
|
import '../../chunk-PXEFYEKL.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-KRKREYKT.js';
|
|
5
|
+
import '../../chunk-HRFWODLP.js';
|
|
6
6
|
import '../../chunk-4DUTRRXF.js';
|
|
7
|
-
import { assertTimerMs } from '../../chunk-
|
|
7
|
+
import { assertTimerMs } from '../../chunk-SS5BPVQL.js';
|
|
8
8
|
import '../../chunk-DPFD5KBK.js';
|
|
9
9
|
import { hex } from '@scure/base';
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkNC6TEEHZ_cjs = require('../../chunk-NC6TEEHZ.cjs');
|
|
4
|
+
require('../../chunk-DMYHAUTA.cjs');
|
|
5
5
|
require('../../chunk-OMZZQTDM.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
6
|
+
require('../../chunk-GEK6QBSY.cjs');
|
|
7
|
+
require('../../chunk-VLO3JAP3.cjs');
|
|
8
8
|
require('../../chunk-UPIQZRNJ.cjs');
|
|
9
|
-
require('../../chunk-
|
|
9
|
+
require('../../chunk-5HCDXBBG.cjs');
|
|
10
10
|
require('../../chunk-WIZCF5IX.cjs');
|
|
11
11
|
|
|
12
12
|
// src/worker/expo/taskQueue.ts
|
|
@@ -123,19 +123,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
123
123
|
|
|
124
124
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkNC6TEEHZ_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkNC6TEEHZ_cjs.contractPollProcessor; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkNC6TEEHZ_cjs.createTaskDependencies; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "runTasks", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkNC6TEEHZ_cjs.runTasks; }
|
|
139
139
|
});
|
|
140
140
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
141
141
|
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-Z3LnHfgs.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-Z3LnHfgs.cjs';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B6rFkXzW.cjs';
|
|
4
4
|
import '../../index-Bq349_ly.cjs';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer';
|
|
@@ -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-BYxEgwM5.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-BYxEgwM5.js';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C0irgPwJ.js';
|
|
4
4
|
import '../../index-Mn2POBPj.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-LKVVWCIW.js';
|
|
2
|
+
import '../../chunk-W2C3KDQA.js';
|
|
3
3
|
import '../../chunk-PXEFYEKL.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-KRKREYKT.js';
|
|
5
|
+
import '../../chunk-HRFWODLP.js';
|
|
6
6
|
import '../../chunk-4DUTRRXF.js';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-SS5BPVQL.js';
|
|
8
8
|
import '../../chunk-DPFD5KBK.js';
|
|
9
9
|
|
|
10
10
|
// src/worker/expo/taskQueue.ts
|