@arkade-os/sdk 0.5.0 → 0.5.1
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/{asyncStorageTaskQueue-BFv2O1y1.d.ts → asyncStorageTaskQueue-CdWheMqT.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-qRRQUOE8.d.cts → asyncStorageTaskQueue-DFt5LgW5.d.cts} +2 -2
- package/dist/{chunk-K352GMVL.js → chunk-3M22PJVB.js} +3 -3
- package/dist/{chunk-K352GMVL.js.map → chunk-3M22PJVB.js.map} +1 -1
- package/dist/{chunk-HABGVRLF.js → chunk-6MIGYYWB.js} +3 -3
- package/dist/{chunk-HABGVRLF.js.map → chunk-6MIGYYWB.js.map} +1 -1
- package/dist/{chunk-K2E6X6JT.js → chunk-FXVEOEYB.js} +4 -4
- package/dist/{chunk-K2E6X6JT.js.map → chunk-FXVEOEYB.js.map} +1 -1
- package/dist/{chunk-JT5YVMCJ.cjs → chunk-GQUFPTN7.cjs} +16 -16
- package/dist/{chunk-JT5YVMCJ.cjs.map → chunk-GQUFPTN7.cjs.map} +1 -1
- package/dist/{chunk-GN2K4WBP.cjs → chunk-GW42FS2X.cjs} +48 -48
- package/dist/{chunk-GN2K4WBP.cjs.map → chunk-GW42FS2X.cjs.map} +1 -1
- package/dist/{chunk-IQWLFYT2.cjs → chunk-HQNQ3CLQ.cjs} +18 -18
- package/dist/{chunk-IQWLFYT2.cjs.map → chunk-HQNQ3CLQ.cjs.map} +1 -1
- package/dist/{chunk-GOM26K6H.cjs → chunk-JJ6QKTFZ.cjs} +10 -10
- package/dist/{chunk-GOM26K6H.cjs.map → chunk-JJ6QKTFZ.cjs.map} +1 -1
- package/dist/{chunk-GWJWXVUB.js → chunk-NKKJEA3Z.js} +51 -37
- package/dist/chunk-NKKJEA3Z.js.map +1 -0
- package/dist/{chunk-ZOEB53NQ.js → chunk-QFB55EOZ.js} +3 -3
- package/dist/{chunk-ZOEB53NQ.js.map → chunk-QFB55EOZ.js.map} +1 -1
- package/dist/{chunk-AU77RYOC.cjs → chunk-QKNSMVBW.cjs} +546 -532
- package/dist/chunk-QKNSMVBW.cjs.map +1 -0
- package/dist/{chunk-UUSKJOSX.cjs → chunk-XLHUGP3G.cjs} +3 -3
- package/dist/{chunk-UUSKJOSX.cjs.map → chunk-XLHUGP3G.cjs.map} +1 -1
- package/dist/{chunk-TZSKLERU.js → chunk-XQRIY5K5.js} +4 -4
- package/dist/{chunk-TZSKLERU.js.map → chunk-XQRIY5K5.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-DNbiUgy8.d.ts → delegate-BSbGQabI.d.ts} +1 -1
- package/dist/{delegate-B5BmYkEY.d.cts → delegate-CFCfrReG.d.cts} +1 -1
- package/dist/{index-CZw-MMfY.d.cts → index-B3fRWO5i.d.cts} +9 -1
- package/dist/{index-CZw-MMfY.d.ts → index-B3fRWO5i.d.ts} +9 -1
- package/dist/{index-CYeyT3kn.d.ts → index-CzUVvIxA.d.ts} +2 -2
- package/dist/{index-B4QuO9sH.d.cts → index-Fpf4mQZr.d.cts} +2 -2
- package/dist/index.cjs +313 -313
- package/dist/index.d.cts +15 -8
- package/dist/index.d.ts +15 -8
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- 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 +33 -33
- 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-wm1bhmtP.d.ts → taskRunner-CdfoCMaw.d.ts} +2 -2
- package/dist/{taskRunner-B3SLvUfL.d.cts → taskRunner-Dk6oDAtd.d.cts} +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 +15 -15
- 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/{wallet-DCZ2-Bea.d.cts → wallet-BQHNgc_v.d.ts} +3 -3
- package/dist/{wallet-DGLXuwXT.d.ts → wallet-D9dvXu-K.d.cts} +3 -3
- 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
- package/dist/chunk-AU77RYOC.cjs.map +0 -1
- package/dist/chunk-GWJWXVUB.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getRandomId, extendVirtualCoinForContract, collectContracts, warnAndFilterVtxosForScript, saveVtxosForContract } from './chunk-
|
|
2
|
-
import { getNormalizedVtxos } from './chunk-
|
|
1
|
+
import { getRandomId, extendVirtualCoinForContract, collectContracts, warnAndFilterVtxosForScript, saveVtxosForContract } from './chunk-NKKJEA3Z.js';
|
|
2
|
+
import { getNormalizedVtxos } from './chunk-QFB55EOZ.js';
|
|
3
3
|
|
|
4
4
|
// src/worker/expo/taskRunner.ts
|
|
5
5
|
async function runTasks(queue, processors, deps) {
|
|
@@ -94,5 +94,5 @@ var contractPollProcessor = {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks };
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-XQRIY5K5.js.map
|
|
98
|
+
//# sourceMappingURL=chunk-XQRIY5K5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/worker/expo/taskRunner.ts","../src/worker/expo/processors/contractPollProcessor.ts"],"names":[],"mappings":";;;;AAkDA,eAAsB,QAAA,CAClB,KAAA,EACA,UAAA,EACA,IAAA,EACqB;AACrB,EAAA,MAAM,KAAA,GAAQ,MAAM,KAAA,CAAM,QAAA,EAAS;AACnC,EAAA,MAAM,YAAA,GAAe,IAAI,GAAA,CAAI,UAAA,CAAW,GAAA,CAAI,CAAC,CAAA,KAAM,CAAC,CAAA,CAAE,QAAA,EAAU,CAAC,CAAC,CAAC,CAAA;AACnE,EAAA,MAAM,UAAwB,EAAC;AAE/B,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACtB,IAAA,MAAM,SAAA,GAAY,YAAA,CAAa,GAAA,CAAI,IAAA,CAAK,IAAI,CAAA;AAE5C,IAAA,IAAI,OAAA;AAEJ,IAAA,IAAI,CAAC,SAAA,EAAW;AACZ,MAAA,OAAA,GAAU;AAAA,QACN,YAAY,IAAA,CAAK,EAAA;AAAA,QACjB,MAAM,IAAA,CAAK,IAAA;AAAA,QACX,MAAA,EAAQ;AAAA,OACZ;AAAA,IACJ,CAAA,MAAO;AACH,MAAA,IAAI;AACA,QAAA,OAAA,GAAU,MAAM,SAAA,CAAU,OAAA,CAAQ,IAAA,EAAM,IAAI,CAAA;AAAA,MAChD,SAAS,KAAA,EAAO;AACZ,QAAA,OAAA,GAAU;AAAA,UACN,YAAY,IAAA,CAAK,EAAA;AAAA,UACjB,MAAM,IAAA,CAAK,IAAA;AAAA,UACX,MAAA,EAAQ,QAAA;AAAA,UACR,IAAA,EAAM;AAAA,YACF,OAAO,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK;AAAA;AAChE,SAC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AAI,MAAM,mBAAmB,eAAA,EAAiB;AAAA,UAC9D,OAAA,EAAS,CAAC,QAAA,CAAS,MAAM,CAAA;AAAA,UACzB,SAAA;AAAA,UACA;AAAA,SACH,CAAA;AAED,QAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACtB,UAAA,QAAA,CAAS,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,QAAQ,CAAC,CAAA;AAAA,QAC5C;AAEA,QAAA,OAAA,GAAU,IAAA,GAAO,KAAA,CAAM,MAAA,KAAW,QAAA,GAAW,KAAA;AAC7C,QAAA,SAAA,EAAA;AAAA,MACJ;AAKA,MAAA,MAAM,QAAA,GAAW,2BAAA;AAAA,QACb,QAAA;AAAA,QACA,QAAA,CAAS,MAAA;AAAA,QACT;AAAA,OACJ;AACA,MAAA,MAAM,oBAAA,CAAqB,gBAAA,EAAkB,QAAA,EAAU,QAAQ,CAAA;AAC/D,MAAA,UAAA,IAAc,QAAA,CAAS,MAAA;AACvB,MAAA,kBAAA,EAAA;AAAA,IACJ;AAEA,IAAA,OAAO;AAAA,MACH,YAAY,IAAA,CAAK,EAAA;AAAA,MACjB,IAAA,EAAM,uBAAA;AAAA,MACN,MAAA,EAAQ,SAAA;AAAA,MACR,IAAA,EAAM,EAAE,kBAAA,EAAoB,UAAA;AAAW,KAC3C;AAAA,EACJ;AACJ","file":"chunk-TZSKLERU.js","sourcesContent":["import type { TaskItem, TaskResult, TaskQueue } from \"./taskQueue\";\nimport type { WalletRepository } from \"../../repositories/walletRepository\";\nimport type { ContractRepository } from \"../../repositories/contractRepository\";\nimport type { IndexerProvider } from \"../../providers/indexer\";\nimport type { ArkProvider } from \"../../providers/ark\";\nimport type { ExtendedVirtualCoin, VirtualCoin } from \"../../wallet\";\nimport type { Contract } from \"../../contracts/types\";\nimport { getRandomId, extendVirtualCoinForContract } from \"../../wallet/utils\";\n\n/**\n * Shared dependencies injected into every processor at runtime.\n *\n * `extendVtxo` requires the owning contract — processors must resolve each\n * vtxo's `script` to a known contract (via the contract repository) before\n * calling this. The strict signature prevents the footgun where a missing\n * contract silently falls back to the wallet's default tapscript.\n */\nexport interface TaskDependencies {\n walletRepository: WalletRepository;\n contractRepository: ContractRepository;\n indexerProvider: IndexerProvider;\n arkProvider: ArkProvider;\n extendVtxo: (vtxo: VirtualCoin, contract: Contract) => ExtendedVirtualCoin;\n}\n\n/**\n * A stateless unit that handles one type of task item.\n *\n * Processors must not keep in-memory state across invocations —\n * all coordination lives in the @see TaskQueue and repositories.\n *\n * The `TDeps` parameter defaults to @see TaskDependencies but\n * can be overridden for domain-specific processors (e.g. swap processing).\n */\nexport interface TaskProcessor<TDeps = TaskDependencies> {\n readonly taskType: string;\n execute(item: TaskItem, deps: TDeps): Promise<Omit<TaskResult, \"id\" | \"executedAt\">>;\n}\n\n/**\n * Run all pending tasks from the queue through matching processors.\n *\n * For each task in the inbox:\n * 1. Find the processor whose `taskType` matches `task.type`.\n * 2. Execute it, producing a @see TaskResult.\n * 3. Push the result to the outbox and remove the task from the inbox.\n *\n * Tasks with no matching processor produce a `\"noop\"` result.\n * Processor errors produce a `\"failed\"` result with the error message.\n */\nexport async function runTasks<TDeps = TaskDependencies>(\n queue: TaskQueue,\n processors: TaskProcessor<TDeps>[],\n deps: TDeps,\n): Promise<TaskResult[]> {\n const tasks = await queue.getTasks();\n const processorMap = new Map(processors.map((p) => [p.taskType, p]));\n const results: TaskResult[] = [];\n\n for (const task of tasks) {\n const processor = processorMap.get(task.type);\n\n let partial: Omit<TaskResult, \"id\" | \"executedAt\">;\n\n if (!processor) {\n partial = {\n taskItemId: task.id,\n type: task.type,\n status: \"noop\",\n };\n } else {\n try {\n partial = await processor.execute(task, deps);\n } catch (error) {\n partial = {\n taskItemId: task.id,\n type: task.type,\n status: \"failed\",\n data: {\n error: error instanceof Error ? error.message : String(error),\n },\n };\n }\n }\n\n const result: TaskResult = {\n ...partial,\n id: getRandomId(),\n executedAt: Date.now(),\n };\n\n await queue.pushResult(result);\n await queue.removeTask(task.id);\n results.push(result);\n }\n\n return results;\n}\n\n/**\n * Options for @see createTaskDependencies.\n */\nexport interface CreateTaskDependenciesOptions {\n walletRepository: WalletRepository;\n contractRepository: ContractRepository;\n indexerProvider: IndexerProvider;\n arkProvider: ArkProvider;\n}\n\n/**\n * Build the @see TaskDependencies needed by task processors\n * (e.g. `src/worker/expo/processors/contractPollProcessor.ts`)\n *\n * This is the same construction that `defineExpoBackgroundTask` does\n * internally, extracted so that consumers with custom schedulers\n * (e.g. bare React Native with `react-native-background-fetch`)\n * can build deps without depending on Expo.\n */\nexport function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies {\n return {\n ...options,\n extendVtxo: (vtxo: VirtualCoin, contract: Contract) =>\n extendVirtualCoinForContract(vtxo, contract),\n };\n}\n","import { collectContracts } from \"../../../repositories/contractRepository\";\nimport type { TaskItem, TaskResult } from \"../taskQueue\";\nimport type { TaskProcessor, TaskDependencies } from \"../taskRunner\";\nimport type { ExtendedVirtualCoin } from \"../../../wallet\";\nimport { getNormalizedVtxos } from \"../../../wallet/vtxo\";\nimport {\n warnAndFilterVtxosForScript,\n saveVtxosForContract,\n} from \"../../../contracts/vtxoOwnership\";\n\nexport const CONTRACT_POLL_TASK_TYPE = \"contract-poll\";\n\n/**\n * Polls the indexer for the latest VTXO state of every contract and\n * persists the results to the wallet repository.\n *\n * Replicates the polling subset of @see ContractManager.initialize:\n * 1. Load every watched contract from the contract repository.\n * 2. Paginated fetch of every VTXO (including spent) from the indexer.\n * 3. Extend each VTXO with tapscript data.\n * 4. Save to the wallet repository.\n *\n * NOTE: the indexer query deliberately omits `spendableOnly`. Every\n * repository implements `saveVtxos` as an upsert with no batch delete,\n * so filtering to spendable-only would leave VTXOs that became spent\n * between polls marked as spendable forever. Fetching the full set lets\n * the upsert overwrite stale records with their latest state.\n */\nexport const contractPollProcessor: TaskProcessor = {\n taskType: CONTRACT_POLL_TASK_TYPE,\n\n async execute(\n item: TaskItem,\n deps: TaskDependencies,\n ): Promise<Omit<TaskResult, \"id\" | \"executedAt\">> {\n const { contractRepository, walletRepository, indexerProvider, extendVtxo } = deps;\n\n // Background channel, so it covers exactly what the watcher's\n // subscription covers: `retained` rows are kept for reads only.\n const contracts = await collectContracts(contractRepository, {\n watch: [\"watched\", \"awaiting-funds\"],\n });\n let contractsProcessed = 0;\n let vtxosSaved = 0;\n\n for (const contract of contracts) {\n // Paginated fetch of spendable virtual outputs\n const pageSize = 100;\n let pageIndex = 0;\n let hasMore = true;\n const allVtxos: ExtendedVirtualCoin[] = [];\n\n while (hasMore) {\n const { vtxos, page } = await getNormalizedVtxos(indexerProvider, {\n scripts: [contract.script],\n pageIndex,\n pageSize,\n });\n\n for (const vtxo of vtxos) {\n allVtxos.push(extendVtxo(vtxo, contract));\n }\n\n hasMore = page ? vtxos.length === pageSize : false;\n pageIndex++;\n }\n\n // Skip wrong-script rows (legacy duplicates or indexer drift)\n // before persisting; the loop must keep going for the remaining\n // contracts even when one row is rejected.\n const filtered = warnAndFilterVtxosForScript(\n allVtxos,\n contract.script,\n \"contractPollProcessor\",\n );\n await saveVtxosForContract(walletRepository, contract, filtered);\n vtxosSaved += filtered.length;\n contractsProcessed++;\n }\n\n return {\n taskItemId: item.id,\n type: CONTRACT_POLL_TASK_TYPE,\n status: \"success\",\n data: { contractsProcessed, vtxosSaved },\n };\n },\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/worker/expo/taskRunner.ts","../src/worker/expo/processors/contractPollProcessor.ts"],"names":[],"mappings":";;;;AAkDA,eAAsB,QAAA,CAClB,KAAA,EACA,UAAA,EACA,IAAA,EACqB;AACrB,EAAA,MAAM,KAAA,GAAQ,MAAM,KAAA,CAAM,QAAA,EAAS;AACnC,EAAA,MAAM,YAAA,GAAe,IAAI,GAAA,CAAI,UAAA,CAAW,GAAA,CAAI,CAAC,CAAA,KAAM,CAAC,CAAA,CAAE,QAAA,EAAU,CAAC,CAAC,CAAC,CAAA;AACnE,EAAA,MAAM,UAAwB,EAAC;AA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,EAAkB,QAAA,EAAU,QAAQ,CAAA;AAC/D,MAAA,UAAA,IAAc,QAAA,CAAS,MAAA;AACvB,MAAA,kBAAA,EAAA;AAAA,IACJ;AAEA,IAAA,OAAO;AAAA,MACH,YAAY,IAAA,CAAK,EAAA;AAAA,MACjB,IAAA,EAAM,uBAAA;AAAA,MACN,MAAA,EAAQ,SAAA;AAAA,MACR,IAAA,EAAM,EAAE,kBAAA,EAAoB,UAAA;AAAW,KAC3C;AAAA,EACJ;AACJ","file":"chunk-XQRIY5K5.js","sourcesContent":["import type { TaskItem, TaskResult, TaskQueue } from \"./taskQueue\";\nimport type { WalletRepository } from \"../../repositories/walletRepository\";\nimport type { ContractRepository } from \"../../repositories/contractRepository\";\nimport type { IndexerProvider } from \"../../providers/indexer\";\nimport type { ArkProvider } from \"../../providers/ark\";\nimport type { ExtendedVirtualCoin, VirtualCoin } from \"../../wallet\";\nimport type { Contract } from \"../../contracts/types\";\nimport { getRandomId, extendVirtualCoinForContract } from \"../../wallet/utils\";\n\n/**\n * Shared dependencies injected into every processor at runtime.\n *\n * `extendVtxo` requires the owning contract — processors must resolve each\n * vtxo's `script` to a known contract (via the contract repository) before\n * calling this. The strict signature prevents the footgun where a missing\n * contract silently falls back to the wallet's default tapscript.\n */\nexport interface TaskDependencies {\n walletRepository: WalletRepository;\n contractRepository: ContractRepository;\n indexerProvider: IndexerProvider;\n arkProvider: ArkProvider;\n extendVtxo: (vtxo: VirtualCoin, contract: Contract) => ExtendedVirtualCoin;\n}\n\n/**\n * A stateless unit that handles one type of task item.\n *\n * Processors must not keep in-memory state across invocations —\n * all coordination lives in the @see TaskQueue and repositories.\n *\n * The `TDeps` parameter defaults to @see TaskDependencies but\n * can be overridden for domain-specific processors (e.g. swap processing).\n */\nexport interface TaskProcessor<TDeps = TaskDependencies> {\n readonly taskType: string;\n execute(item: TaskItem, deps: TDeps): Promise<Omit<TaskResult, \"id\" | \"executedAt\">>;\n}\n\n/**\n * Run all pending tasks from the queue through matching processors.\n *\n * For each task in the inbox:\n * 1. Find the processor whose `taskType` matches `task.type`.\n * 2. Execute it, producing a @see TaskResult.\n * 3. Push the result to the outbox and remove the task from the inbox.\n *\n * Tasks with no matching processor produce a `\"noop\"` result.\n * Processor errors produce a `\"failed\"` result with the error message.\n */\nexport async function runTasks<TDeps = TaskDependencies>(\n queue: TaskQueue,\n processors: TaskProcessor<TDeps>[],\n deps: TDeps,\n): Promise<TaskResult[]> {\n const tasks = await queue.getTasks();\n const processorMap = new Map(processors.map((p) => [p.taskType, p]));\n const results: TaskResult[] = [];\n\n for (const task of tasks) {\n const processor = processorMap.get(task.type);\n\n let partial: Omit<TaskResult, \"id\" | \"executedAt\">;\n\n if (!processor) {\n partial = {\n taskItemId: task.id,\n type: task.type,\n status: \"noop\",\n };\n } else {\n try {\n partial = await processor.execute(task, deps);\n } catch (error) {\n partial = {\n taskItemId: task.id,\n type: task.type,\n status: \"failed\",\n data: {\n error: error instanceof Error ? error.message : String(error),\n },\n };\n }\n }\n\n const result: TaskResult = {\n ...partial,\n id: getRandomId(),\n executedAt: Date.now(),\n };\n\n await queue.pushResult(result);\n await queue.removeTask(task.id);\n results.push(result);\n }\n\n return results;\n}\n\n/**\n * Options for @see createTaskDependencies.\n */\nexport interface CreateTaskDependenciesOptions {\n walletRepository: WalletRepository;\n contractRepository: ContractRepository;\n indexerProvider: IndexerProvider;\n arkProvider: ArkProvider;\n}\n\n/**\n * Build the @see TaskDependencies needed by task processors\n * (e.g. `src/worker/expo/processors/contractPollProcessor.ts`)\n *\n * This is the same construction that `defineExpoBackgroundTask` does\n * internally, extracted so that consumers with custom schedulers\n * (e.g. bare React Native with `react-native-background-fetch`)\n * can build deps without depending on Expo.\n */\nexport function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies {\n return {\n ...options,\n extendVtxo: (vtxo: VirtualCoin, contract: Contract) =>\n extendVirtualCoinForContract(vtxo, contract),\n };\n}\n","import { collectContracts } from \"../../../repositories/contractRepository\";\nimport type { TaskItem, TaskResult } from \"../taskQueue\";\nimport type { TaskProcessor, TaskDependencies } from \"../taskRunner\";\nimport type { ExtendedVirtualCoin } from \"../../../wallet\";\nimport { getNormalizedVtxos } from \"../../../wallet/vtxo\";\nimport {\n warnAndFilterVtxosForScript,\n saveVtxosForContract,\n} from \"../../../contracts/vtxoOwnership\";\n\nexport const CONTRACT_POLL_TASK_TYPE = \"contract-poll\";\n\n/**\n * Polls the indexer for the latest VTXO state of every contract and\n * persists the results to the wallet repository.\n *\n * Replicates the polling subset of @see ContractManager.initialize:\n * 1. Load every watched contract from the contract repository.\n * 2. Paginated fetch of every VTXO (including spent) from the indexer.\n * 3. Extend each VTXO with tapscript data.\n * 4. Save to the wallet repository.\n *\n * NOTE: the indexer query deliberately omits `spendableOnly`. Every\n * repository implements `saveVtxos` as an upsert with no batch delete,\n * so filtering to spendable-only would leave VTXOs that became spent\n * between polls marked as spendable forever. Fetching the full set lets\n * the upsert overwrite stale records with their latest state.\n */\nexport const contractPollProcessor: TaskProcessor = {\n taskType: CONTRACT_POLL_TASK_TYPE,\n\n async execute(\n item: TaskItem,\n deps: TaskDependencies,\n ): Promise<Omit<TaskResult, \"id\" | \"executedAt\">> {\n const { contractRepository, walletRepository, indexerProvider, extendVtxo } = deps;\n\n // Background channel, so it covers exactly what the watcher's\n // subscription covers: `retained` rows are kept for reads only.\n const contracts = await collectContracts(contractRepository, {\n watch: [\"watched\", \"awaiting-funds\"],\n });\n let contractsProcessed = 0;\n let vtxosSaved = 0;\n\n for (const contract of contracts) {\n // Paginated fetch of spendable virtual outputs\n const pageSize = 100;\n let pageIndex = 0;\n let hasMore = true;\n const allVtxos: ExtendedVirtualCoin[] = [];\n\n while (hasMore) {\n const { vtxos, page } = await getNormalizedVtxos(indexerProvider, {\n scripts: [contract.script],\n pageIndex,\n pageSize,\n });\n\n for (const vtxo of vtxos) {\n allVtxos.push(extendVtxo(vtxo, contract));\n }\n\n hasMore = page ? vtxos.length === pageSize : false;\n pageIndex++;\n }\n\n // Skip wrong-script rows (legacy duplicates or indexer drift)\n // before persisting; the loop must keep going for the remaining\n // contracts even when one row is rejected.\n const filtered = warnAndFilterVtxosForScript(\n allVtxos,\n contract.script,\n \"contractPollProcessor\",\n );\n await saveVtxosForContract(walletRepository, contract, filtered);\n vtxosSaved += filtered.length;\n contractsProcessed++;\n }\n\n return {\n taskItemId: item.id,\n type: CONTRACT_POLL_TASK_TYPE,\n status: \"success\",\n data: { contractsProcessed, vtxosSaved },\n };\n },\n};\n"]}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkGW42FS2X_cjs = require('../../chunk-GW42FS2X.cjs');
|
|
4
|
+
require('../../chunk-XLHUGP3G.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ArkadeContractHandler", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkGW42FS2X_cjs.ArkadeContractHandler; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "BoardingContractHandler", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkGW42FS2X_cjs.BoardingContractHandler; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "DefaultContractHandler", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkGW42FS2X_cjs.DefaultContractHandler; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "DelegateContractHandler", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkGW42FS2X_cjs.DelegateContractHandler; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "VHTLCContractHandler", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkGW42FS2X_cjs.VHTLCContractHandler; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "VHTLCV2ContractHandler", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkGW42FS2X_cjs.VHTLCV2ContractHandler; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "contractHandlers", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkGW42FS2X_cjs.contractHandlers; }
|
|
35
35
|
});
|
|
36
36
|
//# sourceMappingURL=index.cjs.map
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-
|
|
2
|
-
import '../../index-
|
|
1
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-Fpf4mQZr.cjs';
|
|
2
|
+
import '../../index-B3fRWO5i.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/transaction.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-CFCfrReG.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-
|
|
2
|
-
import '../../index-
|
|
1
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-CzUVvIxA.js';
|
|
2
|
+
import '../../index-B3fRWO5i.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/transaction.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-BSbGQabI.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-3M22PJVB.js';
|
|
2
|
+
import '../../chunk-QFB55EOZ.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-
|
|
2
|
+
import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-B3fRWO5i.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DefaultVtxo is the default implementation of a VtxoScript.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-
|
|
2
|
+
import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-B3fRWO5i.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DefaultVtxo is the default implementation of a VtxoScript.
|
|
@@ -1649,6 +1649,14 @@ interface OnchainProvider {
|
|
|
1649
1649
|
spent: boolean;
|
|
1650
1650
|
txid?: string;
|
|
1651
1651
|
}[]>;
|
|
1652
|
+
/**
|
|
1653
|
+
* Fetch the spend status of one output, for providers that can answer it without reading the
|
|
1654
|
+
* transaction's other outputs; callers fall back to {@link getTxOutspends} when absent.
|
|
1655
|
+
*/
|
|
1656
|
+
getTxOutspend?(txid: string, vout: number): Promise<{
|
|
1657
|
+
spent: boolean;
|
|
1658
|
+
txid?: string;
|
|
1659
|
+
}>;
|
|
1652
1660
|
/**
|
|
1653
1661
|
* Fetch transactions associated with an address.
|
|
1654
1662
|
*
|
|
@@ -5674,4 +5682,4 @@ declare function isBatchSignable(identity: Identity): identity is BatchSignableI
|
|
|
5674
5682
|
*/
|
|
5675
5683
|
declare function isSigningIdentity(value: unknown): value is Identity;
|
|
5676
5684
|
|
|
5677
|
-
export { type VirtualTxRepository as $, type ArkadeInfo as A, type Contract as B, type ContractRepository as C, type ExtendedVirtualCoin as D, type ExtendedCoin as E, type PageResult as F, type GetArkadeInfoOptions as G, type ScriptVtxoCursor as H, type IWallet as I, type ScriptVtxoPageOptions as J, type StoredVtxo as K, type VtxoRepositoryKey as L, type TransactionHistoryPageFilter as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type PageRequest as P, type TransactionHistoryPageCursor as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type WalletState as U, VtxoScript as V, type WalletRepository as W, type ContractFilter as X, type IntentRepository as Y, type ArkIntent as Z, type IntentPageFilter as _, type Identity as a, type
|
|
5685
|
+
export { type VirtualTxRepository as $, type ArkadeInfo as A, type Contract as B, type ContractRepository as C, type ExtendedVirtualCoin as D, type ExtendedCoin as E, type PageResult as F, type GetArkadeInfoOptions as G, type ScriptVtxoCursor as H, type IWallet as I, type ScriptVtxoPageOptions as J, type StoredVtxo as K, type VtxoRepositoryKey as L, type TransactionHistoryPageFilter as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type PageRequest as P, type TransactionHistoryPageCursor as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type WalletState as U, VtxoScript as V, type WalletRepository as W, type ContractFilter as X, type IntentRepository as Y, type ArkIntent as Z, type IntentPageFilter as _, type Identity as a, type ContractEvent as a$, type VirtualTx as a0, type VtxoBranch as a1, ChainedTxType as a2, type DescriptorProvider as a3, type DescriptorSigningRequest as a4, Transaction as a5, type Network as a6, type BatchStartedEvent as a7, type TreeSigningStartedEvent as a8, TxTree as a9, VtxoManager as aA, type SignerSession as aB, type SignedIntent as aC, Intent as aD, type TimeHeight as aE, type IntentFeeConfig as aF, type OffchainInput as aG, FeeAmount as aH, type OnchainInput as aI, type FeeOutput as aJ, type ContractWatcherConfig as aK, type Asset as aL, type FeeInfo as aM, type GetVtxosOptions as aN, type PaginationOptions as aO, type CreateContractParams as aP, type GetContractsFilter as aQ, type GetSpendablePathsOptions as aR, type GetAllSpendingPathsOptions as aS, type InputExpiryFloor as aT, type IssuanceParams as aU, type ReissuanceParams as aV, type BurnParams as aW, type RenewVtxosOptions as aX, type NormalizedVtxoPage as aY, type WatchedScript as aZ, type PathSelection as a_, type TreeNoncesEvent as aa, type BatchFinalizationEvent as ab, type BatchFinalizedEvent as ac, type BatchFailedEvent as ad, type TreeTxEvent as ae, type TreeSignatureEvent as af, type IReadonlyWallet as ag, type ReadonlyIdentity as ah, type OnchainProvider as ai, type DelegateProvider as aj, type ReadonlyWalletConfig as ak, type ExitCaptureMode as al, type ExitDataSource as am, type IReadonlyAssetManager as an, type ContractSyncState as ao, type RecipientArkadeAddressContext as ap, EsploraProvider as aq, type NetworkName as ar, ArkAddress as as, type ContractWithVtxos as at, selectPendingRecoveryOutpoints as au, type Coin as av, ContractManager as aw, type ContractManagerConfig as ax, CSVMultisigTapscript as ay, type SettlementConfig as az, type WalletConfig as b, type GroupMembership as b$, type AssetDetails as b0, type IssuanceResult as b1, type DelegateInfo as b2, type MigrationGlobalSkipReason as b3, type MigrationLegSkipReason as b4, type SignerStatus as b5, type StorageConfig as b6, type IVtxoManager as b7, type SendBitcoinParams as b8, type ExplorerTransaction as b9, ConditionCSVMultisigTapscript as bA, ConditionMultisigTapscript as bB, type ConnectorTreeNode as bC, type ContractBalance as bD, type ContractEventCallback as bE, type ContractHandler as bF, type ContractState as bG, type ContractVtxo as bH, ContractWatcher as bI, type ContractWatcherEventCallback as bJ, DEFAULT_ARKADE_EMULATOR_URL as bK, DEFAULT_VTXO_PAGE_SIZE as bL, DelegateManagerImpl as bM, type DelegateOptions as bN, type DeprecatedSignerMigrationReport as bO, type DeprecatedSignerReport as bP, DigestMismatchError as bQ, type Discoverable as bR, type DiscoveredContract as bS, type DiscoveryDeps as bT, ESPLORA_URL as bU, type EmulatorInfo as bV, type EventSourceCapable as bW, type EventSourceFactory as bX, type EventSourceLike as bY, EventSourceUnavailableError as bZ, type ExitChainResolver as b_, type TreeNonces as ba, type TreePartialSigs as bb, type PendingTx as bc, type EncodedVtxoScript as bd, type EmulatorProvider as be, type Status as bf, type ChainTx as bg, type ArkadeService as bh, type ContractVtxoEvent as bi, type ExtendedContractVtxo as bj, type ResolvedArkadeService as bk, resolveArkadeService as bl, type PathContext as bm, type ActivityIntent as bn, type ActivityResolver as bo, type ArkIntentState as bp, type ArkTapscript as bq, type AssetMetadata as br, BITCOIN_EMULATOR_PUBKEY as bs, type BaseWalletConfig as bt, type BatchInfo as bu, type BatchSignableIdentity as bv, CLTVMultisigTapscript as bw, type CandidateDeps as bx, ChainTxType as by, type CommitmentTx as bz, type ArkadeReader as c, collabExitResolver as c$, type HandlerError as c0, INTENT_TERMINAL_STATES as c1, IndexerTxType as c2, type IntentCoin as c3, type IntentFilter as c4, type KnownMetadata as c5, MAX_PAGE_SIZE as c6, MUTINYNET_EMULATOR_PUBKEY as c7, type MigrateDeprecatedSignerOptions as c8, type MigrationLegReport as c9, type TapLeaves as cA, TapTreeCoder as cB, TapscriptType as cC, type Tx as cD, type TxHistoryRecord as cE, type TxKey as cF, type TxNotification as cG, type TxTag as cH, type TxTreeNode as cI, TxType as cJ, type Vtxo as cK, type VtxoChain as cL, type VtxoType as cM, type WalletMode as cN, type WithPrevTx as cO, assertAllowedSighashTypes as cP, assertPageRequest as cQ, assertRecipientArkadeAddress as cR, assetMintResolver as cS, attachPrevArkTxs as cT, attachPrevoutTxs as cU, boardingResolver as cV, canRecoverOnchain as cW, canSpendOffchain as cX, canSweepOnchain as cY, classifyAgainstSignerSet as cZ, classifyContractSigner as c_, type MigrationVtxoRef as ca, MultisigTapscript as cb, type NewAddressType as cc, type Nonces as cd, type Output as ce, type PageResponse as cf, PartialSig as cg, type PrevTxSource as ch, PrevTxUnavailableError as ci, type ProviderClass as cj, REGTEST_EMULATOR_PUBKEY as ck, type RawTxSource as cl, type RenewalSplit as cm, type RenewalSplitContext as cn, RestDelegateProvider as co, RestEmulatorProvider as cp, type ScanContractsOptions as cq, type ScanResult as cr, type ScheduledSession as cs, SettlementEventType as ct, type SignRequest as cu, type SignerClassification as cv, type SignerSet as cw, type SubscriptionFilter as cx, type SubscriptionResponse as cy, type SweepTxNotification as cz, type ArkadeBroadcaster as d, collectContracts as d0, collectIntents as d1, collectPages as d2, collectScriptVtxos as d3, collectTransactionHistory as d4, collectUtxos as d5, collectVtxos as d6, configureEventSource as d7, createDefaultActivityRegistry as d8, createExitChainResolver as d9, resolveEmulatorPubkey as dA, resolveEventSource as dB, resolvePrevTxs as dC, scriptFromTapLeafScript as dD, signerSetFromInfo as dE, toOffchainInputFeeParams as dF, toXOnlySignerHex as dG, withPrevTxs as dH, type TapscriptDeriving as dI, decodeTapscript as da, defaultEmulatorPubkey as db, getAllNormalizedVtxos as dc, getConfiguredEventSource as dd, getNetwork as de, getNormalizedVtxos as df, getRandomId as dg, getSequence as dh, hasCandidates as di, isBatchSignable as dj, isContractVtxoEvent as dk, isCooperativelyMigratable as dl, isDiscoverable as dm, isEventSourceUnavailableError as dn, isPastExpiry as dp, isSigningIdentity as dq, isSubdust as dr, isTerminalIntentState as ds, isVirtualCoin as dt, isVtxoExpiringSoon as du, isVtxoSpent as dv, iteratePages as dw, networkFromArkadeInfo as dx, networks as dy, pageResult as dz, type WalletBalance as e, type GetVtxosFilter as f, type GetSpendableVtxosFilter as g, type ArkTransaction as h, ActivityRegistry as i, type Activity as j, type IContractManager as k, type GetNewAddressesOptions as l, type NewAddress as m, type IDelegateManager as n, type SettlementEvent as o, type SendParams as p, type IAssetManager as q, RestArkProvider as r, RestIndexerProvider as s, type SubscriptionEvent as t, type SubscriptionHeartbeat as u, type ArkProvider as v, type IndexerProvider as w, type RelativeTimelock as x, type TapLeafScript as y, type VirtualCoin as z };
|
|
@@ -1649,6 +1649,14 @@ interface OnchainProvider {
|
|
|
1649
1649
|
spent: boolean;
|
|
1650
1650
|
txid?: string;
|
|
1651
1651
|
}[]>;
|
|
1652
|
+
/**
|
|
1653
|
+
* Fetch the spend status of one output, for providers that can answer it without reading the
|
|
1654
|
+
* transaction's other outputs; callers fall back to {@link getTxOutspends} when absent.
|
|
1655
|
+
*/
|
|
1656
|
+
getTxOutspend?(txid: string, vout: number): Promise<{
|
|
1657
|
+
spent: boolean;
|
|
1658
|
+
txid?: string;
|
|
1659
|
+
}>;
|
|
1652
1660
|
/**
|
|
1653
1661
|
* Fetch transactions associated with an address.
|
|
1654
1662
|
*
|
|
@@ -5674,4 +5682,4 @@ declare function isBatchSignable(identity: Identity): identity is BatchSignableI
|
|
|
5674
5682
|
*/
|
|
5675
5683
|
declare function isSigningIdentity(value: unknown): value is Identity;
|
|
5676
5684
|
|
|
5677
|
-
export { type VirtualTxRepository as $, type ArkadeInfo as A, type Contract as B, type ContractRepository as C, type ExtendedVirtualCoin as D, type ExtendedCoin as E, type PageResult as F, type GetArkadeInfoOptions as G, type ScriptVtxoCursor as H, type IWallet as I, type ScriptVtxoPageOptions as J, type StoredVtxo as K, type VtxoRepositoryKey as L, type TransactionHistoryPageFilter as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type PageRequest as P, type TransactionHistoryPageCursor as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type WalletState as U, VtxoScript as V, type WalletRepository as W, type ContractFilter as X, type IntentRepository as Y, type ArkIntent as Z, type IntentPageFilter as _, type Identity as a, type
|
|
5685
|
+
export { type VirtualTxRepository as $, type ArkadeInfo as A, type Contract as B, type ContractRepository as C, type ExtendedVirtualCoin as D, type ExtendedCoin as E, type PageResult as F, type GetArkadeInfoOptions as G, type ScriptVtxoCursor as H, type IWallet as I, type ScriptVtxoPageOptions as J, type StoredVtxo as K, type VtxoRepositoryKey as L, type TransactionHistoryPageFilter as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type PageRequest as P, type TransactionHistoryPageCursor as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type WalletState as U, VtxoScript as V, type WalletRepository as W, type ContractFilter as X, type IntentRepository as Y, type ArkIntent as Z, type IntentPageFilter as _, type Identity as a, type ContractEvent as a$, type VirtualTx as a0, type VtxoBranch as a1, ChainedTxType as a2, type DescriptorProvider as a3, type DescriptorSigningRequest as a4, Transaction as a5, type Network as a6, type BatchStartedEvent as a7, type TreeSigningStartedEvent as a8, TxTree as a9, VtxoManager as aA, type SignerSession as aB, type SignedIntent as aC, Intent as aD, type TimeHeight as aE, type IntentFeeConfig as aF, type OffchainInput as aG, FeeAmount as aH, type OnchainInput as aI, type FeeOutput as aJ, type ContractWatcherConfig as aK, type Asset as aL, type FeeInfo as aM, type GetVtxosOptions as aN, type PaginationOptions as aO, type CreateContractParams as aP, type GetContractsFilter as aQ, type GetSpendablePathsOptions as aR, type GetAllSpendingPathsOptions as aS, type InputExpiryFloor as aT, type IssuanceParams as aU, type ReissuanceParams as aV, type BurnParams as aW, type RenewVtxosOptions as aX, type NormalizedVtxoPage as aY, type WatchedScript as aZ, type PathSelection as a_, type TreeNoncesEvent as aa, type BatchFinalizationEvent as ab, type BatchFinalizedEvent as ac, type BatchFailedEvent as ad, type TreeTxEvent as ae, type TreeSignatureEvent as af, type IReadonlyWallet as ag, type ReadonlyIdentity as ah, type OnchainProvider as ai, type DelegateProvider as aj, type ReadonlyWalletConfig as ak, type ExitCaptureMode as al, type ExitDataSource as am, type IReadonlyAssetManager as an, type ContractSyncState as ao, type RecipientArkadeAddressContext as ap, EsploraProvider as aq, type NetworkName as ar, ArkAddress as as, type ContractWithVtxos as at, selectPendingRecoveryOutpoints as au, type Coin as av, ContractManager as aw, type ContractManagerConfig as ax, CSVMultisigTapscript as ay, type SettlementConfig as az, type WalletConfig as b, type GroupMembership as b$, type AssetDetails as b0, type IssuanceResult as b1, type DelegateInfo as b2, type MigrationGlobalSkipReason as b3, type MigrationLegSkipReason as b4, type SignerStatus as b5, type StorageConfig as b6, type IVtxoManager as b7, type SendBitcoinParams as b8, type ExplorerTransaction as b9, ConditionCSVMultisigTapscript as bA, ConditionMultisigTapscript as bB, type ConnectorTreeNode as bC, type ContractBalance as bD, type ContractEventCallback as bE, type ContractHandler as bF, type ContractState as bG, type ContractVtxo as bH, ContractWatcher as bI, type ContractWatcherEventCallback as bJ, DEFAULT_ARKADE_EMULATOR_URL as bK, DEFAULT_VTXO_PAGE_SIZE as bL, DelegateManagerImpl as bM, type DelegateOptions as bN, type DeprecatedSignerMigrationReport as bO, type DeprecatedSignerReport as bP, DigestMismatchError as bQ, type Discoverable as bR, type DiscoveredContract as bS, type DiscoveryDeps as bT, ESPLORA_URL as bU, type EmulatorInfo as bV, type EventSourceCapable as bW, type EventSourceFactory as bX, type EventSourceLike as bY, EventSourceUnavailableError as bZ, type ExitChainResolver as b_, type TreeNonces as ba, type TreePartialSigs as bb, type PendingTx as bc, type EncodedVtxoScript as bd, type EmulatorProvider as be, type Status as bf, type ChainTx as bg, type ArkadeService as bh, type ContractVtxoEvent as bi, type ExtendedContractVtxo as bj, type ResolvedArkadeService as bk, resolveArkadeService as bl, type PathContext as bm, type ActivityIntent as bn, type ActivityResolver as bo, type ArkIntentState as bp, type ArkTapscript as bq, type AssetMetadata as br, BITCOIN_EMULATOR_PUBKEY as bs, type BaseWalletConfig as bt, type BatchInfo as bu, type BatchSignableIdentity as bv, CLTVMultisigTapscript as bw, type CandidateDeps as bx, ChainTxType as by, type CommitmentTx as bz, type ArkadeReader as c, collabExitResolver as c$, type HandlerError as c0, INTENT_TERMINAL_STATES as c1, IndexerTxType as c2, type IntentCoin as c3, type IntentFilter as c4, type KnownMetadata as c5, MAX_PAGE_SIZE as c6, MUTINYNET_EMULATOR_PUBKEY as c7, type MigrateDeprecatedSignerOptions as c8, type MigrationLegReport as c9, type TapLeaves as cA, TapTreeCoder as cB, TapscriptType as cC, type Tx as cD, type TxHistoryRecord as cE, type TxKey as cF, type TxNotification as cG, type TxTag as cH, type TxTreeNode as cI, TxType as cJ, type Vtxo as cK, type VtxoChain as cL, type VtxoType as cM, type WalletMode as cN, type WithPrevTx as cO, assertAllowedSighashTypes as cP, assertPageRequest as cQ, assertRecipientArkadeAddress as cR, assetMintResolver as cS, attachPrevArkTxs as cT, attachPrevoutTxs as cU, boardingResolver as cV, canRecoverOnchain as cW, canSpendOffchain as cX, canSweepOnchain as cY, classifyAgainstSignerSet as cZ, classifyContractSigner as c_, type MigrationVtxoRef as ca, MultisigTapscript as cb, type NewAddressType as cc, type Nonces as cd, type Output as ce, type PageResponse as cf, PartialSig as cg, type PrevTxSource as ch, PrevTxUnavailableError as ci, type ProviderClass as cj, REGTEST_EMULATOR_PUBKEY as ck, type RawTxSource as cl, type RenewalSplit as cm, type RenewalSplitContext as cn, RestDelegateProvider as co, RestEmulatorProvider as cp, type ScanContractsOptions as cq, type ScanResult as cr, type ScheduledSession as cs, SettlementEventType as ct, type SignRequest as cu, type SignerClassification as cv, type SignerSet as cw, type SubscriptionFilter as cx, type SubscriptionResponse as cy, type SweepTxNotification as cz, type ArkadeBroadcaster as d, collectContracts as d0, collectIntents as d1, collectPages as d2, collectScriptVtxos as d3, collectTransactionHistory as d4, collectUtxos as d5, collectVtxos as d6, configureEventSource as d7, createDefaultActivityRegistry as d8, createExitChainResolver as d9, resolveEmulatorPubkey as dA, resolveEventSource as dB, resolvePrevTxs as dC, scriptFromTapLeafScript as dD, signerSetFromInfo as dE, toOffchainInputFeeParams as dF, toXOnlySignerHex as dG, withPrevTxs as dH, type TapscriptDeriving as dI, decodeTapscript as da, defaultEmulatorPubkey as db, getAllNormalizedVtxos as dc, getConfiguredEventSource as dd, getNetwork as de, getNormalizedVtxos as df, getRandomId as dg, getSequence as dh, hasCandidates as di, isBatchSignable as dj, isContractVtxoEvent as dk, isCooperativelyMigratable as dl, isDiscoverable as dm, isEventSourceUnavailableError as dn, isPastExpiry as dp, isSigningIdentity as dq, isSubdust as dr, isTerminalIntentState as ds, isVirtualCoin as dt, isVtxoExpiringSoon as du, isVtxoSpent as dv, iteratePages as dw, networkFromArkadeInfo as dx, networks as dy, pageResult as dz, type WalletBalance as e, type GetVtxosFilter as f, type GetSpendableVtxosFilter as g, type ArkTransaction as h, ActivityRegistry as i, type Activity as j, type IContractManager as k, type GetNewAddressesOptions as l, type NewAddress as m, type IDelegateManager as n, type SettlementEvent as o, type SendParams as p, type IAssetManager as q, RestArkProvider as r, RestIndexerProvider as s, type SubscriptionEvent as t, type SubscriptionHeartbeat as u, type ArkProvider as v, type IndexerProvider as w, type RelativeTimelock as x, type TapLeafScript as y, type VirtualCoin as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-B3fRWO5i.js';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BSbGQabI.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-B3fRWO5i.cjs';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CFCfrReG.cjs';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|