@arkade-os/sdk 0.4.76 → 0.4.77

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.
Files changed (87) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +3 -5
  6. package/dist/adapters/indexedDB.cjs.map +1 -1
  7. package/dist/adapters/indexedDB.d.cts +1 -1
  8. package/dist/adapters/indexedDB.d.ts +1 -1
  9. package/dist/adapters/indexedDB.js +3 -5
  10. package/dist/adapters/indexedDB.js.map +1 -1
  11. package/dist/{asyncStorageTaskQueue-DrKbfleJ.d.ts → asyncStorageTaskQueue-DTl0WM7E.d.ts} +1 -1
  12. package/dist/{asyncStorageTaskQueue-D7BU-BdP.d.cts → asyncStorageTaskQueue-MmJyAnu-.d.cts} +1 -1
  13. package/dist/{chunk-2KFXM3N5.cjs → chunk-4LP6XOMW.cjs} +17 -17
  14. package/dist/{chunk-2KFXM3N5.cjs.map → chunk-4LP6XOMW.cjs.map} +1 -1
  15. package/dist/{chunk-F6YOCYWU.js → chunk-52OA3UIC.js} +25 -12
  16. package/dist/chunk-52OA3UIC.js.map +1 -0
  17. package/dist/{chunk-7UJLIZQU.js → chunk-ACPANSOX.js} +43 -11
  18. package/dist/chunk-ACPANSOX.js.map +1 -0
  19. package/dist/{chunk-P53OHGXY.cjs → chunk-CJN4CUEU.cjs} +25 -11
  20. package/dist/chunk-CJN4CUEU.cjs.map +1 -0
  21. package/dist/{chunk-T327OEMV.cjs → chunk-H62OOAS4.cjs} +17 -17
  22. package/dist/{chunk-T327OEMV.cjs.map → chunk-H62OOAS4.cjs.map} +1 -1
  23. package/dist/{chunk-54W6QBXL.js → chunk-HKOFYHZP.js} +3 -3
  24. package/dist/{chunk-54W6QBXL.js.map → chunk-HKOFYHZP.js.map} +1 -1
  25. package/dist/{chunk-CQNX4BTA.cjs → chunk-LUWSY2QO.cjs} +89 -57
  26. package/dist/chunk-LUWSY2QO.cjs.map +1 -0
  27. package/dist/{chunk-WMHELOHH.js → chunk-MLOZHTBN.js} +523 -104
  28. package/dist/chunk-MLOZHTBN.js.map +1 -0
  29. package/dist/{chunk-O2BIWLZC.js → chunk-T6MGH4V4.js} +4 -4
  30. package/dist/{chunk-O2BIWLZC.js.map → chunk-T6MGH4V4.js.map} +1 -1
  31. package/dist/{chunk-LQM6RHNT.cjs → chunk-Y4YK44IM.cjs} +10 -10
  32. package/dist/{chunk-LQM6RHNT.cjs.map → chunk-Y4YK44IM.cjs.map} +1 -1
  33. package/dist/{chunk-LHSVPDFJ.cjs → chunk-YJEWWLOQ.cjs} +959 -541
  34. package/dist/chunk-YJEWWLOQ.cjs.map +1 -0
  35. package/dist/{chunk-MUBPGYUE.js → chunk-YKNTUOUG.js} +4 -4
  36. package/dist/{chunk-MUBPGYUE.js.map → chunk-YKNTUOUG.js.map} +1 -1
  37. package/dist/contracts/handlers/index.cjs +9 -9
  38. package/dist/contracts/handlers/index.d.cts +3 -3
  39. package/dist/contracts/handlers/index.d.ts +3 -3
  40. package/dist/contracts/handlers/index.js +2 -2
  41. package/dist/{delegate-BAYpqkEx.d.ts → delegate-CjcysR7s.d.ts} +1 -1
  42. package/dist/{delegate-CR7msIXK.d.cts → delegate-QPCGaD_z.d.cts} +1 -1
  43. package/dist/{hdWalletCapable-BSF29IjK.d.ts → hdWalletCapable--pMncWbC.d.ts} +6 -4
  44. package/dist/{hdWalletCapable-BbZxCUeZ.d.cts → hdWalletCapable-Bp_p0WLj.d.cts} +6 -4
  45. package/dist/{index-4NF3srcg.d.cts → index-BMY272ns.d.cts} +26 -8
  46. package/dist/{index-B_RYn9rg.d.cts → index-Ie_ak2zY.d.cts} +35 -9
  47. package/dist/{index-B_RYn9rg.d.ts → index-Ie_ak2zY.d.ts} +35 -9
  48. package/dist/{index-Dj2yOhQ2.d.ts → index-m-EM-e8D.d.ts} +26 -8
  49. package/dist/index.cjs +307 -303
  50. package/dist/index.d.cts +75 -13
  51. package/dist/index.d.ts +75 -13
  52. package/dist/index.js +4 -4
  53. package/dist/repositories/realm/index.cjs +36 -19
  54. package/dist/repositories/realm/index.cjs.map +1 -1
  55. package/dist/repositories/realm/index.d.cts +6 -3
  56. package/dist/repositories/realm/index.d.ts +6 -3
  57. package/dist/repositories/realm/index.js +22 -5
  58. package/dist/repositories/realm/index.js.map +1 -1
  59. package/dist/repositories/sqlite/index.cjs +42 -18
  60. package/dist/repositories/sqlite/index.cjs.map +1 -1
  61. package/dist/repositories/sqlite/index.d.cts +5 -2
  62. package/dist/repositories/sqlite/index.d.ts +5 -2
  63. package/dist/repositories/sqlite/index.js +29 -5
  64. package/dist/repositories/sqlite/index.js.map +1 -1
  65. package/dist/{taskRunner-DGxde-YU.d.cts → taskRunner-BgRowCqB.d.cts} +1 -1
  66. package/dist/{taskRunner-TzGUhxP-.d.ts → taskRunner-CqrlrJEt.d.ts} +1 -1
  67. package/dist/wallet/expo/background.cjs +14 -14
  68. package/dist/wallet/expo/background.d.cts +3 -3
  69. package/dist/wallet/expo/background.d.ts +3 -3
  70. package/dist/wallet/expo/background.js +6 -6
  71. package/dist/wallet/expo/index.cjs +14 -14
  72. package/dist/wallet/expo/index.cjs.map +1 -1
  73. package/dist/wallet/expo/index.d.cts +5 -5
  74. package/dist/wallet/expo/index.d.ts +5 -5
  75. package/dist/wallet/expo/index.js +5 -5
  76. package/dist/wallet/expo/index.js.map +1 -1
  77. package/dist/worker/expo/index.cjs +9 -9
  78. package/dist/worker/expo/index.d.cts +4 -4
  79. package/dist/worker/expo/index.d.ts +4 -4
  80. package/dist/worker/expo/index.js +5 -5
  81. package/package.json +1 -1
  82. package/dist/chunk-7UJLIZQU.js.map +0 -1
  83. package/dist/chunk-CQNX4BTA.cjs.map +0 -1
  84. package/dist/chunk-F6YOCYWU.js.map +0 -1
  85. package/dist/chunk-LHSVPDFJ.cjs.map +0 -1
  86. package/dist/chunk-P53OHGXY.cjs.map +0 -1
  87. package/dist/chunk-WMHELOHH.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { RestIndexerProvider } from './chunk-54W6QBXL.js';
2
- import { RestArkProvider, DEFAULT_ARKADE_SERVER_URL, ARKADE_VERSION_HEADERS, isFetchTimeoutError, convertVtxo, baseFetch } from './chunk-F6YOCYWU.js';
1
+ import { RestIndexerProvider } from './chunk-HKOFYHZP.js';
2
+ import { RestArkProvider, DEFAULT_ARKADE_SERVER_URL, ARKADE_VERSION_HEADERS, isFetchTimeoutError, convertVtxo, baseFetch } from './chunk-52OA3UIC.js';
3
3
 
4
4
  // src/providers/expoUtils.ts
