@arkade-os/sdk 0.5.0-rc.13 → 0.5.0-rc.14
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-BFQX2KS3.cjs → chunk-2TOHNPEP.cjs} +18 -18
- package/dist/{chunk-BFQX2KS3.cjs.map → chunk-2TOHNPEP.cjs.map} +1 -1
- package/dist/{chunk-I4YBVHAK.cjs → chunk-D77GIHME.cjs} +451 -451
- package/dist/{chunk-I4YBVHAK.cjs.map → chunk-D77GIHME.cjs.map} +1 -1
- package/dist/{chunk-EJYWGTZ7.js → chunk-GNZKO2ZU.js} +3 -3
- package/dist/{chunk-EJYWGTZ7.js.map → chunk-GNZKO2ZU.js.map} +1 -1
- package/dist/{chunk-FDQQOF3F.cjs → chunk-IHI3X2J4.cjs} +47 -47
- package/dist/{chunk-FDQQOF3F.cjs.map → chunk-IHI3X2J4.cjs.map} +1 -1
- package/dist/{chunk-JOUPIZ32.js → chunk-JHWAZOS3.js} +3 -3
- package/dist/{chunk-JOUPIZ32.js.map → chunk-JHWAZOS3.js.map} +1 -1
- package/dist/{chunk-7BACS4XK.cjs → chunk-JJEB6VXZ.cjs} +10 -10
- package/dist/{chunk-7BACS4XK.cjs.map → chunk-JJEB6VXZ.cjs.map} +1 -1
- package/dist/{chunk-RDQSVIXD.cjs → chunk-KEQDQ7VL.cjs} +15 -15
- package/dist/{chunk-RDQSVIXD.cjs.map → chunk-KEQDQ7VL.cjs.map} +1 -1
- package/dist/{chunk-3JLYJ5KZ.js → chunk-TXYOPQ3Q.js} +3 -3
- package/dist/{chunk-3JLYJ5KZ.js.map → chunk-TXYOPQ3Q.js.map} +1 -1
- package/dist/{chunk-D7JLTHSZ.js → chunk-UUE5GF7R.js} +4 -4
- package/dist/{chunk-D7JLTHSZ.js.map → chunk-UUE5GF7R.js.map} +1 -1
- package/dist/{chunk-7NK6XFC3.cjs → chunk-UV6VUA43.cjs} +3 -3
- package/dist/{chunk-7NK6XFC3.cjs.map → chunk-UV6VUA43.cjs.map} +1 -1
- package/dist/{chunk-4EU2Q6YT.js → chunk-Y7TRVM6G.js} +4 -4
- package/dist/{chunk-4EU2Q6YT.js.map → chunk-Y7TRVM6G.js.map} +1 -1
- package/dist/{chunk-IV2252XM.js → chunk-ZGEYOUPK.js} +5 -5
- package/dist/{chunk-IV2252XM.js.map → chunk-ZGEYOUPK.js.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/index.cjs +305 -305
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +34 -34
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +32 -32
- 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 +14 -14
- 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
|
-
require('../../chunk-
|
|
3
|
+
var chunkJJEB6VXZ_cjs = require('../../chunk-JJEB6VXZ.cjs');
|
|
4
|
+
var chunkD77GIHME_cjs = require('../../chunk-D77GIHME.cjs');
|
|
5
|
+
require('../../chunk-2TOHNPEP.cjs');
|
|
6
|
+
require('../../chunk-IHI3X2J4.cjs');
|
|
7
|
+
require('../../chunk-UV6VUA43.cjs');
|
|
8
8
|
var base = require('@scure/base');
|
|
9
9
|
|
|
10
10
|
function warnOnRemovedBackgroundFields(bg) {
|
|
@@ -57,18 +57,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
57
57
|
*/
|
|
58
58
|
static async setup(config) {
|
|
59
59
|
warnOnRemovedBackgroundFields(config.background);
|
|
60
|
-
const wallet = await
|
|
61
|
-
const processors = config.background.processors ?? [
|
|
60
|
+
const wallet = await chunkD77GIHME_cjs.Wallet.create(config);
|
|
61
|
+
const processors = config.background.processors ?? [chunkJJEB6VXZ_cjs.contractPollProcessor];
|
|
62
62
|
const deps = {
|
|
63
63
|
walletRepository: wallet.walletRepository,
|
|
64
64
|
contractRepository: wallet.contractRepository,
|
|
65
65
|
indexerProvider: wallet.indexerProvider,
|
|
66
66
|
arkProvider: wallet.arkProvider,
|
|
67
|
-
extendVtxo: (vtxo, contract) =>
|
|
67
|
+
extendVtxo: (vtxo, contract) => chunkD77GIHME_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
68
68
|
};
|
|
69
69
|
const { taskQueue } = config.background;
|
|
70
70
|
if ("persistConfig" in taskQueue) {
|
|
71
|
-
const arkServerUrl =
|
|
71
|
+
const arkServerUrl = chunkD77GIHME_cjs.extractArkProviderUrl(wallet.arkProvider);
|
|
72
72
|
if (typeof arkServerUrl === "string" && arkServerUrl.length > 0) {
|
|
73
73
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
74
74
|
const bgConfig = {
|
|
@@ -99,7 +99,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
99
99
|
}
|
|
100
100
|
async runForegroundPoll() {
|
|
101
101
|
if (this.cleared) return;
|
|
102
|
-
await
|
|
102
|
+
await chunkJJEB6VXZ_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
103
103
|
const results = await this.taskQueue.getResults();
|
|
104
104
|
if (results.length > 0) {
|
|
105
105
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -108,18 +108,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
108
108
|
await this.seedContractPollTask();
|
|
109
109
|
}
|
|
110
110
|
async seedContractPollTask() {
|
|
111
|
-
const existing = await this.taskQueue.getTasks(
|
|
111
|
+
const existing = await this.taskQueue.getTasks(chunkJJEB6VXZ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
112
112
|
if (existing.length > 0) return;
|
|
113
113
|
const task = {
|
|
114
|
-
id:
|
|
115
|
-
type:
|
|
114
|
+
id: chunkD77GIHME_cjs.getRandomId(),
|
|
115
|
+
type: chunkJJEB6VXZ_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
116
116
|
data: {},
|
|
117
117
|
createdAt: Date.now()
|
|
118
118
|
};
|
|
119
119
|
await this.taskQueue.addTask(task);
|
|
120
120
|
}
|
|
121
121
|
async removeContractPollTasks() {
|
|
122
|
-
const tasks = await this.taskQueue.getTasks(
|
|
122
|
+
const tasks = await this.taskQueue.getTasks(chunkJJEB6VXZ_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
123
123
|
for (const task of tasks) {
|
|
124
124
|
await this.taskQueue.removeTask(task.id);
|
|
125
125
|
}
|
|
@@ -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-UUE5GF7R.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-ZGEYOUPK.js';
|
|
3
|
+
import '../../chunk-TXYOPQ3Q.js';
|
|
4
|
+
import '../../chunk-JHWAZOS3.js';
|
|
5
|
+
import '../../chunk-GNZKO2ZU.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 chunkJJEB6VXZ_cjs = require('../../chunk-JJEB6VXZ.cjs');
|
|
4
|
+
require('../../chunk-D77GIHME.cjs');
|
|
5
|
+
require('../../chunk-2TOHNPEP.cjs');
|
|
6
|
+
require('../../chunk-IHI3X2J4.cjs');
|
|
7
|
+
require('../../chunk-UV6VUA43.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 chunkJJEB6VXZ_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 chunkJJEB6VXZ_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkJJEB6VXZ_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkJJEB6VXZ_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-UUE5GF7R.js';
|
|
2
|
+
import '../../chunk-ZGEYOUPK.js';
|
|
3
|
+
import '../../chunk-TXYOPQ3Q.js';
|
|
4
|
+
import '../../chunk-JHWAZOS3.js';
|
|
5
|
+
import '../../chunk-GNZKO2ZU.js';
|
|
6
6
|
|
|
7
7
|
// src/worker/expo/taskQueue.ts
|
|
8
8
|
var InMemoryTaskQueue = class {
|