@arkade-os/sdk 0.4.29 → 0.4.30
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.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/indexedDB.cjs +2 -2
- package/dist/adapters/indexedDB.js +1 -1
- package/dist/{ark-ChhTwpLf.d.cts → ark-C0TMXvwO.d.cts} +20 -3
- package/dist/{ark-ChhTwpLf.d.ts → ark-C0TMXvwO.d.ts} +20 -3
- package/dist/{asyncStorageTaskQueue-DW1-BpI7.d.cts → asyncStorageTaskQueue-DHOoNvRy.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-DZ0nUuEJ.d.ts → asyncStorageTaskQueue-Iip3xMF_.d.ts} +1 -1
- package/dist/{chunk-BVP2U66Q.js → chunk-6NY27WL6.js} +27 -7
- package/dist/chunk-6NY27WL6.js.map +1 -0
- package/dist/{chunk-TH6T23XG.js → chunk-GRJKJNBO.js} +3 -3
- package/dist/{chunk-TH6T23XG.js.map → chunk-GRJKJNBO.js.map} +1 -1
- package/dist/{chunk-PJUFOJ2L.cjs → chunk-PCEE6DRL.cjs} +7 -7
- package/dist/{chunk-PJUFOJ2L.cjs.map → chunk-PCEE6DRL.cjs.map} +1 -1
- package/dist/{chunk-GDCTOSMV.cjs → chunk-XWJFOP5G.cjs} +27 -7
- package/dist/chunk-XWJFOP5G.cjs.map +1 -0
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-4JBUkUhR.d.cts → delegate-CEk9RHVj.d.cts} +1 -1
- package/dist/{delegate-DN7RELL1.d.ts → delegate-Ds4Hi7Xy.d.ts} +1 -1
- package/dist/{index-Cn82bBUu.d.ts → index-DA9r_7Vg.d.ts} +2 -2
- package/dist/{index-DfT5xzgY.d.cts → index-WIAY0DDn.d.cts} +2 -2
- package/dist/index.cjs +86 -86
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +1 -1
- package/dist/repositories/realm/index.cjs +10 -10
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +1 -1
- package/dist/repositories/sqlite/index.cjs +10 -10
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +1 -1
- package/dist/{taskRunner-B-aPfHhK.d.cts → taskRunner-CdEVYgoP.d.cts} +1 -1
- package/dist/{taskRunner-B-vG08pX.d.ts → taskRunner-JNjIWWJi.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +8 -8
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +2 -2
- package/dist/wallet/expo/index.cjs +9 -9
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +2 -2
- package/dist/{wallet-CCtqT2Wb.d.ts → wallet-BGL6SzKQ.d.ts} +2 -2
- package/dist/{wallet-DjgFb_4T.d.cts → wallet-CMgzKP0o.d.cts} +2 -2
- package/dist/worker/expo/index.cjs +6 -6
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-BVP2U66Q.js.map +0 -1
- package/dist/chunk-GDCTOSMV.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXWJFOP5G_cjs = require('../../chunk-XWJFOP5G.cjs');
|
|
4
4
|
require('../../chunk-6FLL2Q36.cjs');
|
|
5
5
|
require('../../chunk-IEO3XDKI.cjs');
|
|
6
6
|
require('../../chunk-WMIPYZSB.cjs');
|
|
@@ -37,7 +37,7 @@ var RealmWalletRepository = class {
|
|
|
37
37
|
await this.ensureInit();
|
|
38
38
|
this.realm.write(() => {
|
|
39
39
|
for (const vtxo of vtxos) {
|
|
40
|
-
const s =
|
|
40
|
+
const s = chunkXWJFOP5G_cjs.serializeVtxo(vtxo);
|
|
41
41
|
this.realm.create(
|
|
42
42
|
"ArkVtxo",
|
|
43
43
|
{
|
|
@@ -85,7 +85,7 @@ var RealmWalletRepository = class {
|
|
|
85
85
|
throw new Error("RealmWalletRepository requires an address");
|
|
86
86
|
}
|
|
87
87
|
for (const vtxo of vtxos) {
|
|
88
|
-
if (!
|
|
88
|
+
if (!chunkXWJFOP5G_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
89
89
|
throw new Error(
|
|
90
90
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
91
91
|
);
|
|
@@ -110,7 +110,7 @@ var RealmWalletRepository = class {
|
|
|
110
110
|
await this.ensureInit();
|
|
111
111
|
this.realm.write(() => {
|
|
112
112
|
for (const utxo of utxos) {
|
|
113
|
-
const s =
|
|
113
|
+
const s = chunkXWJFOP5G_cjs.serializeUtxo(utxo);
|
|
114
114
|
this.realm.create(
|
|
115
115
|
"ArkUtxo",
|
|
116
116
|
{
|
|
@@ -163,7 +163,7 @@ var RealmWalletRepository = class {
|
|
|
163
163
|
amount: tx.amount,
|
|
164
164
|
settled: tx.settled,
|
|
165
165
|
createdAt: tx.createdAt,
|
|
166
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
166
|
+
assetsJson: tx.assets ? JSON.stringify(chunkXWJFOP5G_cjs.serializeAssets(tx.assets)) : null
|
|
167
167
|
},
|
|
168
168
|
"modified"
|
|
169
169
|
);
|
|
@@ -233,9 +233,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
233
233
|
// Post-migration every row has `script`, but the backfill is
|
|
234
234
|
// idempotent: derive from `address` if the legacy column is still
|
|
235
235
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
236
|
-
script: obj.script ??
|
|
236
|
+
script: obj.script ?? chunkXWJFOP5G_cjs.scriptFromArkAddress(obj.address)
|
|
237
237
|
};
|
|
238
|
-
return
|
|
238
|
+
return chunkXWJFOP5G_cjs.deserializeVtxo(serialized);
|
|
239
239
|
}
|
|
240
240
|
function utxoObjectToDomain(obj) {
|
|
241
241
|
const serialized = {
|
|
@@ -254,7 +254,7 @@ function utxoObjectToDomain(obj) {
|
|
|
254
254
|
status: JSON.parse(obj.statusJson),
|
|
255
255
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
256
256
|
};
|
|
257
|
-
return
|
|
257
|
+
return chunkXWJFOP5G_cjs.deserializeUtxo(serialized);
|
|
258
258
|
}
|
|
259
259
|
function txObjectToDomain(obj) {
|
|
260
260
|
const tx = {
|
|
@@ -269,7 +269,7 @@ function txObjectToDomain(obj) {
|
|
|
269
269
|
createdAt: obj.createdAt
|
|
270
270
|
};
|
|
271
271
|
if (obj.assetsJson) {
|
|
272
|
-
tx.assets =
|
|
272
|
+
tx.assets = chunkXWJFOP5G_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
273
273
|
}
|
|
274
274
|
return tx;
|
|
275
275
|
}
|
|
@@ -499,7 +499,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
499
499
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
500
500
|
const newVtxo = newVtxos[i];
|
|
501
501
|
if (!newVtxo.script) {
|
|
502
|
-
newVtxo.script =
|
|
502
|
+
newVtxo.script = chunkXWJFOP5G_cjs.scriptFromArkAddress(newVtxo.address);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, E as ExtendedVirtualCoin,
|
|
1
|
+
import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-C0TMXvwO.cjs';
|
|
2
2
|
import '@scure/btc-signer/transaction.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -19,7 +19,7 @@ interface RealmResults<T = Record<string, unknown>> extends Iterable<T> {
|
|
|
19
19
|
interface RealmLike {
|
|
20
20
|
write(callback: () => void): void;
|
|
21
21
|
objects<T = Record<string, unknown>>(schemaName: string): RealmResults<T>;
|
|
22
|
-
create(schemaName: string, values: Record<string, any>, mode?: string): void;
|
|
22
|
+
create(schemaName: string, values: Record<string, any>, mode?: boolean | string): void;
|
|
23
23
|
delete(objects: unknown): void;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, E as ExtendedVirtualCoin,
|
|
1
|
+
import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-C0TMXvwO.js';
|
|
2
2
|
import '@scure/btc-signer/transaction.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -19,7 +19,7 @@ interface RealmResults<T = Record<string, unknown>> extends Iterable<T> {
|
|
|
19
19
|
interface RealmLike {
|
|
20
20
|
write(callback: () => void): void;
|
|
21
21
|
objects<T = Record<string, unknown>>(schemaName: string): RealmResults<T>;
|
|
22
|
-
create(schemaName: string, values: Record<string, any>, mode?: string): void;
|
|
22
|
+
create(schemaName: string, values: Record<string, any>, mode?: boolean | string): void;
|
|
23
23
|
delete(objects: unknown): void;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-6NY27WL6.js';
|
|
2
2
|
import '../../chunk-6NWNOLL3.js';
|
|
3
3
|
import '../../chunk-YA4G7RFB.js';
|
|
4
4
|
import '../../chunk-TU3LVAPX.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXWJFOP5G_cjs = require('../../chunk-XWJFOP5G.cjs');
|
|
4
4
|
require('../../chunk-6FLL2Q36.cjs');
|
|
5
5
|
require('../../chunk-IEO3XDKI.cjs');
|
|
6
6
|
require('../../chunk-WMIPYZSB.cjs');
|
|
@@ -126,7 +126,7 @@ var SQLiteWalletRepository = class {
|
|
|
126
126
|
for (const row of nullRows) {
|
|
127
127
|
await this.db.run(
|
|
128
128
|
`UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
|
|
129
|
-
[
|
|
129
|
+
[chunkXWJFOP5G_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
const tempName = `${this.tables.vtxos}__migrate_tmp`;
|
|
@@ -204,7 +204,7 @@ var SQLiteWalletRepository = class {
|
|
|
204
204
|
async saveVtxos(address, vtxos) {
|
|
205
205
|
await this.ensureInit();
|
|
206
206
|
for (const vtxo of vtxos) {
|
|
207
|
-
const s =
|
|
207
|
+
const s = chunkXWJFOP5G_cjs.serializeVtxo(vtxo);
|
|
208
208
|
await this.db.run(
|
|
209
209
|
`INSERT OR REPLACE INTO ${this.tables.vtxos}
|
|
210
210
|
(txid, vout, value, address,
|
|
@@ -259,7 +259,7 @@ var SQLiteWalletRepository = class {
|
|
|
259
259
|
throw new Error("SQLiteWalletRepository requires an address");
|
|
260
260
|
}
|
|
261
261
|
for (const vtxo of vtxos) {
|
|
262
|
-
if (!
|
|
262
|
+
if (!chunkXWJFOP5G_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
263
263
|
throw new Error(
|
|
264
264
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
265
265
|
);
|
|
@@ -283,7 +283,7 @@ var SQLiteWalletRepository = class {
|
|
|
283
283
|
async saveUtxos(address, utxos) {
|
|
284
284
|
await this.ensureInit();
|
|
285
285
|
for (const utxo of utxos) {
|
|
286
|
-
const s =
|
|
286
|
+
const s = chunkXWJFOP5G_cjs.serializeUtxo(utxo);
|
|
287
287
|
await this.db.run(
|
|
288
288
|
`INSERT OR REPLACE INTO ${this.tables.utxos}
|
|
289
289
|
(txid, vout, value, address,
|
|
@@ -339,7 +339,7 @@ var SQLiteWalletRepository = class {
|
|
|
339
339
|
tx.amount,
|
|
340
340
|
tx.settled ? 1 : 0,
|
|
341
341
|
tx.createdAt,
|
|
342
|
-
tx.assets ? JSON.stringify(
|
|
342
|
+
tx.assets ? JSON.stringify(chunkXWJFOP5G_cjs.serializeAssets(tx.assets)) : null
|
|
343
343
|
]
|
|
344
344
|
);
|
|
345
345
|
}
|
|
@@ -413,9 +413,9 @@ function vtxoRowToDomain(row) {
|
|
|
413
413
|
// Post-migration every row has `script`, but the backfill is
|
|
414
414
|
// idempotent: derive from `address` if the legacy column is still
|
|
415
415
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
416
|
-
script: row.script ??
|
|
416
|
+
script: row.script ?? chunkXWJFOP5G_cjs.scriptFromArkAddress(row.address)
|
|
417
417
|
};
|
|
418
|
-
return
|
|
418
|
+
return chunkXWJFOP5G_cjs.deserializeVtxo(serialized);
|
|
419
419
|
}
|
|
420
420
|
function utxoRowToDomain(row) {
|
|
421
421
|
const serialized = {
|
|
@@ -434,7 +434,7 @@ function utxoRowToDomain(row) {
|
|
|
434
434
|
status: JSON.parse(row.status_json),
|
|
435
435
|
extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
|
|
436
436
|
};
|
|
437
|
-
return
|
|
437
|
+
return chunkXWJFOP5G_cjs.deserializeUtxo(serialized);
|
|
438
438
|
}
|
|
439
439
|
function txRowToDomain(row) {
|
|
440
440
|
const tx = {
|
|
@@ -449,7 +449,7 @@ function txRowToDomain(row) {
|
|
|
449
449
|
createdAt: row.created_at
|
|
450
450
|
};
|
|
451
451
|
if (row.assets_json) {
|
|
452
|
-
tx.assets =
|
|
452
|
+
tx.assets = chunkXWJFOP5G_cjs.deserializeAssets(JSON.parse(row.assets_json));
|
|
453
453
|
}
|
|
454
454
|
return tx;
|
|
455
455
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, E as ExtendedVirtualCoin,
|
|
1
|
+
import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-C0TMXvwO.cjs';
|
|
2
2
|
import '@scure/btc-signer/transaction.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, E as ExtendedVirtualCoin,
|
|
1
|
+
import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-C0TMXvwO.js';
|
|
2
2
|
import '@scure/btc-signer/transaction.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-
|
|
1
|
+
import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-6NY27WL6.js';
|
|
2
2
|
import '../../chunk-6NWNOLL3.js';
|
|
3
3
|
import '../../chunk-YA4G7RFB.js';
|
|
4
4
|
import '../../chunk-TU3LVAPX.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-C0TMXvwO.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-C0TMXvwO.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPCEE6DRL_cjs = require('../../chunk-PCEE6DRL.cjs');
|
|
4
4
|
var chunkGIGILVVP_cjs = require('../../chunk-GIGILVVP.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkXWJFOP5G_cjs = require('../../chunk-XWJFOP5G.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 = [chunkPCEE6DRL_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 = chunkPCEE6DRL_cjs.createTaskDependencies({
|
|
50
50
|
walletRepository,
|
|
51
51
|
contractRepository,
|
|
52
52
|
indexerProvider,
|
|
53
53
|
arkProvider
|
|
54
54
|
});
|
|
55
|
-
await
|
|
55
|
+
await chunkPCEE6DRL_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(chunkPCEE6DRL_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
61
61
|
if (existing.length === 0) {
|
|
62
62
|
const task = {
|
|
63
|
-
id:
|
|
64
|
-
type:
|
|
63
|
+
id: chunkXWJFOP5G_cjs.getRandomId(),
|
|
64
|
+
type: chunkPCEE6DRL_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
65
65
|
data: {},
|
|
66
66
|
createdAt: Date.now()
|
|
67
67
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository } from '../../ark-
|
|
2
|
-
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-C0TMXvwO.cjs';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DHOoNvRy.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-CdEVYgoP.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
|
-
import { W as WalletRepository, C as ContractRepository } from '../../ark-
|
|
2
|
-
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-C0TMXvwO.js';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Iip3xMF_.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-JNjIWWJi.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,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-GRJKJNBO.js';
|
|
2
2
|
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-ABWRLTX5.js';
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
3
|
+
import { getRandomId } from '../../chunk-6NY27WL6.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 chunkPCEE6DRL_cjs = require('../../chunk-PCEE6DRL.cjs');
|
|
4
|
+
var chunkXWJFOP5G_cjs = require('../../chunk-XWJFOP5G.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 chunkXWJFOP5G_cjs.Wallet.create(config);
|
|
56
|
+
const processors = config.background.processors ?? [chunkPCEE6DRL_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) => chunkXWJFOP5G_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 chunkPCEE6DRL_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(chunkPCEE6DRL_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
105
105
|
if (existing.length > 0) return;
|
|
106
106
|
const task = {
|
|
107
|
-
id:
|
|
108
|
-
type:
|
|
107
|
+
id: chunkXWJFOP5G_cjs.getRandomId(),
|
|
108
|
+
type: chunkPCEE6DRL_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
109
109
|
data: {},
|
|
110
110
|
createdAt: Date.now()
|
|
111
111
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { W as Wallet } from '../../wallet-
|
|
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 IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-
|
|
3
|
-
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as Wallet } from '../../wallet-CMgzKP0o.cjs';
|
|
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 IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-C0TMXvwO.cjs';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-CdEVYgoP.cjs';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
|
-
import '../../delegate-
|
|
6
|
+
import '../../delegate-CEk9RHVj.cjs';
|
|
7
7
|
import '@scure/btc-signer/transaction.js';
|
|
8
8
|
import '@scure/btc-signer';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { W as Wallet } from '../../wallet-
|
|
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 IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-
|
|
3
|
-
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as Wallet } from '../../wallet-BGL6SzKQ.js';
|
|
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 IContractManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, h as SettlementEvent, R as Recipient, i as IAssetManager } from '../../ark-C0TMXvwO.js';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-JNjIWWJi.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
|
-
import '../../delegate-
|
|
6
|
+
import '../../delegate-Ds4Hi7Xy.js';
|
|
7
7
|
import '@scure/btc-signer/transaction.js';
|
|
8
8
|
import '@scure/btc-signer';
|
|
9
9
|
|
|
@@ -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-GRJKJNBO.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-6NY27WL6.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
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { B as BatchStartedEvent,
|
|
2
|
+
import { B as BatchStartedEvent, s as TreeSigningStartedEvent, t as TxTree, u as TreeNoncesEvent, v as BatchFinalizationEvent, w as BatchFinalizedEvent, x as BatchFailedEvent, y as TreeTxEvent, z as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, D as DescriptorProvider, e as IContractManager, F as IReadonlyWallet, H as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, J as DelegateProvider, K as ReadonlyWalletConfig, o as RelativeTimelock, L as IReadonlyAssetManager, m as ArkProvider, M as NetworkName, P as ArkInfo, Q as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, U as Coin, X as ContractManager, I as IWallet, Y as CSVMultisigTapscript, a as Identity, Z as SettlementConfig, i as IAssetManager, _ as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, $ as SignerSession, a0 as SignedIntent, a1 as Intent } from './ark-C0TMXvwO.js';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Ds4Hi7Xy.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { B as BatchStartedEvent,
|
|
2
|
+
import { B as BatchStartedEvent, s as TreeSigningStartedEvent, t as TxTree, u as TreeNoncesEvent, v as BatchFinalizationEvent, w as BatchFinalizedEvent, x as BatchFailedEvent, y as TreeTxEvent, z as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, D as DescriptorProvider, e as IContractManager, F as IReadonlyWallet, H as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, J as DelegateProvider, K as ReadonlyWalletConfig, o as RelativeTimelock, L as IReadonlyAssetManager, m as ArkProvider, M as NetworkName, P as ArkInfo, Q as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, U as Coin, X as ContractManager, I as IWallet, Y as CSVMultisigTapscript, a as Identity, Z as SettlementConfig, i as IAssetManager, _ as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, $ as SignerSession, a0 as SignedIntent, a1 as Intent } from './ark-C0TMXvwO.cjs';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CEk9RHVj.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkPCEE6DRL_cjs = require('../../chunk-PCEE6DRL.cjs');
|
|
4
|
+
require('../../chunk-XWJFOP5G.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 chunkPCEE6DRL_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 chunkPCEE6DRL_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkPCEE6DRL_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkPCEE6DRL_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-
|
|
3
|
-
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-CdEVYgoP.cjs';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-CdEVYgoP.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DHOoNvRy.cjs';
|
|
4
|
+
import '../../ark-C0TMXvwO.cjs';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
7
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-
|
|
3
|
-
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-JNjIWWJi.js';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-JNjIWWJi.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Iip3xMF_.js';
|
|
4
|
+
import '../../ark-C0TMXvwO.js';
|
|
5
5
|
import '@scure/btc-signer/transaction.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
7
|
import '@scure/btc-signer/psbt.js';
|
|
@@ -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-GRJKJNBO.js';
|
|
2
|
+
import '../../chunk-6NY27WL6.js';
|
|
3
3
|
import '../../chunk-6NWNOLL3.js';
|
|
4
4
|
import '../../chunk-YA4G7RFB.js';
|
|
5
5
|
import '../../chunk-TU3LVAPX.js';
|