5
5
  async function getExpoFetch(options) {
@@ -188,5 +188,5 @@ var ExpoIndexerProvider = class extends RestIndexerProvider {
188
188
  };
189
189
 
190
190
  export { ExpoArkProvider, ExpoIndexerProvider };
191
- //# sourceMappingURL=chunk-MUBPGYUE.js.map
192
- //# sourceMappingURL=chunk-MUBPGYUE.js.map
191
+ //# sourceMappingURL=chunk-YKNTUOUG.js.map
192
+ //# sourceMappingURL=chunk-YKNTUOUG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/providers/expoUtils.ts","../src/providers/expoArk.ts","../src/providers/expoIndexer.ts"],"names":[],"mappings":";;;;AAUA,eAAsB,aAAa,OAAA,EAA4D;AAG3F,EAAA,IAAI;AACA,IAAA,MAAM,eAAA,GAAkB,MAAM,OAAO,YAAY,CAAA;AACjD,IAAA,OAAA,CAAQ,MAAM,gCAAgC,CAAA;AAC9C,IAAA,OAAO,eAAA,CAAgB,KAAA;AAAA,EAC3B,SAAS,KAAA,EAAO;AAQZ,IAAA,OAAA,CAAQ,IAAA;AAAA,MACJ,wGAAA;AAAA,MAEA;AAAA,KACJ;AACA,IAAA,OAAO,SAAA;AAAA,EACX;AACJ;AAYA,gBAAuB,iBAAA,CACnB,GAAA,EACA,WAAA,EACA,OAAA,EACA,SACA,SAAA,EACgC;AA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A,SAAA;AAAA,UACA,EAAE,gBAAgB,kBAAA,EAAmB;AAAA,UACrC,CAAC,IAAA,KAAsC;AAEnC,YAAA,IAAI,IAAA,CAAK,cAAc,KAAA,CAAA,EAAW;AAE9B,cAAA,OAAO,IAAA;AAAA,YACX;AAEA,YAAA,IAAI,KAAK,KAAA,EAAO;AACZ,cAAA,OAAO;AAAA,gBACH,IAAA,EAAM,KAAK,KAAA,CAAM,IAAA;AAAA,gBACjB,OAAA,EAAS,IAAA,CAAK,KAAA,CAAM,OAAA,IAAW,EAAC;AAAA,gBAChC,WAAW,IAAA,CAAK,KAAA,CAAM,YAAY,EAAC,EAAG,IAAI,WAAW,CAAA;AAAA,gBACrD,aAAa,IAAA,CAAK,KAAA,CAAM,cAAc,EAAC,EAAG,IAAI,WAAW,CAAA;AAAA,gBACzD,aAAa,IAAA,CAAK,KAAA,CAAM,cAAc,EAAC,EAAG,IAAI,WAAW,CAAA;AAAA,gBACzD,EAAA,EAAI,KAAK,KAAA,CAAM,EAAA;AAAA,gBACf,aAAA,EAAe,KAAK,KAAA,CAAM;AAAA,eAC9B;AAAA,YACJ;AACA,YAAA,OAAO,IAAA;AAAA,UACX;AAAA,SACJ;AAAA,MACJ,SAAS,KAAA,EAAO;AACZ,QAAA,IAAI,KAAA,YAAiB,KAAA,IAAS,KAAA,CAAM,IAAA,KAAS,YAAA,EAAc;AACvD,UAAA;AAAA,QACJ;AAIA,QAAA,IAAI,mBAAA,CAAoB,KAAK,CAAA,EAAG;AAC5B,UAAA,OAAA,CAAQ,MAAM,uBAAuB,CAAA;AACrC,UAAA;AAAA,QACJ;AAEA,QAAA,OAAA,CAAQ,KAAA,CAAM,uBAAuB,KAAK,CAAA;AAC1C,QAAA,MAAM,KAAA;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AACJ","file":"chunk-MUBPGYUE.js","sourcesContent":["import { baseFetch, fetch } from \"../utils/fetch\";\n\n/**\n * Dynamically imports expo/fetch, falling back to {@link baseFetch}.\n *\n * Adds no headers of its own: both Expo providers share this function but reach\n * different origins, so each passes its own per request.\n *\n * @returns A fetch function suitable for SSE streaming\n */\nexport async function getExpoFetch(options?: { requireExpo?: boolean }): Promise<typeof fetch> {\n const requireExpo = options?.requireExpo ?? false;\n\n try {\n const expoFetchModule = await import(\"expo/fetch\");\n console.debug(\"Using expo/fetch for streaming\");\n return expoFetchModule.fetch as unknown as typeof fetch;\n } catch (error) {\n if (requireExpo) {\n throw new Error(\n \"expo/fetch is unavailable in this environment. \" +\n \"Please ensure expo/fetch is installed and properly configured.\",\n );\n }\n\n console.warn(\n \"Using standard fetch instead of expo/fetch. \" +\n \"Streaming may not be fully supported in some environments.\",\n error,\n );\n return baseFetch;\n }\n}\n\n/**\n * Generic SSE stream processor using fetch API with ReadableStream.\n * Handles SSE format parsing, buffer management, and abort signals.\n *\n * @param url - The SSE endpoint URL\n * @param abortSignal - Signal to abort the stream\n * @param fetchFn - Fetch function to use (defaults to standard fetch)\n * @param headers - Additional headers to send\n * @param parseData - Function to parse and yield data from SSE events\n */\nexport async function* sseStreamIterator<T>(\n url: string,\n abortSignal: AbortSignal,\n fetchFn: typeof fetch,\n headers: Record<string, string>,\n parseData: (data: any) => T | null,\n): AsyncGenerator<T, void, unknown> {\n const fetchController = new AbortController();\n const cleanup = () => fetchController.abort();\n abortSignal?.addEventListener(\"abort\", cleanup, { once: true });\n\n try {\n const response = await fetchFn(url, {\n headers: {\n Accept: \"text/event-stream\",\n ...headers,\n },\n // Required, not just for cancellation: `getExpoFetch` falls back to\n // `baseFetch`, which bounds any read that brings no signal of its\n // own. Drop this and the stream is truncated at READ_TIMEOUT_MS.\n signal: fetchController.signal,\n });\n\n if (!response.ok) {\n throw new Error(`Unexpected status ${response.status} when fetching SSE stream`);\n }\n\n if (!response.body) {\n throw new Error(\"Response body is null\");\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = \"\";\n\n while (!abortSignal?.aborted) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split(\"\\n\");\n\n for (let i = 0; i < lines.length - 1; i++) {\n const line = lines[i].trim();\n if (!line) continue;\n\n if (line.startsWith(\"data:\")) {\n const jsonStr = line.substring(5).trim();\n if (!jsonStr) continue;\n\n try {\n const data = JSON.parse(jsonStr);\n const parsed = parseData(data);\n if (parsed !== null) {\n yield parsed;\n }\n } catch (parseError) {\n console.error(\"Failed to parse SSE data:\", parseError);\n throw parseError;\n }\n }\n }\n\n buffer = lines[lines.length - 1];\n }\n } finally {\n abortSignal?.removeEventListener(\"abort\", cleanup);\n }\n}\n","import { DEFAULT_ARKADE_SERVER_URL } from \"../networks\";\nimport { RestArkProvider, SettlementEvent, TxNotificationEvent, isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { ARKADE_VERSION_HEADERS } from \"../utils/fetch\";\n\n/**\n * Expo-compatible Arkade provider implementation using expo/fetch for SSE support.\n * This provider works specifically in React Native/Expo environments where\n * standard EventSource is not available but expo/fetch provides SSE capabilities.\n *\n * @example\n * ```typescript\n * import { ExpoArkProvider } from '@arkade-os/sdk/providers/expo';\n *\n * const provider = new ExpoArkProvider('https://arkade.computer');\n * const info = await provider.getInfo();\n * ```\n */\nexport class ExpoArkProvider extends RestArkProvider {\n constructor(serverUrl: string = DEFAULT_ARKADE_SERVER_URL) {\n super(serverUrl);\n }\n\n override async *getEventStream(\n signal: AbortSignal,\n topics: string[],\n ): AsyncIterableIterator<SettlementEvent> {\n const expoFetch = await getExpoFetch();\n const url = `${this.serverUrl}/v1/batch/events`;\n const queryParams =\n topics.length > 0\n ? `?${topics.map((topic) => `topics=${encodeURIComponent(topic)}`).join(\"&\")}`\n : \"\";\n\n while (!signal?.aborted) {\n try {\n yield* sseStreamIterator(\n url + queryParams,\n signal,\n expoFetch,\n ARKADE_VERSION_HEADERS,\n (data) => {\n // Handle different response structures\n // v8 mesh API might wrap in {result: ...} or send directly\n const eventData = data.result || data;\n\n // Skip heartbeat messages\n if (eventData.heartbeat !== undefined) {\n return null;\n }\n\n return this.parseSettlementEvent(eventData);\n },\n );\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Event stream error:\", error);\n throw error;\n }\n }\n }\n\n override async *getTransactionsStream(\n signal: AbortSignal,\n ): AsyncIterableIterator<TxNotificationEvent> {\n const expoFetch = await getExpoFetch();\n const url = `${this.serverUrl}/v1/txs`;\n\n while (!signal?.aborted) {\n try {\n yield* sseStreamIterator(url, signal, expoFetch, ARKADE_VERSION_HEADERS, (data) => {\n return this.parseTransactionNotification(data.result);\n });\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Transaction stream error:\", error);\n throw error;\n }\n }\n }\n}\n","import { RestIndexerProvider, SubscriptionResponse } from \"./indexer\";\nimport { isFetchTimeoutError } from \"./ark\";\nimport { convertVtxo } from \"../wallet/vtxo\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { DEFAULT_ARKADE_SERVER_URL } from \"../networks\";\n\n/**\n * Expo-compatible Indexer provider implementation using expo/fetch for streaming support.\n * This provider works specifically in React Native/Expo environments where\n * standard fetch streaming may not work properly but expo/fetch provides streaming capabilities.\n *\n * @example\n * ```typescript\n * import { ExpoIndexerProvider } from '@arkade-os/sdk/adapters/expo';\n *\n * const provider = new ExpoIndexerProvider('https://indexer.example.com');\n * const vtxos = await provider.getVtxos({ scripts: ['script1'] });\n * ```\n */\nexport class ExpoIndexerProvider extends RestIndexerProvider {\n constructor(serverUrl: string = DEFAULT_ARKADE_SERVER_URL) {\n super(serverUrl);\n }\n\n override async *getSubscription(\n subscriptionId: string,\n abortSignal: AbortSignal,\n ): AsyncIterableIterator<SubscriptionResponse> {\n // Detect if we're running in React Native/Expo environment\n const isReactNative =\n typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\n\n const expoFetch = await getExpoFetch().catch((error) => {\n // In React Native/Expo, expo/fetch is required for proper streaming support\n if (isReactNative) {\n throw new Error(\n \"expo/fetch is unavailable in React Native environment. \" +\n \"Please ensure expo/fetch is installed and properly configured. \" +\n \"Streaming support may not work with standard fetch in React Native.\",\n );\n }\n throw error;\n });\n\n const url = `${this.serverUrl}/v1/indexer/script/subscription/${subscriptionId}`;\n\n while (!abortSignal.aborted) {\n try {\n yield* sseStreamIterator(\n url,\n abortSignal,\n expoFetch,\n { \"Content-Type\": \"application/json\" },\n (data): SubscriptionResponse | null => {\n // Handle new v8 proto format with heartbeat or event\n if (data.heartbeat !== undefined) {\n // Skip heartbeat messages\n return null;\n }\n // Process event messages\n if (data.event) {\n return {\n txid: data.event.txid,\n scripts: data.event.scripts || [],\n newVtxos: (data.event.newVtxos || []).map(convertVtxo),\n spentVtxos: (data.event.spentVtxos || []).map(convertVtxo),\n sweptVtxos: (data.event.sweptVtxos || []).map(convertVtxo),\n tx: data.event.tx,\n checkpointTxs: data.event.checkpointTxs,\n };\n }\n return null;\n },\n );\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Subscription error:\", error);\n throw error;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/providers/expoUtils.ts","../src/providers/expoArk.ts","../src/providers/expoIndexer.ts"],"names":[],"mappings":";;;;AAUA,eAAsB,aAAa,OAAA,EAA4D;AAG3F,EAAA,IAAI;AACA,IAA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AIA,QAAA,IAAI,mBAAA,CAAoB,KAAK,CAAA,EAAG;AAC5B,UAAA,OAAA,CAAQ,MAAM,uBAAuB,CAAA;AACrC,UAAA;AAAA,QACJ;AAEA,QAAA,OAAA,CAAQ,KAAA,CAAM,uBAAuB,KAAK,CAAA;AAC1C,QAAA,MAAM,KAAA;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AACJ","file":"chunk-YKNTUOUG.js","sourcesContent":["import { baseFetch, fetch } from \"../utils/fetch\";\n\n/**\n * Dynamically imports expo/fetch, falling back to {@link baseFetch}.\n *\n * Adds no headers of its own: both Expo providers share this function but reach\n * different origins, so each passes its own per request.\n *\n * @returns A fetch function suitable for SSE streaming\n */\nexport async function getExpoFetch(options?: { requireExpo?: boolean }): Promise<typeof fetch> {\n const requireExpo = options?.requireExpo ?? false;\n\n try {\n const expoFetchModule = await import(\"expo/fetch\");\n console.debug(\"Using expo/fetch for streaming\");\n return expoFetchModule.fetch as unknown as typeof fetch;\n } catch (error) {\n if (requireExpo) {\n throw new Error(\n \"expo/fetch is unavailable in this environment. \" +\n \"Please ensure expo/fetch is installed and properly configured.\",\n );\n }\n\n console.warn(\n \"Using standard fetch instead of expo/fetch. \" +\n \"Streaming may not be fully supported in some environments.\",\n error,\n );\n return baseFetch;\n }\n}\n\n/**\n * Generic SSE stream processor using fetch API with ReadableStream.\n * Handles SSE format parsing, buffer management, and abort signals.\n *\n * @param url - The SSE endpoint URL\n * @param abortSignal - Signal to abort the stream\n * @param fetchFn - Fetch function to use (defaults to standard fetch)\n * @param headers - Additional headers to send\n * @param parseData - Function to parse and yield data from SSE events\n */\nexport async function* sseStreamIterator<T>(\n url: string,\n abortSignal: AbortSignal,\n fetchFn: typeof fetch,\n headers: Record<string, string>,\n parseData: (data: any) => T | null,\n): AsyncGenerator<T, void, unknown> {\n const fetchController = new AbortController();\n const cleanup = () => fetchController.abort();\n abortSignal?.addEventListener(\"abort\", cleanup, { once: true });\n\n try {\n const response = await fetchFn(url, {\n headers: {\n Accept: \"text/event-stream\",\n ...headers,\n },\n // Required, not just for cancellation: `getExpoFetch` falls back to\n // `baseFetch`, which bounds any read that brings no signal of its\n // own. Drop this and the stream is truncated at READ_TIMEOUT_MS.\n signal: fetchController.signal,\n });\n\n if (!response.ok) {\n throw new Error(`Unexpected status ${response.status} when fetching SSE stream`);\n }\n\n if (!response.body) {\n throw new Error(\"Response body is null\");\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = \"\";\n\n while (!abortSignal?.aborted) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split(\"\\n\");\n\n for (let i = 0; i < lines.length - 1; i++) {\n const line = lines[i].trim();\n if (!line) continue;\n\n if (line.startsWith(\"data:\")) {\n const jsonStr = line.substring(5).trim();\n if (!jsonStr) continue;\n\n try {\n const data = JSON.parse(jsonStr);\n const parsed = parseData(data);\n if (parsed !== null) {\n yield parsed;\n }\n } catch (parseError) {\n console.error(\"Failed to parse SSE data:\", parseError);\n throw parseError;\n }\n }\n }\n\n buffer = lines[lines.length - 1];\n }\n } finally {\n abortSignal?.removeEventListener(\"abort\", cleanup);\n }\n}\n","import { DEFAULT_ARKADE_SERVER_URL } from \"../networks\";\nimport { RestArkProvider, SettlementEvent, TxNotificationEvent, isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { ARKADE_VERSION_HEADERS } from \"../utils/fetch\";\n\n/**\n * Expo-compatible Arkade provider implementation using expo/fetch for SSE support.\n * This provider works specifically in React Native/Expo environments where\n * standard EventSource is not available but expo/fetch provides SSE capabilities.\n *\n * @example\n * ```typescript\n * import { ExpoArkProvider } from '@arkade-os/sdk/providers/expo';\n *\n * const provider = new ExpoArkProvider('https://arkade.computer');\n * const info = await provider.getInfo();\n * ```\n */\nexport class ExpoArkProvider extends RestArkProvider {\n constructor(serverUrl: string = DEFAULT_ARKADE_SERVER_URL) {\n super(serverUrl);\n }\n\n override async *getEventStream(\n signal: AbortSignal,\n topics: string[],\n ): AsyncIterableIterator<SettlementEvent> {\n const expoFetch = await getExpoFetch();\n const url = `${this.serverUrl}/v1/batch/events`;\n const queryParams =\n topics.length > 0\n ? `?${topics.map((topic) => `topics=${encodeURIComponent(topic)}`).join(\"&\")}`\n : \"\";\n\n while (!signal?.aborted) {\n try {\n yield* sseStreamIterator(\n url + queryParams,\n signal,\n expoFetch,\n ARKADE_VERSION_HEADERS,\n (data) => {\n // Handle different response structures\n // v8 mesh API might wrap in {result: ...} or send directly\n const eventData = data.result || data;\n\n // Skip heartbeat messages\n if (eventData.heartbeat !== undefined) {\n return null;\n }\n\n return this.parseSettlementEvent(eventData);\n },\n );\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Event stream error:\", error);\n throw error;\n }\n }\n }\n\n override async *getTransactionsStream(\n signal: AbortSignal,\n ): AsyncIterableIterator<TxNotificationEvent> {\n const expoFetch = await getExpoFetch();\n const url = `${this.serverUrl}/v1/txs`;\n\n while (!signal?.aborted) {\n try {\n yield* sseStreamIterator(url, signal, expoFetch, ARKADE_VERSION_HEADERS, (data) => {\n return this.parseTransactionNotification(data.result);\n });\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Transaction stream error:\", error);\n throw error;\n }\n }\n }\n}\n","import { RestIndexerProvider, SubscriptionResponse } from \"./indexer\";\nimport { isFetchTimeoutError } from \"./ark\";\nimport { convertVtxo } from \"../wallet/vtxo\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { DEFAULT_ARKADE_SERVER_URL } from \"../networks\";\n\n/**\n * Expo-compatible Indexer provider implementation using expo/fetch for streaming support.\n * This provider works specifically in React Native/Expo environments where\n * standard fetch streaming may not work properly but expo/fetch provides streaming capabilities.\n *\n * @example\n * ```typescript\n * import { ExpoIndexerProvider } from '@arkade-os/sdk/adapters/expo';\n *\n * const provider = new ExpoIndexerProvider('https://indexer.example.com');\n * const vtxos = await provider.getVtxos({ scripts: ['script1'] });\n * ```\n */\nexport class ExpoIndexerProvider extends RestIndexerProvider {\n constructor(serverUrl: string = DEFAULT_ARKADE_SERVER_URL) {\n super(serverUrl);\n }\n\n override async *getSubscription(\n subscriptionId: string,\n abortSignal: AbortSignal,\n ): AsyncIterableIterator<SubscriptionResponse> {\n // Detect if we're running in React Native/Expo environment\n const isReactNative =\n typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\n\n const expoFetch = await getExpoFetch().catch((error) => {\n // In React Native/Expo, expo/fetch is required for proper streaming support\n if (isReactNative) {\n throw new Error(\n \"expo/fetch is unavailable in React Native environment. \" +\n \"Please ensure expo/fetch is installed and properly configured. \" +\n \"Streaming support may not work with standard fetch in React Native.\",\n );\n }\n throw error;\n });\n\n const url = `${this.serverUrl}/v1/indexer/script/subscription/${subscriptionId}`;\n\n while (!abortSignal.aborted) {\n try {\n yield* sseStreamIterator(\n url,\n abortSignal,\n expoFetch,\n { \"Content-Type\": \"application/json\" },\n (data): SubscriptionResponse | null => {\n // Handle new v8 proto format with heartbeat or event\n if (data.heartbeat !== undefined) {\n // Skip heartbeat messages\n return null;\n }\n // Process event messages\n if (data.event) {\n return {\n txid: data.event.txid,\n scripts: data.event.scripts || [],\n newVtxos: (data.event.newVtxos || []).map(convertVtxo),\n spentVtxos: (data.event.spentVtxos || []).map(convertVtxo),\n sweptVtxos: (data.event.sweptVtxos || []).map(convertVtxo),\n tx: data.event.tx,\n checkpointTxs: data.event.checkpointTxs,\n };\n }\n return null;\n },\n );\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n break;\n }\n\n // ignore timeout errors, they're expected when the server is not sending anything for 5 min\n // these timeouts are set by expo/fetch function\n if (isFetchTimeoutError(error)) {\n console.debug(\"Timeout error ignored\");\n continue;\n }\n\n console.error(\"Subscription error:\", error);\n throw error;\n }\n }\n }\n}\n"]}
@@ -1,38 +1,38 @@
1
1
  'use strict';
2
2
 
3
- var chunkCQNX4BTA_cjs = require('../../chunk-CQNX4BTA.cjs');
4
- require('../../chunk-P53OHGXY.cjs');
3
+ var chunkLUWSY2QO_cjs = require('../../chunk-LUWSY2QO.cjs');
4
+ require('../../chunk-CJN4CUEU.cjs');
5
5
  require('../../chunk-5BLDMQED.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "ArkadeContractHandler", {
10
10
  enumerable: true,
11
- get: function () { return chunkCQNX4BTA_cjs.ArkadeContractHandler; }
11
+ get: function () { return chunkLUWSY2QO_cjs.ArkadeContractHandler; }
12
12
  });
