@arkade-os/sdk 0.4.53 → 0.4.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-B69ugeJw.d.cts → ark-Do9Lqfsp.d.cts} +36 -2
- package/dist/{ark-B69ugeJw.d.ts → ark-Do9Lqfsp.d.ts} +36 -2
- package/dist/{asyncStorageTaskQueue-B0SUQMXw.d.cts → asyncStorageTaskQueue-C3DYxvAT.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-DWqxuIAs.d.ts → asyncStorageTaskQueue-DOnBOEDn.d.ts} +1 -1
- package/dist/{chunk-CZTQLA55.cjs → chunk-C6UYPHTQ.cjs} +9 -9
- package/dist/{chunk-CZTQLA55.cjs.map → chunk-C6UYPHTQ.cjs.map} +1 -1
- package/dist/{chunk-4GB73TRR.cjs → chunk-CSS74VCN.cjs} +17 -17
- package/dist/{chunk-4GB73TRR.cjs.map → chunk-CSS74VCN.cjs.map} +1 -1
- package/dist/{chunk-LHYNNDY6.js → chunk-ENWR2F2P.js} +8 -1327
- package/dist/chunk-ENWR2F2P.js.map +1 -0
- package/dist/{chunk-RNMLFY2V.cjs → chunk-G7DOBFQN.cjs} +19 -1367
- package/dist/chunk-G7DOBFQN.cjs.map +1 -0
- package/dist/chunk-JCJ5WFS3.js +2326 -0
- package/dist/chunk-JCJ5WFS3.js.map +1 -0
- package/dist/{chunk-B4WZOJAI.js → chunk-LAONNMM5.js} +4 -4
- package/dist/{chunk-B4WZOJAI.js.map → chunk-LAONNMM5.js.map} +1 -1
- package/dist/chunk-OWCPXRGP.cjs +2415 -0
- package/dist/chunk-OWCPXRGP.cjs.map +1 -0
- package/dist/{chunk-UZLQUWYP.js → chunk-QMPNPZ2T.js} +23 -4
- package/dist/chunk-QMPNPZ2T.js.map +1 -0
- package/dist/{chunk-3MMUKLCI.js → chunk-QO3IKBYL.js} +827 -130
- package/dist/chunk-QO3IKBYL.js.map +1 -0
- package/dist/{chunk-3XWDMLOI.js → chunk-SG4X7SEC.js} +4 -4
- package/dist/{chunk-3XWDMLOI.js.map → chunk-SG4X7SEC.js.map} +1 -1
- package/dist/{chunk-IEMPH7J6.cjs → chunk-V2TOHHPW.cjs} +60 -40
- package/dist/chunk-V2TOHHPW.cjs.map +1 -0
- package/dist/{chunk-3YC3LQ2E.cjs → chunk-ZPL34T2Q.cjs} +1191 -471
- package/dist/chunk-ZPL34T2Q.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +8 -8
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-C_Y2YrXC.d.cts → delegate-C0iIBxen.d.cts} +1 -1
- package/dist/{delegate-BU-Cpyjw.d.ts → delegate-DmhFrtdq.d.ts} +1 -1
- package/dist/{index-BWF-C9eh.d.ts → index-BNt4wcSh.d.ts} +2 -2
- package/dist/{index-tzAInyiX.d.cts → index-BnLM1XxA.d.cts} +2 -2
- package/dist/index.cjs +348 -240
- package/dist/index.d.cts +424 -14
- package/dist/index.d.ts +424 -14
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-nzJFH8qb.d.ts → taskRunner-Bgs-0I3x.d.ts} +1 -1
- package/dist/{taskRunner-B7svzMhT.d.cts → taskRunner-RwUvgQ5M.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +5 -5
- package/dist/wallet/expo/index.d.ts +5 -5
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-B6Xiferv.d.cts → wallet-5Aou-V5n.d.ts} +83 -6
- package/dist/{wallet-CuHAI-eW.d.ts → wallet-Ck7BH8zR.d.cts} +83 -6
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-3MMUKLCI.js.map +0 -1
- package/dist/chunk-3YC3LQ2E.cjs.map +0 -1
- package/dist/chunk-E7HB3GKK.cjs +0 -1030
- package/dist/chunk-E7HB3GKK.cjs.map +0 -1
- package/dist/chunk-EFNLTS6Q.js +0 -976
- package/dist/chunk-EFNLTS6Q.js.map +0 -1
- package/dist/chunk-IEMPH7J6.cjs.map +0 -1
- package/dist/chunk-LHYNNDY6.js.map +0 -1
- package/dist/chunk-RNMLFY2V.cjs.map +0 -1
- package/dist/chunk-UZLQUWYP.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DEFAULT_ARKADE_SERVER_URL, convertVtxo } from './chunk-
|
|
1
|
+
import { RestIndexerProvider } from './chunk-ENWR2F2P.js';
|
|
2
|
+
import { RestArkProvider, DEFAULT_ARKADE_SERVER_URL, isFetchTimeoutError, convertVtxo, buildVersion, sdkVersion, fetch } from './chunk-JCJ5WFS3.js';
|
|
3
3
|
|
|
4
4
|
// src/providers/expoUtils.ts
|
|
5
5
|
async function getExpoFetch(options) {
|
|
@@ -185,5 +185,5 @@ var ExpoIndexerProvider = class extends RestIndexerProvider {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
export { ExpoArkProvider, ExpoIndexerProvider };
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-SG4X7SEC.js.map
|
|
189
|
+
//# sourceMappingURL=chunk-SG4X7SEC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/providers/expoUtils.ts","../src/providers/expoArk.ts","../src/providers/expoIndexer.ts"],"names":[],"mappings":";;;;AAMA,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,MAAM,mBAAA,GAAsB,CAAC,KAAA,EAAoB,IAAA,KAAuB;AACpE,MAAA,MAAM,OAAA,GAAU,IAAI,OAAA,CAAQ,IAAA,EAAM,OAAO,CAAA;AACzC,MAAA,OAAA,CAAQ,GAAA,CAAI,mBAAmB,YAAY,CAAA;AAC3C,MAAA,OAAA,CAAQ,GAAA,CAAI,iBAAiB,UAAU,CAAA;AACvC,MAAA,OAAO,gBAAgB,KAAA,CAAM,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,SAAS,CAAA;AAAA,IAC5D,CAAA;AACA,IAAA,OAAO,mBAAA;AAAA,EACX,SAAS,KAAA,EAAO;AAQZ,IAAA,OAAA,CAAQ,IAAA;AAAA,MACJ,wGAAA;AAAA,MAEA;AAAA,KACJ;AACA,IAAA,OAAO,KAAA;AAAA,EACX;AACJ;AAYA,gBAAuB,iBAAA,CACnB,GAAA,EACA,WAAA,EACA,OAAA,EACA,SACA,SAAA,EACgC;AAChC,EAAA,MAAM,eAAA,GAAkB,IAAI,eAAA,EAAgB;AAC5C,EAAA,MAAM,OAAA,GAAU,MAAM,eAAA,CAAgB,KAAA,EAAM;AAC5C,EAAA,WAAA,EAAa,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,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-3XWDMLOI.js","sourcesContent":["import { fetch, buildVersion, sdkVersion } from \"../utils/fetch\";\n\n/**\n * Dynamically imports expo/fetch with fallback to standard fetch.\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 const expoFetchWithHeader = (input: RequestInfo, init?: RequestInit) => {\n const headers = new Headers(init?.headers);\n headers.set(\"X-Build-Version\", buildVersion);\n headers.set(\"X-SDK-VERSION\", sdkVersion);\n return expoFetchModule.fetch(input, { ...init, headers });\n };\n return expoFetchWithHeader 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 fetch;\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 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, TxNotification, isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\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(url + queryParams, signal, expoFetch, {}, (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 } 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(signal: AbortSignal): AsyncIterableIterator<{\n commitmentTx?: TxNotification;\n arkTx?: TxNotification;\n }> {\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, {}, (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":";;;;AAMA,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,MAAM,mBAAA,GAAsB,CAAC,KAAA,EAAoB,IAAA,KAAuB;AACpE,MAAA,MAAM,OAAA,GAAU,IAAI,OAAA,CAAQ,IAAA,EAAM,OAAO,CAAA;AACzC,MAAA,OAAA,CAAQ,GAAA,C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AAA;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-SG4X7SEC.js","sourcesContent":["import { fetch, buildVersion, sdkVersion } from \"../utils/fetch\";\n\n/**\n * Dynamically imports expo/fetch with fallback to standard fetch.\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 const expoFetchWithHeader = (input: RequestInfo, init?: RequestInit) => {\n const headers = new Headers(init?.headers);\n headers.set(\"X-Build-Version\", buildVersion);\n headers.set(\"X-SDK-VERSION\", sdkVersion);\n return expoFetchModule.fetch(input, { ...init, headers });\n };\n return expoFetchWithHeader 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 fetch;\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 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, TxNotification, isFetchTimeoutError } from \"./ark\";\nimport { getExpoFetch, sseStreamIterator } from \"./expoUtils\";\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(url + queryParams, signal, expoFetch, {}, (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 } 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(signal: AbortSignal): AsyncIterableIterator<{\n commitmentTx?: TxNotification;\n arkTx?: TxNotification;\n }> {\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, {}, (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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOWCPXRGP_cjs = require('./chunk-OWCPXRGP.cjs');
|
|
4
4
|
var chunk5BLDMQED_cjs = require('./chunk-5BLDMQED.cjs');
|
|
5
5
|
var base = require('@scure/base');
|
|
6
6
|
var descriptorsScure = require('@bitcoinerlab/descriptors-scure');
|
|
@@ -76,14 +76,14 @@ var ContractHandlerRegistry = class {
|
|
|
76
76
|
var contractHandlers = new ContractHandlerRegistry();
|
|
77
77
|
exports.DefaultVtxo = void 0;
|
|
78
78
|
((DefaultVtxo2) => {
|
|
79
|
-
class Script3 extends
|
|
79
|
+
class Script3 extends chunkOWCPXRGP_cjs.VtxoScript {
|
|
80
80
|
/** Create the default virtual output script with one forfeit path and one exit path. */
|
|
81
81
|
constructor(options) {
|
|
82
82
|
const { pubKey, serverPubKey, csvTimelock } = options;
|
|
83
|
-
const forfeitScript =
|
|
83
|
+
const forfeitScript = chunkOWCPXRGP_cjs.MultisigTapscript.encode({
|
|
84
84
|
pubkeys: [pubKey, serverPubKey]
|
|
85
85
|
}).script;
|
|
86
|
-
const exitScript =
|
|
86
|
+
const exitScript = chunkOWCPXRGP_cjs.CSVMultisigTapscript.encode({
|
|
87
87
|
timelock: csvTimelock,
|
|
88
88
|
pubkeys: [pubKey]
|
|
89
89
|
}).script;
|
|
@@ -193,6 +193,25 @@ function deriveDescriptorLeafPubKey(descriptor) {
|
|
|
193
193
|
}
|
|
194
194
|
return key.pubkey;
|
|
195
195
|
}
|
|
196
|
+
function deriveDescriptorLeafCompressedPubKey(descriptor) {
|
|
197
|
+
const network = isMainnetDescriptor(descriptor) ? descriptorsScure.networks.bitcoin : descriptorsScure.networks.testnet;
|
|
198
|
+
let expansion;
|
|
199
|
+
try {
|
|
200
|
+
expansion = descriptorsScure.expand({ descriptor, network });
|
|
201
|
+
} catch (e) {
|
|
202
|
+
throw new Error(
|
|
203
|
+
`Cannot derive compressed leaf pubkey from descriptor (length=${descriptor.length}): ensure it is materialized (no wildcard) and parsable.`,
|
|
204
|
+
{ cause: e }
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
const key = expansion.expansionMap?.["@0"];
|
|
208
|
+
if (!key?.bip32) {
|
|
209
|
+
throw new Error(
|
|
210
|
+
`Cannot derive compressed leaf pubkey from descriptor (length=${descriptor.length}): not an HD descriptor, so the key parity is unrecoverable.`
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
return key.keyPath ? key.bip32.derivePath(key.keyPath.replace(/^\//, "")).publicKey : key.bip32.publicKey;
|
|
214
|
+
}
|
|
196
215
|
|
|
197
216
|
// src/contracts/metadata.ts
|
|
198
217
|
var WALLET_RECEIVE_SOURCE = "wallet-receive";
|
|
@@ -244,7 +263,7 @@ function extractPubKeyBytes(value) {
|
|
|
244
263
|
return base.hex.decode(extractPubKey(normalizeToDescriptor(value)));
|
|
245
264
|
}
|
|
246
265
|
function deserializeCsvTimelock(value) {
|
|
247
|
-
return value !== void 0 && value !== "" ?
|
|
266
|
+
return value !== void 0 && value !== "" ? chunkOWCPXRGP_cjs.sequenceToTimelock(Number(value)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
|
|
248
267
|
}
|
|
249
268
|
var CLTV_HEIGHT_THRESHOLD = 500000000n;
|
|
250
269
|
function isCltvSatisfied(context, locktime) {
|
|
@@ -258,7 +277,7 @@ function isCltvSatisfied(context, locktime) {
|
|
|
258
277
|
function isCsvSpendable(context, sequence) {
|
|
259
278
|
if (sequence === void 0) return true;
|
|
260
279
|
if (!context.vtxo) return false;
|
|
261
|
-
const timelock =
|
|
280
|
+
const timelock = chunkOWCPXRGP_cjs.sequenceToTimelock(sequence);
|
|
262
281
|
if (timelock.type === "blocks") {
|
|
263
282
|
if (context.blockHeight === void 0 || context.vtxo.status.block_height === void 0) {
|
|
264
283
|
return false;
|
|
@@ -316,21 +335,21 @@ function forfeitExitSpendablePaths(script, contract, context) {
|
|
|
316
335
|
async function detectUsedScripts(indexerProvider, scriptHexes) {
|
|
317
336
|
const used = /* @__PURE__ */ new Set();
|
|
318
337
|
const unique = [...new Set(scriptHexes)];
|
|
319
|
-
for (let offset = 0; offset < unique.length; offset +=
|
|
320
|
-
const scripts = unique.slice(offset, offset +
|
|
338
|
+
for (let offset = 0; offset < unique.length; offset += chunkOWCPXRGP_cjs.SCRIPT_QUERY_CHUNK_SIZE) {
|
|
339
|
+
const scripts = unique.slice(offset, offset + chunkOWCPXRGP_cjs.SCRIPT_QUERY_CHUNK_SIZE);
|
|
321
340
|
const remaining = new Set(scripts);
|
|
322
341
|
let pageIndex = 0;
|
|
323
342
|
let hasMore = true;
|
|
324
343
|
while (hasMore && remaining.size > 0) {
|
|
325
|
-
const { vtxos, page } = await
|
|
344
|
+
const { vtxos, page } = await chunkOWCPXRGP_cjs.getNormalizedVtxos(indexerProvider, {
|
|
326
345
|
scripts,
|
|
327
346
|
pageIndex,
|
|
328
|
-
pageSize:
|
|
347
|
+
pageSize: chunkOWCPXRGP_cjs.DEFAULT_PAGE_SIZE
|
|
329
348
|
});
|
|
330
349
|
for (const vtxo of vtxos) {
|
|
331
350
|
if (remaining.delete(vtxo.script)) used.add(vtxo.script);
|
|
332
351
|
}
|
|
333
|
-
hasMore = page ? vtxos.length ===
|
|
352
|
+
hasMore = page ? vtxos.length === chunkOWCPXRGP_cjs.DEFAULT_PAGE_SIZE : false;
|
|
334
353
|
pageIndex++;
|
|
335
354
|
}
|
|
336
355
|
}
|
|
@@ -391,7 +410,7 @@ var DefaultContractHandler = {
|
|
|
391
410
|
return {
|
|
392
411
|
pubKey: base.hex.encode(params.pubKey),
|
|
393
412
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
394
|
-
csvTimelock:
|
|
413
|
+
csvTimelock: chunkOWCPXRGP_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
395
414
|
};
|
|
396
415
|
},
|
|
397
416
|
deserializeParams(params) {
|
|
@@ -424,7 +443,7 @@ function defaultCandidatesAt(_index, descriptor, deps) {
|
|
|
424
443
|
params: {
|
|
425
444
|
pubKey: base.hex.encode(c.pubKey),
|
|
426
445
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
427
|
-
csvTimelock:
|
|
446
|
+
csvTimelock: chunkOWCPXRGP_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
428
447
|
},
|
|
429
448
|
script: c.scriptHex,
|
|
430
449
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -440,12 +459,12 @@ function discoverDefaultRange(entries, deps) {
|
|
|
440
459
|
}
|
|
441
460
|
exports.DelegateVtxo = void 0;
|
|
442
461
|
((DelegateVtxo2) => {
|
|
443
|
-
class Script3 extends
|
|
462
|
+
class Script3 extends chunkOWCPXRGP_cjs.VtxoScript {
|
|
444
463
|
/** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
|
|
445
464
|
constructor(options) {
|
|
446
465
|
const defaultVtxo = new exports.DefaultVtxo.Script(options);
|
|
447
466
|
const { delegatePubKey, pubKey, serverPubKey } = options;
|
|
448
|
-
const delegateScript =
|
|
467
|
+
const delegateScript = chunkOWCPXRGP_cjs.MultisigTapscript.encode({
|
|
449
468
|
pubkeys: [pubKey, delegatePubKey, serverPubKey]
|
|
450
469
|
}).script;
|
|
451
470
|
super([...defaultVtxo.scripts, delegateScript]);
|
|
@@ -484,7 +503,7 @@ var DelegateContractHandler = {
|
|
|
484
503
|
pubKey: base.hex.encode(params.pubKey),
|
|
485
504
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
486
505
|
delegatePubKey: base.hex.encode(params.delegatePubKey),
|
|
487
|
-
csvTimelock:
|
|
506
|
+
csvTimelock: chunkOWCPXRGP_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
488
507
|
};
|
|
489
508
|
},
|
|
490
509
|
deserializeParams(params) {
|
|
@@ -526,7 +545,7 @@ function delegateCandidatesAt(_index, descriptor, deps) {
|
|
|
526
545
|
pubKey: base.hex.encode(c.pubKey),
|
|
527
546
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
528
547
|
delegatePubKey: base.hex.encode(delegatePubKey),
|
|
529
|
-
csvTimelock:
|
|
548
|
+
csvTimelock: chunkOWCPXRGP_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
530
549
|
},
|
|
531
550
|
script: c.scriptHex,
|
|
532
551
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -545,7 +564,7 @@ function discoverDelegateRange(entries, deps) {
|
|
|
545
564
|
}
|
|
546
565
|
exports.VHTLC = void 0;
|
|
547
566
|
((VHTLC2) => {
|
|
548
|
-
class Script3 extends
|
|
567
|
+
class Script3 extends chunkOWCPXRGP_cjs.VtxoScript {
|
|
549
568
|
/** Create a VHTLC script from the supplied participant keys, hash, and timelocks. */
|
|
550
569
|
constructor(options) {
|
|
551
570
|
validateOptions(options);
|
|
@@ -560,27 +579,27 @@ exports.VHTLC = void 0;
|
|
|
560
579
|
unilateralRefundWithoutReceiverDelay
|
|
561
580
|
} = options;
|
|
562
581
|
const conditionScript = preimageConditionScript(preimageHash);
|
|
563
|
-
const claimScript =
|
|
582
|
+
const claimScript = chunkOWCPXRGP_cjs.ConditionMultisigTapscript.encode({
|
|
564
583
|
conditionScript,
|
|
565
584
|
pubkeys: [receiver, server]
|
|
566
585
|
}).script;
|
|
567
|
-
const refundScript =
|
|
586
|
+
const refundScript = chunkOWCPXRGP_cjs.MultisigTapscript.encode({
|
|
568
587
|
pubkeys: [sender, receiver, server]
|
|
569
588
|
}).script;
|
|
570
|
-
const refundWithoutReceiverScript =
|
|
589
|
+
const refundWithoutReceiverScript = chunkOWCPXRGP_cjs.CLTVMultisigTapscript.encode({
|
|
571
590
|
absoluteTimelock: refundLocktime,
|
|
572
591
|
pubkeys: [sender, server]
|
|
573
592
|
}).script;
|
|
574
|
-
const unilateralClaimScript =
|
|
593
|
+
const unilateralClaimScript = chunkOWCPXRGP_cjs.ConditionCSVMultisigTapscript.encode({
|
|
575
594
|
conditionScript,
|
|
576
595
|
timelock: unilateralClaimDelay,
|
|
577
596
|
pubkeys: [receiver]
|
|
578
597
|
}).script;
|
|
579
|
-
const unilateralRefundScript =
|
|
598
|
+
const unilateralRefundScript = chunkOWCPXRGP_cjs.CSVMultisigTapscript.encode({
|
|
580
599
|
timelock: unilateralRefundDelay,
|
|
581
600
|
pubkeys: [sender, receiver]
|
|
582
601
|
}).script;
|
|
583
|
-
const unilateralRefundWithoutReceiverScript =
|
|
602
|
+
const unilateralRefundWithoutReceiverScript = chunkOWCPXRGP_cjs.CSVMultisigTapscript.encode({
|
|
584
603
|
timelock: unilateralRefundWithoutReceiverDelay,
|
|
585
604
|
pubkeys: [sender]
|
|
586
605
|
}).script;
|
|
@@ -708,9 +727,9 @@ var VHTLCContractHandler = {
|
|
|
708
727
|
server: base.hex.encode(params.server),
|
|
709
728
|
hash: base.hex.encode(params.preimageHash),
|
|
710
729
|
refundLocktime: params.refundLocktime.toString(),
|
|
711
|
-
claimDelay:
|
|
712
|
-
refundDelay:
|
|
713
|
-
refundNoReceiverDelay:
|
|
730
|
+
claimDelay: chunkOWCPXRGP_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
731
|
+
refundDelay: chunkOWCPXRGP_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
732
|
+
refundNoReceiverDelay: chunkOWCPXRGP_cjs.timelockToSequence(
|
|
714
733
|
params.unilateralRefundWithoutReceiverDelay
|
|
715
734
|
).toString()
|
|
716
735
|
};
|
|
@@ -722,9 +741,9 @@ var VHTLCContractHandler = {
|
|
|
722
741
|
server: base.hex.decode(params.server),
|
|
723
742
|
preimageHash: base.hex.decode(params.hash),
|
|
724
743
|
refundLocktime: BigInt(params.refundLocktime),
|
|
725
|
-
unilateralClaimDelay:
|
|
726
|
-
unilateralRefundDelay:
|
|
727
|
-
unilateralRefundWithoutReceiverDelay:
|
|
744
|
+
unilateralClaimDelay: chunkOWCPXRGP_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
745
|
+
unilateralRefundDelay: chunkOWCPXRGP_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
746
|
+
unilateralRefundWithoutReceiverDelay: chunkOWCPXRGP_cjs.sequenceToTimelock(
|
|
728
747
|
Number(params.refundNoReceiverDelay)
|
|
729
748
|
)
|
|
730
749
|
};
|
|
@@ -917,7 +936,7 @@ var BoardingContractHandler = {
|
|
|
917
936
|
const coins = await deps.onchainProvider.getCoins(onchainAddress);
|
|
918
937
|
if (coins.length === 0) return [];
|
|
919
938
|
const scriptHex = base.hex.encode(script.pkScript);
|
|
920
|
-
const boardingSeq =
|
|
939
|
+
const boardingSeq = chunkOWCPXRGP_cjs.timelockToSequence(deps.boardingTimelock);
|
|
921
940
|
return [
|
|
922
941
|
{
|
|
923
942
|
type: "boarding",
|
|
@@ -1898,27 +1917,27 @@ function encodeTapscriptSegment(seg, pubkeys, args) {
|
|
|
1898
1917
|
if (seg.csv) {
|
|
1899
1918
|
const timelock = { type: seg.csv.type, value: resolveTimelockValue(seg.csv.value, args) };
|
|
1900
1919
|
if (seg.asm) {
|
|
1901
|
-
return
|
|
1920
|
+
return chunkOWCPXRGP_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1902
1921
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1903
1922
|
timelock,
|
|
1904
1923
|
pubkeys
|
|
1905
1924
|
});
|
|
1906
1925
|
}
|
|
1907
|
-
return
|
|
1926
|
+
return chunkOWCPXRGP_cjs.CSVMultisigTapscript.encode({ timelock, pubkeys });
|
|
1908
1927
|
}
|
|
1909
1928
|
if (seg.cltv !== void 0) {
|
|
1910
|
-
return
|
|
1929
|
+
return chunkOWCPXRGP_cjs.CLTVMultisigTapscript.encode({
|
|
1911
1930
|
absoluteTimelock: resolveTimelockValue(seg.cltv, args),
|
|
1912
1931
|
pubkeys
|
|
1913
1932
|
});
|
|
1914
1933
|
}
|
|
1915
1934
|
if (seg.asm) {
|
|
1916
|
-
return
|
|
1935
|
+
return chunkOWCPXRGP_cjs.ConditionMultisigTapscript.encode({
|
|
1917
1936
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1918
1937
|
pubkeys
|
|
1919
1938
|
});
|
|
1920
1939
|
}
|
|
1921
|
-
return
|
|
1940
|
+
return chunkOWCPXRGP_cjs.MultisigTapscript.encode({ pubkeys });
|
|
1922
1941
|
}
|
|
1923
1942
|
function compileFunctions(program, args, keys) {
|
|
1924
1943
|
if (program.version !== SUPPORTED_PROGRAM_VERSION) {
|
|
@@ -1948,7 +1967,7 @@ function compileFunctions(program, args, keys) {
|
|
|
1948
1967
|
return { name: names[i], def, leafScript, arkadeScript, signerKeys: pubkeys };
|
|
1949
1968
|
});
|
|
1950
1969
|
}
|
|
1951
|
-
var ArkadeProgramScript = class extends
|
|
1970
|
+
var ArkadeProgramScript = class extends chunkOWCPXRGP_cjs.VtxoScript {
|
|
1952
1971
|
constructor(program, args, keys) {
|
|
1953
1972
|
const partial = compileFunctions(program, args, keys);
|
|
1954
1973
|
super(partial.map((p) => p.leafScript));
|
|
@@ -2161,7 +2180,7 @@ function pathsFor(script, context, opts) {
|
|
|
2161
2180
|
continue;
|
|
2162
2181
|
}
|
|
2163
2182
|
if (requiresServer) continue;
|
|
2164
|
-
const sequence = csv ? Number(
|
|
2183
|
+
const sequence = csv ? Number(chunkOWCPXRGP_cjs.timelockToSequence(csv)) : void 0;
|
|
2165
2184
|
if (opts.checkTimelocks && csv && !isCsvSpendable(context, sequence)) continue;
|
|
2166
2185
|
if (opts.checkTimelocks && cltv !== void 0 && !isCltvSatisfied(context, cltv)) {
|
|
2167
2186
|
continue;
|
|
@@ -2253,6 +2272,7 @@ exports.bignum_exports = bignum_exports;
|
|
|
2253
2272
|
exports.bytesToASM = bytesToASM;
|
|
2254
2273
|
exports.computeArkadeScriptPublicKey = computeArkadeScriptPublicKey;
|
|
2255
2274
|
exports.contractHandlers = contractHandlers;
|
|
2275
|
+
exports.deriveDescriptorLeafCompressedPubKey = deriveDescriptorLeafCompressedPubKey;
|
|
2256
2276
|
exports.deriveDescriptorLeafPubKey = deriveDescriptorLeafPubKey;
|
|
2257
2277
|
exports.descriptorIsOurs = descriptorIsOurs;
|
|
2258
2278
|
exports.deserializeArkadeContractParams = deserializeArkadeContractParams;
|
|
@@ -2271,5 +2291,5 @@ exports.stringifyArtifact = stringifyArtifact;
|
|
|
2271
2291
|
exports.toASM = toASM;
|
|
2272
2292
|
exports.validateProgram = validateProgram;
|
|
2273
2293
|
exports.witnessRefToBytes = witnessRefToBytes;
|
|
2274
|
-
//# sourceMappingURL=chunk-
|
|
2275
|
-
//# sourceMappingURL=chunk-
|
|
2294
|
+
//# sourceMappingURL=chunk-V2TOHHPW.cjs.map
|
|
2295
|
+
//# sourceMappingURL=chunk-V2TOHHPW.cjs.map
|