@arkade-os/sdk 0.5.12 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/adapters/expo.cjs +7 -7
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +4 -4
- package/dist/{asyncStorageTaskQueue-DTNS2qfN.d.cts → asyncStorageTaskQueue-DzO5SBcm.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Bsty8W7d.d.ts → asyncStorageTaskQueue-p7zeFhA3.d.ts} +2 -2
- package/dist/{chunk-4OY5BCIE.js → chunk-4HZQSKWG.js} +628 -23
- package/dist/chunk-4HZQSKWG.js.map +1 -0
- package/dist/{chunk-4X4SY3RH.cjs → chunk-6J4GABF7.cjs} +28 -20
- package/dist/chunk-6J4GABF7.cjs.map +1 -0
- package/dist/{chunk-YAVF2PR6.cjs → chunk-6TBTL42M.cjs} +87 -2
- package/dist/chunk-6TBTL42M.cjs.map +1 -0
- package/dist/{chunk-5NY5EOS2.js → chunk-72EC3ASW.js} +4 -4
- package/dist/{chunk-5NY5EOS2.js.map → chunk-72EC3ASW.js.map} +1 -1
- package/dist/{chunk-QV7AOZZN.cjs → chunk-7LPT6AYH.cjs} +21 -21
- package/dist/{chunk-QV7AOZZN.cjs.map → chunk-7LPT6AYH.cjs.map} +1 -1
- package/dist/{chunk-JA4SYFC7.cjs → chunk-ACIQZLWL.cjs} +379 -20
- package/dist/chunk-ACIQZLWL.cjs.map +1 -0
- package/dist/{chunk-BA3GPO5C.js → chunk-AZHBGWVC.js} +5 -5
- package/dist/{chunk-BA3GPO5C.js.map → chunk-AZHBGWVC.js.map} +1 -1
- package/dist/{chunk-HNLC6F73.cjs → chunk-EVVLVFY7.cjs} +20 -20
- package/dist/{chunk-HNLC6F73.cjs.map → chunk-EVVLVFY7.cjs.map} +1 -1
- package/dist/{chunk-2YXVU5TK.js → chunk-GB67AGXG.js} +81 -3
- package/dist/chunk-GB67AGXG.js.map +1 -0
- package/dist/{chunk-WBZYYRAB.js → chunk-HWWSLCQN.js} +9724 -8151
- package/dist/chunk-HWWSLCQN.js.map +1 -0
- package/dist/{chunk-4TMJBLJT.js → chunk-J2JZZTOE.js} +20 -14
- package/dist/chunk-J2JZZTOE.js.map +1 -0
- package/dist/{chunk-3RO63OPW.js → chunk-LCGRZ24T.js} +4 -4
- package/dist/{chunk-3RO63OPW.js.map → chunk-LCGRZ24T.js.map} +1 -1
- package/dist/{chunk-CJUVKHK4.cjs → chunk-LQH7DACV.cjs} +10204 -8628
- package/dist/chunk-LQH7DACV.cjs.map +1 -0
- package/dist/{chunk-QDX2HUBK.cjs → chunk-MEIE2AEU.cjs} +11 -11
- package/dist/{chunk-QDX2HUBK.cjs.map → chunk-MEIE2AEU.cjs.map} +1 -1
- package/dist/{chunk-3ABF4EMM.js → chunk-X57WKONW.js} +369 -10
- package/dist/chunk-X57WKONW.js.map +1 -0
- package/dist/{chunk-C3NKBKRY.cjs → chunk-XZHTYYW5.cjs} +680 -68
- package/dist/chunk-XZHTYYW5.cjs.map +1 -0
- package/dist/compiler.cjs +3 -4
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.d.cts +1 -1
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.js +2 -3
- package/dist/compiler.js.map +1 -1
- package/dist/contracts/handlers/index.cjs +15 -11
- package/dist/contracts/handlers/index.d.cts +5 -5
- package/dist/contracts/handlers/index.d.ts +5 -5
- package/dist/contracts/handlers/index.js +4 -4
- package/dist/{index-D_zLtU-F.d.ts → index-CaOBA9Ev.d.ts} +2 -2
- package/dist/{index-BBmZXXqk.d.cts → index-Cy57QdcL.d.cts} +589 -23
- package/dist/{index-DJ32LpfD.d.ts → index-Db5qzYRi.d.ts} +589 -23
- package/dist/{index-DenQfCn1.d.cts → index-Lq_u0hqj.d.cts} +2 -2
- package/dist/index.cjs +403 -368
- package/dist/index.d.cts +197 -117
- package/dist/index.d.ts +197 -117
- package/dist/index.js +6 -7
- package/dist/{program-DPzf5qsk.d.cts → program-ZWUAWy_9.d.cts} +1 -1
- package/dist/{program-38A2Twvj.d.ts → program-zdDO4cMt.d.ts} +1 -1
- package/dist/repositories/realm/index.cjs +39 -40
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +7 -8
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +37 -38
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +7 -8
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-BBGaN4cq.d.cts → taskRunner-DhZ-KQBW.d.cts} +2 -2
- package/dist/{taskRunner-Cck24OnC.d.ts → taskRunner-amPuilMW.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +16 -17
- package/dist/wallet/expo/background.cjs.map +1 -1
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +8 -9
- package/dist/wallet/expo/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +17 -18
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +2 -2
- package/dist/wallet/expo/index.d.ts +2 -2
- package/dist/wallet/expo/index.js +7 -8
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +11 -12
- package/dist/worker/expo/index.cjs.map +1 -1
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +7 -8
- package/dist/worker/expo/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2YXVU5TK.js.map +0 -1
- package/dist/chunk-3ABF4EMM.js.map +0 -1
- package/dist/chunk-4OY5BCIE.js.map +0 -1
- package/dist/chunk-4TMJBLJT.js.map +0 -1
- package/dist/chunk-4X4SY3RH.cjs.map +0 -1
- package/dist/chunk-C3NKBKRY.cjs.map +0 -1
- package/dist/chunk-CJUVKHK4.cjs.map +0 -1
- package/dist/chunk-JA4SYFC7.cjs.map +0 -1
- package/dist/chunk-PHOJF7OK.cjs +0 -376
- package/dist/chunk-PHOJF7OK.cjs.map +0 -1
- package/dist/chunk-UXLETBNK.js +0 -373
- package/dist/chunk-UXLETBNK.js.map +0 -1
- package/dist/chunk-WBZYYRAB.js.map +0 -1
- package/dist/chunk-YAVF2PR6.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VtxoScript, getSequence, proofTapLeafScriptOf, TapTreeCoder, toBIP371TapTree, sequenceToTimelock, DEFAULT_ARKADE_SERVER_URL } from './chunk-
|
|
1
|
+
import { VtxoScript, getSequence, proofTapLeafScriptOf, TapTreeCoder, toBIP371TapTree, sequenceToTimelock, DEFAULT_ARKADE_SERVER_URL } from './chunk-GB67AGXG.js';
|
|
2
2
|
import { OP, Script, SigHash, RawWitness, Transaction as Transaction$1, RawTx, ScriptNum } from '@scure/btc-signer';
|
|
3
3
|
import { PSBTOutput } from '@scure/btc-signer/psbt.js';
|
|
4
4
|
import { concatBytes } from '@scure/btc-signer/utils.js';
|
|
@@ -300,7 +300,7 @@ function checkKeyMatch(key, arkPsbtFieldKey, prefixOnly = false) {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// package.json
|
|
303
|
-
var version = "0.5.
|
|
303
|
+
var version = "0.5.14";
|
|
304
304
|
|
|
305
305
|
// src/utils/sdkVersionHeaders.ts
|
|
306
306
|
var sdkVersion = `ts-sdk/${version}`;
|
|
@@ -329,28 +329,31 @@ var FetchError = class extends Error {
|
|
|
329
329
|
};
|
|
330
330
|
var READ_TIMEOUT_MS = 3e4;
|
|
331
331
|
var warnedNoTimeoutSupport = false;
|
|
332
|
-
function
|
|
333
|
-
if (init?.signal || input instanceof Request) return void 0;
|
|
334
|
-
const { method } = describeRequest(input, init);
|
|
335
|
-
const verb = method.toUpperCase();
|
|
336
|
-
if (verb !== "GET" && verb !== "HEAD") return void 0;
|
|
332
|
+
function timeoutSignal(ms) {
|
|
337
333
|
if (typeof AbortSignal !== "undefined" && typeof AbortSignal.timeout === "function") {
|
|
338
|
-
return AbortSignal.timeout(
|
|
334
|
+
return AbortSignal.timeout(ms);
|
|
339
335
|
}
|
|
340
336
|
if (typeof AbortController === "function") {
|
|
341
337
|
const controller = new AbortController();
|
|
342
|
-
const timer = setTimeout(() => controller.abort(),
|
|
338
|
+
const timer = setTimeout(() => controller.abort(), ms);
|
|
343
339
|
timer?.unref?.();
|
|
344
340
|
return controller.signal;
|
|
345
341
|
}
|
|
346
342
|
if (!warnedNoTimeoutSupport) {
|
|
347
343
|
warnedNoTimeoutSupport = true;
|
|
348
344
|
console.warn(
|
|
349
|
-
"Neither AbortSignal.timeout nor AbortController is available in this runtime: provider reads are
|
|
345
|
+
"Neither AbortSignal.timeout nor AbortController is available in this runtime: request deadlines (READ_TIMEOUT_MS on provider reads) are NOT applied, so those requests are UNBOUNDED."
|
|
350
346
|
);
|
|
351
347
|
}
|
|
352
348
|
return void 0;
|
|
353
349
|
}
|
|
350
|
+
function readDeadline(input, init) {
|
|
351
|
+
if (init?.signal || input instanceof Request) return void 0;
|
|
352
|
+
const { method } = describeRequest(input, init);
|
|
353
|
+
const verb = method.toUpperCase();
|
|
354
|
+
if (verb !== "GET" && verb !== "HEAD") return void 0;
|
|
355
|
+
return timeoutSignal(READ_TIMEOUT_MS);
|
|
356
|
+
}
|
|
354
357
|
function baseFetch(input, init) {
|
|
355
358
|
if (typeof globalThis.fetch !== "function") {
|
|
356
359
|
throw new Error("Fetch API is not available in this environment.");
|
|
@@ -1675,7 +1678,7 @@ function isFetchTimeoutError(err) {
|
|
|
1675
1678
|
return isCloudflare524 || // AbortSignal.timeout rejects with a DOMException named this
|
|
1676
1679
|
error.name === "TimeoutError" || error.name === "HeadersTimeoutError" || error.name === "BodyTimeoutError" || error.code === "UND_ERR_HEADERS_TIMEOUT" || error.code === "UND_ERR_BODY_TIMEOUT";
|
|
1677
1680
|
};
|
|
1678
|
-
return checkError(err) || checkError(err
|
|
1681
|
+
return checkError(err) || checkError(err?.cause);
|
|
1679
1682
|
}
|
|
1680
1683
|
function mapTxNotification(data) {
|
|
1681
1684
|
return {
|
|
@@ -1717,6 +1720,9 @@ var RestArkProvider = RestOperatorProvider;
|
|
|
1717
1720
|
function isRetryableProviderError(error) {
|
|
1718
1721
|
return error instanceof ProviderUnavailableError || error instanceof FetchError || isFetchTimeoutError(error);
|
|
1719
1722
|
}
|
|
1723
|
+
function isTransientOperatorError(error) {
|
|
1724
|
+
return isRetryableProviderError(error) || error instanceof DigestMismatchError;
|
|
1725
|
+
}
|
|
1720
1726
|
|
|
1721
1727
|
// src/contracts/constants.ts
|
|
1722
1728
|
var DEFAULT_PAGE_SIZE = 500;
|
|
@@ -1890,6 +1896,6 @@ function isVirtualCoin(input) {
|
|
|
1890
1896
|
return typeof input === "object" && input !== null && typeof input.script === "string";
|
|
1891
1897
|
}
|
|
1892
1898
|
|
|
1893
|
-
export { ARKADE_VERSION_HEADERS, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ConditionWitness, CosignerPublicKey, DEFAULT_PAGE_SIZE, DigestMismatchError, EXPIRY_MIN_PLAUSIBLE_MS, EventSourceUnavailableError, FetchError, HttpResponseError, INFO_FETCH_TIMEOUT_MS, Intent, MAX_COOLDOWN_MS, ONCHAIN_COSIGN_AMBIGUOUS_PREFIX, ONCHAIN_COSIGN_REJECTED_PREFIX, ONCHAIN_COSIGN_UNSUPPORTED_PREFIX, OP_RETURN_EMPTY_PKSCRIPT, OUTPOINT_QUERY_CHUNK_SIZE, OnchainCosignAmbiguousError, OnchainCosignRejectedError, OnchainCosignUnsupportedError, PrevArkTxField, PrevoutTxField, Proof, ProviderUnavailableError, READ_TIMEOUT_MS, RestArkProvider, RestOperatorProvider, SCRIPT_QUERY_CHUNK_SIZE, ServerResponseMismatchError, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, baseFetch, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, convertVtxo, craftToSpendTx, eventSourceIterator, fetchVtxoCreatedAtByTxid, formatSighash, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNormalizedVtxos, indexerPages, isArkError, isEventSourceError, isEventSourceUnavailableError, isFetchTimeoutError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, normalizeVtxo, rateGate, readSseFrames, requiresForfeit, resolveEventSource, resolveTimeHeight, retryAfterMsFromError, sdkVersion, sdkVersionHeaders, setArkPsbtField, streamFailureError, throwIfHttpUnavailable, toOffchainInputFeeParams, toProviderUnavailable };
|
|
1894
|
-
//# sourceMappingURL=chunk-
|
|
1895
|
-
//# sourceMappingURL=chunk-
|
|
1899
|
+
export { ARKADE_VERSION_HEADERS, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ConditionWitness, CosignerPublicKey, DEFAULT_PAGE_SIZE, DigestMismatchError, EXPIRY_MIN_PLAUSIBLE_MS, EventSourceUnavailableError, FetchError, HttpResponseError, INFO_FETCH_TIMEOUT_MS, Intent, MAX_COOLDOWN_MS, ONCHAIN_COSIGN_AMBIGUOUS_PREFIX, ONCHAIN_COSIGN_REJECTED_PREFIX, ONCHAIN_COSIGN_UNSUPPORTED_PREFIX, OP_RETURN_EMPTY_PKSCRIPT, OUTPOINT_QUERY_CHUNK_SIZE, OnchainCosignAmbiguousError, OnchainCosignRejectedError, OnchainCosignUnsupportedError, PrevArkTxField, PrevoutTxField, Proof, ProviderUnavailableError, READ_TIMEOUT_MS, RestArkProvider, RestOperatorProvider, SCRIPT_QUERY_CHUNK_SIZE, ServerResponseMismatchError, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, baseFetch, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, convertVtxo, craftToSpendTx, eventSourceIterator, fetchVtxoCreatedAtByTxid, formatSighash, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNormalizedVtxos, indexerPages, isArkError, isEventSourceError, isEventSourceUnavailableError, isFetchTimeoutError, isPastExpiry, isRetryableProviderError, isTransientOperatorError, isVirtualCoin, isVtxoSpent, maybeArkError, normalizeVtxo, rateGate, readSseFrames, requiresForfeit, resolveEventSource, resolveTimeHeight, retryAfterMsFromError, sdkVersion, sdkVersionHeaders, setArkPsbtField, streamFailureError, throwIfHttpUnavailable, timeoutSignal, toOffchainInputFeeParams, toProviderUnavailable };
|
|
1900
|
+
//# sourceMappingURL=chunk-J2JZZTOE.js.map
|
|
1901
|
+
//# sourceMappingURL=chunk-J2JZZTOE.js.map
|