13
13
  Object.defineProperty(exports, "BoardingContractHandler", {
14
14
  enumerable: true,
15
- get: function () { return chunkCQNX4BTA_cjs.BoardingContractHandler; }
15
+ get: function () { return chunkLUWSY2QO_cjs.BoardingContractHandler; }
16
16
  });
17
17
  Object.defineProperty(exports, "DefaultContractHandler", {
18
18
  enumerable: true,
19
- get: function () { return chunkCQNX4BTA_cjs.DefaultContractHandler; }
19
+ get: function () { return chunkLUWSY2QO_cjs.DefaultContractHandler; }
20
20
  });
21
21
  Object.defineProperty(exports, "DelegateContractHandler", {
22
22
  enumerable: true,
23
- get: function () { return chunkCQNX4BTA_cjs.DelegateContractHandler; }
23
+ get: function () { return chunkLUWSY2QO_cjs.DelegateContractHandler; }
24
24
  });
25
25
  Object.defineProperty(exports, "VHTLCContractHandler", {
26
26
  enumerable: true,
27
- get: function () { return chunkCQNX4BTA_cjs.VHTLCContractHandler; }
27
+ get: function () { return chunkLUWSY2QO_cjs.VHTLCContractHandler; }
28
28
  });
29
29
  Object.defineProperty(exports, "VHTLCV2ContractHandler", {
30
30
  enumerable: true,
31
- get: function () { return chunkCQNX4BTA_cjs.VHTLCV2ContractHandler; }
31
+ get: function () { return chunkLUWSY2QO_cjs.VHTLCV2ContractHandler; }
32
32
  });
