@arkade-os/sdk 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +9 -5
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/{asyncStorageTaskQueue-CdWheMqT.d.ts → asyncStorageTaskQueue-B3U5gQ-i.d.ts} +1 -1
  7. package/dist/{asyncStorageTaskQueue-DFt5LgW5.d.cts → asyncStorageTaskQueue-C9PkPcW_.d.cts} +1 -1
  8. package/dist/{chunk-JJ6QKTFZ.cjs → chunk-5WRA66RV.cjs} +10 -10
  9. package/dist/{chunk-JJ6QKTFZ.cjs.map → chunk-5WRA66RV.cjs.map} +1 -1
  10. package/dist/{chunk-6MIGYYWB.js → chunk-6FL4N4S2.js} +3 -3
  11. package/dist/{chunk-6MIGYYWB.js.map → chunk-6FL4N4S2.js.map} +1 -1
  12. package/dist/{chunk-GW42FS2X.cjs → chunk-BYPBVHVA.cjs} +48 -48
  13. package/dist/{chunk-GW42FS2X.cjs.map → chunk-BYPBVHVA.cjs.map} +1 -1
  14. package/dist/{chunk-NKKJEA3Z.js → chunk-HAQAWBYG.js} +739 -392
  15. package/dist/chunk-HAQAWBYG.js.map +1 -0
  16. package/dist/{chunk-XLHUGP3G.cjs → chunk-KW7ZEWYS.cjs} +6 -3
  17. package/dist/chunk-KW7ZEWYS.cjs.map +1 -0
  18. package/dist/{chunk-QFB55EOZ.js → chunk-OPX2HRWM.js} +6 -3
  19. package/dist/chunk-OPX2HRWM.js.map +1 -0
  20. package/dist/{chunk-QKNSMVBW.cjs → chunk-OUTWUYJ4.cjs} +1222 -875
  21. package/dist/chunk-OUTWUYJ4.cjs.map +1 -0
  22. package/dist/{chunk-3M22PJVB.js → chunk-P7B4LQ3H.js} +3 -3
  23. package/dist/{chunk-3M22PJVB.js.map → chunk-P7B4LQ3H.js.map} +1 -1
  24. package/dist/{chunk-FXVEOEYB.js → chunk-T7C3E2HL.js} +4 -4
  25. package/dist/{chunk-FXVEOEYB.js.map → chunk-T7C3E2HL.js.map} +1 -1
  26. package/dist/{chunk-XQRIY5K5.js → chunk-Y4BL3YYX.js} +4 -4
  27. package/dist/{chunk-XQRIY5K5.js.map → chunk-Y4BL3YYX.js.map} +1 -1
  28. package/dist/{chunk-HQNQ3CLQ.cjs → chunk-ZMSM3NOH.cjs} +18 -18
  29. package/dist/{chunk-HQNQ3CLQ.cjs.map → chunk-ZMSM3NOH.cjs.map} +1 -1
  30. package/dist/{chunk-GQUFPTN7.cjs → chunk-ZPF4I3K2.cjs} +16 -16
  31. package/dist/{chunk-GQUFPTN7.cjs.map → chunk-ZPF4I3K2.cjs.map} +1 -1
  32. package/dist/contracts/handlers/index.cjs +9 -9
  33. package/dist/contracts/handlers/index.d.cts +3 -3
  34. package/dist/contracts/handlers/index.d.ts +3 -3
  35. package/dist/contracts/handlers/index.js +2 -2
  36. package/dist/{delegate-CFCfrReG.d.cts → delegate-ByfKszb6.d.cts} +1 -1
  37. package/dist/{delegate-BSbGQabI.d.ts → delegate-Cd28gxpM.d.ts} +1 -1
  38. package/dist/{index-CzUVvIxA.d.ts → index-B6X2E7W_.d.ts} +2 -2
  39. package/dist/{index-B3fRWO5i.d.cts → index-BURzbRup.d.cts} +38 -16
  40. package/dist/{index-B3fRWO5i.d.ts → index-BURzbRup.d.ts} +38 -16
  41. package/dist/{index-Fpf4mQZr.d.cts → index-DgH_0j14.d.cts} +2 -2
  42. package/dist/index.cjs +313 -313
  43. package/dist/index.d.cts +107 -27
  44. package/dist/index.d.ts +107 -27
  45. package/dist/index.js +4 -4
  46. package/dist/repositories/realm/index.cjs +35 -35
  47. package/dist/repositories/realm/index.d.cts +2 -2
  48. package/dist/repositories/realm/index.d.ts +2 -2
  49. package/dist/repositories/realm/index.js +5 -5
  50. package/dist/repositories/sqlite/index.cjs +33 -33
  51. package/dist/repositories/sqlite/index.d.cts +2 -2
  52. package/dist/repositories/sqlite/index.d.ts +2 -2
  53. package/dist/repositories/sqlite/index.js +5 -5
  54. package/dist/{taskRunner-CdfoCMaw.d.ts → taskRunner-BaNCSxqK.d.ts} +1 -1
  55. package/dist/{taskRunner-Dk6oDAtd.d.cts → taskRunner-i56-drQV.d.cts} +1 -1
  56. package/dist/wallet/expo/background.cjs +14 -14
  57. package/dist/wallet/expo/background.d.cts +3 -3
  58. package/dist/wallet/expo/background.d.ts +3 -3
  59. package/dist/wallet/expo/background.js +6 -6
  60. package/dist/wallet/expo/index.cjs +18 -15
  61. package/dist/wallet/expo/index.cjs.map +1 -1
  62. package/dist/wallet/expo/index.d.cts +5 -4
  63. package/dist/wallet/expo/index.d.ts +5 -4
  64. package/dist/wallet/expo/index.js +8 -5
  65. package/dist/wallet/expo/index.js.map +1 -1
  66. package/dist/{wallet-D9dvXu-K.d.cts → wallet-BjQugVUt.d.cts} +11 -6
  67. package/dist/{wallet-BQHNgc_v.d.ts → wallet-BnmhohgZ.d.ts} +11 -6
  68. package/dist/worker/expo/index.cjs +9 -9
  69. package/dist/worker/expo/index.d.cts +4 -4
  70. package/dist/worker/expo/index.d.ts +4 -4
  71. package/dist/worker/expo/index.js +5 -5
  72. package/package.json +1 -1
  73. package/dist/chunk-NKKJEA3Z.js.map +0 -1
  74. package/dist/chunk-QFB55EOZ.js.map +0 -1
  75. package/dist/chunk-QKNSMVBW.cjs.map +0 -1
  76. package/dist/chunk-XLHUGP3G.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkHQNQ3CLQ_cjs = require('./chunk-HQNQ3CLQ.cjs');
