@arkade-os/sdk 0.5.0-rc.20 → 0.5.0-rc.21
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/{chunk-NR4XYTN3.js → chunk-4FDNOLBO.js} +3 -3
- package/dist/{chunk-NR4XYTN3.js.map → chunk-4FDNOLBO.js.map} +1 -1
- package/dist/{chunk-T6N6B7HK.cjs → chunk-5XBH5SAL.cjs} +3 -3
- package/dist/{chunk-T6N6B7HK.cjs.map → chunk-5XBH5SAL.cjs.map} +1 -1
- package/dist/{chunk-TIVYJIIX.js → chunk-CXHJGED6.js} +3 -3
- package/dist/{chunk-TIVYJIIX.js.map → chunk-CXHJGED6.js.map} +1 -1
- package/dist/{chunk-O2ZZD5Z6.js → chunk-EXFU6MTA.js} +5 -5
- package/dist/{chunk-O2ZZD5Z6.js.map → chunk-EXFU6MTA.js.map} +1 -1
- package/dist/{chunk-5SLUXXWQ.cjs → chunk-GVF4OCTL.cjs} +48 -48
- package/dist/{chunk-5SLUXXWQ.cjs.map → chunk-GVF4OCTL.cjs.map} +1 -1
- package/dist/{chunk-6YVGWOLG.cjs → chunk-HIZNPHB2.cjs} +15 -15
- package/dist/{chunk-6YVGWOLG.cjs.map → chunk-HIZNPHB2.cjs.map} +1 -1
- package/dist/{chunk-AARSVV3S.js → chunk-JZAEFOE4.js} +3 -3
- package/dist/{chunk-AARSVV3S.js.map → chunk-JZAEFOE4.js.map} +1 -1
- package/dist/{chunk-P267BXL7.js → chunk-LNJPVLIC.js} +4 -4
- package/dist/{chunk-P267BXL7.js.map → chunk-LNJPVLIC.js.map} +1 -1
- package/dist/{chunk-P42MGA4K.cjs → chunk-Q7PC3NHX.cjs} +18 -18
- package/dist/{chunk-P42MGA4K.cjs.map → chunk-Q7PC3NHX.cjs.map} +1 -1
- package/dist/{chunk-QARA4IYT.cjs → chunk-R5OFJ23O.cjs} +483 -483
- package/dist/{chunk-QARA4IYT.cjs.map → chunk-R5OFJ23O.cjs.map} +1 -1
- package/dist/{chunk-IM3J3T5P.js → chunk-S2WWOVFC.js} +4 -4
- package/dist/{chunk-IM3J3T5P.js.map → chunk-S2WWOVFC.js.map} +1 -1
- package/dist/{chunk-AFJSJACF.cjs → chunk-VZMLADXQ.cjs} +10 -10
- package/dist/{chunk-AFJSJACF.cjs.map → chunk-VZMLADXQ.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/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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
3
|
+
var chunkVZMLADXQ_cjs = require('../../chunk-VZMLADXQ.cjs');
|
|
4
|
+
var chunkR5OFJ23O_cjs = require('../../chunk-R5OFJ23O.cjs');
|
|
5
|
+
require('../../chunk-Q7PC3NHX.cjs');
|
|
6
|
+
require('../../chunk-GVF4OCTL.cjs');
|
|
7
|
+
var chunk5XBH5SAL_cjs = require('../../chunk-5XBH5SAL.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
|
+
chunk5XBH5SAL_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 chunkR5OFJ23O_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunkVZMLADXQ_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) => chunkR5OFJ23O_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl =
|
|
72
|
+
const arkServerUrl = chunkR5OFJ23O_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 chunkVZMLADXQ_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(chunkVZMLADXQ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunkR5OFJ23O_cjs.getRandomId(),
|
|
116
|
+
type: chunkVZMLADXQ_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(chunkVZMLADXQ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
124
124
|
for (const task of tasks) {
|
|
125
125
|
await this.taskQueue.removeTask(task.id);
|
|
126
126
|
}
|
|
@@ -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-S2WWOVFC.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-EXFU6MTA.js';
|
|
3
|
+
import '../../chunk-JZAEFOE4.js';
|
|
4
|
+
import '../../chunk-CXHJGED6.js';
|
|
5
|
+
import { assertTimerMs } from '../../chunk-4FDNOLBO.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 chunkVZMLADXQ_cjs = require('../../chunk-VZMLADXQ.cjs');
|
|
4
|
+
require('../../chunk-R5OFJ23O.cjs');
|
|
5
|
+
require('../../chunk-Q7PC3NHX.cjs');
|
|
6
|
+
require('../../chunk-GVF4OCTL.cjs');
|
|
7
|
+
require('../../chunk-5XBH5SAL.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 chunkVZMLADXQ_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 chunkVZMLADXQ_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkVZMLADXQ_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkVZMLADXQ_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -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-S2WWOVFC.js';
|
|
2
|
+
import '../../chunk-EXFU6MTA.js';
|
|
3
|
+
import '../../chunk-JZAEFOE4.js';
|
|
4
|
+
import '../../chunk-CXHJGED6.js';
|
|
5
|
+
import '../../chunk-4FDNOLBO.js';
|
|
6
6
|
|
|
7
7
|
// src/worker/expo/taskQueue.ts
|
|
8
8
|
var InMemoryTaskQueue = class {
|