@arkade-os/sdk 0.4.31 → 0.4.32
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/indexedDB.cjs +2 -2
- package/dist/adapters/indexedDB.js +1 -1
- package/dist/{chunk-RN2OFLC3.cjs → chunk-I2UIKZM5.cjs} +7 -7
- package/dist/{chunk-RN2OFLC3.cjs.map → chunk-I2UIKZM5.cjs.map} +1 -1
- package/dist/{chunk-GPZH5QNA.cjs → chunk-KQK4PP6L.cjs} +41 -17
- package/dist/chunk-KQK4PP6L.cjs.map +1 -0
- package/dist/{chunk-AXGVYRAL.js → chunk-SHEBNWOQ.js} +3 -3
- package/dist/{chunk-AXGVYRAL.js.map → chunk-SHEBNWOQ.js.map} +1 -1
- package/dist/{chunk-HJM6JPG4.js → chunk-XROGFOPX.js} +41 -17
- package/dist/chunk-XROGFOPX.js.map +1 -0
- package/dist/index.cjs +86 -86
- package/dist/index.js +1 -1
- package/dist/repositories/realm/index.cjs +10 -10
- package/dist/repositories/realm/index.js +1 -1
- package/dist/repositories/sqlite/index.cjs +10 -10
- package/dist/repositories/sqlite/index.js +1 -1
- package/dist/wallet/expo/background.cjs +8 -8
- package/dist/wallet/expo/background.js +2 -2
- package/dist/wallet/expo/index.cjs +9 -9
- package/dist/wallet/expo/index.js +2 -2
- package/dist/worker/expo/index.cjs +6 -6
- package/dist/worker/expo/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-GPZH5QNA.cjs.map +0 -1
- package/dist/chunk-HJM6JPG4.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkI2UIKZM5_cjs = require('../../chunk-I2UIKZM5.cjs');
|
|
4
4
|
var chunkGIGILVVP_cjs = require('../../chunk-GIGILVVP.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkKQK4PP6L_cjs = require('../../chunk-KQK4PP6L.cjs');
|
|
6
6
|
require('../../chunk-6FLL2Q36.cjs');
|
|
7
7
|
require('../../chunk-IEO3XDKI.cjs');
|
|
8
8
|
require('../../chunk-WMIPYZSB.cjs');
|
|
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
36
36
|
taskQueue,
|
|
37
37
|
walletRepository,
|
|
38
38
|
contractRepository,
|
|
39
|
-
processors = [
|
|
39
|
+
processors = [chunkI2UIKZM5_cjs.contractPollProcessor]
|
|
40
40
|
} = options;
|
|
41
41
|
TaskManager__namespace.defineTask(taskName, async () => {
|
|
42
42
|
try {
|
|
@@ -46,22 +46,22 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
46
46
|
}
|
|
47
47
|
const indexerProvider = new chunkGIGILVVP_cjs.ExpoIndexerProvider(config.arkServerUrl);
|
|
48
48
|
const arkProvider = new chunkGIGILVVP_cjs.ExpoArkProvider(config.arkServerUrl);
|
|
49
|
-
const deps =
|
|
49
|
+
const deps = chunkI2UIKZM5_cjs.createTaskDependencies({
|
|
50
50
|
walletRepository,
|
|
51
51
|
contractRepository,
|
|
52
52
|
indexerProvider,
|
|
53
53
|
arkProvider
|
|
54
54
|
});
|
|
55
|
-
await
|
|
55
|
+
await chunkI2UIKZM5_cjs.runTasks(taskQueue, processors, deps);
|
|
56
56
|
const results = await taskQueue.getResults();
|
|
57
57
|
if (results.length > 0) {
|
|
58
58
|
await taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
59
59
|
}
|
|
60
|
-
const existing = await taskQueue.getTasks(
|
|
60
|
+
const existing = await taskQueue.getTasks(chunkI2UIKZM5_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
61
61
|
if (existing.length === 0) {
|
|
62
62
|
const task = {
|
|
63
|
-
id:
|
|
64
|
-
type:
|
|
63
|
+
id: chunkKQK4PP6L_cjs.getRandomId(),
|
|
64
|
+
type: chunkI2UIKZM5_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
65
65
|
data: {},
|
|
66
66
|
createdAt: Date.now()
|
|
67
67
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-SHEBNWOQ.js';
|
|
2
2
|
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-ABWRLTX5.js';
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
3
|
+
import { getRandomId } from '../../chunk-XROGFOPX.js';
|
|
4
4
|
import '../../chunk-6NWNOLL3.js';
|
|
5
5
|
import '../../chunk-YA4G7RFB.js';
|
|
6
6
|
import '../../chunk-TU3LVAPX.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkI2UIKZM5_cjs = require('../../chunk-I2UIKZM5.cjs');
|
|
4
|
+
var chunkKQK4PP6L_cjs = require('../../chunk-KQK4PP6L.cjs');
|
|
5
5
|
var chunk6FLL2Q36_cjs = require('../../chunk-6FLL2Q36.cjs');
|
|
6
6
|
var chunkIEO3XDKI_cjs = require('../../chunk-IEO3XDKI.cjs');
|
|
7
7
|
require('../../chunk-WMIPYZSB.cjs');
|
|
@@ -52,14 +52,14 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
52
52
|
*/
|
|
53
53
|
static async setup(config) {
|
|
54
54
|
warnOnRemovedBackgroundFields(config.background);
|
|
55
|
-
const wallet = await
|
|
56
|
-
const processors = config.background.processors ?? [
|
|
55
|
+
const wallet = await chunkKQK4PP6L_cjs.Wallet.create(config);
|
|
56
|
+
const processors = config.background.processors ?? [chunkI2UIKZM5_cjs.contractPollProcessor];
|
|
57
57
|
const deps = {
|
|
58
58
|
walletRepository: wallet.walletRepository,
|
|
59
59
|
contractRepository: wallet.contractRepository,
|
|
60
60
|
indexerProvider: wallet.indexerProvider,
|
|
61
61
|
arkProvider: wallet.arkProvider,
|
|
62
|
-
extendVtxo: (vtxo, contract) =>
|
|
62
|
+
extendVtxo: (vtxo, contract) => chunkKQK4PP6L_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
63
63
|
};
|
|
64
64
|
const { taskQueue } = config.background;
|
|
65
65
|
if ("persistConfig" in taskQueue) {
|
|
@@ -93,7 +93,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
93
93
|
}, intervalMs);
|
|
94
94
|
}
|
|
95
95
|
async runForegroundPoll() {
|
|
96
|
-
await
|
|
96
|
+
await chunkI2UIKZM5_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
97
97
|
const results = await this.taskQueue.getResults();
|
|
98
98
|
if (results.length > 0) {
|
|
99
99
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -101,11 +101,11 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
101
101
|
await this.seedContractPollTask();
|
|
102
102
|
}
|
|
103
103
|
async seedContractPollTask() {
|
|
104
|
-
const existing = await this.taskQueue.getTasks(
|
|
104
|
+
const existing = await this.taskQueue.getTasks(chunkI2UIKZM5_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
105
105
|
if (existing.length > 0) return;
|
|
106
106
|
const task = {
|
|
107
|
-
id:
|
|
108
|
-
type:
|
|
107
|
+
id: chunkKQK4PP6L_cjs.getRandomId(),
|
|
108
|
+
type: chunkI2UIKZM5_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
109
109
|
data: {},
|
|
110
110
|
createdAt: Date.now()
|
|
111
111
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-SHEBNWOQ.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-XROGFOPX.js';
|
|
3
3
|
import { RestArkProvider } from '../../chunk-6NWNOLL3.js';
|
|
4
4
|
import { DefaultVtxo } from '../../chunk-YA4G7RFB.js';
|
|
5
5
|
import '../../chunk-TU3LVAPX.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkI2UIKZM5_cjs = require('../../chunk-I2UIKZM5.cjs');
|
|
4
|
+
require('../../chunk-KQK4PP6L.cjs');
|
|
5
5
|
require('../../chunk-6FLL2Q36.cjs');
|
|
6
6
|
require('../../chunk-IEO3XDKI.cjs');
|
|
7
7
|
require('../../chunk-WMIPYZSB.cjs');
|
|
@@ -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 chunkI2UIKZM5_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 chunkI2UIKZM5_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkI2UIKZM5_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkI2UIKZM5_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,5 +1,5 @@
|
|
|
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-SHEBNWOQ.js';
|
|
2
|
+
import '../../chunk-XROGFOPX.js';
|
|
3
3
|
import '../../chunk-6NWNOLL3.js';
|
|
4
4
|
import '../../chunk-YA4G7RFB.js';
|
|
5
5
|
import '../../chunk-TU3LVAPX.js';
|