@arkade-os/sdk 0.4.43 → 0.4.44
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/README.md +65 -0
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{asyncStorageTaskQueue-CjoL-35w.d.ts → asyncStorageTaskQueue-BtSOVZFn.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-D1FfHfgK.d.cts → asyncStorageTaskQueue-Dap7qUlF.d.cts} +2 -2
- package/dist/{chunk-B4R36PRN.js → chunk-FMI2GKYO.js} +1088 -181
- package/dist/chunk-FMI2GKYO.js.map +1 -0
- package/dist/{chunk-US274KZO.js → chunk-LCQQPOIT.js} +3 -3
- package/dist/{chunk-US274KZO.js.map → chunk-LCQQPOIT.js.map} +1 -1
- package/dist/{chunk-763XHDAJ.js → chunk-LJ35HPJW.js} +3 -3
- package/dist/{chunk-763XHDAJ.js.map → chunk-LJ35HPJW.js.map} +1 -1
- package/dist/{chunk-JIWCE2IK.cjs → chunk-RJ6XVCX4.cjs} +7 -7
- package/dist/{chunk-JIWCE2IK.cjs.map → chunk-RJ6XVCX4.cjs.map} +1 -1
- package/dist/{chunk-3AQNLQPM.cjs → chunk-UBYY2TPK.cjs} +3 -3
- package/dist/{chunk-3AQNLQPM.cjs.map → chunk-UBYY2TPK.cjs.map} +1 -1
- package/dist/{chunk-VKKLOT2E.js → chunk-V7WIZR2B.js} +3 -3
- package/dist/{chunk-VKKLOT2E.js.map → chunk-V7WIZR2B.js.map} +1 -1
- package/dist/{chunk-PLJZRIFZ.cjs → chunk-X37EKDIH.cjs} +11 -11
- package/dist/{chunk-PLJZRIFZ.cjs.map → chunk-X37EKDIH.cjs.map} +1 -1
- package/dist/{chunk-QGNTDGMN.cjs → chunk-XIVCG6EP.cjs} +1163 -253
- package/dist/chunk-XIVCG6EP.cjs.map +1 -0
- package/dist/index.cjs +138 -126
- package/dist/index.d.cts +232 -1
- package/dist/index.d.ts +232 -1
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +17 -17
- package/dist/repositories/realm/index.js +3 -3
- package/dist/repositories/sqlite/index.cjs +16 -16
- package/dist/repositories/sqlite/index.js +3 -3
- package/dist/{taskRunner-Djlhfgi1.d.ts → taskRunner-Bptw9UMa.d.ts} +1 -1
- package/dist/{taskRunner-BSnslNmq.d.cts → taskRunner-CeFxKhSH.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +2 -2
- package/dist/wallet/expo/background.d.ts +2 -2
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +12 -12
- package/dist/wallet/expo/index.d.cts +1 -1
- package/dist/wallet/expo/index.d.ts +1 -1
- package/dist/wallet/expo/index.js +3 -3
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +3 -3
- package/dist/worker/expo/index.d.ts +3 -3
- package/dist/worker/expo/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-B4R36PRN.js.map +0 -1
- package/dist/chunk-QGNTDGMN.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-FMI2GKYO.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-FMI2GKYO.js';
|
|
3
|
+
import '../../chunk-LJ35HPJW.js';
|
|
4
4
|
import '../../chunk-YNEDJTX2.js';
|
|
5
5
|
import '../../chunk-BE5MUB7T.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkXIVCG6EP_cjs = require('../../chunk-XIVCG6EP.cjs');
|
|
4
|
+
require('../../chunk-UBYY2TPK.cjs');
|
|
5
5
|
require('../../chunk-32YKLQPS.cjs');
|
|
6
6
|
require('../../chunk-HXDZ2QTW.cjs');
|
|
7
7
|
require('../../chunk-5BLDMQED.cjs');
|
|
@@ -153,7 +153,7 @@ var SQLiteWalletRepository = class {
|
|
|
153
153
|
for (const row of nullRows) {
|
|
154
154
|
await this.db.run(
|
|
155
155
|
`UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
|
|
156
|
-
[
|
|
156
|
+
[chunkXIVCG6EP_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
const tempName = `${this.tables.vtxos}__migrate_tmp`;
|
|
@@ -224,7 +224,7 @@ var SQLiteWalletRepository = class {
|
|
|
224
224
|
async saveVtxos(address, vtxos) {
|
|
225
225
|
await this.ensureInit();
|
|
226
226
|
for (const vtxo of vtxos) {
|
|
227
|
-
const s =
|
|
227
|
+
const s = chunkXIVCG6EP_cjs.serializeVtxo(vtxo);
|
|
228
228
|
await this.db.run(
|
|
229
229
|
`INSERT OR REPLACE INTO ${this.tables.vtxos}
|
|
230
230
|
(txid, vout, value, address,
|
|
@@ -279,7 +279,7 @@ var SQLiteWalletRepository = class {
|
|
|
279
279
|
throw new Error("SQLiteWalletRepository requires an address");
|
|
280
280
|
}
|
|
281
281
|
for (const vtxo of vtxos) {
|
|
282
|
-
if (!
|
|
282
|
+
if (!chunkXIVCG6EP_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
283
283
|
throw new Error(
|
|
284
284
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
285
285
|
);
|
|
@@ -303,7 +303,7 @@ var SQLiteWalletRepository = class {
|
|
|
303
303
|
async saveUtxos(address, utxos) {
|
|
304
304
|
await this.ensureInit();
|
|
305
305
|
for (const utxo of utxos) {
|
|
306
|
-
const s =
|
|
306
|
+
const s = chunkXIVCG6EP_cjs.serializeUtxo(utxo);
|
|
307
307
|
await this.db.run(
|
|
308
308
|
`INSERT OR REPLACE INTO ${this.tables.utxos}
|
|
309
309
|
(txid, vout, value, address,
|
|
@@ -359,7 +359,7 @@ var SQLiteWalletRepository = class {
|
|
|
359
359
|
tx.amount,
|
|
360
360
|
tx.settled ? 1 : 0,
|
|
361
361
|
tx.createdAt,
|
|
362
|
-
tx.assets ? JSON.stringify(
|
|
362
|
+
tx.assets ? JSON.stringify(chunkXIVCG6EP_cjs.serializeAssets(tx.assets)) : null
|
|
363
363
|
]
|
|
364
364
|
);
|
|
365
365
|
}
|
|
@@ -433,9 +433,9 @@ function vtxoRowToDomain(row) {
|
|
|
433
433
|
// Post-migration every row has `script`, but the backfill is
|
|
434
434
|
// idempotent: derive from `address` if the legacy column is still
|
|
435
435
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
436
|
-
script: row.script ??
|
|
436
|
+
script: row.script ?? chunkXIVCG6EP_cjs.scriptFromArkAddress(row.address)
|
|
437
437
|
};
|
|
438
|
-
return
|
|
438
|
+
return chunkXIVCG6EP_cjs.deserializeVtxo(serialized);
|
|
439
439
|
}
|
|
440
440
|
function utxoRowToDomain(row) {
|
|
441
441
|
const serialized = {
|
|
@@ -454,7 +454,7 @@ function utxoRowToDomain(row) {
|
|
|
454
454
|
status: JSON.parse(row.status_json),
|
|
455
455
|
extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
|
|
456
456
|
};
|
|
457
|
-
return
|
|
457
|
+
return chunkXIVCG6EP_cjs.deserializeUtxo(serialized);
|
|
458
458
|
}
|
|
459
459
|
function txRowToDomain(row) {
|
|
460
460
|
const tx = {
|
|
@@ -469,7 +469,7 @@ function txRowToDomain(row) {
|
|
|
469
469
|
createdAt: row.created_at
|
|
470
470
|
};
|
|
471
471
|
if (row.assets_json) {
|
|
472
|
-
tx.assets =
|
|
472
|
+
tx.assets = chunkXIVCG6EP_cjs.deserializeAssets(JSON.parse(row.assets_json));
|
|
473
473
|
}
|
|
474
474
|
return tx;
|
|
475
475
|
}
|
|
@@ -715,8 +715,8 @@ var SQLiteIntentRepository = class {
|
|
|
715
715
|
`SELECT * FROM ${this.t} ORDER BY created_at ASC, intent_tx_id ASC`
|
|
716
716
|
);
|
|
717
717
|
let out = rows.map(rowToIntent);
|
|
718
|
-
if (filter) out = out.filter((i) =>
|
|
719
|
-
const { skip, end } =
|
|
718
|
+
if (filter) out = out.filter((i) => chunkXIVCG6EP_cjs.intentMatchesFilter(i, filter));
|
|
719
|
+
const { skip, end } = chunkXIVCG6EP_cjs.intentPageBounds(filter, out.length);
|
|
720
720
|
return out.slice(skip, end);
|
|
721
721
|
}
|
|
722
722
|
async getLockedVtxoOutpoints() {
|
|
@@ -724,7 +724,7 @@ var SQLiteIntentRepository = class {
|
|
|
724
724
|
const rows = await this.db.all(`SELECT * FROM ${this.t}`);
|
|
725
725
|
const out = [];
|
|
726
726
|
for (const r of rows) {
|
|
727
|
-
if (
|
|
727
|
+
if (chunkXIVCG6EP_cjs.isTerminalIntentState(r.state)) continue;
|
|
728
728
|
for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
|
|
729
729
|
}
|
|
730
730
|
return out;
|
|
@@ -818,7 +818,7 @@ var SQLiteVirtualTxRepository = class {
|
|
|
818
818
|
const prev = prevByTxid.get(t.txid);
|
|
819
819
|
const psbt = t.psbt ?? prev?.psbt ?? null;
|
|
820
820
|
const expires = t.expiresAt ?? prev?.expires_at ?? null;
|
|
821
|
-
const type =
|
|
821
|
+
const type = chunkXIVCG6EP_cjs.mergeChainedTxType(t.type, prev?.type);
|
|
822
822
|
await this.db.run(
|
|
823
823
|
`INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
|
|
824
824
|
[t.txid, psbt, expires, type]
|
|
@@ -904,7 +904,7 @@ function rowToTx(r) {
|
|
|
904
904
|
|
|
905
905
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
906
906
|
enumerable: true,
|
|
907
|
-
get: function () { return
|
|
907
|
+
get: function () { return chunkXIVCG6EP_cjs.ChainedTxType; }
|
|
908
908
|
});
|
|
909
909
|
exports.SQLiteContractRepository = SQLiteContractRepository;
|
|
910
910
|
exports.SQLiteIntentRepository = SQLiteIntentRepository;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-FMI2GKYO.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-FMI2GKYO.js';
|
|
3
|
+
import '../../chunk-LJ35HPJW.js';
|
|
4
4
|
import '../../chunk-YNEDJTX2.js';
|
|
5
5
|
import '../../chunk-BE5MUB7T.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -111,4 +111,4 @@ interface CreateTaskDependenciesOptions {
|
|
|
111
111
|
*/
|
|
112
112
|
declare function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies;
|
|
113
113
|
|
|
114
|
-
export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type
|
|
114
|
+
export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskDependencies as a, type TaskItem as b, type TaskQueue as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
|
|
@@ -111,4 +111,4 @@ interface CreateTaskDependenciesOptions {
|
|
|
111
111
|
*/
|
|
112
112
|
declare function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies;
|
|
113
113
|
|
|
114
|
-
export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type
|
|
114
|
+
export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskDependencies as a, type TaskItem as b, type TaskQueue as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunkRJ6XVCX4_cjs = require('../../chunk-RJ6XVCX4.cjs');
|
|
4
|
+
var chunkX37EKDIH_cjs = require('../../chunk-X37EKDIH.cjs');
|
|
5
|
+
var chunkXIVCG6EP_cjs = require('../../chunk-XIVCG6EP.cjs');
|
|
6
|
+
require('../../chunk-UBYY2TPK.cjs');
|
|
7
7
|
require('../../chunk-32YKLQPS.cjs');
|
|
8
8
|
require('../../chunk-HXDZ2QTW.cjs');
|
|
9
9
|
require('../../chunk-5BLDMQED.cjs');
|
|
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
36
36
|
taskQueue,
|
|
37
37
|
walletRepository,
|
|
38
38
|
contractRepository,
|
|
39
|
-
processors = [
|
|
39
|
+
processors = [chunkRJ6XVCX4_cjs.contractPollProcessor]
|
|
40
40
|
} = options;
|
|
41
41
|
TaskManager__namespace.defineTask(taskName, async () => {
|
|
42
42
|
try {
|
|
@@ -44,24 +44,24 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
44
44
|
if (!config) {
|
|
45
45
|
return BackgroundTask__namespace.BackgroundTaskResult.Success;
|
|
46
46
|
}
|
|
47
|
-
const indexerProvider = new
|
|
48
|
-
const arkProvider = new
|
|
49
|
-
const deps =
|
|
47
|
+
const indexerProvider = new chunkX37EKDIH_cjs.ExpoIndexerProvider(config.arkServerUrl);
|
|
48
|
+
const arkProvider = new chunkX37EKDIH_cjs.ExpoArkProvider(config.arkServerUrl);
|
|
49
|
+
const deps = chunkRJ6XVCX4_cjs.createTaskDependencies({
|
|
50
50
|
walletRepository,
|
|
51
51
|
contractRepository,
|
|
52
52
|
indexerProvider,
|
|
53
53
|
arkProvider
|
|
54
54
|
});
|
|
55
|
-
await
|
|
55
|
+
await chunkRJ6XVCX4_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(chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
61
61
|
if (existing.length === 0) {
|
|
62
62
|
const task = {
|
|
63
|
-
id:
|
|
64
|
-
type:
|
|
63
|
+
id: chunkXIVCG6EP_cjs.getRandomId(),
|
|
64
|
+
type: chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
65
65
|
data: {},
|
|
66
66
|
createdAt: Date.now()
|
|
67
67
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as WalletRepository, C as ContractRepository } from '../../ark-I8jfe5VE.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Dap7qUlF.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-CeFxKhSH.cjs';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as WalletRepository, C as ContractRepository } from '../../ark-I8jfe5VE.js';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BtSOVZFn.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-Bptw9UMa.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-LCQQPOIT.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-V7WIZR2B.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-FMI2GKYO.js';
|
|
4
|
+
import '../../chunk-LJ35HPJW.js';
|
|
5
5
|
import '../../chunk-YNEDJTX2.js';
|
|
6
6
|
import '../../chunk-BE5MUB7T.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkRJ6XVCX4_cjs = require('../../chunk-RJ6XVCX4.cjs');
|
|
4
|
+
var chunkXIVCG6EP_cjs = require('../../chunk-XIVCG6EP.cjs');
|
|
5
|
+
var chunkUBYY2TPK_cjs = require('../../chunk-UBYY2TPK.cjs');
|
|
6
6
|
require('../../chunk-32YKLQPS.cjs');
|
|
7
7
|
require('../../chunk-HXDZ2QTW.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
@@ -54,18 +54,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
54
54
|
*/
|
|
55
55
|
static async setup(config) {
|
|
56
56
|
warnOnRemovedBackgroundFields(config.background);
|
|
57
|
-
const wallet = await
|
|
58
|
-
const processors = config.background.processors ?? [
|
|
57
|
+
const wallet = await chunkXIVCG6EP_cjs.Wallet.create(config);
|
|
58
|
+
const processors = config.background.processors ?? [chunkRJ6XVCX4_cjs.contractPollProcessor];
|
|
59
59
|
const deps = {
|
|
60
60
|
walletRepository: wallet.walletRepository,
|
|
61
61
|
contractRepository: wallet.contractRepository,
|
|
62
62
|
indexerProvider: wallet.indexerProvider,
|
|
63
63
|
arkProvider: wallet.arkProvider,
|
|
64
|
-
extendVtxo: (vtxo, contract) =>
|
|
64
|
+
extendVtxo: (vtxo, contract) => chunkXIVCG6EP_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
65
65
|
};
|
|
66
66
|
const { taskQueue } = config.background;
|
|
67
67
|
if ("persistConfig" in taskQueue) {
|
|
68
|
-
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof
|
|
68
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkUBYY2TPK_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
69
69
|
if (arkServerUrl) {
|
|
70
70
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
71
71
|
const bgConfig = {
|
|
@@ -96,7 +96,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
96
96
|
}
|
|
97
97
|
async runForegroundPoll() {
|
|
98
98
|
if (this.cleared) return;
|
|
99
|
-
await
|
|
99
|
+
await chunkRJ6XVCX4_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
100
100
|
const results = await this.taskQueue.getResults();
|
|
101
101
|
if (results.length > 0) {
|
|
102
102
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -105,18 +105,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
105
105
|
await this.seedContractPollTask();
|
|
106
106
|
}
|
|
107
107
|
async seedContractPollTask() {
|
|
108
|
-
const existing = await this.taskQueue.getTasks(
|
|
108
|
+
const existing = await this.taskQueue.getTasks(chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
109
109
|
if (existing.length > 0) return;
|
|
110
110
|
const task = {
|
|
111
|
-
id:
|
|
112
|
-
type:
|
|
111
|
+
id: chunkXIVCG6EP_cjs.getRandomId(),
|
|
112
|
+
type: chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
113
113
|
data: {},
|
|
114
114
|
createdAt: Date.now()
|
|
115
115
|
};
|
|
116
116
|
await this.taskQueue.addTask(task);
|
|
117
117
|
}
|
|
118
118
|
async removeContractPollTasks() {
|
|
119
|
-
const tasks = await this.taskQueue.getTasks(
|
|
119
|
+
const tasks = await this.taskQueue.getTasks(chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
120
120
|
for (const task of tasks) {
|
|
121
121
|
await this.taskQueue.removeTask(task.id);
|
|
122
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as Wallet } from '../../wallet-BsqRU8KM.cjs';
|
|
2
2
|
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as ActivityRegistry, f as Activity, g as IContractManager, h as IDelegateManager, S as SendBitcoinParams, i as SettleParams, j as SettlementEvent, R as Recipient, k as IAssetManager } from '../../ark-I8jfe5VE.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-CeFxKhSH.cjs';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W as Wallet } from '../../wallet-D9z7wssl.js';
|
|
2
2
|
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, d as ExtendedCoin, A as ArkTransaction, e as ActivityRegistry, f as Activity, g as IContractManager, h as IDelegateManager, S as SendBitcoinParams, i as SettleParams, j as SettlementEvent, R as Recipient, k as IAssetManager } from '../../ark-I8jfe5VE.js';
|
|
3
|
-
import {
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-Bptw9UMa.js';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
3
|
-
import { RestArkProvider } from '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-LCQQPOIT.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-FMI2GKYO.js';
|
|
3
|
+
import { RestArkProvider } from '../../chunk-LJ35HPJW.js';
|
|
4
4
|
import '../../chunk-YNEDJTX2.js';
|
|
5
5
|
import '../../chunk-BE5MUB7T.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
3
|
+
var chunkRJ6XVCX4_cjs = require('../../chunk-RJ6XVCX4.cjs');
|
|
4
|
+
require('../../chunk-XIVCG6EP.cjs');
|
|
5
|
+
require('../../chunk-UBYY2TPK.cjs');
|
|
6
6
|
require('../../chunk-32YKLQPS.cjs');
|
|
7
7
|
require('../../chunk-HXDZ2QTW.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.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 chunkRJ6XVCX4_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 chunkRJ6XVCX4_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkRJ6XVCX4_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkRJ6XVCX4_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
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-CeFxKhSH.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-CeFxKhSH.cjs';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Dap7qUlF.cjs';
|
|
4
4
|
import '../../ark-I8jfe5VE.cjs';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
@@ -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-Bptw9UMa.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-Bptw9UMa.js';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BtSOVZFn.js';
|
|
4
4
|
import '../../ark-I8jfe5VE.js';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-LCQQPOIT.js';
|
|
2
|
+
import '../../chunk-FMI2GKYO.js';
|
|
3
|
+
import '../../chunk-LJ35HPJW.js';
|
|
4
4
|
import '../../chunk-YNEDJTX2.js';
|
|
5
5
|
import '../../chunk-BE5MUB7T.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|