@arkade-os/sdk 0.4.51 → 0.4.53
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 +4 -2
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +4 -4
- package/dist/adapters/indexedDB.js +3 -3
- package/dist/{ark-9V45Anrs.d.cts → ark-B69ugeJw.d.cts} +31 -3
- package/dist/{ark-9V45Anrs.d.ts → ark-B69ugeJw.d.ts} +31 -3
- package/dist/{asyncStorageTaskQueue-B6nXJv7m.d.cts → asyncStorageTaskQueue-B0SUQMXw.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-BZjR843B.d.ts → asyncStorageTaskQueue-DWqxuIAs.d.ts} +1 -1
- package/dist/{chunk-TS2MTRP4.js → chunk-3MMUKLCI.js} +59 -29
- package/dist/chunk-3MMUKLCI.js.map +1 -0
- package/dist/{chunk-6T5BBPKO.js → chunk-3XWDMLOI.js} +3 -3
- package/dist/{chunk-6T5BBPKO.js.map → chunk-3XWDMLOI.js.map} +1 -1
- package/dist/{chunk-6XF6ZATZ.cjs → chunk-3YC3LQ2E.cjs} +246 -213
- package/dist/chunk-3YC3LQ2E.cjs.map +1 -0
- package/dist/{chunk-5AT2NV5G.cjs → chunk-4GB73TRR.cjs} +11 -11
- package/dist/{chunk-5AT2NV5G.cjs.map → chunk-4GB73TRR.cjs.map} +1 -1
- package/dist/{chunk-4KGT3IP2.js → chunk-B4WZOJAI.js} +3 -3
- package/dist/{chunk-4KGT3IP2.js.map → chunk-B4WZOJAI.js.map} +1 -1
- package/dist/{chunk-3E4GDBYU.cjs → chunk-CZTQLA55.cjs} +7 -7
- package/dist/{chunk-3E4GDBYU.cjs.map → chunk-CZTQLA55.cjs.map} +1 -1
- package/dist/{chunk-LJQ2VQBE.cjs → chunk-IEMPH7J6.cjs} +52 -44
- package/dist/chunk-IEMPH7J6.cjs.map +1 -0
- package/dist/{chunk-3AOTJZQ4.js → chunk-LHYNNDY6.js} +3 -3
- package/dist/{chunk-3AOTJZQ4.js.map → chunk-LHYNNDY6.js.map} +1 -1
- package/dist/{chunk-FHDUEBBC.cjs → chunk-RNMLFY2V.cjs} +3 -3
- package/dist/{chunk-FHDUEBBC.cjs.map → chunk-RNMLFY2V.cjs.map} +1 -1
- package/dist/{chunk-MBSYQ3WX.js → chunk-UZLQUWYP.js} +52 -45
- package/dist/chunk-UZLQUWYP.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 +1 -1
- package/dist/{delegate-CJkolr2s.d.ts → delegate-BU-Cpyjw.d.ts} +1 -1
- package/dist/{delegate-tVTPM4fm.d.cts → delegate-C_Y2YrXC.d.cts} +1 -1
- package/dist/{index-B5Fdwzs_.d.ts → index-BWF-C9eh.d.ts} +2 -2
- package/dist/{index-BBAffp_8.d.cts → index-tzAInyiX.d.cts} +2 -2
- package/dist/index.cjs +169 -157
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +3 -3
- package/dist/repositories/realm/index.cjs +18 -18
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +4 -4
- package/dist/repositories/sqlite/index.cjs +17 -17
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +4 -4
- package/dist/{taskRunner-4CrJaWHv.d.cts → taskRunner-B7svzMhT.d.cts} +1 -1
- package/dist/{taskRunner-TgdjRf_b.d.ts → taskRunner-nzJFH8qb.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.cjs.map +1 -1
- 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/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +13 -13
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +4 -4
- package/dist/{wallet-BBfhZx_Z.d.cts → wallet-B6Xiferv.d.cts} +16 -5
- package/dist/{wallet-CSSTN8Yc.d.ts → wallet-CuHAI-eW.d.ts} +16 -5
- package/dist/worker/expo/index.cjs +8 -8
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-6XF6ZATZ.cjs.map +0 -1
- package/dist/chunk-LJQ2VQBE.cjs.map +0 -1
- package/dist/chunk-MBSYQ3WX.js.map +0 -1
- package/dist/chunk-TS2MTRP4.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/wallet/expo/background.ts"],"names":["contractPollProcessor","TaskManager","BackgroundTask","ExpoIndexerProvider","ExpoArkProvider","createTaskDependencies","runTasks","CONTRACT_POLL_TASK_TYPE","getRandomId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFO,SAAS,wBAAA,CACZ,UACA,OAAA,EACI;AACJ,EAAA,MAAM;AAAA,IACF,SAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAA;AAAA,IACA,UAAA,GAAa,CAACA,uCAAqB;AAAA,GACvC,GAAI,OAAA;AAEJ,EAAYC,sBAAA,CAAA,UAAA,CAAW,UAAU,YAAY;AACzC,IAAA,IAAI;AACA,MAAA,MAAM,MAAA,GAAS,MAAM,SAAA,CAAU,UAAA,EAAsC;AACrE,MAAA,IAAI,CAAC,MAAA,EAAQ;AAGT,QAAA,OAAsBC,yBAAA,CAAA,oBAAA,CAAqB,OAAA;AAAA,MAC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;AACL;AAcA,eAAsB,0BAAA,CAClB,UACA,OAAA,EACa;AACb,EAAA,MAAqBA,4CAAkB,QAAA,EAAU;AAAA,IAC7C,eAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/wallet/expo/background.ts"],"names":["contractPollProcessor","TaskManager","BackgroundTask","ExpoIndexerProvider","ExpoArkProvider","createTaskDependencies","runTasks","CONTRACT_POLL_TASK_TYPE","getRandomId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFO,SAAS,wBAAA,CACZ,UACA,OAAA,EACI;AACJ,EAAA,MAAM;AAAA,IACF,SAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAA;AAAA,IACA,UAAA,GAAa,CAACA,uCAAqB;AAAA,GACvC,GAAI,OAAA;AAEJ,EAAYC,sBAAA,CAAA,UAAA,CAAW,UAAU,YAAY;AACzC,IAAA,IAAI;AACA,MAAA,MAAM,MAAA,GAAS,MAAM,SAAA,CAAU,UAAA,EAAsC;AACrE,MAAA,IAAI,CAAC,MAAA,EAAQ;AAGT,QAAA,OAAsBC,yBAAA,CAAA,oBAAA,CAAqB,OAAA;AAAA,MAC/C;AAEA,MAAA,MAAM,eAAA,GAAkB,IAAIC,qCAAA,CAAoB,MAAA,CAAO,YAAY,CAAA;AACnE,MAAA,MAAM,WAAA,GAAc,IAAIC,iCAAA,CAAgB,MAAA,CAAO,YAAY,CAAA;AAE3D,MAAA,MAAM,OAAOC,wCAAA,CAAuB;AAAA,QAChC,gBAAA;AAAA,QACA,kBAAA;AAAA,QACA,eAAA;AAAA,QACA;AAAA,OACH,CAAA;AAED,MAAA,MAAMC,0BAAA,CAAS,SAAA,EAAW,UAAA,EAAY,IAAI,CAAA;AAG1C,MAAA,MAAM,OAAA,GAAU,MAAM,SAAA,CAAU,UAAA,EAAW;AAC3C,MAAA,IAAI,OAAA,CAAQ,SAAS,CAAA,EAAG;AACpB,QAAA,MAAM,SAAA,CAAU,mBAAmB,OAAA,CAAQ,GAAA,CAAI,CAAC,CAAA,KAAM,CAAA,CAAE,EAAE,CAAC,CAAA;AAAA,MAC/D;AAGA,MAAA,MAAM,QAAA,GAAW,MAAM,SAAA,CAAU,QAAA,CAASC,yCAAuB,CAAA;AACjE,MAAA,IAAI,QAAA,CAAS,WAAW,CAAA,EAAG;AACvB,QAAA,MAAM,IAAA,GAAiB;AAAA,UACnB,IAAIC,6BAAA,EAAY;AAAA,UAChB,IAAA,EAAMD,yCAAA;AAAA,UACN,MAAM,EAAC;AAAA,UACP,SAAA,EAAW,KAAK,GAAA;AAAI,SACxB;AACA,QAAA,MAAM,SAAA,CAAU,QAAQ,IAAI,CAAA;AAAA,MAChC;AAEA,MAAA,OAAsBL,yBAAA,CAAA,oBAAA,CAAqB,OAAA;AAAA,IAC/C,SAAS,KAAA,EAAO;AACZ,MAAA,OAAA,CAAQ,KAAA;AAAA,QACJ,mCAAA;AAAA,QACA,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU;AAAA,OAC7C;AACA,MAAA,OAAsBA,yBAAA,CAAA,oBAAA,CAAqB,MAAA;AAAA,IAC/C;AAAA,EACJ,CAAC,CAAA;AACL;AAcA,eAAsB,0BAAA,CAClB,UACA,OAAA,EACa;AACb,EAAA,MAAqBA,4CAAkB,QAAA,EAAU;AAAA,IAC7C,eAAA,EAAiB,SAAS,eAAA,IAAmB;AAAA,GAChD,CAAA;AACL;AASA,eAAsB,6BAA6B,QAAA,EAAiC;AAChF,EAAA,MAAqBA,8CAAoB,QAAQ,CAAA;AACrD","file":"background.cjs","sourcesContent":["/**\n * Expo background task entrypoint — `@arkade-os/sdk/wallet/expo/background`.\n *\n * This subpath is the **only** module in the package that touches\n * `expo-task-manager` / `expo-background-task`. It is split out from\n * `/wallet/expo` on purpose: those packages have no web platform and\n * are declared as optional peer dependencies, so importing them from\n * `/wallet/expo` would regress react-native-web / Node consumers who\n * only need the foreground APIs.\n *\n * The imports are static (not lazy `require()`) because Metro's static\n * dependency collector cannot see modules hidden behind `__require()`\n * in the ESM build — without static imports the packages never enter\n * the bundle graph and resolution fails at runtime. See\n * https://github.com/arkade-os/ts-sdk/issues/486 for details.\n *\n * Consumers install the peers in their Expo app:\n * npx expo install expo-task-manager expo-background-task\n */\nimport * as TaskManager from \"expo-task-manager\";\nimport * as BackgroundTask from \"expo-background-task\";\n\nimport type { WalletRepository } from \"../../repositories/walletRepository\";\nimport type { ContractRepository } from \"../../repositories/contractRepository\";\nimport type { AsyncStorageTaskQueue } from \"../../worker/expo/asyncStorageTaskQueue\";\nimport type { TaskProcessor } from \"../../worker/expo/taskRunner\";\nimport type { TaskItem } from \"../../worker/expo/taskQueue\";\nimport { runTasks, createTaskDependencies } from \"../../worker/expo/taskRunner\";\nimport { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from \"../../worker/expo/processors\";\nimport { ExpoArkProvider } from \"../../providers/expoArk\";\nimport { ExpoIndexerProvider } from \"../../providers/expoIndexer\";\nimport { getRandomId } from \"../utils\";\n\n// ── Persisted config ─────────────────────────────────────────────\n\n/**\n * Wallet parameters persisted by @see ExpoWallet.setup and read\n * by the background handler to reconstruct providers and `extendVtxo`\n * without a network call.\n */\nexport interface PersistedBackgroundConfig {\n arkServerUrl: string;\n pubkeyHex: string;\n serverPubKeyHex: string;\n exitTimelockValue: string;\n exitTimelockType: \"blocks\" | \"seconds\";\n}\n\n// ── Public API ───────────────────────────────────────────────────\n\n/**\n * Options for @see defineExpoBackgroundTask.\n */\nexport interface DefineBackgroundTaskOptions {\n /** AsyncStorage-backed queue (must match the one passed to ExpoWallet.setup). */\n taskQueue: AsyncStorageTaskQueue;\n /** Wallet repository (fresh instance is fine — connects to the same DB). */\n walletRepository: WalletRepository;\n /** Contract repository (fresh instance is fine — connects to the same DB). */\n contractRepository: ContractRepository;\n /** Processors to run. Defaults to `[contractPollProcessor]`. */\n processors?: TaskProcessor[];\n}\n\n/**\n * Define the Expo background task handler.\n *\n * **Must be called at module/global scope** (before React mounts) so\n * Expo's TaskManager can resume the task on cold start.\n *\n * Pair with @see registerExpoBackgroundTask to activate the OS\n * scheduler — `ExpoWallet.setup()` no longer registers the task for\n * you.\n *\n * @example\n * ```ts\n * // App entry (e.g. _layout.tsx) — module scope\n * import { defineExpoBackgroundTask } from \"@arkade-os/sdk/wallet/expo/background\";\n * import { AsyncStorageTaskQueue } from \"@arkade-os/sdk/worker/expo\";\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n *\n * const taskQueue = new AsyncStorageTaskQueue(AsyncStorage);\n * defineExpoBackgroundTask(\"ark-background-poll\", {\n * taskQueue,\n * walletRepository: new IndexedDBWalletRepository(),\n * contractRepository: new IndexedDBContractRepository(),\n * });\n * ```\n */\nexport function defineExpoBackgroundTask(\n taskName: string,\n options: DefineBackgroundTaskOptions,\n): void {\n const {\n taskQueue,\n walletRepository,\n contractRepository,\n processors = [contractPollProcessor],\n } = options;\n\n TaskManager.defineTask(taskName, async () => {\n try {\n const config = await taskQueue.loadConfig<PersistedBackgroundConfig>();\n if (!config) {\n // No config persisted yet — ExpoWallet.setup() hasn't run.\n // Nothing to do.\n return BackgroundTask.BackgroundTaskResult.Success;\n }\n\n const indexerProvider = new ExpoIndexerProvider(config.arkServerUrl);\n const arkProvider = new ExpoArkProvider(config.arkServerUrl);\n\n const deps = createTaskDependencies({\n walletRepository,\n contractRepository,\n indexerProvider,\n arkProvider,\n });\n\n await runTasks(taskQueue, processors, deps);\n\n // Acknowledge outbox results (no foreground to consume them)\n const results = await taskQueue.getResults();\n if (results.length > 0) {\n await taskQueue.acknowledgeResults(results.map((r) => r.id));\n }\n\n // Re-seed the contract-poll task for the next OS wake\n const existing = await taskQueue.getTasks(CONTRACT_POLL_TASK_TYPE);\n if (existing.length === 0) {\n const task: TaskItem = {\n id: getRandomId(),\n type: CONTRACT_POLL_TASK_TYPE,\n data: {},\n createdAt: Date.now(),\n };\n await taskQueue.addTask(task);\n }\n\n return BackgroundTask.BackgroundTaskResult.Success;\n } catch (error) {\n console.error(\n \"[ark-sdk] Background task failed:\",\n error instanceof Error ? error.message : error,\n );\n return BackgroundTask.BackgroundTaskResult.Failed;\n }\n });\n}\n\n/**\n * Activate the OS-level background task scheduler.\n *\n * Call once after @see defineExpoBackgroundTask — typically right after\n * `ExpoWallet.setup()`. Safe to call again to update the interval.\n *\n * @param taskName - The task name passed to {@link defineExpoBackgroundTask}.\n * @param options.minimumInterval - Minimum interval in **minutes** (default\n * 15, the floor enforced by `expo-background-task`).\n *\n * @see https://docs.expo.dev/versions/latest/sdk/background-task/#backgroundtaskoptions\n */\nexport async function registerExpoBackgroundTask(\n taskName: string,\n options?: { minimumInterval?: number },\n): Promise<void> {\n await BackgroundTask.registerTaskAsync(taskName, {\n minimumInterval: options?.minimumInterval ?? 15,\n });\n}\n\n/**\n * Unregister the background task from the OS scheduler.\n *\n * `ExpoWallet.dispose()` does **not** call this — the OS-level task\n * lifecycle is the consumer's responsibility, matching the explicit\n * `register` step.\n */\nexport async function unregisterExpoBackgroundTask(taskName: string): Promise<void> {\n await BackgroundTask.unregisterTaskAsync(taskName);\n}\n"]}
|
|
@@ -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-B69ugeJw.cjs';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B0SUQMXw.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-B7svzMhT.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-B69ugeJw.js';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DWqxuIAs.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-nzJFH8qb.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,8 +1,8 @@
|
|
|
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-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-B4WZOJAI.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-3XWDMLOI.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-3MMUKLCI.js';
|
|
4
|
+
import '../../chunk-LHYNNDY6.js';
|
|
5
|
+
import '../../chunk-UZLQUWYP.js';
|
|
6
6
|
import '../../chunk-EFNLTS6Q.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
8
8
|
import * as TaskManager from 'expo-task-manager';
|
|
@@ -56,7 +56,7 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
56
56
|
}
|
|
57
57
|
async function registerExpoBackgroundTask(taskName, options) {
|
|
58
58
|
await BackgroundTask.registerTaskAsync(taskName, {
|
|
59
|
-
minimumInterval:
|
|
59
|
+
minimumInterval: options?.minimumInterval ?? 15
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
async function unregisterExpoBackgroundTask(taskName)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AAChF,EAAA,MAAqB,mCAAoB,QAAQ,CAAA;AACrD","file":"background.js","sourcesContent":["/**\n * Expo background task entrypoint — `@arkade-os/sdk/wallet/expo/background`.\n *\n * This subpath is the **only** module in the package that touches\n * `expo-task-manager` / `expo-background-task`. It is split out from\n * `/wallet/expo` on purpose: those packages have no web platform and\n * are declared as optional peer dependencies, so importing them from\n * `/wallet/expo` would regress react-native-web / Node consumers who\n * only need the foreground APIs.\n *\n * The imports are static (not lazy `require()`) because Metro's static\n * dependency collector cannot see modules hidden behind `__require()`\n * in the ESM build — without static imports the packages never enter\n * the bundle graph and resolution fails at runtime. See\n * https://github.com/arkade-os/ts-sdk/issues/486 for details.\n *\n * Consumers install the peers in their Expo app:\n * npx expo install expo-task-manager expo-background-task\n */\nimport * as TaskManager from \"expo-task-manager\";\nimport * as BackgroundTask from \"expo-background-task\";\n\nimport type { WalletRepository } from \"../../repositories/walletRepository\";\nimport type { ContractRepository } from \"../../repositories/contractRepository\";\nimport type { AsyncStorageTaskQueue } from \"../../worker/expo/asyncStorageTaskQueue\";\nimport type { TaskProcessor } from \"../../worker/expo/taskRunner\";\nimport type { TaskItem } from \"../../worker/expo/taskQueue\";\nimport { runTasks, createTaskDependencies } from \"../../worker/expo/taskRunner\";\nimport { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from \"../../worker/expo/processors\";\nimport { ExpoArkProvider } from \"../../providers/expoArk\";\nimport { ExpoIndexerProvider } from \"../../providers/expoIndexer\";\nimport { getRandomId } from \"../utils\";\n\n// ── Persisted config ─────────────────────────────────────────────\n\n/**\n * Wallet parameters persisted by @see ExpoWallet.setup and read\n * by the background handler to reconstruct providers and `extendVtxo`\n * without a network call.\n */\nexport interface PersistedBackgroundConfig {\n arkServerUrl: string;\n pubkeyHex: string;\n serverPubKeyHex: string;\n exitTimelockValue: string;\n exitTimelockType: \"blocks\" | \"seconds\";\n}\n\n// ── Public API ───────────────────────────────────────────────────\n\n/**\n * Options for @see defineExpoBackgroundTask.\n */\nexport interface DefineBackgroundTaskOptions {\n /** AsyncStorage-backed queue (must match the one passed to ExpoWallet.setup). */\n taskQueue: AsyncStorageTaskQueue;\n /** Wallet repository (fresh instance is fine — connects to the same DB). */\n walletRepository: WalletRepository;\n /** Contract repository (fresh instance is fine — connects to the same DB). */\n contractRepository: ContractRepository;\n /** Processors to run. Defaults to `[contractPollProcessor]`. */\n processors?: TaskProcessor[];\n}\n\n/**\n * Define the Expo background task handler.\n *\n * **Must be called at module/global scope** (before React mounts) so\n * Expo's TaskManager can resume the task on cold start.\n *\n * Pair with @see registerExpoBackgroundTask to activate the OS\n * scheduler — `ExpoWallet.setup()` no longer registers the task for\n * you.\n *\n * @example\n * ```ts\n * // App entry (e.g. _layout.tsx) — module scope\n * import { defineExpoBackgroundTask } from \"@arkade-os/sdk/wallet/expo/background\";\n * import { AsyncStorageTaskQueue } from \"@arkade-os/sdk/worker/expo\";\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n *\n * const taskQueue = new AsyncStorageTaskQueue(AsyncStorage);\n * defineExpoBackgroundTask(\"ark-background-poll\", {\n * taskQueue,\n * walletRepository: new IndexedDBWalletRepository(),\n * contractRepository: new IndexedDBContractRepository(),\n * });\n * ```\n */\nexport function defineExpoBackgroundTask(\n taskName: string,\n options: DefineBackgroundTaskOptions,\n): void {\n const {\n taskQueue,\n walletRepository,\n contractRepository,\n processors = [contractPollProcessor],\n } = options;\n\n TaskManager.defineTask(taskName, async () => {\n try {\n const config = await taskQueue.loadConfig<PersistedBackgroundConfig>();\n if (!config) {\n // No config persisted yet — ExpoWallet.setup() hasn't run.\n // Nothing to do.\n return BackgroundTask.BackgroundTaskResult.Success;\n }\n\n const indexerProvider = new ExpoIndexerProvider(config.arkServerUrl);\n const arkProvider = new ExpoArkProvider(config.arkServerUrl);\n\n const deps = createTaskDependencies({\n walletRepository,\n contractRepository,\n indexerProvider,\n arkProvider,\n });\n\n await runTasks(taskQueue, processors, deps);\n\n // Acknowledge outbox results (no foreground to consume them)\n const results = await taskQueue.getResults();\n if (results.length > 0) {\n await taskQueue.acknowledgeResults(results.map((r) => r.id));\n }\n\n // Re-seed the contract-poll task for the next OS wake\n const existing = await taskQueue.getTasks(CONTRACT_POLL_TASK_TYPE);\n if (existing.length === 0) {\n const task: TaskItem = {\n id: getRandomId(),\n type: CONTRACT_POLL_TASK_TYPE,\n data: {},\n createdAt: Date.now(),\n };\n await taskQueue.addTask(task);\n }\n\n return BackgroundTask.BackgroundTaskResult.Success;\n } catch (error) {\n console.error(\n \"[ark-sdk] Background task failed:\",\n error instanceof Error ? error.message : error,\n );\n return BackgroundTask.BackgroundTaskResult.Failed;\n }\n });\n}\n\n/**\n * Activate the OS-level background task scheduler.\n *\n * Call once after @see defineExpoBackgroundTask — typically right after\n * `ExpoWallet.setup()`. Safe to call again to update the interval.\n *\n * @param taskName - The task name passed to {@link defineExpoBackgroundTask}.\n * @param options.minimumInterval - Minimum interval in **minutes** (default\n * 15, the floor enforced by `expo-background-task`).\n *\n * @see https://docs.expo.dev/versions/latest/sdk/background-task/#backgroundtaskoptions\n */\nexport async function registerExpoBackgroundTask(\n taskName: string,\n options?: { minimumInterval?: number },\n): Promise<void> {\n await BackgroundTask.registerTaskAsync(taskName, {\n minimumInterval: options?.minimumInterval ?? 15,\n });\n}\n\n/**\n * Unregister the background task from the OS scheduler.\n *\n * `ExpoWallet.dispose()` does **not** call this — the OS-level task\n * lifecycle is the consumer's responsibility, matching the explicit\n * `register` step.\n */\nexport async function unregisterExpoBackgroundTask(taskName: string): Promise<void> {\n await BackgroundTask.unregisterTaskAsync(taskName);\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunkCZTQLA55_cjs = require('../../chunk-CZTQLA55.cjs');
|
|
4
|
+
var chunk3YC3LQ2E_cjs = require('../../chunk-3YC3LQ2E.cjs');
|
|
5
|
+
var chunkRNMLFY2V_cjs = require('../../chunk-RNMLFY2V.cjs');
|
|
6
|
+
require('../../chunk-IEMPH7J6.cjs');
|
|
7
7
|
require('../../chunk-E7HB3GKK.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
var base = require('@scure/base');
|
|
@@ -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 chunk3YC3LQ2E_cjs.Wallet.create(config);
|
|
62
|
+
const processors = config.background.processors ?? [chunkCZTQLA55_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) => chunk3YC3LQ2E_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
69
69
|
};
|
|
70
70
|
const { taskQueue } = config.background;
|
|
71
71
|
if ("persistConfig" in taskQueue) {
|
|
72
|
-
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof
|
|
72
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkRNMLFY2V_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
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 chunkCZTQLA55_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(chunkCZTQLA55_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
113
113
|
if (existing.length > 0) return;
|
|
114
114
|
const task = {
|
|
115
|
-
id:
|
|
116
|
-
type:
|
|
115
|
+
id: chunk3YC3LQ2E_cjs.getRandomId(),
|
|
116
|
+
type: chunkCZTQLA55_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(chunkCZTQLA55_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 { W as Wallet, P as ProviderConnectionState } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-
|
|
3
|
-
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as Wallet, P as ProviderConnectionState } from '../../wallet-B6Xiferv.cjs';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-B69ugeJw.cjs';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-B7svzMhT.cjs';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-C_Y2YrXC.cjs';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as Wallet, P as ProviderConnectionState } from '../../wallet-
|
|
2
|
-
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-
|
|
3
|
-
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as Wallet, P as ProviderConnectionState } from '../../wallet-CuHAI-eW.js';
|
|
2
|
+
import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-B69ugeJw.js';
|
|
3
|
+
import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-nzJFH8qb.js';
|
|
4
4
|
import '@scure/btc-signer';
|
|
5
5
|
import '@scure/btc-signer/utils.js';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-BU-Cpyjw.js';
|
|
8
8
|
import '@scure/btc-signer/transaction.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-B4WZOJAI.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-3MMUKLCI.js';
|
|
3
|
+
import { RestArkProvider } from '../../chunk-LHYNNDY6.js';
|
|
4
|
+
import '../../chunk-UZLQUWYP.js';
|
|
5
5
|
import '../../chunk-EFNLTS6Q.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
import { hex } from '@scure/base';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.cjs';
|
|
4
4
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-C_Y2YrXC.cjs';
|
|
6
6
|
|
|
7
7
|
declare class ArkError extends Error {
|
|
8
8
|
readonly code: number;
|
|
@@ -1048,11 +1048,22 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1048
1048
|
* Only HD wallets have a watermark to look ahead of; static / `auto`
|
|
1049
1049
|
* wallets keep a single index-0 receive address, so the feature stays off.
|
|
1050
1050
|
*
|
|
1051
|
-
* `
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1051
|
+
* `candidateDeps` is read at refill time, so a band rebuilt after
|
|
1052
|
+
* {@link rotateServerSigner} fans the active signer set (persisted
|
|
1053
|
+
* old-signer rows stay watched through the repository).
|
|
1054
1054
|
*/
|
|
1055
1055
|
protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
|
|
1056
|
+
/**
|
|
1057
|
+
* Every axis an externally issued receive script could be anchored to, not
|
|
1058
|
+
* just the wallet's own current shape: an issuer sharing the seed (NArk, a
|
|
1059
|
+
* merchant backend) picks its own contract type, and a band derived from one
|
|
1060
|
+
* variant silently misses the rest until a `restore()`.
|
|
1061
|
+
*
|
|
1062
|
+
* Read from cached state, not a fresh `getInfo`, to stay synchronous and
|
|
1063
|
+
* offline-safe; {@link refreshDeprecatedSigners} and
|
|
1064
|
+
* {@link rotateServerSigner} keep it current and re-trigger a refill.
|
|
1065
|
+
*/
|
|
1066
|
+
private receiveCandidateDeps;
|
|
1056
1067
|
private readonly _signerRouter;
|
|
1057
1068
|
/**
|
|
1058
1069
|
* @internal Sole write path for `offchainTapscript` after construction.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Transaction } from '@scure/btc-signer';
|
|
2
2
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.js';
|
|
4
4
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BU-Cpyjw.js';
|
|
6
6
|
|
|
7
7
|
declare class ArkError extends Error {
|
|
8
8
|
readonly code: number;
|
|
@@ -1048,11 +1048,22 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
1048
1048
|
* Only HD wallets have a watermark to look ahead of; static / `auto`
|
|
1049
1049
|
* wallets keep a single index-0 receive address, so the feature stays off.
|
|
1050
1050
|
*
|
|
1051
|
-
* `
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1051
|
+
* `candidateDeps` is read at refill time, so a band rebuilt after
|
|
1052
|
+
* {@link rotateServerSigner} fans the active signer set (persisted
|
|
1053
|
+
* old-signer rows stay watched through the repository).
|
|
1054
1054
|
*/
|
|
1055
1055
|
protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
|
|
1056
|
+
/**
|
|
1057
|
+
* Every axis an externally issued receive script could be anchored to, not
|
|
1058
|
+
* just the wallet's own current shape: an issuer sharing the seed (NArk, a
|
|
1059
|
+
* merchant backend) picks its own contract type, and a band derived from one
|
|
1060
|
+
* variant silently misses the rest until a `restore()`.
|
|
1061
|
+
*
|
|
1062
|
+
* Read from cached state, not a fresh `getInfo`, to stay synchronous and
|
|
1063
|
+
* offline-safe; {@link refreshDeprecatedSigners} and
|
|
1064
|
+
* {@link rotateServerSigner} keep it current and re-trigger a refill.
|
|
1065
|
+
*/
|
|
1066
|
+
private receiveCandidateDeps;
|
|
1056
1067
|
private readonly _signerRouter;
|
|
1057
1068
|
/**
|
|
1058
1069
|
* @internal Sole write path for `offchainTapscript` after construction.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunkCZTQLA55_cjs = require('../../chunk-CZTQLA55.cjs');
|
|
4
|
+
require('../../chunk-3YC3LQ2E.cjs');
|
|
5
|
+
require('../../chunk-RNMLFY2V.cjs');
|
|
6
|
+
require('../../chunk-IEMPH7J6.cjs');
|
|
7
7
|
require('../../chunk-E7HB3GKK.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
|
|
@@ -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 chunkCZTQLA55_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 chunkCZTQLA55_cjs.contractPollProcessor; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkCZTQLA55_cjs.createTaskDependencies; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "runTasks", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkCZTQLA55_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, 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-B7svzMhT.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-B7svzMhT.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B0SUQMXw.cjs';
|
|
4
|
+
import '../../ark-B69ugeJw.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-nzJFH8qb.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-nzJFH8qb.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DWqxuIAs.js';
|
|
4
|
+
import '../../ark-B69ugeJw.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,7 +1,7 @@
|
|
|
1
|
-
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
1
|
+
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-B4WZOJAI.js';
|
|
2
|
+
import '../../chunk-3MMUKLCI.js';
|
|
3
|
+
import '../../chunk-LHYNNDY6.js';
|
|
4
|
+
import '../../chunk-UZLQUWYP.js';
|
|
5
5
|
import '../../chunk-EFNLTS6Q.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|