33
33
  Object.defineProperty(exports, "contractHandlers", {
34
34
  enumerable: true,
35
- get: function () { return chunkCQNX4BTA_cjs.contractHandlers; }
35
+ get: function () { return chunkLUWSY2QO_cjs.contractHandlers; }
36
36
  });
37
37
  //# sourceMappingURL=index.cjs.map
38
38
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-4NF3srcg.cjs';
2
- import '../../index-B_RYn9rg.cjs';
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-BMY272ns.cjs';
2
+ import '../../index-Ie_ak2zY.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-CR7msIXK.cjs';
7
+ import '../../delegate-QPCGaD_z.cjs';
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-Dj2yOhQ2.js';
2
- import '../../index-B_RYn9rg.js';
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-m-EM-e8D.js';
2
+ import '../../index-Ie_ak2zY.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-BAYpqkEx.js';
7
+ import '../../delegate-CjcysR7s.js';
@@ -1,5 +1,5 @@
1
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-7UJLIZQU.js';
2
- import '../../chunk-F6YOCYWU.js';
1
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-ACPANSOX.js';
2
+ import '../../chunk-52OA3UIC.js';
3
3
  import '../../chunk-NSBPE2FW.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-B_RYn9rg.js';
2
+ import { t as RelativeTimelock, V as VtxoScript, u as TapLeafScript } from './index-Ie_ak2zY.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 { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-B_RYn9rg.cjs';
2
+ import { t as RelativeTimelock, V as VtxoScript, u as TapLeafScript } from './index-Ie_ak2zY.cjs';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-B_RYn9rg.js';
1
+ import { t as RelativeTimelock, P as Network, Q as CSVMultisigTapscript, U as BatchStartedEvent, X as TreeSigningStartedEvent, Y as TxTree, Z as TreeNoncesEvent, _ as BatchFinalizationEvent, $ as BatchFinalizedEvent, a0 as BatchFailedEvent, a1 as TreeTxEvent, a2 as TreeSignatureEvent, l as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a3 as DescriptorProvider, g as IContractManager, a4 as IReadonlyWallet, a5 as ReadonlyIdentity, a6 as OnchainProvider, s as IndexerProvider, a7 as DelegateProvider, a8 as ReadonlyWalletConfig, D as IntentRepository, J as VirtualTxRepository, a9 as ExitCaptureMode, aa as ExitDataSource, e as ActivityRegistry, ab as IReadonlyAssetManager, ac as ContractSyncState, ad as RecipientAddressContext, r as ArkProvider, ae as NetworkName, af as ArkInfo, ag as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, d as GetSpendableVtxosFilter, ah as ContractWithVtxos, ai as selectPendingRecoveryOutpoints, A as ArkTransaction, f as Activity, E as ExtendedCoin, aj as Coin, x as ExtendedVirtualCoin, ak as ContractManager, al as ContractManagerConfig, I as IWallet, a as Identity, h as GetNewAddressesOptions, i as NewAddress, am as SettlementConfig, n as IAssetManager, an as VtxoManager, j as IDelegateManager, S as SendBitcoinParams, k as SettleParams, R as Recipient, ao as SignerSession, ap as SignedIntent, aq as Intent, m as SendParams, ar as TimeHeight } from './index-Ie_ak2zY.js';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BAYpqkEx.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CjcysR7s.js';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -973,7 +973,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
973
973
  */
