@arkade-os/sdk 0.4.63 → 0.4.65
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.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-CIUEhv2t.d.cts → asyncStorageTaskQueue-Chwe60Ce.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-LT-xvvDN.d.ts → asyncStorageTaskQueue-Dq_UcvDx.d.ts} +2 -2
- package/dist/{chunk-CZFAMS57.js → chunk-3G5V564P.js} +141 -3
- package/dist/chunk-3G5V564P.js.map +1 -0
- package/dist/{chunk-X7MMBB7S.js → chunk-5YTSQSLE.js} +226 -353
- package/dist/chunk-5YTSQSLE.js.map +1 -0
- package/dist/{chunk-K56BNZV3.cjs → chunk-7X744EFF.cjs} +10 -10
- package/dist/{chunk-K56BNZV3.cjs.map → chunk-7X744EFF.cjs.map} +1 -1
- package/dist/{chunk-OL7V43WS.cjs → chunk-BABJ77NG.cjs} +196 -57
- package/dist/chunk-BABJ77NG.cjs.map +1 -0
- package/dist/{chunk-AB67CMHS.cjs → chunk-G552MISJ.cjs} +3 -3
- package/dist/{chunk-AB67CMHS.cjs.map → chunk-G552MISJ.cjs.map} +1 -1
- package/dist/{chunk-COOBS7ET.cjs → chunk-GFZNEMGL.cjs} +629 -748
- package/dist/chunk-GFZNEMGL.cjs.map +1 -0
- package/dist/{chunk-KWW74O2F.js → chunk-RESN6QHP.js} +4 -4
- package/dist/{chunk-KWW74O2F.js.map → chunk-RESN6QHP.js.map} +1 -1
- package/dist/{chunk-P6XYE27K.cjs → chunk-SJQM5AVB.cjs} +17 -17
- package/dist/{chunk-P6XYE27K.cjs.map → chunk-SJQM5AVB.cjs.map} +1 -1
- package/dist/{chunk-MA32NXUV.js → chunk-TFSVXMTM.js} +3 -3
- package/dist/{chunk-MA32NXUV.js.map → chunk-TFSVXMTM.js.map} +1 -1
- package/dist/{chunk-FKKERGKA.js → chunk-TYTPVPKD.js} +4 -4
- package/dist/{chunk-FKKERGKA.js.map → chunk-TYTPVPKD.js.map} +1 -1
- package/dist/{chunk-OAESYVZQ.js → chunk-XMOIRDLF.js} +151 -12
- package/dist/chunk-XMOIRDLF.js.map +1 -0
- package/dist/{chunk-LG5GY73A.cjs → chunk-XN55B6EP.cjs} +155 -17
- package/dist/chunk-XN55B6EP.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +1 -1
- package/dist/contracts/handlers/index.d.ts +1 -1
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{index-aZycGEsQ.d.cts → index-BtTtQFUX.d.cts} +109 -0
- package/dist/{index-Bxe9kBFs.d.ts → index-fDDiA1-L.d.ts} +109 -0
- package/dist/index.cjs +300 -268
- package/dist/index.d.cts +187 -13
- package/dist/index.d.ts +187 -13
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BQb0W1XG.d.ts → taskRunner-BDzWbpct.d.ts} +1 -1
- package/dist/{taskRunner-BJ6_AnLq.d.cts → taskRunner-CIKOS2OO.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +2 -2
- package/dist/wallet/expo/background.d.ts +2 -2
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +1 -1
- package/dist/wallet/expo/index.d.ts +1 -1
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +3 -3
- package/dist/worker/expo/index.d.ts +3 -3
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-COOBS7ET.cjs.map +0 -1
- package/dist/chunk-CZFAMS57.js.map +0 -1
- package/dist/chunk-LG5GY73A.cjs.map +0 -1
- package/dist/chunk-OAESYVZQ.js.map +0 -1
- package/dist/chunk-OL7V43WS.cjs.map +0 -1
- package/dist/chunk-X7MMBB7S.js.map +0 -1
package/dist/adapters/expo.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkSJQM5AVB_cjs = require('../chunk-SJQM5AVB.cjs');
|
|
4
|
+
require('../chunk-XN55B6EP.cjs');
|
|
5
|
+
require('../chunk-G552MISJ.cjs');
|
|
6
6
|
require('../chunk-5BLDMQED.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ExpoArkProvider", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkSJQM5AVB_cjs.ExpoArkProvider; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ExpoIndexerProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkSJQM5AVB_cjs.ExpoIndexerProvider; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=expo.cjs.map
|
|
19
19
|
//# sourceMappingURL=expo.cjs.map
|
package/dist/adapters/expo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-TYTPVPKD.js';
|
|
2
|
+
import '../chunk-3G5V564P.js';
|
|
3
|
+
import '../chunk-TFSVXMTM.js';
|
|
4
4
|
import '../chunk-NSBPE2FW.js';
|
|
5
5
|
//# sourceMappingURL=expo.js.map
|
|
6
6
|
//# sourceMappingURL=expo.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkGFZNEMGL_cjs = require('../chunk-GFZNEMGL.cjs');
|
|
4
|
+
require('../chunk-XN55B6EP.cjs');
|
|
5
|
+
require('../chunk-BABJ77NG.cjs');
|
|
6
|
+
require('../chunk-G552MISJ.cjs');
|
|
7
7
|
require('../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
9
9
|
// src/storage/indexedDB.ts
|
|
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
|
|
|
11
11
|
dbName;
|
|
12
12
|
version;
|
|
13
13
|
db = null;
|
|
14
|
-
constructor(dbName, version =
|
|
14
|
+
constructor(dbName, version = chunkGFZNEMGL_cjs.DB_VERSION) {
|
|
15
15
|
this.dbName = dbName;
|
|
16
16
|
this.version = version;
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DB_VERSION } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { DB_VERSION } from '../chunk-5YTSQSLE.js';
|
|
2
|
+
import '../chunk-3G5V564P.js';
|
|
3
|
+
import '../chunk-XMOIRDLF.js';
|
|
4
|
+
import '../chunk-TFSVXMTM.js';
|
|
5
5
|
import '../chunk-NSBPE2FW.js';
|
|
6
6
|
|
|
7
7
|
// src/storage/indexedDB.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-CIKOS2OO.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Minimal async key-value storage interface.
|
|
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
|
|
|
46
46
|
private writeList;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-BDzWbpct.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Minimal async key-value storage interface.
|
|
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
|
|
|
46
46
|
private writeList;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ARKADE_SERVER_URL, eventSourceIterator, resolveEventSource, convertVtxo, isFetchTimeoutError, isEventSourceError, isEventSourceUnavailableError, rateGate, baseFetch, toProviderUnavailable, ProviderUnavailableError, throwIfHttpUnavailable } from './chunk-
|
|
1
|
+
import { DEFAULT_ARKADE_SERVER_URL, eventSourceIterator, resolveEventSource, convertVtxo, isFetchTimeoutError, isEventSourceError, isEventSourceUnavailableError, rateGate, baseFetch, toProviderUnavailable, ProviderUnavailableError, throwIfHttpUnavailable } from './chunk-TFSVXMTM.js';
|
|
2
2
|
import { __export } from './chunk-NSBPE2FW.js';
|
|
3
3
|
import { hex } from '@scure/base';
|
|
4
4
|
import { schnorr } from '@noble/curves/secp256k1.js';
|
|
@@ -7,6 +7,7 @@ import { compareBytes } from '@scure/btc-signer/utils.js';
|
|
|
7
7
|
// src/extension/asset/index.ts
|
|
8
8
|
var asset_exports = {};
|
|
9
9
|
__export(asset_exports, {
|
|
10
|
+
ASSET_ID_VECTORS: () => ASSET_ID_VECTORS,
|
|
10
11
|
AssetGroup: () => AssetGroup,
|
|
11
12
|
AssetId: () => AssetId,
|
|
12
13
|
AssetInput: () => AssetInput,
|
|
@@ -1271,6 +1272,143 @@ var Packet = class _Packet {
|
|
|
1271
1272
|
return packet;
|
|
1272
1273
|
}
|
|
1273
1274
|
};
|
|
1275
|
+
|
|
1276
|
+
// src/extension/asset/assetIdVectors.json
|
|
1277
|
+
var assetIdVectors_default = {
|
|
1278
|
+
version: 1,
|
|
1279
|
+
note: "Source of truth for the Arkade Asset ID encodings. See ts-sdk plans/asset-id-shared-vectors.md.",
|
|
1280
|
+
txid_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
|
|
1281
|
+
script_txid_hex: "201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a090807060504030201",
|
|
1282
|
+
valid: [
|
|
1283
|
+
{
|
|
1284
|
+
label: "group 0 (issuance mints this one)",
|
|
1285
|
+
group_index: 0,
|
|
1286
|
+
asset_id_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200000",
|
|
1287
|
+
script_group_index_item_hex: ""
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
label: "group 1 \u2014 high byte zero, so endianness bugs hide here",
|
|
1291
|
+
group_index: 1,
|
|
1292
|
+
asset_id_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200100",
|
|
1293
|
+
script_group_index_item_hex: "01"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
label: "endianness discriminator (gidx 258 = 0x0102)",
|
|
1297
|
+
group_index: 258,
|
|
1298
|
+
asset_id_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200201",
|
|
1299
|
+
script_group_index_item_hex: "0201"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
label: "upper bound \u2014 script number needs a third byte, the u16 blob does not",
|
|
1303
|
+
group_index: 65535,
|
|
1304
|
+
asset_id_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20ffff",
|
|
1305
|
+
script_group_index_item_hex: "ffff00"
|
|
1306
|
+
}
|
|
1307
|
+
],
|
|
1308
|
+
invalid_identity: [
|
|
1309
|
+
{
|
|
1310
|
+
label: "uppercase",
|
|
1311
|
+
value: "0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F200201",
|
|
1312
|
+
why: "identity is lowercase-only",
|
|
1313
|
+
normalizes_to: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200201"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
label: "too short",
|
|
1317
|
+
value: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2002",
|
|
1318
|
+
why: "33 bytes; the identity is 34"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
label: "non-hex",
|
|
1322
|
+
value: "z102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200201",
|
|
1323
|
+
why: "ASCII hex only"
|
|
1324
|
+
}
|
|
1325
|
+
],
|
|
1326
|
+
invalid_decode: [
|
|
1327
|
+
{
|
|
1328
|
+
label: "empty",
|
|
1329
|
+
value: "",
|
|
1330
|
+
expected_error: "missing asset id"
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
label: "too short",
|
|
1334
|
+
value: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2002",
|
|
1335
|
+
expected_error: "invalid asset id length"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
label: "too long",
|
|
1339
|
+
value: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200201ff",
|
|
1340
|
+
expected_error: "invalid asset id length"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
label: "non-hex",
|
|
1344
|
+
value: "z102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200201",
|
|
1345
|
+
expected_error: "invalid asset id format"
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
label: "zero txid",
|
|
1349
|
+
value: "00000000000000000000000000000000000000000000000000000000000000000201",
|
|
1350
|
+
expected_error: "empty txid"
|
|
1351
|
+
}
|
|
1352
|
+
],
|
|
1353
|
+
invalid_construction: [
|
|
1354
|
+
{
|
|
1355
|
+
label: "missing txid",
|
|
1356
|
+
txid_hex: "",
|
|
1357
|
+
group_index: 0,
|
|
1358
|
+
expected_error: "missing txid"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
label: "non-hex txid",
|
|
1362
|
+
txid_hex: "z102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
|
|
1363
|
+
group_index: 0,
|
|
1364
|
+
expected_error: "invalid txid format"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
label: "txid too long",
|
|
1368
|
+
txid_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021",
|
|
1369
|
+
group_index: 0,
|
|
1370
|
+
expected_error: "invalid txid length"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
label: "txid too short",
|
|
1374
|
+
txid_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e",
|
|
1375
|
+
group_index: 0,
|
|
1376
|
+
expected_error: "invalid txid length"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
label: "zero txid",
|
|
1380
|
+
txid_hex: "0000000000000000000000000000000000000000000000000000000000000000",
|
|
1381
|
+
group_index: 0,
|
|
1382
|
+
expected_error: "empty txid"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
label: "gidx out of range",
|
|
1386
|
+
txid_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
|
|
1387
|
+
group_index: 65536,
|
|
1388
|
+
expected_error: "invalid group index",
|
|
1389
|
+
outside_uint16: true
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
label: "gidx negative",
|
|
1393
|
+
txid_hex: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
|
|
1394
|
+
group_index: -1,
|
|
1395
|
+
expected_error: "invalid group index",
|
|
1396
|
+
outside_uint16: true
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
// src/extension/asset/assetIdVectors.ts
|
|
1402
|
+
function deepFreeze(value) {
|
|
1403
|
+
if (value !== null && typeof value === "object" && !Object.isFrozen(value)) {
|
|
1404
|
+
Object.freeze(value);
|
|
1405
|
+
for (const key of Object.getOwnPropertyNames(value)) {
|
|
1406
|
+
deepFreeze(value[key]);
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
return value;
|
|
1410
|
+
}
|
|
1411
|
+
var ASSET_ID_VECTORS = deepFreeze(assetIdVectors_default);
|
|
1274
1412
|
var INDEXER_MAX_ATTEMPTS = 3;
|
|
1275
1413
|
var INDEXER_RETRY_BASE_MS = 250;
|
|
1276
1414
|
async function indexerFetch(input, init) {
|
|
@@ -1790,5 +1928,5 @@ var Response;
|
|
|
1790
1928
|
})(Response || (Response = {}));
|
|
1791
1929
|
|
|
1792
1930
|
export { AssetGroup, AssetId, AssetInput, AssetOutput, AssetRef, BufferReader, BufferWriter, ChainTxType, IndexerTxType, Metadata, Packet, RestIndexerProvider, asset_exports };
|
|
1793
|
-
//# sourceMappingURL=chunk-
|
|
1794
|
-
//# sourceMappingURL=chunk-
|
|
1931
|
+
//# sourceMappingURL=chunk-3G5V564P.js.map
|
|
1932
|
+
//# sourceMappingURL=chunk-3G5V564P.js.map
|