@arkade-os/sdk 0.4.41 → 0.4.43
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 +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{ark-CSqMJczW.d.cts → ark-I8jfe5VE.d.cts} +157 -2
- package/dist/{ark-CSqMJczW.d.ts → ark-I8jfe5VE.d.ts} +157 -2
- package/dist/{asyncStorageTaskQueue-SZPrhw23.d.ts → asyncStorageTaskQueue-CjoL-35w.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-79XdGsdW.d.cts → asyncStorageTaskQueue-D1FfHfgK.d.cts} +1 -1
- package/dist/{chunk-ALISWEQ5.cjs → chunk-3AQNLQPM.cjs} +39 -4
- package/dist/chunk-3AQNLQPM.cjs.map +1 -0
- package/dist/{chunk-5XAYUPK4.js → chunk-763XHDAJ.js} +39 -5
- package/dist/chunk-763XHDAJ.js.map +1 -0
- package/dist/{chunk-D5MQYYYF.js → chunk-B4R36PRN.js} +1106 -357
- package/dist/chunk-B4R36PRN.js.map +1 -0
- package/dist/{chunk-KNASU3QI.cjs → chunk-JIWCE2IK.cjs} +7 -7
- package/dist/{chunk-KNASU3QI.cjs.map → chunk-JIWCE2IK.cjs.map} +1 -1
- package/dist/{chunk-WBF3FNS3.cjs → chunk-PLJZRIFZ.cjs} +11 -11
- package/dist/{chunk-WBF3FNS3.cjs.map → chunk-PLJZRIFZ.cjs.map} +1 -1
- package/dist/{chunk-3MPXMLP4.cjs → chunk-QGNTDGMN.cjs} +1190 -430
- package/dist/chunk-QGNTDGMN.cjs.map +1 -0
- package/dist/{chunk-MYI333YH.js → chunk-US274KZO.js} +3 -3
- package/dist/{chunk-MYI333YH.js.map → chunk-US274KZO.js.map} +1 -1
- package/dist/{chunk-DDG4RE5F.js → chunk-VKKLOT2E.js} +3 -3
- package/dist/{chunk-DDG4RE5F.js.map → chunk-VKKLOT2E.js.map} +1 -1
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-Bqwe-kbj.d.cts → delegate-BRqbh2fW.d.cts} +1 -1
- package/dist/{delegate-BTn9BK8E.d.ts → delegate-CgjVjYOP.d.ts} +1 -1
- package/dist/{index-aYiHTMkX.d.cts → index-DHuXlDEg.d.cts} +2 -2
- package/dist/{index-kITujXlS.d.ts → index-DvWNB_rl.d.ts} +2 -2
- package/dist/index.cjs +150 -118
- package/dist/index.d.cts +113 -9
- package/dist/index.d.ts +113 -9
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +268 -12
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +101 -3
- package/dist/repositories/realm/index.d.ts +101 -3
- package/dist/repositories/realm/index.js +254 -4
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +366 -40
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +52 -6
- package/dist/repositories/sqlite/index.d.ts +52 -6
- package/dist/repositories/sqlite/index.js +353 -32
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-DRHElPMG.d.cts → taskRunner-BSnslNmq.d.cts} +1 -1
- package/dist/{taskRunner-BuBAZQwB.d.ts → taskRunner-Djlhfgi1.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +12 -12
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +3 -3
- package/dist/{wallet-CTEQpKG9.d.ts → wallet-BsqRU8KM.d.cts} +29 -5
- package/dist/{wallet-BZgRfnAE.d.cts → wallet-D9z7wssl.d.ts} +29 -5
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-3MPXMLP4.cjs.map +0 -1
- package/dist/chunk-5XAYUPK4.js.map +0 -1
- package/dist/chunk-ALISWEQ5.cjs.map +0 -1
- package/dist/chunk-D5MQYYYF.js.map +0 -1
|
@@ -349,16 +349,31 @@ function prepareCoinAsIntentProofInput(coin) {
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
// package.json
|
|
352
|
-
var version = "0.4.
|
|
352
|
+
var version = "0.4.43";
|
|
353
353
|
|
|
354
354
|
// src/utils/fetch.ts
|
|
355
355
|
var buildVersion = "0.9.9";
|
|
356
356
|
var sdkVersion = `ts-sdk/${version}`;
|
|
357
|
+
var FetchError = class extends Error {
|
|
358
|
+
/** The request URL that failed, when derivable from the `fetch` input. */
|
|
359
|
+
url;
|
|
360
|
+
/** The HTTP method of the failed request (defaults to `"GET"`). */
|
|
361
|
+
method;
|
|
362
|
+
constructor(message, options) {
|
|
363
|
+
super(message, { cause: options.cause });
|
|
364
|
+
this.name = "FetchError";
|
|
365
|
+
this.url = options.url;
|
|
366
|
+
this.method = options.method;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
357
369
|
function baseFetch(input, init) {
|
|
358
370
|
if (typeof globalThis.fetch !== "function") {
|
|
359
371
|
throw new Error("Fetch API is not available in this environment.");
|
|
360
372
|
}
|
|
361
|
-
return globalThis.fetch(input, init)
|
|
373
|
+
return globalThis.fetch(input, init).catch((cause) => {
|
|
374
|
+
const { url, method } = describeRequest(input, init);
|
|
375
|
+
throw new FetchError(`Network request failed: ${method} ${url}`, { url, method, cause });
|
|
376
|
+
});
|
|
362
377
|
}
|
|
363
378
|
function fetch(input, init) {
|
|
364
379
|
const headers = new Headers(init?.headers);
|
|
@@ -366,6 +381,25 @@ function fetch(input, init) {
|
|
|
366
381
|
headers.set("X-SDK-VERSION", sdkVersion);
|
|
367
382
|
return baseFetch(input, { ...init, headers });
|
|
368
383
|
}
|
|
384
|
+
function describeRequest(input, init) {
|
|
385
|
+
let url;
|
|
386
|
+
if (typeof input === "string") {
|
|
387
|
+
url = input;
|
|
388
|
+
} else if (input instanceof URL) {
|
|
389
|
+
url = input.href;
|
|
390
|
+
} else {
|
|
391
|
+
url = input.url;
|
|
392
|
+
}
|
|
393
|
+
let method;
|
|
394
|
+
if (init?.method !== void 0) {
|
|
395
|
+
method = init.method;
|
|
396
|
+
} else if (input instanceof Request) {
|
|
397
|
+
method = input.method;
|
|
398
|
+
} else {
|
|
399
|
+
method = "GET";
|
|
400
|
+
}
|
|
401
|
+
return { url, method };
|
|
402
|
+
}
|
|
369
403
|
|
|
370
404
|
// src/providers/utils.ts
|
|
371
405
|
function createAbortError() {
|
|
@@ -2773,6 +2807,6 @@ var Response;
|
|
|
2773
2807
|
Response2.isGetAssetResponse = isGetAssetResponse;
|
|
2774
2808
|
})(Response || (Response = {}));
|
|
2775
2809
|
|
|
2776
|
-
export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, AssetGroup, AssetId, AssetInput, AssetOutput, AssetRef, BufferReader, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, IndexerTxType, Intent, Metadata, OP_RETURN_EMPTY_PKSCRIPT, Packet, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports, baseFetch, buildVersion, craftToSpendTx, fetch, getArkPsbtFields, isEventSourceError, isFetchTimeoutError, maybeArkError, sdkVersion, setArkPsbtField };
|
|
2777
|
-
//# sourceMappingURL=chunk-
|
|
2778
|
-
//# sourceMappingURL=chunk-
|
|
2810
|
+
export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, AssetGroup, AssetId, AssetInput, AssetOutput, AssetRef, BufferReader, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, IndexerTxType, Intent, Metadata, OP_RETURN_EMPTY_PKSCRIPT, Packet, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports, baseFetch, buildVersion, craftToSpendTx, fetch, getArkPsbtFields, isEventSourceError, isFetchTimeoutError, maybeArkError, sdkVersion, setArkPsbtField };
|
|
2811
|
+
//# sourceMappingURL=chunk-763XHDAJ.js.map
|
|
2812
|
+
//# sourceMappingURL=chunk-763XHDAJ.js.map
|