@arkade-os/sdk 0.5.9 → 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/{chunk-DY24A73N.cjs → chunk-5HCDXBBG.cjs} +3 -3
- package/dist/chunk-5HCDXBBG.cjs.map +1 -0
- package/dist/{chunk-V2EU5QWF.cjs → chunk-DMYHAUTA.cjs} +438 -438
- package/dist/{chunk-V2EU5QWF.cjs.map → chunk-DMYHAUTA.cjs.map} +1 -1
- package/dist/{chunk-ODLSVJRU.cjs → chunk-GEK6QBSY.cjs} +18 -18
- package/dist/{chunk-ODLSVJRU.cjs.map → chunk-GEK6QBSY.cjs.map} +1 -1
- package/dist/{chunk-Z6WDOZZI.js → chunk-HRFWODLP.js} +3 -3
- package/dist/{chunk-Z6WDOZZI.js.map → chunk-HRFWODLP.js.map} +1 -1
- package/dist/{chunk-3KNSMZWD.js → chunk-KRKREYKT.js} +3 -3
- package/dist/{chunk-3KNSMZWD.js.map → chunk-KRKREYKT.js.map} +1 -1
- package/dist/{chunk-GUK33TNC.js → chunk-LKVVWCIW.js} +4 -4
- package/dist/{chunk-GUK33TNC.js.map → chunk-LKVVWCIW.js.map} +1 -1
- package/dist/{chunk-UPV4W423.cjs → chunk-NC6TEEHZ.cjs} +11 -11
- package/dist/{chunk-UPV4W423.cjs.map → chunk-NC6TEEHZ.cjs.map} +1 -1
- package/dist/{chunk-FUCKDTH7.js → chunk-SS5BPVQL.js} +3 -3
- package/dist/chunk-SS5BPVQL.js.map +1 -0
- package/dist/{chunk-2657D67V.js → chunk-VJQMUKPZ.js} +4 -4
- package/dist/{chunk-2657D67V.js.map → chunk-VJQMUKPZ.js.map} +1 -1
- package/dist/{chunk-4PSM6ZUC.cjs → chunk-VLO3JAP3.cjs} +8 -8
- package/dist/{chunk-4PSM6ZUC.cjs.map → chunk-VLO3JAP3.cjs.map} +1 -1
- package/dist/{chunk-HT35HPXR.js → chunk-W2C3KDQA.js} +5 -5
- package/dist/{chunk-HT35HPXR.js.map → chunk-W2C3KDQA.js.map} +1 -1
- package/dist/{chunk-WZJJZGBT.cjs → chunk-WZ2UHHQ7.cjs} +17 -17
- package/dist/{chunk-WZJJZGBT.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/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +15 -15
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-DY24A73N.cjs.map +0 -1
- package/dist/chunk-FUCKDTH7.js.map +0 -1
|
@@ -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,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,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
|