@arkade-os/sdk 0.5.0-rc.2 → 0.5.0-rc.3
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.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/{asyncStorageTaskQueue-C5rBYlru.d.ts → asyncStorageTaskQueue-DAs_n1xr.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-BuDvgWh6.d.cts → asyncStorageTaskQueue-DqGRG66E.d.cts} +2 -2
- package/dist/{chunk-HLCGYOIH.cjs → chunk-43XGA362.cjs} +17 -17
- package/dist/{chunk-HLCGYOIH.cjs.map → chunk-43XGA362.cjs.map} +1 -1
- package/dist/{chunk-3R476TDV.js → chunk-7W6FHWYN.js} +3 -3
- package/dist/{chunk-3R476TDV.js.map → chunk-7W6FHWYN.js.map} +1 -1
- package/dist/{chunk-D25O4EGY.cjs → chunk-BCT7DT2J.cjs} +10 -10
- package/dist/{chunk-D25O4EGY.cjs.map → chunk-BCT7DT2J.cjs.map} +1 -1
- package/dist/{chunk-4PKLULWT.js → chunk-ERUAQGYF.js} +3 -3
- package/dist/{chunk-4PKLULWT.js.map → chunk-ERUAQGYF.js.map} +1 -1
- package/dist/{chunk-GMZZQXV5.cjs → chunk-FSF2PGTR.cjs} +439 -439
- package/dist/{chunk-GMZZQXV5.cjs.map → chunk-FSF2PGTR.cjs.map} +1 -1
- package/dist/{chunk-ZOTXDOS5.js → chunk-G4UPMCKW.js} +4 -4
- package/dist/{chunk-ZOTXDOS5.js.map → chunk-G4UPMCKW.js.map} +1 -1
- package/dist/{chunk-ISO4TI5J.js → chunk-HSG2GQTM.js} +4 -4
- package/dist/{chunk-ISO4TI5J.js.map → chunk-HSG2GQTM.js.map} +1 -1
- package/dist/{chunk-NVZJSKZS.cjs → chunk-L4HZK4KK.cjs} +17 -17
- package/dist/{chunk-NVZJSKZS.cjs.map → chunk-L4HZK4KK.cjs.map} +1 -1
- package/dist/{chunk-6DNR46C7.js → chunk-ROD5H7RX.js} +4 -4
- package/dist/{chunk-6DNR46C7.js.map → chunk-ROD5H7RX.js.map} +1 -1
- package/dist/{chunk-43FKNLX4.cjs → chunk-UCSTNXB4.cjs} +49 -49
- package/dist/{chunk-43FKNLX4.cjs.map → chunk-UCSTNXB4.cjs.map} +1 -1
- package/dist/{chunk-JZWLXNHV.cjs → chunk-UJTYUYY4.cjs} +3 -3
- package/dist/{chunk-JZWLXNHV.cjs.map → chunk-UJTYUYY4.cjs.map} +1 -1
- package/dist/{chunk-ZRNQV6HV.js → chunk-VQCDDGRW.js} +5 -5
- package/dist/{chunk-ZRNQV6HV.js.map → chunk-VQCDDGRW.js.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- 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-BAX5QftB.d.ts → delegate-B9Bmrns7.d.ts} +1 -1
- package/dist/{delegate-1yp1HyP7.d.cts → delegate-CZzIduW4.d.cts} +1 -1
- package/dist/{hdWalletCapable-eJgaT-ec.d.cts → hdWalletCapable-BIl3yLVM.d.cts} +3 -3
- package/dist/{hdWalletCapable-CmEU0NP1.d.ts → hdWalletCapable-Cr5nGpK5.d.ts} +3 -3
- package/dist/{index-W_oMcOmG.d.cts → index-Ci5MmNnK.d.cts} +3 -3
- package/dist/{index-Bem5vKzX.d.ts → index-DQ1Hb2w_.d.ts} +3 -3
- package/dist/{index-DUxufw76.d.cts → index-DnNIOqHS.d.cts} +1 -1
- package/dist/{index-DUxufw76.d.ts → index-DnNIOqHS.d.ts} +1 -1
- package/dist/index.cjs +300 -300
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- 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/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-Dr3NStc0.d.cts → taskRunner-BDb5Ee2J.d.cts} +2 -2
- package/dist/{taskRunner-D_iPiZIi.d.ts → taskRunner-F7wNJcF3.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 +14 -14
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- 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 +1 -1
|
@@ -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-ROD5H7RX.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-G4UPMCKW.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-VQCDDGRW.js';
|
|
4
|
+
import '../../chunk-ERUAQGYF.js';
|
|
5
|
+
import '../../chunk-7W6FHWYN.js';
|
|
6
|
+
import '../../chunk-HSG2GQTM.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
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunkBCT7DT2J_cjs = require('../../chunk-BCT7DT2J.cjs');
|
|
4
|
+
var chunkFSF2PGTR_cjs = require('../../chunk-FSF2PGTR.cjs');
|
|
5
|
+
require('../../chunk-L4HZK4KK.cjs');
|
|
6
|
+
require('../../chunk-UCSTNXB4.cjs');
|
|
7
|
+
require('../../chunk-UJTYUYY4.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
var base = require('@scure/base');
|
|
10
10
|
|
|
@@ -58,18 +58,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
58
58
|
*/
|
|
59
59
|
static async setup(config) {
|
|
60
60
|
warnOnRemovedBackgroundFields(config.background);
|
|
61
|
-
const wallet = await
|
|
62
|
-
const processors = config.background.processors ?? [
|
|
61
|
+
const wallet = await chunkFSF2PGTR_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunkBCT7DT2J_cjs.contractPollProcessor];
|
|
63
63
|
const deps = {
|
|
64
64
|
walletRepository: wallet.walletRepository,
|
|
65
65
|
contractRepository: wallet.contractRepository,
|
|
66
66
|
indexerProvider: wallet.indexerProvider,
|
|
67
67
|
arkProvider: wallet.arkProvider,
|
|
68
|
-
extendVtxo: (vtxo, contract) =>
|
|
68
|
+
extendVtxo: (vtxo, contract) => chunkFSF2PGTR_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl = config.arkServerUrl ||
|
|
72
|
+
const arkServerUrl = config.arkServerUrl || chunkFSF2PGTR_cjs.extractArkProviderUrl(wallet.arkProvider);
|
|
73
73
|
if (arkServerUrl) {
|
|
74
74
|
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
75
75
|
const bgConfig = {
|
|
@@ -100,7 +100,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
100
100
|
}
|
|
101
101
|
async runForegroundPoll() {
|
|
102
102
|
if (this.cleared) return;
|
|
103
|
-
await
|
|
103
|
+
await chunkBCT7DT2J_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
104
104
|
const results = await this.taskQueue.getResults();
|
|
105
105
|
if (results.length > 0) {
|
|
106
106
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -109,18 +109,18 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
109
109
|
await this.seedContractPollTask();
|
|
110
110
|
}
|
|
111
111
|
async seedContractPollTask() {
|
|
112
|
-
const existing = await this.taskQueue.getTasks(
|
|
112
|
+
const existing = await this.taskQueue.getTasks(chunkBCT7DT2J_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunkFSF2PGTR_cjs.getRandomId(),
|
|
116
|
+
type: chunkBCT7DT2J_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
117
117
|
data: {},
|
|
118
118
|
createdAt: Date.now()
|
|
119
119
|
};
|
|
120
120
|
await this.taskQueue.addTask(task);
|
|
121
121
|
}
|
|
122
122
|
async removeContractPollTasks() {
|
|
123
|
-
const tasks = await this.taskQueue.getTasks(
|
|
123
|
+
const tasks = await this.taskQueue.getTasks(chunkBCT7DT2J_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
124
124
|
for (const task of tasks) {
|
|
125
125
|
await this.taskQueue.removeTask(task.id);
|
|
126
126
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, g as ArkTransaction, h as ActivityRegistry, i as Activity, j as IContractManager, k as GetNewAddressesOptions, l as NewAddress, m as IDelegateManager, S as SendBitcoinParams, n as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-BIl3yLVM.cjs';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, g as ArkTransaction, h as ActivityRegistry, i as Activity, j as IContractManager, k as GetNewAddressesOptions, l as NewAddress, m as IDelegateManager, S as SendBitcoinParams, n as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-DnNIOqHS.cjs';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-BDb5Ee2J.cjs';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-CZzIduW4.cjs';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, g as ArkTransaction, h as ActivityRegistry, i as Activity, j as IContractManager, k as GetNewAddressesOptions, l as NewAddress, m as IDelegateManager, S as SendBitcoinParams, n as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-
|
|
3
|
-
import {
|
|
1
|
+
import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-Cr5nGpK5.js';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, g as ArkTransaction, h as ActivityRegistry, i as Activity, j as IContractManager, k as GetNewAddressesOptions, l as NewAddress, m as IDelegateManager, S as SendBitcoinParams, n as SettleParams, o as SettlementEvent, p as SendParams, R as Recipient, q as IAssetManager } from '../../index-DnNIOqHS.js';
|
|
3
|
+
import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-F7wNJcF3.js';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
|
6
6
|
import '@scure/btc-signer/utils.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-B9Bmrns7.js';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, extractArkProviderUrl,
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-ROD5H7RX.js';
|
|
2
|
+
import { Wallet, extractArkProviderUrl, extendVirtualCoinForContract, getRandomId } from '../../chunk-VQCDDGRW.js';
|
|
3
|
+
import '../../chunk-ERUAQGYF.js';
|
|
4
|
+
import '../../chunk-7W6FHWYN.js';
|
|
5
|
+
import '../../chunk-HSG2GQTM.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
import { hex } from '@scure/base';
|
|
8
8
|
|
|
@@ -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 chunkBCT7DT2J_cjs = require('../../chunk-BCT7DT2J.cjs');
|
|
4
|
+
require('../../chunk-FSF2PGTR.cjs');
|
|
5
|
+
require('../../chunk-L4HZK4KK.cjs');
|
|
6
|
+
require('../../chunk-UCSTNXB4.cjs');
|
|
7
|
+
require('../../chunk-UJTYUYY4.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
|
|
10
10
|
// src/worker/expo/taskQueue.ts
|
|
@@ -121,19 +121,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
121
121
|
|
|
122
122
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkBCT7DT2J_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkBCT7DT2J_cjs.contractPollProcessor; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkBCT7DT2J_cjs.createTaskDependencies; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "runTasks", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkBCT7DT2J_cjs.runTasks; }
|
|
137
137
|
});
|
|
138
138
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
139
139
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../index-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-BDb5Ee2J.cjs';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, d as TaskDependencies, a as TaskItem, c as TaskQueue, b as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-BDb5Ee2J.cjs';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DqGRG66E.cjs';
|
|
4
|
+
import '../../index-DnNIOqHS.cjs';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/transaction.js';
|
|
7
7
|
import '@scure/btc-signer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../index-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-F7wNJcF3.js';
|
|
2
|
+
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, d as TaskDependencies, a as TaskItem, c as TaskQueue, b as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-F7wNJcF3.js';
|
|
3
|
+
export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DAs_n1xr.js';
|
|
4
|
+
import '../../index-DnNIOqHS.js';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/transaction.js';
|
|
7
7
|
import '@scure/btc-signer';
|
|
@@ -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-ROD5H7RX.js';
|
|
2
|
+
import '../../chunk-VQCDDGRW.js';
|
|
3
|
+
import '../../chunk-ERUAQGYF.js';
|
|
4
|
+
import '../../chunk-7W6FHWYN.js';
|
|
5
|
+
import '../../chunk-HSG2GQTM.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/worker/expo/taskQueue.ts
|