@arkade-os/sdk 0.4.33 → 0.4.35
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 +1 -1
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-DEsDMYGv.d.cts → ark-D6sau_6-.d.cts} +522 -9
- package/dist/{ark-DEsDMYGv.d.ts → ark-D6sau_6-.d.ts} +522 -9
- package/dist/{asyncStorageTaskQueue-D8T1VXEx.d.cts → asyncStorageTaskQueue-CpC027t_.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-CMrTYlKG.d.ts → asyncStorageTaskQueue-GT8fmPUG.d.ts} +2 -2
- package/dist/{chunk-E22HEKLN.js → chunk-3JR77WQ4.js} +140 -42
- package/dist/chunk-3JR77WQ4.js.map +1 -0
- package/dist/{chunk-WMIPYZSB.cjs → chunk-CMPJR3HS.cjs} +42 -9
- package/dist/chunk-CMPJR3HS.cjs.map +1 -0
- package/dist/{chunk-AOJUURHM.js → chunk-CUSABEUQ.js} +141 -37
- package/dist/chunk-CUSABEUQ.js.map +1 -0
- package/dist/{chunk-HAVA4XB7.cjs → chunk-FM7T7JVL.cjs} +7 -7
- package/dist/{chunk-HAVA4XB7.cjs.map → chunk-FM7T7JVL.cjs.map} +1 -1
- package/dist/{chunk-GYSK5R57.cjs → chunk-GUTKJMSF.cjs} +164 -59
- package/dist/chunk-GUTKJMSF.cjs.map +1 -0
- package/dist/{chunk-7K3ROJF6.cjs → chunk-H2LX2KKY.cjs} +2161 -466
- package/dist/chunk-H2LX2KKY.cjs.map +1 -0
- package/dist/{chunk-DSS2GQUG.js → chunk-NOR7XOKN.js} +2021 -331
- package/dist/chunk-NOR7XOKN.js.map +1 -0
- package/dist/{chunk-BU3BU6XK.js → chunk-OURFR4UR.js} +3 -3
- package/dist/{chunk-BU3BU6XK.js.map → chunk-OURFR4UR.js.map} +1 -1
- package/dist/{chunk-TU3LVAPX.js → chunk-OUVTG72A.js} +43 -11
- package/dist/chunk-OUVTG72A.js.map +1 -0
- package/dist/{chunk-5CCRRL5S.cjs → chunk-VYS3KGRI.cjs} +19 -13
- package/dist/chunk-VYS3KGRI.cjs.map +1 -0
- package/dist/{chunk-SPDNHPM4.cjs → chunk-X2EQLK4O.cjs} +149 -46
- package/dist/chunk-X2EQLK4O.cjs.map +1 -0
- package/dist/{chunk-L6ZETTX3.js → chunk-XQS2HW4Q.js} +11 -5
- package/dist/chunk-XQS2HW4Q.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +7 -7
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-BJeBNP5a.d.cts → delegate-C-L6gSZx.d.cts} +1 -1
- package/dist/{delegate-EXN2mfkb.d.ts → delegate-De5__fpZ.d.ts} +1 -1
- package/dist/{index-BG2ooYKO.d.ts → index-BETdjE_o.d.ts} +22 -16
- package/dist/{index-DHjEeHEp.d.cts → index-jwQfHP6D.d.cts} +22 -16
- package/dist/index.cjs +158 -130
- package/dist/index.d.cts +125 -16
- package/dist/index.d.ts +125 -16
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +14 -14
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +13 -13
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +4 -4
- package/dist/{taskRunner-pIGyarFG.d.cts → taskRunner-DCyp6Gea.d.cts} +2 -2
- package/dist/{taskRunner-B7lBU45X.d.ts → taskRunner-DnxtObeq.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +13 -13
- package/dist/wallet/expo/index.d.cts +5 -5
- package/dist/wallet/expo/index.d.ts +5 -5
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-D4Dll5Gu.d.cts → wallet-BWHbd5b1.d.cts} +388 -10
- package/dist/{wallet-C4L_X0i6.d.ts → wallet-Bth5uucA.d.ts} +388 -10
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +5 -5
- package/dist/chunk-5CCRRL5S.cjs.map +0 -1
- package/dist/chunk-7K3ROJF6.cjs.map +0 -1
- package/dist/chunk-AOJUURHM.js.map +0 -1
- package/dist/chunk-DSS2GQUG.js.map +0 -1
- package/dist/chunk-E22HEKLN.js.map +0 -1
- package/dist/chunk-GYSK5R57.cjs.map +0 -1
- package/dist/chunk-L6ZETTX3.js.map +0 -1
- package/dist/chunk-SPDNHPM4.cjs.map +0 -1
- package/dist/chunk-TU3LVAPX.js.map +0 -1
- package/dist/chunk-WMIPYZSB.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
3
|
+
var chunkFM7T7JVL_cjs = require('../../chunk-FM7T7JVL.cjs');
|
|
4
|
+
var chunkVYS3KGRI_cjs = require('../../chunk-VYS3KGRI.cjs');
|
|
5
|
+
var chunkH2LX2KKY_cjs = require('../../chunk-H2LX2KKY.cjs');
|
|
6
|
+
require('../../chunk-X2EQLK4O.cjs');
|
|
7
|
+
require('../../chunk-GUTKJMSF.cjs');
|
|
8
|
+
require('../../chunk-CMPJR3HS.cjs');
|
|
9
9
|
require('../../chunk-5BLDMQED.cjs');
|
|
10
10
|
var TaskManager = require('expo-task-manager');
|
|
11
11
|
var BackgroundTask = require('expo-background-task');
|
|
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
36
36
|
taskQueue,
|
|
37
37
|
walletRepository,
|
|
38
38
|
contractRepository,
|
|
39
|
-
processors = [
|
|
39
|
+
processors = [chunkFM7T7JVL_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 chunkVYS3KGRI_cjs.ExpoIndexerProvider(config.arkServerUrl);
|
|
48
|
+
const arkProvider = new chunkVYS3KGRI_cjs.ExpoArkProvider(config.arkServerUrl);
|
|
49
|
+
const deps = chunkFM7T7JVL_cjs.createTaskDependencies({
|
|
50
50
|
walletRepository,
|
|
51
51
|
contractRepository,
|
|
52
52
|
indexerProvider,
|
|
53
53
|
arkProvider
|
|
54
54
|
});
|
|
55
|
-
await
|
|
55
|
+
await chunkFM7T7JVL_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(chunkFM7T7JVL_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
61
61
|
if (existing.length === 0) {
|
|
62
62
|
const task = {
|
|
63
|
-
id:
|
|
64
|
-
type:
|
|
63
|
+
id: chunkH2LX2KKY_cjs.getRandomId(),
|
|
64
|
+
type: chunkFM7T7JVL_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 {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-D6sau_6-.cjs';
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CpC027t_.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-DCyp6Gea.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 {
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-D6sau_6-.js';
|
|
2
|
+
import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-GT8fmPUG.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-DnxtObeq.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,9 +1,9 @@
|
|
|
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-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-OURFR4UR.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-XQS2HW4Q.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-NOR7XOKN.js';
|
|
4
|
+
import '../../chunk-3JR77WQ4.js';
|
|
5
|
+
import '../../chunk-CUSABEUQ.js';
|
|
6
|
+
import '../../chunk-OUVTG72A.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
8
8
|
import * as TaskManager from 'expo-task-manager';
|
|
9
9
|
import * as BackgroundTask from 'expo-background-task';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunkFM7T7JVL_cjs = require('../../chunk-FM7T7JVL.cjs');
|
|
4
|
+
var chunkH2LX2KKY_cjs = require('../../chunk-H2LX2KKY.cjs');
|
|
5
|
+
var chunkX2EQLK4O_cjs = require('../../chunk-X2EQLK4O.cjs');
|
|
6
|
+
require('../../chunk-GUTKJMSF.cjs');
|
|
7
|
+
require('../../chunk-CMPJR3HS.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
var base = require('@scure/base');
|
|
10
10
|
|
|
@@ -52,18 +52,18 @@ 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 chunkH2LX2KKY_cjs.Wallet.create(config);
|
|
56
|
+
const processors = config.background.processors ?? [chunkFM7T7JVL_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) => chunkH2LX2KKY_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
63
63
|
};
|
|
64
64
|
const { taskQueue } = config.background;
|
|
65
65
|
if ("persistConfig" in taskQueue) {
|
|
66
|
-
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof
|
|
66
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkX2EQLK4O_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
67
67
|
if (arkServerUrl) {
|
|
68
68
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
69
69
|
const bgConfig = {
|
|
@@ -93,7 +93,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
93
93
|
}, intervalMs);
|
|
94
94
|
}
|
|
95
95
|
async runForegroundPoll() {
|
|
96
|
-
await
|
|
96
|
+
await chunkFM7T7JVL_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(chunkFM7T7JVL_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
105
105
|
if (existing.length > 0) return;
|
|
106
106
|
const task = {
|
|
107
|
-
id:
|
|
108
|
-
type:
|
|
107
|
+
id: chunkH2LX2KKY_cjs.getRandomId(),
|
|
108
|
+
type: chunkFM7T7JVL_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
109
109
|
data: {},
|
|
110
110
|
createdAt: Date.now()
|
|
111
111
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
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 {
|
|
1
|
+
import { W as Wallet } from '../../wallet-BWHbd5b1.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-D6sau_6-.cjs';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-DCyp6Gea.cjs';
|
|
4
|
+
import '@scure/btc-signer';
|
|
4
5
|
import '@scure/btc-signer/utils.js';
|
|
5
6
|
import '@scure/btc-signer/psbt.js';
|
|
6
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-C-L6gSZx.cjs';
|
|
7
8
|
import '@scure/btc-signer/transaction.js';
|
|
8
|
-
import '@scure/btc-signer';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Background processing configuration for @see ExpoWallet.
|
|
@@ -1,11 +1,11 @@
|
|
|
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 {
|
|
1
|
+
import { W as Wallet } from '../../wallet-Bth5uucA.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-D6sau_6-.js';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-DnxtObeq.js';
|
|
4
|
+
import '@scure/btc-signer';
|
|
4
5
|
import '@scure/btc-signer/utils.js';
|
|
5
6
|
import '@scure/btc-signer/psbt.js';
|
|
6
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-De5__fpZ.js';
|
|
7
8
|
import '@scure/btc-signer/transaction.js';
|
|
8
|
-
import '@scure/btc-signer';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Background processing configuration for @see ExpoWallet.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
3
|
-
import { RestArkProvider } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-OURFR4UR.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-NOR7XOKN.js';
|
|
3
|
+
import { RestArkProvider } from '../../chunk-3JR77WQ4.js';
|
|
4
|
+
import '../../chunk-CUSABEUQ.js';
|
|
5
|
+
import '../../chunk-OUVTG72A.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
import { hex } from '@scure/base';
|
|
8
8
|
|