4
- var chunkXLHUGP3G_cjs = require('./chunk-XLHUGP3G.cjs');
3
+ var chunkZMSM3NOH_cjs = require('./chunk-ZMSM3NOH.cjs');
4
+ var chunkKW7ZEWYS_cjs = require('./chunk-KW7ZEWYS.cjs');
5
5
 
6
6
  // src/providers/expoUtils.ts
7
7
  async function getExpoFetch(options) {
@@ -20,7 +20,7 @@ async function getExpoFetch(options) {
20
20
  "Using standard fetch instead of expo/fetch. Streaming may not be fully supported in some environments.",
21
21
  error
22
22
  );
23
- return chunkXLHUGP3G_cjs.baseFetch;
23
+ return chunkKW7ZEWYS_cjs.baseFetch;
24
24
  }
25
25
  }
26
26
  async function* sseStreamIterator(url, abortSignal, fetchFn, headers, parseData) {
@@ -80,8 +80,8 @@ async function* sseStreamIterator(url, abortSignal, fetchFn, headers, parseData)
80
80
  }
81
81
 
82
82
  // src/providers/expoArk.ts
83
- var ExpoArkProvider = class extends chunkXLHUGP3G_cjs.RestArkProvider {
84
- constructor(serverUrl = chunkXLHUGP3G_cjs.DEFAULT_ARKADE_SERVER_URL) {
83
+ var ExpoArkProvider = class extends chunkKW7ZEWYS_cjs.RestArkProvider {
84
+ constructor(serverUrl = chunkKW7ZEWYS_cjs.DEFAULT_ARKADE_SERVER_URL) {
85
85
  super(serverUrl);
86
86
  }
87
87
  async *getEventStream(signal, topics) {
@@ -94,7 +94,7 @@ var ExpoArkProvider = class extends chunkXLHUGP3G_cjs.RestArkProvider {
94
94
  url + queryParams,
95
95
  signal,
96
96
  expoFetch,
97
- chunkXLHUGP3G_cjs.ARKADE_VERSION_HEADERS,
97
+ chunkKW7ZEWYS_cjs.ARKADE_VERSION_HEADERS,
98
98
  (data) => {
99
99
  const eventData = data.result || data;
100
100
  if (eventData.heartbeat !== void 0) {
@@ -107,7 +107,7 @@ var ExpoArkProvider = class extends chunkXLHUGP3G_cjs.RestArkProvider {
107
107
  if (error instanceof Error && error.name === "AbortError") {
108
108
  break;
109
109
  }
110
- if (chunkXLHUGP3G_cjs.isFetchTimeoutError(error)) {
110
+ if (chunkKW7ZEWYS_cjs.isFetchTimeoutError(error)) {
111
111
  console.debug("Timeout error ignored");
112
112
  continue;
113
113
  }
@@ -121,14 +121,14 @@ var ExpoArkProvider = class extends chunkXLHUGP3G_cjs.RestArkProvider {
121
121
  const url = `${this.serverUrl}/v1/txs`;
122
122
  while (!signal?.aborted) {
123
123
  try {
124
- yield* sseStreamIterator(url, signal, expoFetch, chunkXLHUGP3G_cjs.ARKADE_VERSION_HEADERS, (data) => {
124
+ yield* sseStreamIterator(url, signal, expoFetch, chunkKW7ZEWYS_cjs.ARKADE_VERSION_HEADERS, (data) => {
125
125
  return this.parseTransactionNotification(data.result);
126
126
  });
127
127
  } catch (error) {
128
128
  if (error instanceof Error && error.name === "AbortError") {
129
129
  break;
130
130
  }
131
- if (chunkXLHUGP3G_cjs.isFetchTimeoutError(error)) {
131
+ if (chunkKW7ZEWYS_cjs.isFetchTimeoutError(error)) {
132
132
  console.debug("Timeout error ignored");
133
133
  continue;
134
134
  }
@@ -140,8 +140,8 @@ var ExpoArkProvider = class extends chunkXLHUGP3G_cjs.RestArkProvider {
140
140
  };
141
141
 
142
142
  // src/providers/expoIndexer.ts
143
- var ExpoIndexerProvider = class extends chunkHQNQ3CLQ_cjs.RestIndexerProvider {
144
- constructor(serverUrl = chunkXLHUGP3G_cjs.DEFAULT_ARKADE_SERVER_URL) {
143
+ var ExpoIndexerProvider = class extends chunkZMSM3NOH_cjs.RestIndexerProvider {
144
+ constructor(serverUrl = chunkKW7ZEWYS_cjs.DEFAULT_ARKADE_SERVER_URL) {
145
145
  super(serverUrl);
146
146
  }
147
147
  async *subscriptionStream(url, abortSignal) {
@@ -162,9 +162,9 @@ var ExpoIndexerProvider = class extends chunkHQNQ3CLQ_cjs.RestIndexerProvider {
162
162
  expoFetch,
163
163
  { "Content-Type": "application/json" },
164
164
  (data) => {
165
- const message = chunkHQNQ3CLQ_cjs.toSubscriptionMessage(data);
165
+ const message = chunkZMSM3NOH_cjs.toSubscriptionMessage(data);
166
166
  if (message) return message;
167
- if (data.code !== void 0) throw chunkXLHUGP3G_cjs.streamFailureError(data);
167
+ if (data.code !== void 0) throw chunkKW7ZEWYS_cjs.streamFailureError(data);
168
168
  return null;
169
169
  }
170
170
  );
@@ -172,7 +172,7 @@ var ExpoIndexerProvider = class extends chunkHQNQ3CLQ_cjs.RestIndexerProvider {
172
172
  if (error instanceof Error && error.name === "AbortError") {
173
173
  break;
174
174
  }
175
- if (chunkXLHUGP3G_cjs.isFetchTimeoutError(error)) {
175
+ if (chunkKW7ZEWYS_cjs.isFetchTimeoutError(error)) {
176
176
  console.debug("Timeout error ignored");
177
177
  continue;
178
178
  }
@@ -185,5 +185,5 @@ var ExpoIndexerProvider = class extends chunkHQNQ3CLQ_cjs.RestIndexerProvider {
185
185
 
186
186
  exports.ExpoArkProvider = ExpoArkProvider;
187
187
  exports.ExpoIndexerProvider = ExpoIndexerProvider;
188
- //# sourceMappingURL=chunk-GQUFPTN7.cjs.map
189
- //# sourceMappingURL=chunk-GQUFPTN7.cjs.map
188
+ //# sourceMappingURL=chunk-ZPF4I3K2.cjs.map
189
+ //# sourceMappingURL=chunk-ZPF4I3K2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/providers/expoUtils.ts","../src/providers/expoArk.ts","../src/providers/expoIndexer.ts"],"names":["baseFetch","RestArkProvider","DEFAULT_ARKADE_SERVER_URL","ARKADE_VERSION_HEADERS","isFetchTimeoutError","RestIndexerProvider","toSubscriptionMessage","streamFailureError"],"mappings":";;;;;;AAUA,eAAsB,aAAa,OAAA,EAA4D;AAC3F,EAAA,MAAM,WAAA,GAAc,SAAS,WAAA,IAAe,KAAA;AAE5C,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;AACZ,IAAA,IAAI,WAAA,EAAa;AACb,MAAA,MAAM,IAAI,KAAA;AAAA,QACN;AAAA,OAEJ;AAAA,IACJ;AAEA,IAAA,OAAA,CAAQ,IAAA;AAAA,MACJ,wGAAA;AAAA,MAEA;AAA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AS;AACzB,MAAA,IAAI;AACA,QAAA,OAAO,iBAAA;AAAA,UACH,GAAA;AAAA,UACA,WAAA;AAAA,UACA,SAAA;AAAA,UACA,EAAE,gBAAgB,kBAAA,EAAmB;AAAA,UACrC,CAAC,IAAA,KAAS;AACN,YAAA,MAAM,OAAA,GAAUI,wCAAsB,IAAI,CAAA;AAC1C,YAAA,IAAI,SAAS,OAAO,OAAA;AAGpB,YAAA,IAAI,IAAA,CAAK,IAAA,KAAS,KAAA,CAAA,EAAW,MAAMC,qCAAmB,IAAI,CAAA;AAC1D,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,IAAIH,qCAAA,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-GQUFPTN7.cjs","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 {\n RestIndexerProvider,\n SubscriptionEvent,\n SubscriptionHeartbeat,\n toSubscriptionMessage,\n} from \"./indexer\";\nimport { isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { streamFailureError } from \"./utils\";\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 protected override async *subscriptionStream(\n url: string,\n abortSignal: AbortSignal,\n ): AsyncIterableIterator<SubscriptionEvent | SubscriptionHeartbeat> {\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({ requireExpo: isReactNative }).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 while (!abortSignal.aborted) {\n try {\n yield* sseStreamIterator(\n url,\n abortSignal,\n expoFetch,\n { \"Content-Type\": \"application/json\" },\n (data) => {\n const message = toSubscriptionMessage(data);\n if (message) return message;\n // A `failure` event's status, which this reader sees as a plain data line.\n // Skipping it would reconnect into the same refusal at once, in a tight loop.\n if (data.code !== undefined) throw streamFailureError(data);\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":["baseFetch","RestArkProvider","DEFAULT_ARKADE_SERVER_URL","ARKADE_VERSION_HEADERS","isFetchTimeoutError","RestIndexerProvider","toSubscriptionMessage","streamFailureError"],"mappings":";;;;;;AAUA,eAAsB,aAAa,OAAA,EAA4D;AAC3F,EAAA,MAAM,WAAA,GAAc,SAAS,WAAA,IAAe,KAAA;AAE5C,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;AACZ,IAAA,IAAI,WAAA,EAAa;AACb,MAAA,MAAM,IAAI,KAAA;AAAA,QACN;AAAA,OAEJ;AAAA,IACJ;AAEA,IAAA,OAAA,CAAQ,IAAA;AAAA,MACJ,wGAAA;AAAA,MAEA;AAAA,KACJ;AACA,IAAA,OA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AACA,QAAA,OAAO,iBAAA;AAAA,UACH,GAAA;AAAA,UACA,WAAA;AAAA,UACA,SAAA;AAAA,UACA,EAAE,gBAAgB,kBAAA,EAAmB;AAAA,UACrC,CAAC,IAAA,KAAS;AACN,YAAA,MAAM,OAAA,GAAUI,wCAAsB,IAAI,CAAA;AAC1C,YAAA,IAAI,SAAS,OAAO,OAAA;AAGpB,YAAA,IAAI,IAAA,CAAK,IAAA,KAAS,KAAA,CAAA,EAAW,MAAMC,qCAAmB,IAAI,CAAA;AAC1D,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,IAAIH,qCAAA,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-ZPF4I3K2.cjs","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 {\n RestIndexerProvider,\n SubscriptionEvent,\n SubscriptionHeartbeat,\n toSubscriptionMessage,\n} from \"./indexer\";\nimport { isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\nimport { streamFailureError } from \"./utils\";\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 protected override async *subscriptionStream(\n url: string,\n abortSignal: AbortSignal,\n ): AsyncIterableIterator<SubscriptionEvent | SubscriptionHeartbeat> {\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({ requireExpo: isReactNative }).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 while (!abortSignal.aborted) {\n try {\n yield* sseStreamIterator(\n url,\n abortSignal,\n expoFetch,\n { \"Content-Type\": \"application/json\" },\n (data) => {\n const message = toSubscriptionMessage(data);\n if (message) return message;\n // A `failure` event's status, which this reader sees as a plain data line.\n // Skipping it would reconnect into the same refusal at once, in a tight loop.\n if (data.code !== undefined) throw streamFailureError(data);\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,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkGW42FS2X_cjs = require('../../chunk-GW42FS2X.cjs');
4
- require('../../chunk-XLHUGP3G.cjs');
3
+ var chunkBYPBVHVA_cjs = require('../../chunk-BYPBVHVA.cjs');
4
+ require('../../chunk-KW7ZEWYS.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "ArkadeContractHandler", {
9
9
  enumerable: true,
10
- get: function () { return chunkGW42FS2X_cjs.ArkadeContractHandler; }
10
+ get: function () { return chunkBYPBVHVA_cjs.ArkadeContractHandler; }
11
11
  });
12
12
  Object.defineProperty(exports, "BoardingContractHandler", {
13
13
  enumerable: true,
14
- get: function () { return chunkGW42FS2X_cjs.BoardingContractHandler; }
14
+ get: function () { return chunkBYPBVHVA_cjs.BoardingContractHandler; }
15
15
  });
16
16
  Object.defineProperty(exports, "DefaultContractHandler", {
17
17
  enumerable: true,
18
- get: function () { return chunkGW42FS2X_cjs.DefaultContractHandler; }
18
+ get: function () { return chunkBYPBVHVA_cjs.DefaultContractHandler; }
19
19
  });
20
20
  Object.defineProperty(exports, "DelegateContractHandler", {
21
21
  enumerable: true,
22
- get: function () { return chunkGW42FS2X_cjs.DelegateContractHandler; }
22
+ get: function () { return chunkBYPBVHVA_cjs.DelegateContractHandler; }
23
23
  });
24
24
  Object.defineProperty(exports, "VHTLCContractHandler", {
25
25
  enumerable: true,
26
- get: function () { return chunkGW42FS2X_cjs.VHTLCContractHandler; }
26
+ get: function () { return chunkBYPBVHVA_cjs.VHTLCContractHandler; }
27
27
  });
28
28
  Object.defineProperty(exports, "VHTLCV2ContractHandler", {
29
29
  enumerable: true,
30
- get: function () { return chunkGW42FS2X_cjs.VHTLCV2ContractHandler; }
30
+ get: function () { return chunkBYPBVHVA_cjs.VHTLCV2ContractHandler; }
31
31
  });
32
32
  Object.defineProperty(exports, "contractHandlers", {
33
33
  enumerable: true,
34
- get: function () { return chunkGW42FS2X_cjs.contractHandlers; }
34
+ get: function () { return chunkBYPBVHVA_cjs.contractHandlers; }
35
35
  });
36
36
  //# sourceMappingURL=index.cjs.map
37
37
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-Fpf4mQZr.cjs';
2
- import '../../index-B3fRWO5i.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-DgH_0j14.cjs';
2
+ import '../../index-BURzbRup.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/transaction.js';
7
- import '../../delegate-CFCfrReG.cjs';
7
+ import '../../delegate-ByfKszb6.cjs';
@@ -1,7 +1,7 @@
1
- export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from '../../index-CzUVvIxA.js';
2
- import '../../index-B3fRWO5i.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-B6X2E7W_.js';
2
+ import '../../index-BURzbRup.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/transaction.js';
7
- import '../../delegate-BSbGQabI.js';
7
+ import '../../delegate-Cd28gxpM.js';
@@ -1,4 +1,4 @@
1
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-3M22PJVB.js';
2
- import '../../chunk-QFB55EOZ.js';
1
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-P7B4LQ3H.js';
2
+ import '../../chunk-OPX2HRWM.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-B3fRWO5i.cjs';
2
+ import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-BURzbRup.cjs';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-B3fRWO5i.js';
2
+ import { x as RelativeTimelock, V as VtxoScript, y as TapLeafScript } from './index-BURzbRup.js';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,5 +1,5 @@
1
- import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-B3fRWO5i.js';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BSbGQabI.js';
1
+ import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-BURzbRup.js';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Cd28gxpM.js';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**
@@ -1942,7 +1942,7 @@ interface SignerSet {
1942
1942
  * Deprecated signers (x-only hex) → cutoff; `0n` means none advertised (→ `DUE_NOW`).
1943
1943
  *
1944
1944
  * Read-only: the wallet hands out its live `_deprecatedSigners`, which drives coin selection
1945
- * and the pendingRecovery balance bucket. Never write through it.
1945
+ * and the `deprecatedSignerLocked` balance bucket. Never write through it.
1946
1946
  */
1947
1947
  deprecated: ReadonlyMap<string, bigint>;
1948
1948
  }
@@ -1971,7 +1971,7 @@ declare function isCooperativelyMigratable(status: SignerStatus): boolean;
1971
1971
  /**
1972
1972
  * Outpoints (`txid:vout`) of VTXOs whose contract signer is past its cutoff (`EXPIRED`) and that
1973
1973
  * the server has not swept yet. The operator will not co-sign them, so `getBalance` buckets them
1974
- * under `pendingRecovery` and coin selection skips them (a send would fail at submit); they
1974
+ * under `deprecatedSignerLocked` and coin selection skips them (a send would fail at submit); they
1975
1975
  * recover once swept and re-settled under the active signer.
1976
1976
  *
1977
1977
  * Pure + offline: classifies against a cached {@link SignerSet}, never a fresh GetInfo.
@@ -2881,7 +2881,7 @@ interface IntentReconciliationDeps {
2881
2881
  intentRepository: IntentRepository;
2882
2882
  indexerProvider: IntentReconcilerIndexer;
2883
2883
  /**
2884
- * Replays an intent's stored delete proof against arkd. Absent ⇒ a submitted, unexpired
2884
+ * Replays an intent's stored delete proof against arkd. Absent ⇒ an unresolved, unexpired
2885
2885
  * intent stays locked, since arkd never expires a queued intent on its own.
2886
2886
  */
2887
2887
  deleteIntent?: (intent: SignedIntent<Intent.DeleteMessage>) => Promise<void>;
@@ -4781,6 +4781,16 @@ interface WalletConfig extends ReadonlyWalletConfig {
4781
4781
  * @defaultValue `20`
4782
4782
  */
4783
4783
  lookAheadWindow?: number;
4784
+ /**
4785
+ * Submit offchain transactions with signed checkpoints, so a supporting
4786
+ * arkd finalizes them in one call (older arkd falls back to finalizeTx).
4787
+ * Set `false` to keep the two-step flow for this wallet's sends and
4788
+ * ArkadeCash sweeps, and for swap claims, refunds and cancels driven
4789
+ * through it; an `Arkade` client takes its own `oneShotSubmit`.
4790
+ *
4791
+ * @defaultValue `true`
4792
+ */
4793
+ oneShotSubmit?: boolean;
4784
4794
  /**
4785
4795
  * Let spends run concurrently on disjoint VTXOs: the wallet lock covers only picking and
4786
4796
  * reserving inputs, amount-bearing `Ramps` exits spend only the VTXOs they need, and naming a
@@ -4860,14 +4870,17 @@ interface WalletBalance {
4860
4870
  * boarding inputs, so zero boarding may only mean "not loaded". */
4861
4871
  loaded?: boolean;
4862
4872
  };
4863
- /** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
4873
+ /**
4874
+ * Settled (finalized) balance the wallet owns, including {@link contractLocked} and
4875
+ * {@link pendingSettlement} funds.
4876
+ */
4864
4877
  settled: number;
4865
4878
  /** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
4866
4879
  preconfirmed: number;
4867
4880
  /**
4868
4881
  * Immediately spendable offchain balance — what generic selection would pick, so `send` never
4869
- * refuses it: `settled + preconfirmed - gated - pendingSettlement - reserved`, minus one dust
4870
- * carrier kept back if any of these outputs hold assets.
4882
+ * refuses it: `settled + preconfirmed - contractLocked - pendingSettlement - reserved`, minus
4883
+ * one dust carrier kept back if any of these outputs hold assets.
4871
4884
  */
4872
4885
  available: number;
4873
4886
  /**
@@ -4876,12 +4889,12 @@ interface WalletBalance {
4876
4889
  * `available`. Takes precedence over {@link pendingSettlement} (the gate is durable; a lock clears).
4877
4890
  *
4878
4891
  * Subtract it from `settled + preconfirmed`, never from `total`, which also carries boarding,
4879
- * recoverable, pending-recovery and unrolled funds.
4892
+ * `recoverable`, `deprecatedSignerLocked` and `unrolled` funds.
4880
4893
  */
4881
- gated: number;
4894
+ contractLocked: number;
4882
4895
  /**
4883
- * Committed to an in-flight intent and not {@link gated}; returns to `available` when the
4884
- * intent terminates. Zero when unknown (no intent repository or a failed read), so it
4896
+ * Committed to an in-flight intent and not {@link contractLocked}; returns to `available` when
4897
+ * the intent terminates. Zero when unknown (no intent repository or a failed read), so it
4885
4898
  * under-reports into `available` rather than misattributing.
4886
4899
  */
4887
4900
  pendingSettlement: number;
@@ -4897,7 +4910,7 @@ interface WalletBalance {
4897
4910
  * Unswept funds under a deprecated signer past its cutoff. Not spendable until recovered
4898
4911
  * (excluded from `available`/`settled`/`preconfirmed` and coin selection), but in `total`.
4899
4912
  */
4900
- pendingRecovery: number;
4913
+ deprecatedSignerLocked: number;
4901
4914
  /**
4902
4915
  * Already unilaterally exited: onchain behind its CSV, movable only by
4903
4916
  * `Unroll.completeUnroll`. Excluded from every spendable bucket and `recoverable`, but in
@@ -4905,7 +4918,8 @@ interface WalletBalance {
4905
4918
  */
4906
4919
  unrolled: number;
4907
4920
  /**
4908
- * Total across offchain, recoverable, pending-recovery, unrolled and boarding funds.
4921
+ * Total across offchain, `recoverable`, `deprecatedSignerLocked`, `unrolled` and boarding
4922
+ * funds.
4909
4923
  *
4910
4924
  * Known wedge: while a `send`/`sendBitcoin`/`settle` is in flight, its VTXO inputs (not
4911
4925
  * boarding) are withheld from every bucket on the `Wallet` instance driving it; a
@@ -4919,6 +4933,12 @@ interface WalletBalance {
4919
4933
  * {@link available}). Assets have no per-cause split of what is held but not selectable.
4920
4934
  */
4921
4935
  availableAssets: Asset[];
4936
+ /** @deprecated Use {@link contractLocked}. It holds the same value. */
4937
+ gated: number;
4938
+ /** @deprecated Use {@link pendingSettlement}. It holds the same value. */
4939
+ intentLocked: number;
4940
+ /** @deprecated Use {@link deprecatedSignerLocked}. It holds the same value. */
4941
+ pendingRecovery: number;
4922
4942
  }
4923
4943
  /**
4924
4944
  * Parameters accepted by `OnchainWallet.send`.
@@ -5229,7 +5249,7 @@ interface TxKey {
5229
5249
  /**
5230
5250
  * The categories the history builder itself assigns. Four name the mechanism that moved the
5231
5251
  * coin; `"gated"` names the counterparty: an offchain movement into or out of one of this
5232
- * wallet's gated contracts (swap covenant, lockup — the {@link WalletBalance.gated} money).
5252
+ * wallet's gated contracts (swap covenant, lockup — the {@link WalletBalance.contractLocked} money).
5233
5253
  * History treats that contract as external, so the tag tells "my own escrow" from "a stranger".
5234
5254
  */
5235
5255
  type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch" | "gated";
@@ -5420,6 +5440,8 @@ interface IWallet extends IReadonlyWallet {
5420
5440
  * @see ArkadeBroadcaster
5421
5441
  */
5422
5442
  getArkadeBroadcaster(): Promise<ArkadeBroadcaster>;
5443
+ /** @see WalletConfig.oneShotSubmit — read by plugins that sign checkpoints for this wallet. */
5444
+ readonly oneShotSubmit?: boolean;
5423
5445
  /**
5424
5446
  * Signing identity associated with the wallet. Must be a real signer (`isSigningIdentity`):
5425
5447
  * contract corridors need `signerSession`, which a watch-only identity lacks, and refuse such
@@ -5503,9 +5525,9 @@ interface IReadonlyWallet {
5503
5525
  /** Cached display coins; may be incomplete until synchronization finishes. */
5504
5526
  getStoredVtxos?(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
5505
5527
  /**
5506
- * The subset of {@link getVtxos} generic spending may select: minus gated contracts,
5507
- * pending-recovery funds and intent-locked outpoints (all from one contract snapshot). Every
5508
- * implicit coin selection reads this; `getVtxos` stays the raw reporting/recovery read.
5528
+ * The subset of {@link getVtxos} generic spending may select: minus `contractLocked`,
5529
+ * `deprecatedSignerLocked` and `pendingSettlement` outpoints (all from one contract snapshot).
5530
+ * Every implicit coin selection reads this; `getVtxos` stays the raw reporting/recovery read.
5509
5531
  *
5510
5532
  * @param filter - Same coin flags and defaults as {@link getVtxos}, with opt-in contract scopes
5511
5533
  * @see GetSpendableVtxosFilter
@@ -1942,7 +1942,7 @@ interface SignerSet {
1942
1942
  * Deprecated signers (x-only hex) → cutoff; `0n` means none advertised (→ `DUE_NOW`).
1943
1943
  *
1944
1944
  * Read-only: the wallet hands out its live `_deprecatedSigners`, which drives coin selection
1945
- * and the pendingRecovery balance bucket. Never write through it.
1945
+ * and the `deprecatedSignerLocked` balance bucket. Never write through it.
1946
1946
  */
1947
1947
  deprecated: ReadonlyMap<string, bigint>;
1948
1948
  }
@@ -1971,7 +1971,7 @@ declare function isCooperativelyMigratable(status: SignerStatus): boolean;
1971
1971
  /**
1972
1972
  * Outpoints (`txid:vout`) of VTXOs whose contract signer is past its cutoff (`EXPIRED`) and that
1973
1973
  * the server has not swept yet. The operator will not co-sign them, so `getBalance` buckets them
1974
- * under `pendingRecovery` and coin selection skips them (a send would fail at submit); they
1974
+ * under `deprecatedSignerLocked` and coin selection skips them (a send would fail at submit); they
1975
1975
  * recover once swept and re-settled under the active signer.
1976
1976
  *
1977
1977
  * Pure + offline: classifies against a cached {@link SignerSet}, never a fresh GetInfo.
@@ -2881,7 +2881,7 @@ interface IntentReconciliationDeps {
2881
2881
  intentRepository: IntentRepository;
2882
2882
  indexerProvider: IntentReconcilerIndexer;
2883
2883
  /**
2884
- * Replays an intent's stored delete proof against arkd. Absent ⇒ a submitted, unexpired
2884
+ * Replays an intent's stored delete proof against arkd. Absent ⇒ an unresolved, unexpired
2885
2885
  * intent stays locked, since arkd never expires a queued intent on its own.
2886
2886
  */
2887
2887
  deleteIntent?: (intent: SignedIntent<Intent.DeleteMessage>) => Promise<void>;
@@ -4781,6 +4781,16 @@ interface WalletConfig extends ReadonlyWalletConfig {
4781
4781
  * @defaultValue `20`
4782
4782
  */
4783
4783
  lookAheadWindow?: number;
4784
+ /**
4785
+ * Submit offchain transactions with signed checkpoints, so a supporting
4786
+ * arkd finalizes them in one call (older arkd falls back to finalizeTx).
4787
+ * Set `false` to keep the two-step flow for this wallet's sends and
4788
+ * ArkadeCash sweeps, and for swap claims, refunds and cancels driven
4789
+ * through it; an `Arkade` client takes its own `oneShotSubmit`.
4790
+ *
4791
+ * @defaultValue `true`
4792
+ */
4793
+ oneShotSubmit?: boolean;
4784
4794
  /**
4785
4795
  * Let spends run concurrently on disjoint VTXOs: the wallet lock covers only picking and
4786
4796
  * reserving inputs, amount-bearing `Ramps` exits spend only the VTXOs they need, and naming a
@@ -4860,14 +4870,17 @@ interface WalletBalance {
4860
4870
  * boarding inputs, so zero boarding may only mean "not loaded". */
4861
4871
  loaded?: boolean;
4862
4872
  };
4863
- /** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
4873
+ /**
4874
+ * Settled (finalized) balance the wallet owns, including {@link contractLocked} and
4875
+ * {@link pendingSettlement} funds.
4876
+ */
4864
4877
  settled: number;
4865
4878
  /** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
4866
4879
  preconfirmed: number;
4867
4880
  /**
4868
4881
  * Immediately spendable offchain balance — what generic selection would pick, so `send` never
4869
- * refuses it: `settled + preconfirmed - gated - pendingSettlement - reserved`, minus one dust
4870
- * carrier kept back if any of these outputs hold assets.
4882
+ * refuses it: `settled + preconfirmed - contractLocked - pendingSettlement - reserved`, minus
4883
+ * one dust carrier kept back if any of these outputs hold assets.
4871
4884
  */
4872
4885
  available: number;
4873
4886
  /**
@@ -4876,12 +4889,12 @@ interface WalletBalance {
4876
4889
  * `available`. Takes precedence over {@link pendingSettlement} (the gate is durable; a lock clears).
4877
4890
  *
4878
4891
  * Subtract it from `settled + preconfirmed`, never from `total`, which also carries boarding,
4879
- * recoverable, pending-recovery and unrolled funds.
4892
+ * `recoverable`, `deprecatedSignerLocked` and `unrolled` funds.
4880
4893
  */
4881
- gated: number;
4894
+ contractLocked: number;
4882
4895
  /**
4883
- * Committed to an in-flight intent and not {@link gated}; returns to `available` when the
4884
- * intent terminates. Zero when unknown (no intent repository or a failed read), so it
4896
+ * Committed to an in-flight intent and not {@link contractLocked}; returns to `available` when
4897
+ * the intent terminates. Zero when unknown (no intent repository or a failed read), so it
4885
4898
  * under-reports into `available` rather than misattributing.
4886
4899
  */
4887
4900
  pendingSettlement: number;
@@ -4897,7 +4910,7 @@ interface WalletBalance {
4897
4910
  * Unswept funds under a deprecated signer past its cutoff. Not spendable until recovered
4898
4911
  * (excluded from `available`/`settled`/`preconfirmed` and coin selection), but in `total`.
4899
4912
  */
4900
- pendingRecovery: number;
4913
+ deprecatedSignerLocked: number;
4901
4914
  /**
4902
4915
  * Already unilaterally exited: onchain behind its CSV, movable only by
4903
4916
  * `Unroll.completeUnroll`. Excluded from every spendable bucket and `recoverable`, but in
@@ -4905,7 +4918,8 @@ interface WalletBalance {
4905
4918
  */
4906
4919
  unrolled: number;
4907
4920
  /**
4908
- * Total across offchain, recoverable, pending-recovery, unrolled and boarding funds.
4921
+ * Total across offchain, `recoverable`, `deprecatedSignerLocked`, `unrolled` and boarding
4922
+ * funds.
4909
4923
  *
4910
4924
  * Known wedge: while a `send`/`sendBitcoin`/`settle` is in flight, its VTXO inputs (not
4911
4925
  * boarding) are withheld from every bucket on the `Wallet` instance driving it; a
@@ -4919,6 +4933,12 @@ interface WalletBalance {
4919
4933
  * {@link available}). Assets have no per-cause split of what is held but not selectable.
4920
4934
  */
4921
4935
  availableAssets: Asset[];
4936
+ /** @deprecated Use {@link contractLocked}. It holds the same value. */
4937
+ gated: number;
4938
+ /** @deprecated Use {@link pendingSettlement}. It holds the same value. */
4939
+ intentLocked: number;
4940
+ /** @deprecated Use {@link deprecatedSignerLocked}. It holds the same value. */
4941
+ pendingRecovery: number;
4922
4942
  }
4923
4943
  /**
4924
4944
  * Parameters accepted by `OnchainWallet.send`.
@@ -5229,7 +5249,7 @@ interface TxKey {
5229
5249
  /**
5230
5250
  * The categories the history builder itself assigns. Four name the mechanism that moved the
5231
5251
  * coin; `"gated"` names the counterparty: an offchain movement into or out of one of this
5232
- * wallet's gated contracts (swap covenant, lockup — the {@link WalletBalance.gated} money).
5252
+ * wallet's gated contracts (swap covenant, lockup — the {@link WalletBalance.contractLocked} money).
5233
5253
  * History treats that contract as external, so the tag tells "my own escrow" from "a stranger".
5234
5254
  */
5235
5255
  type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch" | "gated";
@@ -5420,6 +5440,8 @@ interface IWallet extends IReadonlyWallet {
5420
5440
  * @see ArkadeBroadcaster
5421
5441
  */
5422
5442
  getArkadeBroadcaster(): Promise<ArkadeBroadcaster>;
5443
+ /** @see WalletConfig.oneShotSubmit — read by plugins that sign checkpoints for this wallet. */
5444
+ readonly oneShotSubmit?: boolean;
5423
5445
  /**
5424
5446
  * Signing identity associated with the wallet. Must be a real signer (`isSigningIdentity`):
5425
5447
  * contract corridors need `signerSession`, which a watch-only identity lacks, and refuse such
@@ -5503,9 +5525,9 @@ interface IReadonlyWallet {
5503
5525
  /** Cached display coins; may be incomplete until synchronization finishes. */
5504
5526
  getStoredVtxos?(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
5505
5527
  /**
5506
- * The subset of {@link getVtxos} generic spending may select: minus gated contracts,
5507
- * pending-recovery funds and intent-locked outpoints (all from one contract snapshot). Every
5508
- * implicit coin selection reads this; `getVtxos` stays the raw reporting/recovery read.
5528
+ * The subset of {@link getVtxos} generic spending may select: minus `contractLocked`,
5529
+ * `deprecatedSignerLocked` and `pendingSettlement` outpoints (all from one contract snapshot).
5530
+ * Every implicit coin selection reads this; `getVtxos` stays the raw reporting/recovery read.
5509
5531
  *
5510
5532
  * @param filter - Same coin flags and defaults as {@link getVtxos}, with opt-in contract scopes
5511
5533
  * @see GetSpendableVtxosFilter
@@ -1,5 +1,5 @@
1
- import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-B3fRWO5i.cjs';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CFCfrReG.cjs';
1
+ import { bF as ContractHandler, x as RelativeTimelock, bR as Discoverable, V as VtxoScript, y as TapLeafScript, dI as TapscriptDeriving } from './index-BURzbRup.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-ByfKszb6.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**