@arkade-os/sdk 0.4.28 → 0.4.29
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 +14 -16
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +4 -4
- package/dist/adapters/expo.d.ts +4 -4
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-TZ1gXAXU.d.cts → ark-ChhTwpLf.d.cts} +73 -61
- package/dist/{ark-TZ1gXAXU.d.ts → ark-ChhTwpLf.d.ts} +73 -61
- package/dist/{asyncStorageTaskQueue-EFqSmYTg.d.cts → asyncStorageTaskQueue-DW1-BpI7.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Cb1F_Z9s.d.ts → asyncStorageTaskQueue-DZ0nUuEJ.d.ts} +2 -2
- package/dist/{chunk-ADV27S4N.cjs → chunk-6FLL2Q36.cjs} +8 -8
- package/dist/chunk-6FLL2Q36.cjs.map +1 -0
- package/dist/{chunk-ZBUDLTBO.js → chunk-6NWNOLL3.js} +5 -5
- package/dist/chunk-6NWNOLL3.js.map +1 -0
- package/dist/{chunk-CFZMTDWI.js → chunk-ABWRLTX5.js} +6 -5
- package/dist/chunk-ABWRLTX5.js.map +1 -0
- package/dist/{chunk-BQLHADL7.js → chunk-BVP2U66Q.js} +316 -178
- package/dist/chunk-BVP2U66Q.js.map +1 -0
- package/dist/{chunk-ZLO6NETT.cjs → chunk-GDCTOSMV.cjs} +480 -332
- package/dist/chunk-GDCTOSMV.cjs.map +1 -0
- package/dist/{chunk-FG5ACJJW.cjs → chunk-GIGILVVP.cjs} +11 -10
- package/dist/chunk-GIGILVVP.cjs.map +1 -0
- package/dist/{chunk-I3DGUUCT.cjs → chunk-IEO3XDKI.cjs} +28 -28
- package/dist/{chunk-I3DGUUCT.cjs.map → chunk-IEO3XDKI.cjs.map} +1 -1
- package/dist/{chunk-IPX2R7FR.cjs → chunk-PJUFOJ2L.cjs} +7 -7
- package/dist/{chunk-IPX2R7FR.cjs.map → chunk-PJUFOJ2L.cjs.map} +1 -1
- package/dist/{chunk-A3EMF7RN.js → chunk-TH6T23XG.js} +3 -3
- package/dist/{chunk-A3EMF7RN.js.map → chunk-TH6T23XG.js.map} +1 -1
- package/dist/{chunk-HW3JJ323.js → chunk-TU3LVAPX.js} +32 -31
- package/dist/chunk-TU3LVAPX.js.map +1 -0
- package/dist/{chunk-5PG7DV7A.cjs → chunk-WMIPYZSB.cjs} +34 -36
- package/dist/chunk-WMIPYZSB.cjs.map +1 -0
- package/dist/{chunk-T64LAI7L.js → chunk-YA4G7RFB.js} +3 -3
- package/dist/{chunk-T64LAI7L.js.map → chunk-YA4G7RFB.js.map} +1 -1
- package/dist/contracts/handlers/index.cjs +6 -6
- 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-aaVGfWsV.d.ts → delegate-4JBUkUhR.d.cts} +2 -2
- package/dist/{delegate-BFZs69hp.d.cts → delegate-DN7RELL1.d.ts} +2 -2
- package/dist/{index-NDla_UoJ.d.ts → index-Cn82bBUu.d.ts} +2 -2
- package/dist/{index-B22cA64m.d.cts → index-DfT5xzgY.d.cts} +2 -2
- package/dist/index.cjs +161 -137
- package/dist/index.d.cts +143 -17
- package/dist/index.d.ts +143 -17
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +13 -13
- package/dist/repositories/realm/index.d.cts +1 -1
- package/dist/repositories/realm/index.d.ts +1 -1
- package/dist/repositories/realm/index.js +4 -4
- package/dist/repositories/sqlite/index.cjs +13 -13
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +4 -4
- package/dist/{taskRunner-C6Ff4OaU.d.cts → taskRunner-B-aPfHhK.d.cts} +2 -2
- package/dist/{taskRunner-yvPN8Z0K.d.ts → taskRunner-B-vG08pX.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 +19 -15
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +9 -7
- package/dist/wallet/expo/index.d.ts +9 -7
- package/dist/wallet/expo/index.js +11 -7
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-D9NBRqvC.d.ts → wallet-CCtqT2Wb.d.ts} +19 -15
- package/dist/{wallet-AF-p-OWj.d.cts → wallet-DjgFb_4T.d.cts} +19 -15
- 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-5PG7DV7A.cjs.map +0 -1
- package/dist/chunk-ADV27S4N.cjs.map +0 -1
- package/dist/chunk-BQLHADL7.js.map +0 -1
- package/dist/chunk-CFZMTDWI.js.map +0 -1
- package/dist/chunk-FG5ACJJW.cjs.map +0 -1
- package/dist/chunk-HW3JJ323.js.map +0 -1
- package/dist/chunk-ZBUDLTBO.js.map +0 -1
- package/dist/chunk-ZLO6NETT.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-
|
|
3
|
-
import { RestArkProvider } from '../../chunk-
|
|
4
|
-
import { DefaultVtxo } from '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-TH6T23XG.js';
|
|
2
|
+
import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-BVP2U66Q.js';
|
|
3
|
+
import { RestArkProvider } from '../../chunk-6NWNOLL3.js';
|
|
4
|
+
import { DefaultVtxo } from '../../chunk-YA4G7RFB.js';
|
|
5
|
+
import '../../chunk-TU3LVAPX.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
import { hex } from '@scure/base';
|
|
8
8
|
|
|
@@ -61,7 +61,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
61
61
|
};
|
|
62
62
|
const { taskQueue } = config.background;
|
|
63
63
|
if ("persistConfig" in taskQueue) {
|
|
64
|
-
const arkServerUrl = config.arkServerUrl
|
|
64
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
65
65
|
if (arkServerUrl) {
|
|
66
66
|
const timelock = wallet.offchainTapscript.options.csvTimelock ?? DefaultVtxo.Script.DEFAULT_TIMELOCK;
|
|
67
67
|
const bgConfig = {
|
|
@@ -147,8 +147,12 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
147
147
|
getContractManager() {
|
|
148
148
|
return this.wallet.getContractManager();
|
|
149
149
|
}
|
|
150
|
+
getDelegateManager() {
|
|
151
|
+
return this.wallet.getDelegateManager();
|
|
152
|
+
}
|
|
153
|
+
/** @deprecated alias for @see ExpoWallet.getDelegateManager */
|
|
150
154
|
getDelegatorManager() {
|
|
151
|
-
return this.wallet.
|
|
155
|
+
return this.wallet.getDelegateManager();
|
|
152
156
|
}
|
|
153
157
|
sendBitcoin(params) {
|
|
154
158
|
return this.wallet.sendBitcoin(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/wallet/expo/wallet.ts"],"names":[],"mappings":";;;;;;;;AAgEO,SAAS,8BAA8B,EAAA,EAAmB;AAC7D,EAAA,IAAI,CAAC,EAAA,IAAM,OAAO,EAAA,KAAO,QAAA,EAAU;AACnC,EAAA,MAAM,UAAoB,EAAC;AAC3B,E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,OAAO,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,GAAG,UAAU,CAAA;AAAA,EACzC;AAAA,EAEA,IAAI,YAAA,GAA8B;AAC9B,IAAA,OAAO,KAAK,MAAA,CAAO,YAAA;AAAA,EACvB;AACJ","file":"index.js","sourcesContent":["import { hex } from \"@scure/base\";\nimport { Wallet } from \"../wallet\";\nimport { RestArkProvider } from \"../../providers/ark\";\nimport type {\n IWallet,\n IAssetManager,\n WalletBalance,\n WalletConfig,\n SendBitcoinParams,\n SettleParams,\n GetVtxosFilter,\n ArkTransaction,\n ExtendedCoin,\n ExtendedVirtualCoin,\n Recipient,\n} from \"..\";\nimport type { VirtualCoin } from \"..\";\nimport type { SettlementEvent } from \"../../providers/ark\";\nimport type { Identity } from \"../../identity\";\nimport type { IContractManager } from \"../../contracts/contractManager\";\nimport type { IDelegatorManager } from \"../delegator\";\nimport type { TaskQueue, TaskItem } from \"../../worker/expo/taskQueue\";\nimport type { TaskProcessor, TaskDependencies } from \"../../worker/expo/taskRunner\";\nimport { runTasks } from \"../../worker/expo/taskRunner\";\nimport { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from \"../../worker/expo/processors\";\nimport { extendVirtualCoinForContract, getRandomId } from \"../utils\";\nimport { DefaultVtxo } from \"../../script/default\";\nimport type { PersistedBackgroundConfig } from \"./background\";\nimport type { AsyncStorageTaskQueue } from \"../../worker/expo/asyncStorageTaskQueue\";\n\n/**\n * Background processing configuration for @see ExpoWallet.\n *\n * OS-level task registration is **not** part of this config — call\n * `registerExpoBackgroundTask` from `@arkade-os/sdk/wallet/expo/background`\n * explicitly. Splitting that step out keeps `/wallet/expo` free of the\n * `expo-task-manager` / `expo-background-task` dependencies, so\n * react-native-web and Node consumers can use `ExpoWallet` without\n * those native packages. See\n * https://github.com/arkade-os/ts-sdk/issues/486 for details.\n */\nexport interface ExpoBackgroundConfig {\n /** Persistence layer for foreground ↔ background handoff. */\n taskQueue: TaskQueue;\n /** Processors to run on each tick. Defaults to `[contractPollProcessor]`. */\n processors?: TaskProcessor[];\n /** If set, automatically polls at this interval (ms) while the app is in the foreground. */\n foregroundIntervalMs?: number;\n}\n\n/**\n * Configuration for @see ExpoWallet.setup.\n */\nexport interface ExpoWalletConfig extends WalletConfig {\n background: ExpoBackgroundConfig;\n}\n\n/**\n * Catches JS callers still passing the pre-fix-#486 fields: TypeScript\n * blocks these at compile time, but compiled JS silently dropped them\n * and consumers would never realize the OS task wasn't scheduled.\n *\n * @internal Exported for tests; not part of the public API surface.\n */\nexport function warnOnRemovedBackgroundFields(bg: unknown): void {\n if (!bg || typeof bg !== \"object\") return;\n const removed: string[] = [];\n if (\"taskName\" in bg) removed.push(\"taskName\");\n if (\"minimumBackgroundInterval\" in bg) {\n removed.push(\"minimumBackgroundInterval\");\n }\n if (removed.length === 0) return;\n console.warn(\n `[ark-sdk] ExpoWallet.setup: ignoring removed background field(s): ${removed.join(\", \")}. ` +\n 'OS-task registration moved to \"@arkade-os/sdk/wallet/expo/background\". ' +\n \"See https://github.com/arkade-os/ts-sdk/issues/486\",\n );\n}\n\n/**\n * Expo/React Native wallet with built-in background task processing.\n *\n * Wraps a standard @see Wallet and adds a lightweight task queue\n * for keeping contract/VTXO state fresh while the app is active and\n * across Expo BackgroundTask wakes.\n *\n * OS-level task registration is the consumer's responsibility — call\n * `registerExpoBackgroundTask` from\n * `@arkade-os/sdk/wallet/expo/background` after `setup()`. Keeping\n * registration out of `setup()` lets this entrypoint avoid pulling\n * `expo-task-manager` / `expo-background-task` into the `/wallet/expo`\n * bundle.\n *\n * @example\n * ```ts\n * import { ExpoWallet } from \"@arkade-os/sdk/wallet/expo\";\n * import { registerExpoBackgroundTask } from \"@arkade-os/sdk/wallet/expo/background\";\n * import { AsyncStorageTaskQueue } from \"@arkade-os/sdk/worker/expo\";\n *\n * const wallet = await ExpoWallet.setup({\n * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),\n * arkServerUrl: 'https://arkade.computer',\n * esploraUrl: 'https://mempool.space/api',\n * storage: { ... },\n * background: {\n * taskQueue: new AsyncStorageTaskQueue(AsyncStorage),\n * foregroundIntervalMs: 20_000,\n * },\n * });\n *\n * // Activate the OS scheduler (Expo Android/iOS only)\n * await registerExpoBackgroundTask(\"ark-background-poll\", { minimumInterval: 15 });\n *\n * const balance = await wallet.getBalance();\n * ```\n */\nexport class ExpoWallet implements IWallet {\n readonly identity: Identity;\n readonly arkProvider: Wallet[\"arkProvider\"];\n readonly indexerProvider: Wallet[\"indexerProvider\"];\n\n private foregroundIntervalId?: ReturnType<typeof setInterval>;\n\n private constructor(\n private readonly wallet: Wallet,\n private readonly taskQueue: TaskQueue,\n private readonly processors: TaskProcessor[],\n private readonly deps: TaskDependencies,\n foregroundIntervalMs?: number,\n ) {\n this.identity = wallet.identity;\n this.arkProvider = wallet.arkProvider;\n this.indexerProvider = wallet.indexerProvider;\n\n if (foregroundIntervalMs && foregroundIntervalMs > 0) {\n this.startForegroundPolling(foregroundIntervalMs);\n }\n }\n\n /**\n * Create an ExpoWallet with foreground/background queue handoff.\n *\n * 1. Creates the inner @see Wallet via `Wallet.create()`.\n * 2. Wires up processors (defaults to @see contractPollProcessor).\n * 3. Persists background config for the background handler (if the queue supports it).\n * 4. Seeds the task queue with a `contract-poll` task.\n * 5. Starts the foreground interval if `foregroundIntervalMs` is set.\n *\n * OS-level scheduling lives in\n * `@arkade-os/sdk/wallet/expo/background` and is invoked separately\n * by the consumer.\n */\n static async setup(config: ExpoWalletConfig): Promise<ExpoWallet> {\n warnOnRemovedBackgroundFields(config.background);\n\n const wallet = await Wallet.create(config);\n\n const processors = config.background.processors ?? [contractPollProcessor];\n\n const deps: TaskDependencies = {\n walletRepository: wallet.walletRepository,\n contractRepository: wallet.contractRepository,\n indexerProvider: wallet.indexerProvider,\n arkProvider: wallet.arkProvider,\n extendVtxo: (vtxo, contract) => extendVirtualCoinForContract(vtxo, contract),\n };\n\n const { taskQueue } = config.background;\n\n // Persist wallet params so the background handler can rehydrate\n // without a network call. Only works with AsyncStorageTaskQueue.\n if (\"persistConfig\" in taskQueue) {\n const arkServerUrl =\n config.arkServerUrl ??\n (wallet.arkProvider instanceof RestArkProvider\n ? wallet.arkProvider.serverUrl\n : undefined);\n\n if (arkServerUrl) {\n const timelock =\n wallet.offchainTapscript.options.csvTimelock ??\n DefaultVtxo.Script.DEFAULT_TIMELOCK;\n\n const bgConfig: PersistedBackgroundConfig = {\n arkServerUrl,\n pubkeyHex: hex.encode(wallet.offchainTapscript.options.pubKey),\n serverPubKeyHex: hex.encode(wallet.offchainTapscript.options.serverPubKey),\n exitTimelockValue: timelock.value.toString(),\n exitTimelockType: timelock.type,\n };\n\n await (taskQueue as AsyncStorageTaskQueue).persistConfig(bgConfig);\n }\n }\n\n const expoWallet = new ExpoWallet(\n wallet,\n taskQueue,\n processors,\n deps,\n config.background.foregroundIntervalMs,\n );\n\n // Seed the queue so the first tick (or background wake) has work to do\n await expoWallet.seedContractPollTask();\n\n return expoWallet;\n }\n\n // ── Foreground polling ───────────────────────────────────────────\n\n private startForegroundPolling(intervalMs: number): void {\n this.foregroundIntervalId = setInterval(() => {\n this.runForegroundPoll().catch(console.error);\n }, intervalMs);\n }\n\n private async runForegroundPoll(): Promise<void> {\n await runTasks(this.taskQueue, this.processors, this.deps);\n\n // Consume results immediately (no background handoff needed)\n const results = await this.taskQueue.getResults();\n if (results.length > 0) {\n await this.taskQueue.acknowledgeResults(results.map((r) => r.id));\n }\n\n // Re-seed for the next tick\n await this.seedContractPollTask();\n }\n\n private async seedContractPollTask(): Promise<void> {\n const existing = await this.taskQueue.getTasks(CONTRACT_POLL_TASK_TYPE);\n if (existing.length > 0) return;\n\n const task: TaskItem = {\n id: getRandomId(),\n type: CONTRACT_POLL_TASK_TYPE,\n data: {},\n createdAt: Date.now(),\n };\n await this.taskQueue.addTask(task);\n }\n\n // ── Lifecycle ────────────────────────────────────────────────────\n\n /**\n * Stop foreground polling and dispose the inner wallet.\n *\n * Does **not** unregister the OS background task — call\n * `unregisterExpoBackgroundTask` from\n * `@arkade-os/sdk/wallet/expo/background` yourself, matching the\n * explicit `register` step.\n */\n async dispose(): Promise<void> {\n if (this.foregroundIntervalId) {\n clearInterval(this.foregroundIntervalId);\n this.foregroundIntervalId = undefined;\n }\n\n await this.wallet.dispose();\n }\n\n // ── IWallet delegation ───────────────────────────────────────────\n\n getAddress(): Promise<string> {\n return this.wallet.getAddress();\n }\n\n getBoardingAddress(): Promise<string> {\n return this.wallet.getBoardingAddress();\n }\n\n getBalance(): Promise<WalletBalance> {\n return this.wallet.getBalance();\n }\n\n getVtxos(filter?: GetVtxosFilter): Promise<ExtendedVirtualCoin[]> {\n return this.wallet.getVtxos(filter);\n }\n\n getBoardingUtxos(): Promise<ExtendedCoin[]> {\n return this.wallet.getBoardingUtxos();\n }\n\n getTransactionHistory(): Promise<ArkTransaction[]> {\n return this.wallet.getTransactionHistory();\n }\n\n getContractManager(): Promise<IContractManager> {\n return this.wallet.getContractManager();\n }\n\n getDelegatorManager(): Promise<IDelegatorManager | undefined> {\n return this.wallet.getDelegatorManager();\n }\n\n sendBitcoin(params: SendBitcoinParams): Promise<string> {\n return this.wallet.sendBitcoin(params);\n }\n\n settle(\n params?: SettleParams,\n eventCallback?: (event: SettlementEvent) => void,\n ): Promise<string> {\n return this.wallet.settle(params, eventCallback);\n }\n\n send(...recipients: [Recipient, ...Recipient[]]): Promise<string> {\n return this.wallet.send(...recipients);\n }\n\n get assetManager(): IAssetManager {\n return this.wallet.assetManager;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/wallet/expo/wallet.ts"],"names":[],"mappings":";;;;;;;;AAgEO,SAAS,8BAA8B,EAAA,EAAmB;AAC7D,EAAA,IAAI,CAAC,EAAA,IAAM,OAAO,EAAA,KAAO,QAAA,EAAU;AACnC,EAAA,MAAM,UAAoB,EAAC;AAC3B,EAAA,IAAI,UAAA,IAAc,EAAA,EAAI,OAAA,CAAQ,IAAA,CAAK,UAAU,CAAA;AAC7C,EAAA,IA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D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,GAAG,UAAU,CAAA;AAAA,EACzC;AAAA,EAEA,IAAI,YAAA,GAA8B;AAC9B,IAAA,OAAO,KAAK,MAAA,CAAO,YAAA;AAAA,EACvB;AACJ","file":"index.js","sourcesContent":["import { hex } from \"@scure/base\";\nimport { Wallet } from \"../wallet\";\nimport { RestArkProvider } from \"../../providers/ark\";\nimport type {\n IWallet,\n IAssetManager,\n WalletBalance,\n WalletConfig,\n SendBitcoinParams,\n SettleParams,\n GetVtxosFilter,\n ArkTransaction,\n ExtendedCoin,\n ExtendedVirtualCoin,\n Recipient,\n} from \"..\";\nimport type { VirtualCoin } from \"..\";\nimport type { SettlementEvent } from \"../../providers/ark\";\nimport type { Identity } from \"../../identity\";\nimport type { IContractManager } from \"../../contracts/contractManager\";\nimport type { IDelegateManager } from \"../delegate\";\nimport type { TaskQueue, TaskItem } from \"../../worker/expo/taskQueue\";\nimport type { TaskProcessor, TaskDependencies } from \"../../worker/expo/taskRunner\";\nimport { runTasks } from \"../../worker/expo/taskRunner\";\nimport { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from \"../../worker/expo/processors\";\nimport { extendVirtualCoinForContract, getRandomId } from \"../utils\";\nimport { DefaultVtxo } from \"../../script/default\";\nimport type { PersistedBackgroundConfig } from \"./background\";\nimport type { AsyncStorageTaskQueue } from \"../../worker/expo/asyncStorageTaskQueue\";\n\n/**\n * Background processing configuration for @see ExpoWallet.\n *\n * OS-level task registration is **not** part of this config — call\n * `registerExpoBackgroundTask` from `@arkade-os/sdk/wallet/expo/background`\n * explicitly. Splitting that step out keeps `/wallet/expo` free of the\n * `expo-task-manager` / `expo-background-task` dependencies, so\n * react-native-web and Node consumers can use `ExpoWallet` without\n * those native packages. See\n * https://github.com/arkade-os/ts-sdk/issues/486 for details.\n */\nexport interface ExpoBackgroundConfig {\n /** Persistence layer for foreground ↔ background handoff. */\n taskQueue: TaskQueue;\n /** Processors to run on each tick. Defaults to `[contractPollProcessor]`. */\n processors?: TaskProcessor[];\n /** If set, automatically polls at this interval (ms) while the app is in the foreground. */\n foregroundIntervalMs?: number;\n}\n\n/**\n * Configuration for @see ExpoWallet.setup.\n */\nexport interface ExpoWalletConfig extends WalletConfig {\n background: ExpoBackgroundConfig;\n}\n\n/**\n * Catches JS callers still passing the pre-fix-#486 fields: TypeScript\n * blocks these at compile time, but compiled JS silently dropped them\n * and consumers would never realize the OS task wasn't scheduled.\n *\n * @internal Exported for tests; not part of the public API surface.\n */\nexport function warnOnRemovedBackgroundFields(bg: unknown): void {\n if (!bg || typeof bg !== \"object\") return;\n const removed: string[] = [];\n if (\"taskName\" in bg) removed.push(\"taskName\");\n if (\"minimumBackgroundInterval\" in bg) {\n removed.push(\"minimumBackgroundInterval\");\n }\n if (removed.length === 0) return;\n console.warn(\n `[ark-sdk] ExpoWallet.setup: ignoring removed background field(s): ${removed.join(\", \")}. ` +\n 'OS-task registration moved to \"@arkade-os/sdk/wallet/expo/background\". ' +\n \"See https://github.com/arkade-os/ts-sdk/issues/486\",\n );\n}\n\n/**\n * Expo/React Native wallet with built-in background task processing.\n *\n * Wraps a standard @see Wallet and adds a lightweight task queue\n * for keeping contract/VTXO state fresh while the app is active and\n * across Expo BackgroundTask wakes.\n *\n * OS-level task registration is the consumer's responsibility — call\n * `registerExpoBackgroundTask` from\n * `@arkade-os/sdk/wallet/expo/background` after `setup()`. Keeping\n * registration out of `setup()` lets this entrypoint avoid pulling\n * `expo-task-manager` / `expo-background-task` into the `/wallet/expo`\n * bundle.\n *\n * @example\n * ```ts\n * import { ExpoWallet } from \"@arkade-os/sdk/wallet/expo\";\n * import { registerExpoBackgroundTask } from \"@arkade-os/sdk/wallet/expo/background\";\n * import { AsyncStorageTaskQueue } from \"@arkade-os/sdk/worker/expo\";\n *\n * const wallet = await ExpoWallet.setup({\n * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),\n * arkProvider: new RestArkProvider(),\n * onchainProvider: new EsploraProvider(),\n * storage: { ... },\n * background: {\n * taskQueue: new AsyncStorageTaskQueue(AsyncStorage),\n * foregroundIntervalMs: 20_000,\n * },\n * });\n *\n * // Activate the OS scheduler (Expo Android/iOS only)\n * await registerExpoBackgroundTask(\"ark-background-poll\", { minimumInterval: 15 });\n *\n * const balance = await wallet.getBalance();\n * ```\n */\nexport class ExpoWallet implements IWallet {\n readonly identity: Identity;\n readonly arkProvider: Wallet[\"arkProvider\"];\n readonly indexerProvider: Wallet[\"indexerProvider\"];\n\n private foregroundIntervalId?: ReturnType<typeof setInterval>;\n\n private constructor(\n private readonly wallet: Wallet,\n private readonly taskQueue: TaskQueue,\n private readonly processors: TaskProcessor[],\n private readonly deps: TaskDependencies,\n foregroundIntervalMs?: number,\n ) {\n this.identity = wallet.identity;\n this.arkProvider = wallet.arkProvider;\n this.indexerProvider = wallet.indexerProvider;\n\n if (foregroundIntervalMs && foregroundIntervalMs > 0) {\n this.startForegroundPolling(foregroundIntervalMs);\n }\n }\n\n /**\n * Create an ExpoWallet with foreground/background queue handoff.\n *\n * 1. Creates the inner @see Wallet via `Wallet.create()`.\n * 2. Wires up processors (defaults to @see contractPollProcessor).\n * 3. Persists background config for the background handler (if the queue supports it).\n * 4. Seeds the task queue with a `contract-poll` task.\n * 5. Starts the foreground interval if `foregroundIntervalMs` is set.\n *\n * OS-level scheduling lives in\n * `@arkade-os/sdk/wallet/expo/background` and is invoked separately\n * by the consumer.\n */\n static async setup(config: ExpoWalletConfig): Promise<ExpoWallet> {\n warnOnRemovedBackgroundFields(config.background);\n\n const wallet = await Wallet.create(config);\n\n const processors = config.background.processors ?? [contractPollProcessor];\n\n const deps: TaskDependencies = {\n walletRepository: wallet.walletRepository,\n contractRepository: wallet.contractRepository,\n indexerProvider: wallet.indexerProvider,\n arkProvider: wallet.arkProvider,\n extendVtxo: (vtxo, contract) => extendVirtualCoinForContract(vtxo, contract),\n };\n\n const { taskQueue } = config.background;\n\n // Persist wallet params so the background handler can rehydrate\n // without a network call. Only works with AsyncStorageTaskQueue.\n if (\"persistConfig\" in taskQueue) {\n const arkServerUrl =\n config.arkServerUrl ||\n (wallet.arkProvider instanceof RestArkProvider\n ? wallet.arkProvider.serverUrl\n : undefined);\n\n if (arkServerUrl) {\n const timelock =\n wallet.offchainTapscript.options.csvTimelock ??\n DefaultVtxo.Script.DEFAULT_TIMELOCK;\n\n const bgConfig: PersistedBackgroundConfig = {\n arkServerUrl,\n pubkeyHex: hex.encode(wallet.offchainTapscript.options.pubKey),\n serverPubKeyHex: hex.encode(wallet.offchainTapscript.options.serverPubKey),\n exitTimelockValue: timelock.value.toString(),\n exitTimelockType: timelock.type,\n };\n\n await (taskQueue as AsyncStorageTaskQueue).persistConfig(bgConfig);\n }\n }\n\n const expoWallet = new ExpoWallet(\n wallet,\n taskQueue,\n processors,\n deps,\n config.background.foregroundIntervalMs,\n );\n\n // Seed the queue so the first tick (or background wake) has work to do\n await expoWallet.seedContractPollTask();\n\n return expoWallet;\n }\n\n // ── Foreground polling ───────────────────────────────────────────\n\n private startForegroundPolling(intervalMs: number): void {\n this.foregroundIntervalId = setInterval(() => {\n this.runForegroundPoll().catch(console.error);\n }, intervalMs);\n }\n\n private async runForegroundPoll(): Promise<void> {\n await runTasks(this.taskQueue, this.processors, this.deps);\n\n // Consume results immediately (no background handoff needed)\n const results = await this.taskQueue.getResults();\n if (results.length > 0) {\n await this.taskQueue.acknowledgeResults(results.map((r) => r.id));\n }\n\n // Re-seed for the next tick\n await this.seedContractPollTask();\n }\n\n private async seedContractPollTask(): Promise<void> {\n const existing = await this.taskQueue.getTasks(CONTRACT_POLL_TASK_TYPE);\n if (existing.length > 0) return;\n\n const task: TaskItem = {\n id: getRandomId(),\n type: CONTRACT_POLL_TASK_TYPE,\n data: {},\n createdAt: Date.now(),\n };\n await this.taskQueue.addTask(task);\n }\n\n // ── Lifecycle ────────────────────────────────────────────────────\n\n /**\n * Stop foreground polling and dispose the inner wallet.\n *\n * Does **not** unregister the OS background task — call\n * `unregisterExpoBackgroundTask` from\n * `@arkade-os/sdk/wallet/expo/background` yourself, matching the\n * explicit `register` step.\n */\n async dispose(): Promise<void> {\n if (this.foregroundIntervalId) {\n clearInterval(this.foregroundIntervalId);\n this.foregroundIntervalId = undefined;\n }\n\n await this.wallet.dispose();\n }\n\n // ── IWallet delegation ───────────────────────────────────────────\n\n getAddress(): Promise<string> {\n return this.wallet.getAddress();\n }\n\n getBoardingAddress(): Promise<string> {\n return this.wallet.getBoardingAddress();\n }\n\n getBalance(): Promise<WalletBalance> {\n return this.wallet.getBalance();\n }\n\n getVtxos(filter?: GetVtxosFilter): Promise<ExtendedVirtualCoin[]> {\n return this.wallet.getVtxos(filter);\n }\n\n getBoardingUtxos(): Promise<ExtendedCoin[]> {\n return this.wallet.getBoardingUtxos();\n }\n\n getTransactionHistory(): Promise<ArkTransaction[]> {\n return this.wallet.getTransactionHistory();\n }\n\n getContractManager(): Promise<IContractManager> {\n return this.wallet.getContractManager();\n }\n\n getDelegateManager(): Promise<IDelegateManager | undefined> {\n return this.wallet.getDelegateManager();\n }\n\n /** @deprecated alias for @see ExpoWallet.getDelegateManager */\n getDelegatorManager(): Promise<IDelegateManager | undefined> {\n return this.wallet.getDelegateManager();\n }\n\n sendBitcoin(params: SendBitcoinParams): Promise<string> {\n return this.wallet.sendBitcoin(params);\n }\n\n settle(\n params?: SettleParams,\n eventCallback?: (event: SettlementEvent) => void,\n ): Promise<string> {\n return this.wallet.settle(params, eventCallback);\n }\n\n send(...recipients: [Recipient, ...Recipient[]]): Promise<string> {\n return this.wallet.send(...recipients);\n }\n\n get assetManager(): IAssetManager {\n return this.wallet.assetManager;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent,
|
|
2
|
+
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, J as DescriptorProvider, e as IContractManager, K as IReadonlyWallet, L as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, o as RelativeTimelock, Q as IReadonlyAssetManager, m as ArkProvider, U as NetworkName, X as ArkInfo, Y as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, Z as Coin, _ as ContractManager, I as IWallet, $ as CSVMultisigTapscript, a as Identity, a0 as SettlementConfig, i as IAssetManager, a1 as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, a2 as SignerSession, a3 as SignedIntent, a4 as Intent } from './ark-ChhTwpLf.js';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DN7RELL1.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -383,7 +383,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
383
383
|
readonly dustAmount: bigint;
|
|
384
384
|
readonly walletRepository: WalletRepository;
|
|
385
385
|
readonly contractRepository: ContractRepository;
|
|
386
|
-
readonly
|
|
386
|
+
readonly delegateProvider?: DelegateProvider | undefined;
|
|
387
387
|
private _contractManager?;
|
|
388
388
|
private _contractManagerInitializing?;
|
|
389
389
|
protected readonly watcherConfig?: ReadonlyWalletConfig["watcherConfig"];
|
|
@@ -399,7 +399,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
399
399
|
* {@link WalletReceiveRotator.rotate} is the sole intended caller of.
|
|
400
400
|
*/
|
|
401
401
|
protected _offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script;
|
|
402
|
-
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
|
|
402
|
+
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, delegateProvider?: DelegateProvider | undefined, watcherConfig?: ReadonlyWalletConfig["watcherConfig"], walletContractTimelocks?: RelativeTimelock[]);
|
|
403
403
|
/**
|
|
404
404
|
* Currently-active receive tapscript. Read-only from the outside;
|
|
405
405
|
* mutated only via {@link Wallet.setOffchainTapscriptForRotation}
|
|
@@ -423,7 +423,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
423
423
|
walletRepository: WalletRepository;
|
|
424
424
|
contractRepository: ContractRepository;
|
|
425
425
|
info: ArkInfo;
|
|
426
|
-
|
|
426
|
+
delegateProvider: DelegateProvider | undefined;
|
|
427
|
+
/** @deprecated alias for `delegateProvider` */
|
|
428
|
+
delegatorProvider: DelegateProvider | undefined;
|
|
427
429
|
walletContractTimelocks: RelativeTimelock[];
|
|
428
430
|
}>;
|
|
429
431
|
/**
|
|
@@ -533,19 +535,19 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
533
535
|
*
|
|
534
536
|
* @example
|
|
535
537
|
* ```typescript
|
|
536
|
-
* // Create a wallet with
|
|
538
|
+
* // Create a wallet with providers
|
|
537
539
|
* const wallet = await Wallet.create({
|
|
538
540
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
+
* arkProvider: new RestArkProvider(),
|
|
542
|
+
* onchainProvider: new EsploraProvider()
|
|
541
543
|
* });
|
|
542
544
|
*
|
|
543
|
-
* //
|
|
545
|
+
* // Use custom providers and/or URLs (e.g., for Expo/React Native)
|
|
544
546
|
* const wallet = await Wallet.create({
|
|
545
547
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
546
548
|
* arkProvider: new ExpoArkProvider('https://arkade.computer'),
|
|
547
549
|
* indexerProvider: new ExpoIndexerProvider('https://arkade.computer'),
|
|
548
|
-
*
|
|
550
|
+
* onchainProvider: new EsploraProvider('https://mempool.space/api')
|
|
549
551
|
* });
|
|
550
552
|
*
|
|
551
553
|
* // Get addresses
|
|
@@ -566,7 +568,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
566
568
|
readonly forfeitPubkey: Bytes;
|
|
567
569
|
static MIN_FEE_RATE: number;
|
|
568
570
|
readonly identity: Identity;
|
|
569
|
-
private readonly
|
|
571
|
+
private readonly _delegateManager?;
|
|
570
572
|
private _vtxoManager?;
|
|
571
573
|
private _vtxoManagerInitializing?;
|
|
572
574
|
private _walletAssetManager?;
|
|
@@ -648,7 +650,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
648
650
|
readonly settlementConfig: SettlementConfig | false;
|
|
649
651
|
protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
|
|
650
652
|
/** @deprecated Use settlementConfig */
|
|
651
|
-
renewalConfig?: WalletConfig["renewalConfig"],
|
|
653
|
+
renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
|
|
652
654
|
get assetManager(): IAssetManager;
|
|
653
655
|
getVtxoManager(): Promise<VtxoManager>;
|
|
654
656
|
dispose(): Promise<void>;
|
|
@@ -661,7 +663,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
661
663
|
* ```typescript
|
|
662
664
|
* const wallet = await Wallet.create({
|
|
663
665
|
* identity,
|
|
664
|
-
*
|
|
666
|
+
* arkProvider: new RestArkProvider(),
|
|
665
667
|
* });
|
|
666
668
|
* ```
|
|
667
669
|
*/
|
|
@@ -684,8 +686,10 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
684
686
|
* ```
|
|
685
687
|
*/
|
|
686
688
|
toReadonly(): Promise<ReadonlyWallet>;
|
|
687
|
-
/** Returns the
|
|
688
|
-
|
|
689
|
+
/** Returns the delegate manager when delegation support is configured. */
|
|
690
|
+
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
691
|
+
/** @deprecated alias for @see Wallet.getDelegateManager */
|
|
692
|
+
getDelegatorManager(): Promise<IDelegateManager | undefined>;
|
|
689
693
|
/**
|
|
690
694
|
* Send bitcoin to an Arkade address.
|
|
691
695
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent,
|
|
2
|
+
import { B as BatchStartedEvent, v as TreeSigningStartedEvent, w as TxTree, x as TreeNoncesEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, D as BatchFailedEvent, F as TreeTxEvent, H as TreeSignatureEvent, h as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, J as DescriptorProvider, e as IContractManager, K as IReadonlyWallet, L as ReadonlyIdentity, N as Network, O as OnchainProvider, n as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, o as RelativeTimelock, Q as IReadonlyAssetManager, m as ArkProvider, U as NetworkName, X as ArkInfo, Y as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, d as ExtendedCoin, Z as Coin, _ as ContractManager, I as IWallet, $ as CSVMultisigTapscript, a as Identity, a0 as SettlementConfig, i as IAssetManager, a1 as VtxoManager, f as IDelegateManager, S as SendBitcoinParams, g as SettleParams, R as Recipient, a2 as SignerSession, a3 as SignedIntent, a4 as Intent } from './ark-ChhTwpLf.cjs';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
4
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-4JBUkUhR.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
@@ -383,7 +383,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
383
383
|
readonly dustAmount: bigint;
|
|
384
384
|
readonly walletRepository: WalletRepository;
|
|
385
385
|
readonly contractRepository: ContractRepository;
|
|
386
|
-
readonly
|
|
386
|
+
readonly delegateProvider?: DelegateProvider | undefined;
|
|
387
387
|
private _contractManager?;
|
|
388
388
|
private _contractManagerInitializing?;
|
|
389
389
|
protected readonly watcherConfig?: ReadonlyWalletConfig["watcherConfig"];
|
|
@@ -399,7 +399,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
399
399
|
* {@link WalletReceiveRotator.rotate} is the sole intended caller of.
|
|
400
400
|
*/
|
|
401
401
|
protected _offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script;
|
|
402
|
-
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
|
|
402
|
+
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, delegateProvider?: DelegateProvider | undefined, watcherConfig?: ReadonlyWalletConfig["watcherConfig"], walletContractTimelocks?: RelativeTimelock[]);
|
|
403
403
|
/**
|
|
404
404
|
* Currently-active receive tapscript. Read-only from the outside;
|
|
405
405
|
* mutated only via {@link Wallet.setOffchainTapscriptForRotation}
|
|
@@ -423,7 +423,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
423
423
|
walletRepository: WalletRepository;
|
|
424
424
|
contractRepository: ContractRepository;
|
|
425
425
|
info: ArkInfo;
|
|
426
|
-
|
|
426
|
+
delegateProvider: DelegateProvider | undefined;
|
|
427
|
+
/** @deprecated alias for `delegateProvider` */
|
|
428
|
+
delegatorProvider: DelegateProvider | undefined;
|
|
427
429
|
walletContractTimelocks: RelativeTimelock[];
|
|
428
430
|
}>;
|
|
429
431
|
/**
|
|
@@ -533,19 +535,19 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
533
535
|
*
|
|
534
536
|
* @example
|
|
535
537
|
* ```typescript
|
|
536
|
-
* // Create a wallet with
|
|
538
|
+
* // Create a wallet with providers
|
|
537
539
|
* const wallet = await Wallet.create({
|
|
538
540
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
+
* arkProvider: new RestArkProvider(),
|
|
542
|
+
* onchainProvider: new EsploraProvider()
|
|
541
543
|
* });
|
|
542
544
|
*
|
|
543
|
-
* //
|
|
545
|
+
* // Use custom providers and/or URLs (e.g., for Expo/React Native)
|
|
544
546
|
* const wallet = await Wallet.create({
|
|
545
547
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
546
548
|
* arkProvider: new ExpoArkProvider('https://arkade.computer'),
|
|
547
549
|
* indexerProvider: new ExpoIndexerProvider('https://arkade.computer'),
|
|
548
|
-
*
|
|
550
|
+
* onchainProvider: new EsploraProvider('https://mempool.space/api')
|
|
549
551
|
* });
|
|
550
552
|
*
|
|
551
553
|
* // Get addresses
|
|
@@ -566,7 +568,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
566
568
|
readonly forfeitPubkey: Bytes;
|
|
567
569
|
static MIN_FEE_RATE: number;
|
|
568
570
|
readonly identity: Identity;
|
|
569
|
-
private readonly
|
|
571
|
+
private readonly _delegateManager?;
|
|
570
572
|
private _vtxoManager?;
|
|
571
573
|
private _vtxoManagerInitializing?;
|
|
572
574
|
private _walletAssetManager?;
|
|
@@ -648,7 +650,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
648
650
|
readonly settlementConfig: SettlementConfig | false;
|
|
649
651
|
protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
|
|
650
652
|
/** @deprecated Use settlementConfig */
|
|
651
|
-
renewalConfig?: WalletConfig["renewalConfig"],
|
|
653
|
+
renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
|
|
652
654
|
get assetManager(): IAssetManager;
|
|
653
655
|
getVtxoManager(): Promise<VtxoManager>;
|
|
654
656
|
dispose(): Promise<void>;
|
|
@@ -661,7 +663,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
661
663
|
* ```typescript
|
|
662
664
|
* const wallet = await Wallet.create({
|
|
663
665
|
* identity,
|
|
664
|
-
*
|
|
666
|
+
* arkProvider: new RestArkProvider(),
|
|
665
667
|
* });
|
|
666
668
|
* ```
|
|
667
669
|
*/
|
|
@@ -684,8 +686,10 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
|
684
686
|
* ```
|
|
685
687
|
*/
|
|
686
688
|
toReadonly(): Promise<ReadonlyWallet>;
|
|
687
|
-
/** Returns the
|
|
688
|
-
|
|
689
|
+
/** Returns the delegate manager when delegation support is configured. */
|
|
690
|
+
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
691
|
+
/** @deprecated alias for @see Wallet.getDelegateManager */
|
|
692
|
+
getDelegatorManager(): Promise<IDelegateManager | undefined>;
|
|
689
693
|
/**
|
|
690
694
|
* Send bitcoin to an Arkade address.
|
|
691
695
|
*
|
|
@@ -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 chunkPJUFOJ2L_cjs = require('../../chunk-PJUFOJ2L.cjs');
|
|
4
|
+
require('../../chunk-GDCTOSMV.cjs');
|
|
5
|
+
require('../../chunk-6FLL2Q36.cjs');
|
|
6
|
+
require('../../chunk-IEO3XDKI.cjs');
|
|
7
|
+
require('../../chunk-WMIPYZSB.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
|
|
10
10
|
// src/worker/expo/taskQueue.ts
|
|
@@ -120,19 +120,19 @@ var AsyncStorageTaskQueue = class {
|
|
|
120
120
|
|
|
121
121
|
Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkPJUFOJ2L_cjs.CONTRACT_POLL_TASK_TYPE; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "contractPollProcessor", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkPJUFOJ2L_cjs.contractPollProcessor; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "createTaskDependencies", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkPJUFOJ2L_cjs.createTaskDependencies; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "runTasks", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkPJUFOJ2L_cjs.runTasks; }
|
|
136
136
|
});
|
|
137
137
|
exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
|
|
138
138
|
exports.InMemoryTaskQueue = InMemoryTaskQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
2
|
-
export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue,
|
|
3
|
-
export {
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-B-aPfHhK.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-B-aPfHhK.cjs';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DW1-BpI7.cjs';
|
|
4
|
+
import '../../ark-ChhTwpLf.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,
|
|
3
|
-
export {
|
|
4
|
-
import '../../ark-
|
|
1
|
+
import { T as TaskProcessor } from '../../taskRunner-B-vG08pX.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-B-vG08pX.js';
|
|
3
|
+
export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DZ0nUuEJ.js';
|
|
4
|
+
import '../../ark-ChhTwpLf.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,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-TH6T23XG.js';
|
|
2
|
+
import '../../chunk-BVP2U66Q.js';
|
|
3
|
+
import '../../chunk-6NWNOLL3.js';
|
|
4
|
+
import '../../chunk-YA4G7RFB.js';
|
|
5
|
+
import '../../chunk-TU3LVAPX.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/worker/expo/taskQueue.ts
|