974
974
  getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
975
975
  /** @inheritdoc */
976
- getSpendableVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
976
+ getSpendableVtxos(filter?: GetSpendableVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
977
977
  /**
978
978
  * Debug-log any explicit input generic selection would have excluded, for
979
979
  * each of the three reasons it excludes on. Explicit-input APIs stay ungated
@@ -1008,7 +1008,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
1008
1008
  * otherwise the gate and the pending-recovery set answer about two different
1009
1009
  * points in time, and each read costs another sync.
1010
1010
  */
1011
- protected contractSnapshot(): Promise<ContractWithVtxos[]>;
1011
+ protected contractSnapshot(filter?: GetSpendableVtxosFilter, options?: {
1012
+ unspentOnly?: boolean;
1013
+ }): Promise<ContractWithVtxos[]>;
1012
1014
  /**
1013
1015
  * The two exclusion sets the gate is made of, derived from one snapshot so
1014
1016
  * {@link getSpendableVtxos} and the balance answer about the same instant.
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-B_RYn9rg.cjs';
1
+ import { t as RelativeTimelock, P as Network, Q as CSVMultisigTapscript, U as BatchStartedEvent, X as TreeSigningStartedEvent, Y as TxTree, Z as TreeNoncesEvent, _ as BatchFinalizationEvent, $ as BatchFinalizedEvent, a0 as BatchFailedEvent, a1 as TreeTxEvent, a2 as TreeSignatureEvent, l as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a3 as DescriptorProvider, g as IContractManager, a4 as IReadonlyWallet, a5 as ReadonlyIdentity, a6 as OnchainProvider, s as IndexerProvider, a7 as DelegateProvider, a8 as ReadonlyWalletConfig, D as IntentRepository, J as VirtualTxRepository, a9 as ExitCaptureMode, aa as ExitDataSource, e as ActivityRegistry, ab as IReadonlyAssetManager, ac as ContractSyncState, ad as RecipientAddressContext, r as ArkProvider, ae as NetworkName, af as ArkInfo, ag as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, d as GetSpendableVtxosFilter, ah as ContractWithVtxos, ai as selectPendingRecoveryOutpoints, A as ArkTransaction, f as Activity, E as ExtendedCoin, aj as Coin, x as ExtendedVirtualCoin, ak as ContractManager, al as ContractManagerConfig, I as IWallet, a as Identity, h as GetNewAddressesOptions, i as NewAddress, am as SettlementConfig, n as IAssetManager, an as VtxoManager, j as IDelegateManager, S as SendBitcoinParams, k as SettleParams, R as Recipient, ao as SignerSession, ap as SignedIntent, aq as Intent, m as SendParams, ar as TimeHeight } from './index-Ie_ak2zY.cjs';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CR7msIXK.cjs';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-QPCGaD_z.cjs';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -973,7 +973,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
973
973
  */
974
974
  getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
975
975
  /** @inheritdoc */
976
- getSpendableVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
976
+ getSpendableVtxos(filter?: GetSpendableVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
977
977
  /**
978
978
  * Debug-log any explicit input generic selection would have excluded, for
979
979
  * each of the three reasons it excludes on. Explicit-input APIs stay ungated
@@ -1008,7 +1008,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
1008
1008
  * otherwise the gate and the pending-recovery set answer about two different
1009
1009
  * points in time, and each read costs another sync.
1010
1010
  */
1011
- protected contractSnapshot(): Promise<ContractWithVtxos[]>;
1011
+ protected contractSnapshot(filter?: GetSpendableVtxosFilter, options?: {
1012
+ unspentOnly?: boolean;
1013
+ }): Promise<ContractWithVtxos[]>;
1012
1014
  /**
1013
1015
  * The two exclusion sets the gate is made of, derived from one snapshot so
1014
1016
  * {@link getSpendableVtxos} and the balance answer about the same instant.
@@ -1,5 +1,5 @@
1
- import { bh as ContractHandler, s as RelativeTimelock, bu as Discoverable, V as VtxoScript, t as TapLeafScript, d8 as TapscriptDeriving } from './index-B_RYn9rg.cjs';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CR7msIXK.cjs';
1
+ import { bi as ContractHandler, t as RelativeTimelock, bv as Discoverable, V as VtxoScript, u as TapLeafScript, da as TapscriptDeriving } from './index-Ie_ak2zY.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-QPCGaD_z.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**
@@ -654,14 +654,28 @@ interface InputDef {
654
654
  * {@link ArkadeArgValue}).
655
655
  */
656
656
  type InputRef = string | InputDef;
657
- /** Reference to a signer key: a `"$param"` reference or literal x-only bytes. */
658
- type SignerRef = string | Uint8Array;
657
+ /** Constructor pubkey `$param` tweaked by `fn`'s covenant. */
658
+ interface TweakedSigner {
659
+ tweak: string;
660
+ fn: string;
661
+ }
662
+ /** A `"$param"` reference, literal x-only bytes, or a {@link TweakedSigner}. */
663
+ type SignerRef = string | Uint8Array | TweakedSigner;
659
664
  /** A witness-stack item: a function-input name, a `"$param"`, a literal number/bigint (minimal script-num), or raw bytes. */
660
665
  type WitnessRef = string | number | bigint | Uint8Array;
661
666
  /** Bitcoin Script segment of a spending path — enforced on-chain. */
662
667
  interface TapscriptSegment {
663
- /** Required signers. The tweaked co-signer is appended automatically when the path has an `arkadeScript`. */
668
+ /**
669
+ * Required signers. A path with `arkadeScript` also appends the emulator
670
+ * co-signer, unless `emulator` is `null`.
671
+ */
664
672
  signers: SignerRef[];
673
+ /**
674
+ * Covenant named by `<EMULATOR_KEY:fn>`. `null` when this leaf belongs to a
675
+ * covenant but signs with a constructor-key tweak instead. Omitted on
676
+ * hand-written programs, which still append the co-signer.
677
+ */
678
+ emulator?: string | null;
665
679
  /**
666
680
  * Optional standard-opcode condition (e.g. a hashlock), encoded into a
667
681
  * ConditionMultisig leaf — or ConditionCSVMultisig when combined with `csv`.
@@ -798,15 +812,19 @@ declare class ArkadeProgramScript extends VtxoScript {
798
812
  functionByName(name: string): CompiledProgramFunction | undefined;
799
813
  }
800
814
  /**
801
- * Convert a compiler-style JSON artifact into a {@link Program}. Byte values are
815
+ * Convert a Program JSON artifact into a {@link Program}. Byte values are
802
816
  * encoded as `0x`-prefixed hex strings in `asm`/`witness`/`signers`; opcode names,
803
817
  * `$param` placeholders and numbers pass through unchanged.
818
+ *
819
+ * This is *not* the JSON `arkadec` writes. That artifact lists spend groups in
820
+ * an array and uses `<param>` placeholders and raw leaf assembly; pass it to
821
+ * {@link programFromArtifact} instead.
804
822
  */
805
823
  declare function parseArtifact(artifact: {
806
824
  version?: number;
807
825
  name?: string;
808
826
  params?: readonly InputRef[];
809
- functions: Record<string, any>;
827
+ functions: unknown;
810
828
  }): Program;
811
829
  /**
812
830
  * Serialize a {@link Program} to compiler-artifact JSON — the inverse of
@@ -847,4 +865,4 @@ declare function deserializeArkadeContractParams(params: Record<string, string>)
847
865
  */
848
866
  declare const ArkadeContractHandler: ContractHandler<ArkadeContractParams, ArkadeProgramScript> & TapscriptDeriving<ArkadeProgramScript>;
849
867
 
850
- export { type ArkadeParamValue as A, BoardingContractHandler as B, type CompiledProgramFunction as C, DefaultContractHandler as D, type VHTLCV2ContractParams as E, contractHandlers as F, type InputRef as I, type Program as P, SUPPORTED_PROGRAM_VERSION as S, type TapscriptSegment as T, VHTLC as V, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeArgValue as c, type ArkadeFunction as d, type InputDef as e, type ArkadeValueType as f, type ArkadeArgType as g, type ArkadeContractParams as h, type ArkadeSegment as i, type AsmToken as j, type SignerRef as k, deserializeArkadeContractParams as l, stringifyArtifact as m, ArkadeContractHandler as n, type BoardingContractParams as o, parseArtifact as p, type DefaultContractParams as q, resolveAsm as r, serializeArkadeContractParams as s, DelegateContractHandler as t, type DelegateContractParams as u, validateProgram as v, witnessRefToBytes as w, VHTLCContractHandler as x, type VHTLCContractParams as y, VHTLCV2ContractHandler as z };
868
+ export { type ArkadeParamValue as A, BoardingContractHandler as B, type CompiledProgramFunction as C, DefaultContractHandler as D, VHTLCV2ContractHandler as E, type VHTLCV2ContractParams as F, contractHandlers as G, type InputRef as I, type Program as P, SUPPORTED_PROGRAM_VERSION as S, type TapscriptSegment as T, VHTLC as V, type WitnessRef as W, ArkadeProgramScript as a, type ProgramKeys as b, type ArkadeArgValue as c, type ArkadeFunction as d, type InputDef as e, type ArkadeValueType as f, type ArkadeArgType as g, type ArkadeContractParams as h, type ArkadeSegment as i, type AsmToken as j, type SignerRef as k, type TweakedSigner as l, deserializeArkadeContractParams as m, stringifyArtifact as n, ArkadeContractHandler as o, parseArtifact as p, type BoardingContractParams as q, resolveAsm as r, serializeArkadeContractParams as s, type DefaultContractParams as t, DelegateContractHandler as u, validateProgram as v, witnessRefToBytes as w, type DelegateContractParams as x, VHTLCContractHandler as y, type VHTLCContractParams as z };
@@ -1948,7 +1948,9 @@ type NormalizedExtendedVirtualCoin = ExtendedVirtualCoin & NormalizedVirtualCoin
1948
1948
  * it was consumed. Mirrors NArk's `ArkVtxo.IsSpent()`. The location axis is {@link canSweepOnchain},
1949
1949
  * which the two capability predicates below subtract instead.
1950
1950
  */
1951
- declare function hasTerminalSpend(vtxo: VirtualCoin): boolean;
1951
+ declare function isVtxoSpent(vtxo: VirtualCoin): boolean;
1952
+ /** @deprecated Use {@link isVtxoSpent}. */
1953
+ declare const hasTerminalSpend: typeof isVtxoSpent;
1952
1954
  /**
1953
1955
  * Whether a virtual output's batch expiry has passed. Pure expiry — swept is a separate fact, ORed
1954
1956
  * in explicitly by {@link canSpendOffchain} / {@link canRecoverOnchain}.
@@ -3005,6 +3007,10 @@ interface WalletRepository extends AsyncDisposable {
3005
3007
  * @optional SDK backends implement this; custom backends fall back to Tier 1.
3006
3008
  */
3007
3009
  getVtxosForScript?(script: string): Promise<ExtendedVirtualCoin[]>;
3010
+ /** Fetch a script set without one read per contract; `unspentOnly` omits spent rows. */
3011
+ getVtxosForScripts?(scripts: string[], options?: {
3012
+ unspentOnly?: boolean;
3013
+ }): Promise<ExtendedVirtualCoin[]>;
3008
3014
  /**
3009
3015
  * Save virtual outputs for a script.
3010
3016
  * @optional SDK backends implement this; custom backends fall back to Tier 1.
@@ -3644,8 +3650,14 @@ interface IContractManager extends Disposable {
3644
3650
  * List contracts and their current virtual outputs.
3645
3651
  *
3646
3652
  * If no filter is provided, returns all contracts with their virtual outputs.
3653
+ * `unspentOnly` omits spent VTXOs from the repository result; it
3654
+ * does not narrow the provider sync or change the full-history default.
3647
3655
  */
3648
- getContractsWithVtxos(filter?: GetContractsFilter): Promise<ContractWithVtxos[]>;
3656
+ getContractsWithVtxos(filter?: GetContractsFilter, pageSize?: number, options?: {
3657
+ maxSyncAgeMs?: number;
3658
+ unspentOnly?: boolean;
3659
+ requireSynced?: boolean;
3660
+ }): Promise<ContractWithVtxos[]>;
3649
3661
  /**
3650
3662
  * Latest provider-sync health (online vs. degraded to repository data).
3651
3663
  * See {@link ContractSyncState}.
@@ -4317,7 +4329,11 @@ declare class ContractManager implements IContractManager {
4317
4329
  * ```
4318
4330
  */
4319
4331
  getContracts(filter?: GetContractsFilter): Promise<Contract[]>;
4320
- getContractsWithVtxos(filter?: GetContractsFilter, pageSize?: number): Promise<ContractWithVtxos[]>;
4332
+ getContractsWithVtxos(filter?: GetContractsFilter, pageSize?: number, options?: {
4333
+ maxSyncAgeMs?: number;
4334
+ unspentOnly?: boolean;
4335
+ requireSynced?: boolean;
4336
+ }): Promise<ContractWithVtxos[]>;
4321
4337
  annotateVtxos(vtxos: VirtualCoin[], tapscripts?: ContractTapscriptCache): Promise<NormalizedExtendedVirtualCoin[]>;
4322
4338
  /** @inheritdoc */
4323
4339
  assertAnnotatable(vtxos: readonly {
@@ -5971,7 +5987,7 @@ interface Status {
5971
5987
  * @deprecated Use the canonical facts on {@link VirtualCoin} — `isSwept`, `isPreconfirmed`,
5972
5988
  * `isSpent`, `expiresAt`, `expiresAtHeight`, `commitmentTxIds`, `spentBy`, `settledBy` — and the
5973
5989
  * capability predicates {@link canSpendOffchain}, {@link canRecoverOnchain},
5974
- * {@link hasTerminalSpend}, {@link isPastExpiry}. `state` collapses independent facts into one
5990
+ * {@link isVtxoSpent}, {@link isPastExpiry}. `state` collapses independent facts into one
5975
5991
  * lossy label; this object is retained only as a backward-compatible projection.
5976
5992
  */
5977
5993
  interface VirtualStatus {
@@ -6031,7 +6047,7 @@ interface Coin extends Outpoint {
6031
6047
  * {@link IndexerProvider} and {@link WalletRepository} implementations may hand back coins without
6032
6048
  * them. The SDK normalizes every incoming coin, so coins it returns always carry the facts that are
6033
6049
  * determinable; do not read these fields off a coin the SDK has not returned to you — use
6034
- * {@link canSpendOffchain} / {@link canRecoverOnchain} / {@link hasTerminalSpend} /
6050
+ * {@link canSpendOffchain} / {@link canRecoverOnchain} / {@link isVtxoSpent} /
6035
6051
  * {@link isPastExpiry}, which normalize defensively.
6036
6052
  *
6037
6053
  * @see Coin
@@ -6211,6 +6227,16 @@ type GetVtxosFilter = {
6211
6227
  */
6212
6228
  withUnrolled?: boolean;
6213
6229
  };
6230
+ type GetSpendableVtxosFilter = GetVtxosFilter & {
6231
+ /** Exclude contracts retained for history from this spendable read. */
6232
+ watchedOnly?: boolean;
6233
+ /** Query only contracts whose handler permits generic spending. */
6234
+ genericallySpendableOnly?: boolean;
6235
+ /** Maximum age of a successful sync reused by this read, in milliseconds. Default: 0. */
6236
+ maxSyncAgeMs?: number;
6237
+ /** Reject repository fallback when the selected contracts could not be synced. */
6238
+ requireSynced?: boolean;
6239
+ };
6214
6240
  /**
6215
6241
  * Readonly asset manager interface for asset operations that do not require wallet identity.
6216
6242
  *
@@ -6362,10 +6388,10 @@ interface IReadonlyWallet {
6362
6388
  * Both exclusion sets are derived from one contract snapshot, so they cannot
6363
6389
  * disagree about which VTXOs exist.
6364
6390
  *
6365
- * @param filter - Same flags, same defaults, as {@link getVtxos}
6366
- * @see GetVtxosFilter
6391
+ * @param filter - Same coin flags and defaults as {@link getVtxos}, with opt-in contract scopes
6392
+ * @see GetSpendableVtxosFilter
6367
6393
  */
6368
- getSpendableVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
6394
+ getSpendableVtxos(filter?: GetSpendableVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
6369
6395
  /** @returns Onchain boarding inputs tracked by the wallet. */
6370
6396
  getBoardingUtxos(): Promise<ExtendedCoin[]>;
6371
6397
  /** @returns Wallet transaction history derived from boarding and Arkade activity. */
@@ -6390,4 +6416,4 @@ interface IReadonlyWallet {
6390
6416
  clear(): Promise<void>;
6391
6417
  }
6392
6418
 
6393
- export { type BatchFailedEvent as $, type ArkTransaction as A, type IntentRepository as B, type ContractRepository as C, type ArkIntent as D, type ExtendedCoin as E, type IntentFilter as F, type GetVtxosFilter as G, type VirtualTxRepository as H, type IWallet as I, type VirtualTx as J, type VtxoBranch as K, ChainedTxType as L, type Network as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, CSVMultisigTapscript as P, type BatchStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotificationEvent as T, type TreeSigningStartedEvent as U, VtxoScript as V, type WalletRepository as W, TxTree as X, type TreeNoncesEvent as Y, type BatchFinalizationEvent as Z, type BatchFinalizedEvent as _, type Identity as a, type PathContext as a$, type TreeTxEvent as a0, type TreeSignatureEvent as a1, type DescriptorProvider as a2, type IReadonlyWallet as a3, type ReadonlyIdentity as a4, type OnchainProvider as a5, type DelegateProvider as a6, type ReadonlyWalletConfig as a7, type ExitCaptureMode as a8, type ExitDataSource as a9, type FeeInfo as aA, type CreateContractParams as aB, type GetContractsFilter as aC, type GetSpendablePathsOptions as aD, type GetAllSpendingPathsOptions as aE, type IssuanceParams as aF, type ReissuanceParams as aG, type BurnParams as aH, type RenewVtxosOptions as aI, type WatchedScript as aJ, type PathSelection as aK, type ContractEvent as aL, type AssetDetails as aM, type IssuanceResult as aN, type DelegateInfo as aO, type MigrationGlobalSkipReason as aP, type MigrationLegSkipReason as aQ, type SignerStatus as aR, type StorageConfig as aS, type IVtxoManager as aT, type ExplorerTransaction as aU, type TreeNonces as aV, type TreePartialSigs as aW, type PendingTx as aX, type EncodedVtxoScript as aY, type Status as aZ, type ChainTx as a_, type IReadonlyAssetManager as aa, type ContractSyncState as ab, type RecipientAddressContext as ac, type NetworkName as ad, type ArkInfo as ae, ArkAddress as af, type ContractWithVtxos as ag, selectPendingRecoveryOutpoints as ah, type Coin as ai, ContractManager as aj, type ContractManagerConfig as ak, type SettlementConfig as al, VtxoManager as am, type SignerSession as an, type SignedIntent as ao, Intent as ap, type TimeHeight as aq, type DescriptorSigningRequest as ar, Transaction as as, type IntentFeeConfig as at, type OffchainInput as au, FeeAmount as av, type OnchainInput as aw, type FeeOutput as ax, type ContractWatcherConfig as ay, type Asset as az, type WalletConfig as b, type RawTxSource as b$, type ActivityIntent as b0, type ActivityResolver as b1, type ArkIntentState as b2, type ArkTapscript as b3, type AssetMetadata as b4, BITCOIN_EMULATOR_PUBKEY as b5, type BaseWalletConfig as b6, type BatchInfo as b7, type BatchSignableIdentity as b8, CLTVMultisigTapscript as b9, type EventSourceFactory as bA, type EventSourceLike as bB, EventSourceUnavailableError as bC, type ExitChainResolver as bD, type ExtendedContractVtxo as bE, type GroupMembership as bF, type HandlerError as bG, type IDelegatorManager as bH, INTENT_TERMINAL_STATES as bI, IndexerTxType as bJ, type IntentCoin as bK, type KnownMetadata as bL, MUTINYNET_EMULATOR_PUBKEY as bM, type MigrateDeprecatedSignerOptions as bN, type MigrationLegReport as bO, type MigrationVtxoRef as bP, MultisigTapscript as bQ, type NewAddressType as bR, type Nonces as bS, type Output as bT, type PageResponse as bU, type PaginationOptions as bV, PartialSig as bW, type PrevTxSource as bX, PrevTxUnavailableError as bY, type ProviderClass as bZ, REGTEST_EMULATOR_PUBKEY as b_, type CandidateDeps as ba, ChainTxType as bb, type CommitmentTx as bc, ConditionCSVMultisigTapscript as bd, ConditionMultisigTapscript as be, type ContractBalance as bf, type ContractEventCallback as bg, type ContractHandler as bh, type ContractState as bi, type ContractVtxo as bj, type ContractVtxoEvent as bk, ContractWatcher as bl, DEFAULT_VTXO_PAGE_SIZE as bm, DelegateManagerImpl as bn, type DelegateOptions as bo, DelegatorManagerImpl as bp, type DelegatorProvider as bq, type DeprecatedSignerMigrationReport as br, type DeprecatedSignerReport as bs, DigestMismatchError as bt, type Discoverable as bu, type DiscoveredContract as bv, type DiscoveryDeps as bw, ESPLORA_URL as bx, EsploraProvider as by, type EventSourceCapable as bz, type WalletBalance as c, isVtxoExpiringSoon as c$, RestDelegateProvider as c0, RestDelegatorProvider as c1, type ScanContractsOptions as c2, type ScanResult as c3, type ScheduledSession as c4, SettlementEventType as c5, type SignRequest as c6, type SignerClassification as c7, type SignerSet as c8, type SubscriptionEvent as c9, classifyAgainstSignerSet as cA, classifyContractSigner as cB, collabExitResolver as cC, configureEventSource as cD, createDefaultActivityRegistry as cE, createExitChainResolver as cF, decodeTapscript as cG, defaultEmulatorPubkey as cH, getConfiguredEventSource as cI, getNetwork as cJ, getRandomId as cK, getSequence as cL, hasCandidates as cM, hasTerminalSpend as cN, isBatchSignable as cO, isContractVtxoEvent as cP, isCooperativelyMigratable as cQ, isDiscoverable as cR, isEventSourceUnavailableError as cS, isExpired as cT, isPastExpiry as cU, isRecoverable as cV, isSigningIdentity as cW, isSpendable as cX, isSubdust as cY, isTerminalIntentState as cZ, isVirtualCoin as c_, type SubscriptionHeartbeat as ca, type SweepTxNotification as cb, type TapLeaves as cc, TapTreeCoder as cd, TapscriptType as ce, type Tx as cf, type TxHistoryRecord as cg, type TxKey as ch, type TxNotification as ci, type TxTag as cj, type TxTreeNode as ck, TxType as cl, type VirtualStatus as cm, type Vtxo as cn, type VtxoChain as co, type VtxoType as cp, type WalletMode as cq, type WithPrevTx as cr, assertAllowedSighashTypes as cs, assetMintResolver as ct, attachPrevArkTxs as cu, attachPrevoutTxs as cv, boardingResolver as cw, canRecoverOnchain as cx, canSpendOffchain as cy, canSweepOnchain as cz, ActivityRegistry as d, networks as d0, resolveEmulatorPubkey as d1, resolveEventSource as d2, resolvePrevTxs as d3, scriptFromTapLeafScript as d4, signerSetFromInfo as d5, toXOnlySignerHex as d6, withPrevTxs as d7, type TapscriptDeriving as d8, type Activity as e, type IContractManager as f, type GetNewAddressesOptions as g, type NewAddress as h, type IDelegateManager as i, type SettleParams as j, type SettlementEvent as k, type SendParams as l, type IAssetManager as m, RestArkProvider as n, RestIndexerProvider as o, type SubscriptionResponse as p, type ArkProvider as q, type IndexerProvider as r, type RelativeTimelock as s, type TapLeafScript as t, type VirtualCoin as u, type Contract as v, type ExtendedVirtualCoin as w, type VtxoRepositoryKey as x, type WalletState as y, type ContractFilter as z };
6419
+ export { type BatchFinalizedEvent as $, type ArkTransaction as A, type ContractFilter as B, type ContractRepository as C, type IntentRepository as D, type ExtendedCoin as E, type ArkIntent as F, type GetVtxosFilter as G, type IntentFilter as H, type IWallet as I, type VirtualTxRepository as J, type VirtualTx as K, type VtxoBranch as L, ChainedTxType as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type Network as P, CSVMultisigTapscript as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotificationEvent as T, type BatchStartedEvent as U, VtxoScript as V, type WalletRepository as W, type TreeSigningStartedEvent as X, TxTree as Y, type TreeNoncesEvent as Z, type BatchFinalizationEvent as _, type Identity as a, type ChainTx as a$, type BatchFailedEvent as a0, type TreeTxEvent as a1, type TreeSignatureEvent as a2, type DescriptorProvider as a3, type IReadonlyWallet as a4, type ReadonlyIdentity as a5, type OnchainProvider as a6, type DelegateProvider as a7, type ReadonlyWalletConfig as a8, type ExitCaptureMode as a9, type Asset as aA, type FeeInfo as aB, type CreateContractParams as aC, type GetContractsFilter as aD, type GetSpendablePathsOptions as aE, type GetAllSpendingPathsOptions as aF, type IssuanceParams as aG, type ReissuanceParams as aH, type BurnParams as aI, type RenewVtxosOptions as aJ, type WatchedScript as aK, type PathSelection as aL, type ContractEvent as aM, type AssetDetails as aN, type IssuanceResult as aO, type DelegateInfo as aP, type MigrationGlobalSkipReason as aQ, type MigrationLegSkipReason as aR, type SignerStatus as aS, type StorageConfig as aT, type IVtxoManager as aU, type ExplorerTransaction as aV, type TreeNonces as aW, type TreePartialSigs as aX, type PendingTx as aY, type EncodedVtxoScript as aZ, type Status as a_, type ExitDataSource as aa, type IReadonlyAssetManager as ab, type ContractSyncState as ac, type RecipientAddressContext as ad, type NetworkName as ae, type ArkInfo as af, ArkAddress as ag, type ContractWithVtxos as ah, selectPendingRecoveryOutpoints as ai, type Coin as aj, ContractManager as ak, type ContractManagerConfig as al, type SettlementConfig as am, VtxoManager as an, type SignerSession as ao, type SignedIntent as ap, Intent as aq, type TimeHeight as ar, type DescriptorSigningRequest as as, Transaction as at, type IntentFeeConfig as au, type OffchainInput as av, FeeAmount as aw, type OnchainInput as ax, type FeeOutput as ay, type ContractWatcherConfig as az, type WalletConfig as b, REGTEST_EMULATOR_PUBKEY as b$, type PathContext as b0, type ActivityIntent as b1, type ActivityResolver as b2, type ArkIntentState as b3, type ArkTapscript as b4, type AssetMetadata as b5, BITCOIN_EMULATOR_PUBKEY as b6, type BaseWalletConfig as b7, type BatchInfo as b8, type BatchSignableIdentity as b9, type EventSourceCapable as bA, type EventSourceFactory as bB, type EventSourceLike as bC, EventSourceUnavailableError as bD, type ExitChainResolver as bE, type ExtendedContractVtxo as bF, type GroupMembership as bG, type HandlerError as bH, type IDelegatorManager as bI, INTENT_TERMINAL_STATES as bJ, IndexerTxType as bK, type IntentCoin as bL, type KnownMetadata as bM, MUTINYNET_EMULATOR_PUBKEY as bN, type MigrateDeprecatedSignerOptions as bO, type MigrationLegReport as bP, type MigrationVtxoRef as bQ, MultisigTapscript as bR, type NewAddressType as bS, type Nonces as bT, type Output as bU, type PageResponse as bV, type PaginationOptions as bW, PartialSig as bX, type PrevTxSource as bY, PrevTxUnavailableError as bZ, type ProviderClass as b_, CLTVMultisigTapscript as ba, type CandidateDeps as bb, ChainTxType as bc, type CommitmentTx as bd, ConditionCSVMultisigTapscript as be, ConditionMultisigTapscript as bf, type ContractBalance as bg, type ContractEventCallback as bh, type ContractHandler as bi, type ContractState as bj, type ContractVtxo as bk, type ContractVtxoEvent as bl, ContractWatcher as bm, DEFAULT_VTXO_PAGE_SIZE as bn, DelegateManagerImpl as bo, type DelegateOptions as bp, DelegatorManagerImpl as bq, type DelegatorProvider as br, type DeprecatedSignerMigrationReport as bs, type DeprecatedSignerReport as bt, DigestMismatchError as bu, type Discoverable as bv, type DiscoveredContract as bw, type DiscoveryDeps as bx, ESPLORA_URL as by, EsploraProvider as bz, type WalletBalance as c, isVirtualCoin as c$, type RawTxSource as c0, RestDelegateProvider as c1, RestDelegatorProvider as c2, type ScanContractsOptions as c3, type ScanResult as c4, type ScheduledSession as c5, SettlementEventType as c6, type SignRequest as c7, type SignerClassification as c8, type SignerSet as c9, canSweepOnchain as cA, classifyAgainstSignerSet as cB, classifyContractSigner as cC, collabExitResolver as cD, configureEventSource as cE, createDefaultActivityRegistry as cF, createExitChainResolver as cG, decodeTapscript as cH, defaultEmulatorPubkey as cI, getConfiguredEventSource as cJ, getNetwork as cK, getRandomId as cL, getSequence as cM, hasCandidates as cN, hasTerminalSpend as cO, isBatchSignable as cP, isContractVtxoEvent as cQ, isCooperativelyMigratable as cR, isDiscoverable as cS, isEventSourceUnavailableError as cT, isExpired as cU, isPastExpiry as cV, isRecoverable as cW, isSigningIdentity as cX, isSpendable as cY, isSubdust as cZ, isTerminalIntentState as c_, type SubscriptionEvent as ca, type SubscriptionHeartbeat as cb, type SweepTxNotification as cc, type TapLeaves as cd, TapTreeCoder as ce, TapscriptType as cf, type Tx as cg, type TxHistoryRecord as ch, type TxKey as ci, type TxNotification as cj, type TxTag as ck, type TxTreeNode as cl, TxType as cm, type VirtualStatus as cn, type Vtxo as co, type VtxoChain as cp, type VtxoType as cq, type WalletMode as cr, type WithPrevTx as cs, assertAllowedSighashTypes as ct, assetMintResolver as cu, attachPrevArkTxs as cv, attachPrevoutTxs as cw, boardingResolver as cx, canRecoverOnchain as cy, canSpendOffchain as cz, type GetSpendableVtxosFilter as d, isVtxoExpiringSoon as d0, isVtxoSpent as d1, networks as d2, resolveEmulatorPubkey as d3, resolveEventSource as d4, resolvePrevTxs as d5, scriptFromTapLeafScript as d6, signerSetFromInfo as d7, toXOnlySignerHex as d8, withPrevTxs as d9, type TapscriptDeriving as da, ActivityRegistry as e, type Activity as f, type IContractManager as g, type GetNewAddressesOptions as h, type NewAddress as i, type IDelegateManager as j, type SettleParams as k, type SettlementEvent as l, type SendParams as m, type IAssetManager as n, RestArkProvider as o, RestIndexerProvider as p, type SubscriptionResponse as q, type ArkProvider as r, type IndexerProvider as s, type RelativeTimelock as t, type TapLeafScript as u, type VirtualCoin as v, type Contract as w, type ExtendedVirtualCoin as x, type VtxoRepositoryKey as y, type WalletState as z };