@siafoundation/sia-storage 0.0.8 → 0.0.10
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/index.node.d.ts +16 -3
- package/package.json +22 -10
- package/wasm/sia_storage_wasm.d.ts +28 -19
- package/wasm/sia_storage_wasm.js +86 -33
- package/wasm/sia_storage_wasm_bg.wasm +0 -0
- package/wasm/sia_storage_wasm_bg.wasm.d.ts +15 -14
package/dist/index.node.d.ts
CHANGED
|
@@ -66,12 +66,25 @@ export declare class PackedUpload {
|
|
|
66
66
|
/** Returns the number of slabs in the upload. */
|
|
67
67
|
slabs(): bigint
|
|
68
68
|
/**
|
|
69
|
-
* Adds a new object to the upload. The data
|
|
70
|
-
*
|
|
69
|
+
* Adds a new object to the upload. The data is read until EOF and packed into
|
|
70
|
+
* the current slab. Returns the number of bytes consumed; call
|
|
71
|
+
* [finalize](Self::finalize) once all objects have been added to get the
|
|
72
|
+
* resulting objects.
|
|
73
|
+
*
|
|
74
|
+
* If the reader errors part-way, it's safe to continue calling
|
|
75
|
+
* [add](Self::add); no object is registered for the failed call. Or call
|
|
76
|
+
* [finalize](Self::finalize) to collect the objects added so far.
|
|
77
|
+
*
|
|
78
|
+
* ```js
|
|
79
|
+
* const packed = sdk.uploadPacked();
|
|
80
|
+
* await packed.add(file.stream());
|
|
81
|
+
* await packed.add(blob.stream());
|
|
82
|
+
* const objects = await packed.finalize();
|
|
83
|
+
* ```
|
|
71
84
|
*/
|
|
72
85
|
add(stream: ReadableStream): Promise<bigint>
|
|
73
86
|
/** Cancels the upload. */
|
|
74
|
-
cancel():
|
|
87
|
+
cancel(): void
|
|
75
88
|
/**
|
|
76
89
|
* Finalizes the upload and returns the resulting objects. Each object
|
|
77
90
|
* must be pinned separately with `sdk.pinObject()`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siafoundation/sia-storage",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/SiaFoundation/sia-storage-js"
|
|
8
|
+
},
|
|
5
9
|
"main": "dist/index.js",
|
|
6
10
|
"types": "dist/index.d.ts",
|
|
7
11
|
"files": [
|
|
@@ -10,15 +14,23 @@
|
|
|
10
14
|
],
|
|
11
15
|
"exports": {
|
|
12
16
|
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"browser": "./dist/index.js",
|
|
15
|
-
"bun": "./dist/index.node.cjs",
|
|
16
17
|
"node": {
|
|
17
18
|
"types": "./dist/index.node.d.ts",
|
|
18
19
|
"require": "./dist/index.node.cjs",
|
|
19
20
|
"import": "./dist/index.node.cjs"
|
|
20
21
|
},
|
|
21
|
-
"
|
|
22
|
+
"bun": {
|
|
23
|
+
"types": "./dist/index.node.d.ts",
|
|
24
|
+
"default": "./dist/index.node.cjs"
|
|
25
|
+
},
|
|
26
|
+
"browser": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"default": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
22
34
|
},
|
|
23
35
|
"./wasm": "./wasm/sia_storage_wasm.js",
|
|
24
36
|
"./wasm/*": "./wasm/*"
|
|
@@ -35,11 +47,11 @@
|
|
|
35
47
|
"publish-npm": "bun run scripts/publish.ts"
|
|
36
48
|
},
|
|
37
49
|
"optionalDependencies": {
|
|
38
|
-
"@siafoundation/sia-storage-darwin-arm64": "0.0.
|
|
39
|
-
"@siafoundation/sia-storage-darwin-x64": "0.0.
|
|
40
|
-
"@siafoundation/sia-storage-linux-x64-gnu": "0.0.
|
|
41
|
-
"@siafoundation/sia-storage-linux-arm64-gnu": "0.0.
|
|
42
|
-
"@siafoundation/sia-storage-win32-x64-msvc": "0.0.
|
|
50
|
+
"@siafoundation/sia-storage-darwin-arm64": "0.0.10",
|
|
51
|
+
"@siafoundation/sia-storage-darwin-x64": "0.0.10",
|
|
52
|
+
"@siafoundation/sia-storage-linux-x64-gnu": "0.0.10",
|
|
53
|
+
"@siafoundation/sia-storage-linux-arm64-gnu": "0.0.10",
|
|
54
|
+
"@siafoundation/sia-storage-win32-x64-msvc": "0.0.10"
|
|
43
55
|
},
|
|
44
56
|
"devDependencies": {
|
|
45
57
|
"@types/bun": "^1.3.12",
|
|
@@ -255,12 +255,20 @@ export class PackedUpload {
|
|
|
255
255
|
free(): void;
|
|
256
256
|
[Symbol.dispose](): void;
|
|
257
257
|
/**
|
|
258
|
-
* Adds
|
|
258
|
+
* Adds a new object to the upload. The data is read until EOF and packed into
|
|
259
|
+
* the current slab. Returns the number of bytes consumed; call
|
|
260
|
+
* [finalize](Self::finalize) once all objects have been added to get the
|
|
261
|
+
* resulting objects.
|
|
262
|
+
*
|
|
263
|
+
* If the reader errors part-way, it's safe to continue calling
|
|
264
|
+
* [add](Self::add); no object is registered for the failed call. Or call
|
|
265
|
+
* [finalize](Self::finalize) to collect the objects added so far.
|
|
259
266
|
*
|
|
260
267
|
* ```js
|
|
261
268
|
* const packed = sdk.uploadPacked();
|
|
262
269
|
* await packed.add(file.stream());
|
|
263
270
|
* await packed.add(blob.stream());
|
|
271
|
+
* const objects = await packed.finalize();
|
|
264
272
|
* ```
|
|
265
273
|
*/
|
|
266
274
|
add(stream: ReadableStream): Promise<number>;
|
|
@@ -278,15 +286,15 @@ export class PackedUpload {
|
|
|
278
286
|
* Total bytes added so far across all objects.
|
|
279
287
|
*/
|
|
280
288
|
length(): number;
|
|
289
|
+
/**
|
|
290
|
+
* Optimal size of each slab in bytes.
|
|
291
|
+
*/
|
|
292
|
+
optimalDataSize(): number;
|
|
281
293
|
/**
|
|
282
294
|
* Bytes remaining until the current slab is full. Adding objects that
|
|
283
295
|
* fit within this size avoids starting a new slab and minimizes padding.
|
|
284
296
|
*/
|
|
285
297
|
remaining(): number;
|
|
286
|
-
/**
|
|
287
|
-
* Optimal size of each slab in bytes.
|
|
288
|
-
*/
|
|
289
|
-
slabSize(): number;
|
|
290
298
|
/**
|
|
291
299
|
* Number of slabs in the upload.
|
|
292
300
|
*/
|
|
@@ -479,21 +487,15 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
479
487
|
|
|
480
488
|
export interface InitOutput {
|
|
481
489
|
readonly memory: WebAssembly.Memory;
|
|
482
|
-
readonly __wbg_packedupload_free: (a: number, b: number) => void;
|
|
483
490
|
readonly encodedSize: (a: number, b: number, c: number) => number;
|
|
484
491
|
readonly generateRecoveryPhrase: () => [number, number];
|
|
485
492
|
readonly init: () => void;
|
|
486
|
-
readonly packedupload_add: (a: number, b: any) => any;
|
|
487
|
-
readonly packedupload_cancel: (a: number) => void;
|
|
488
|
-
readonly packedupload_finalize: (a: number) => any;
|
|
489
|
-
readonly packedupload_length: (a: number) => number;
|
|
490
|
-
readonly packedupload_remaining: (a: number) => number;
|
|
491
|
-
readonly packedupload_slabSize: (a: number) => number;
|
|
492
|
-
readonly packedupload_slabs: (a: number) => number;
|
|
493
493
|
readonly validateRecoveryPhrase: (a: number, b: number) => [number, number];
|
|
494
|
+
readonly setLogger: (a: any, b: any) => void;
|
|
494
495
|
readonly __wbg_appkey_free: (a: number, b: number) => void;
|
|
495
496
|
readonly __wbg_builder_free: (a: number, b: number) => void;
|
|
496
497
|
readonly __wbg_objectevent_free: (a: number, b: number) => void;
|
|
498
|
+
readonly __wbg_packedupload_free: (a: number, b: number) => void;
|
|
497
499
|
readonly __wbg_pinnedobject_free: (a: number, b: number) => void;
|
|
498
500
|
readonly __wbg_sdk_free: (a: number, b: number) => void;
|
|
499
501
|
readonly appkey_export: (a: number) => [number, number];
|
|
@@ -511,6 +513,13 @@ export interface InitOutput {
|
|
|
511
513
|
readonly objectevent_id: (a: number) => [number, number];
|
|
512
514
|
readonly objectevent_object: (a: number) => number;
|
|
513
515
|
readonly objectevent_updatedAt: (a: number) => any;
|
|
516
|
+
readonly packedupload_add: (a: number, b: any) => any;
|
|
517
|
+
readonly packedupload_cancel: (a: number) => void;
|
|
518
|
+
readonly packedupload_finalize: (a: number) => any;
|
|
519
|
+
readonly packedupload_length: (a: number) => number;
|
|
520
|
+
readonly packedupload_optimalDataSize: (a: number) => number;
|
|
521
|
+
readonly packedupload_remaining: (a: number) => number;
|
|
522
|
+
readonly packedupload_slabs: (a: number) => number;
|
|
514
523
|
readonly pinnedobject_createdAt: (a: number) => any;
|
|
515
524
|
readonly pinnedobject_encodedSize: (a: number) => number;
|
|
516
525
|
readonly pinnedobject_id: (a: number) => [number, number];
|
|
@@ -528,7 +537,7 @@ export interface InitOutput {
|
|
|
528
537
|
readonly sdk_download: (a: number, b: number, c: number) => [number, number, number];
|
|
529
538
|
readonly sdk_hosts: (a: number, b: number) => any;
|
|
530
539
|
readonly sdk_object: (a: number, b: number, c: number) => any;
|
|
531
|
-
readonly sdk_objectEvents: (a: number, b:
|
|
540
|
+
readonly sdk_objectEvents: (a: number, b: any, c: number) => any;
|
|
532
541
|
readonly sdk_pinObject: (a: number, b: number) => any;
|
|
533
542
|
readonly sdk_pruneSlabs: (a: number) => any;
|
|
534
543
|
readonly sdk_shareObject: (a: number, b: number, c: any) => [number, number, number, number];
|
|
@@ -537,7 +546,6 @@ export interface InitOutput {
|
|
|
537
546
|
readonly sdk_updateObjectMetadata: (a: number, b: number) => any;
|
|
538
547
|
readonly sdk_upload: (a: number, b: number, c: any, d: number) => any;
|
|
539
548
|
readonly sdk_uploadPacked: (a: number, b: number) => [number, number, number];
|
|
540
|
-
readonly setLogger: (a: any, b: any) => void;
|
|
541
549
|
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
542
550
|
readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
|
|
543
551
|
readonly intounderlyingbytesource_cancel: (a: number) => void;
|
|
@@ -552,11 +560,12 @@ export interface InitOutput {
|
|
|
552
560
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
553
561
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
554
562
|
readonly wasm_bindgen__convert__closures_____invoke__h0c753f5de41a6544: (a: number, b: number, c: any) => [number, number];
|
|
555
|
-
readonly
|
|
556
|
-
readonly
|
|
563
|
+
readonly wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a: (a: number, b: number, c: any) => [number, number];
|
|
564
|
+
readonly wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_3: (a: number, b: number, c: any) => [number, number];
|
|
565
|
+
readonly wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_4: (a: number, b: number, c: any) => [number, number];
|
|
557
566
|
readonly wasm_bindgen__convert__closures_____invoke__h29f5bd75867abdc1: (a: number, b: number, c: any, d: any) => void;
|
|
558
|
-
readonly
|
|
559
|
-
readonly
|
|
567
|
+
readonly wasm_bindgen__convert__closures_____invoke__hd08ec99393977d92: (a: number, b: number, c: any) => void;
|
|
568
|
+
readonly wasm_bindgen__convert__closures_____invoke__he74b9f0460fb8e21: (a: number, b: number) => void;
|
|
560
569
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
561
570
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
562
571
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/wasm/sia_storage_wasm.js
CHANGED
|
@@ -404,12 +404,20 @@ export class PackedUpload {
|
|
|
404
404
|
wasm.__wbg_packedupload_free(ptr, 0);
|
|
405
405
|
}
|
|
406
406
|
/**
|
|
407
|
-
* Adds
|
|
407
|
+
* Adds a new object to the upload. The data is read until EOF and packed into
|
|
408
|
+
* the current slab. Returns the number of bytes consumed; call
|
|
409
|
+
* [finalize](Self::finalize) once all objects have been added to get the
|
|
410
|
+
* resulting objects.
|
|
411
|
+
*
|
|
412
|
+
* If the reader errors part-way, it's safe to continue calling
|
|
413
|
+
* [add](Self::add); no object is registered for the failed call. Or call
|
|
414
|
+
* [finalize](Self::finalize) to collect the objects added so far.
|
|
408
415
|
*
|
|
409
416
|
* ```js
|
|
410
417
|
* const packed = sdk.uploadPacked();
|
|
411
418
|
* await packed.add(file.stream());
|
|
412
419
|
* await packed.add(blob.stream());
|
|
420
|
+
* const objects = await packed.finalize();
|
|
413
421
|
* ```
|
|
414
422
|
* @param {ReadableStream} stream
|
|
415
423
|
* @returns {Promise<number>}
|
|
@@ -444,20 +452,20 @@ export class PackedUpload {
|
|
|
444
452
|
return ret;
|
|
445
453
|
}
|
|
446
454
|
/**
|
|
447
|
-
*
|
|
448
|
-
* fit within this size avoids starting a new slab and minimizes padding.
|
|
455
|
+
* Optimal size of each slab in bytes.
|
|
449
456
|
* @returns {number}
|
|
450
457
|
*/
|
|
451
|
-
|
|
452
|
-
const ret = wasm.
|
|
458
|
+
optimalDataSize() {
|
|
459
|
+
const ret = wasm.packedupload_optimalDataSize(this.__wbg_ptr);
|
|
453
460
|
return ret;
|
|
454
461
|
}
|
|
455
462
|
/**
|
|
456
|
-
*
|
|
463
|
+
* Bytes remaining until the current slab is full. Adding objects that
|
|
464
|
+
* fit within this size avoids starting a new slab and minimizes padding.
|
|
457
465
|
* @returns {number}
|
|
458
466
|
*/
|
|
459
|
-
|
|
460
|
-
const ret = wasm.
|
|
467
|
+
remaining() {
|
|
468
|
+
const ret = wasm.packedupload_remaining(this.__wbg_ptr);
|
|
461
469
|
return ret;
|
|
462
470
|
}
|
|
463
471
|
/**
|
|
@@ -711,7 +719,7 @@ export class Sdk {
|
|
|
711
719
|
* @returns {Promise<ObjectEvent[]>}
|
|
712
720
|
*/
|
|
713
721
|
objectEvents(cursor, limit) {
|
|
714
|
-
const ret = wasm.sdk_objectEvents(this.__wbg_ptr,
|
|
722
|
+
const ret = wasm.sdk_objectEvents(this.__wbg_ptr, cursor, limit);
|
|
715
723
|
return ret;
|
|
716
724
|
}
|
|
717
725
|
/**
|
|
@@ -949,6 +957,10 @@ function __wbg_get_imports() {
|
|
|
949
957
|
const ret = typeof(arg0) === 'function';
|
|
950
958
|
return ret;
|
|
951
959
|
},
|
|
960
|
+
__wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
|
|
961
|
+
const ret = arg0 === null;
|
|
962
|
+
return ret;
|
|
963
|
+
},
|
|
952
964
|
__wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
|
|
953
965
|
const val = arg0;
|
|
954
966
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -1035,6 +1047,10 @@ function __wbg_get_imports() {
|
|
|
1035
1047
|
const ret = arg0.cancel();
|
|
1036
1048
|
return ret;
|
|
1037
1049
|
},
|
|
1050
|
+
__wbg_cancel_ceb1bda02e29f0a9: function(arg0) {
|
|
1051
|
+
const ret = arg0.cancel();
|
|
1052
|
+
return ret;
|
|
1053
|
+
},
|
|
1038
1054
|
__wbg_catch_e9362815fd0b24cf: function(arg0, arg1) {
|
|
1039
1055
|
const ret = arg0.catch(arg1);
|
|
1040
1056
|
return ret;
|
|
@@ -1052,6 +1068,10 @@ function __wbg_get_imports() {
|
|
|
1052
1068
|
__wbg_close_fb954dfaf67b5732: function() { return handleError(function (arg0) {
|
|
1053
1069
|
arg0.close();
|
|
1054
1070
|
}, arguments); },
|
|
1071
|
+
__wbg_closed_07518cb4fba01f29: function(arg0) {
|
|
1072
|
+
const ret = arg0.closed;
|
|
1073
|
+
return ret;
|
|
1074
|
+
},
|
|
1055
1075
|
__wbg_createBidirectionalStream_ca9f0bbcf625e093: function(arg0) {
|
|
1056
1076
|
const ret = arg0.createBidirectionalStream();
|
|
1057
1077
|
return ret;
|
|
@@ -1060,7 +1080,7 @@ function __wbg_get_imports() {
|
|
|
1060
1080
|
const ret = arg0.crypto;
|
|
1061
1081
|
return ret;
|
|
1062
1082
|
},
|
|
1063
|
-
|
|
1083
|
+
__wbg_done_3a42bff1c40d05e3: function(arg0) {
|
|
1064
1084
|
const ret = arg0.done;
|
|
1065
1085
|
return ret;
|
|
1066
1086
|
},
|
|
@@ -1104,6 +1124,10 @@ function __wbg_get_imports() {
|
|
|
1104
1124
|
const ret = arg0.getReader();
|
|
1105
1125
|
return ret;
|
|
1106
1126
|
},
|
|
1127
|
+
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
1128
|
+
const ret = arg0.getReader();
|
|
1129
|
+
return ret;
|
|
1130
|
+
}, arguments); },
|
|
1107
1131
|
__wbg_getTime_da7c55f52b71e8c6: function(arg0) {
|
|
1108
1132
|
const ret = arg0.getTime();
|
|
1109
1133
|
return ret;
|
|
@@ -1164,6 +1188,16 @@ function __wbg_get_imports() {
|
|
|
1164
1188
|
const ret = result;
|
|
1165
1189
|
return ret;
|
|
1166
1190
|
},
|
|
1191
|
+
__wbg_instanceof_Error_6872d63ba7922898: function(arg0) {
|
|
1192
|
+
let result;
|
|
1193
|
+
try {
|
|
1194
|
+
result = arg0 instanceof Error;
|
|
1195
|
+
} catch (_) {
|
|
1196
|
+
result = false;
|
|
1197
|
+
}
|
|
1198
|
+
const ret = result;
|
|
1199
|
+
return ret;
|
|
1200
|
+
},
|
|
1167
1201
|
__wbg_instanceof_Response_9b2d111407865ff2: function(arg0) {
|
|
1168
1202
|
let result;
|
|
1169
1203
|
try {
|
|
@@ -1204,6 +1238,10 @@ function __wbg_get_imports() {
|
|
|
1204
1238
|
const ret = arg0.length;
|
|
1205
1239
|
return ret;
|
|
1206
1240
|
},
|
|
1241
|
+
__wbg_message_cb4f84ee66e5e341: function(arg0) {
|
|
1242
|
+
const ret = arg0.message;
|
|
1243
|
+
return ret;
|
|
1244
|
+
},
|
|
1207
1245
|
__wbg_msCrypto_8c6d45a75ef1d3da: function(arg0) {
|
|
1208
1246
|
const ret = arg0.msCrypto;
|
|
1209
1247
|
return ret;
|
|
@@ -1372,6 +1410,9 @@ function __wbg_get_imports() {
|
|
|
1372
1410
|
__wbg_releaseLock_38a8537ebe7067e2: function(arg0) {
|
|
1373
1411
|
arg0.releaseLock();
|
|
1374
1412
|
},
|
|
1413
|
+
__wbg_releaseLock_9baaf3ccc5cfad69: function(arg0) {
|
|
1414
|
+
arg0.releaseLock();
|
|
1415
|
+
},
|
|
1375
1416
|
__wbg_require_7a9419e39d796c95: function() { return handleError(function () {
|
|
1376
1417
|
const ret = module.require;
|
|
1377
1418
|
return ret;
|
|
@@ -1489,7 +1530,7 @@ function __wbg_get_imports() {
|
|
|
1489
1530
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1490
1531
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1491
1532
|
},
|
|
1492
|
-
|
|
1533
|
+
__wbg_value_bf4f76f14ac182eb: function(arg0) {
|
|
1493
1534
|
const ret = arg0.value;
|
|
1494
1535
|
return ret;
|
|
1495
1536
|
},
|
|
@@ -1514,58 +1555,63 @@ function __wbg_get_imports() {
|
|
|
1514
1555
|
return ret;
|
|
1515
1556
|
},
|
|
1516
1557
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1517
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1558
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1137, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1518
1559
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0c753f5de41a6544);
|
|
1519
1560
|
return ret;
|
|
1520
1561
|
},
|
|
1521
1562
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1522
1563
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 466, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1523
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1564
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd08ec99393977d92);
|
|
1524
1565
|
return ret;
|
|
1525
1566
|
},
|
|
1526
1567
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1527
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [
|
|
1528
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1568
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 881, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1569
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a);
|
|
1529
1570
|
return ret;
|
|
1530
1571
|
},
|
|
1531
1572
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1532
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("
|
|
1533
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1573
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("WebTransportBidirectionalStream")], shim_idx: 881, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1574
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_3);
|
|
1534
1575
|
return ret;
|
|
1535
1576
|
},
|
|
1536
1577
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1537
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1538
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1578
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 881, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1579
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_4);
|
|
1539
1580
|
return ret;
|
|
1540
1581
|
},
|
|
1541
|
-
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
1582
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1583
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 925, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1584
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__he74b9f0460fb8e21);
|
|
1585
|
+
return ret;
|
|
1586
|
+
},
|
|
1587
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
1542
1588
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1543
1589
|
const ret = arg0;
|
|
1544
1590
|
return ret;
|
|
1545
1591
|
},
|
|
1546
|
-
|
|
1592
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
1547
1593
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1548
1594
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1549
1595
|
return ret;
|
|
1550
1596
|
},
|
|
1551
|
-
|
|
1597
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
1552
1598
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1553
1599
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1554
1600
|
return ret;
|
|
1555
1601
|
},
|
|
1556
|
-
|
|
1602
|
+
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
1557
1603
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1558
1604
|
const ret = BigInt.asUintN(64, arg0);
|
|
1559
1605
|
return ret;
|
|
1560
1606
|
},
|
|
1561
|
-
|
|
1607
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
1562
1608
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1563
1609
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1564
1610
|
// Cast intrinsic for `Vector(NamedExternref("ObjectEvent")) -> Externref`.
|
|
1565
1611
|
const ret = v0;
|
|
1566
1612
|
return ret;
|
|
1567
1613
|
},
|
|
1568
|
-
|
|
1614
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
1569
1615
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1570
1616
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1571
1617
|
// Cast intrinsic for `Vector(NamedExternref("PinnedObject")) -> Externref`.
|
|
@@ -1588,12 +1634,12 @@ function __wbg_get_imports() {
|
|
|
1588
1634
|
};
|
|
1589
1635
|
}
|
|
1590
1636
|
|
|
1591
|
-
function
|
|
1592
|
-
wasm.
|
|
1637
|
+
function wasm_bindgen__convert__closures_____invoke__he74b9f0460fb8e21(arg0, arg1) {
|
|
1638
|
+
wasm.wasm_bindgen__convert__closures_____invoke__he74b9f0460fb8e21(arg0, arg1);
|
|
1593
1639
|
}
|
|
1594
1640
|
|
|
1595
|
-
function
|
|
1596
|
-
wasm.
|
|
1641
|
+
function wasm_bindgen__convert__closures_____invoke__hd08ec99393977d92(arg0, arg1, arg2) {
|
|
1642
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hd08ec99393977d92(arg0, arg1, arg2);
|
|
1597
1643
|
}
|
|
1598
1644
|
|
|
1599
1645
|
function wasm_bindgen__convert__closures_____invoke__h0c753f5de41a6544(arg0, arg1, arg2) {
|
|
@@ -1603,15 +1649,22 @@ function wasm_bindgen__convert__closures_____invoke__h0c753f5de41a6544(arg0, arg
|
|
|
1603
1649
|
}
|
|
1604
1650
|
}
|
|
1605
1651
|
|
|
1606
|
-
function
|
|
1607
|
-
const ret = wasm.
|
|
1652
|
+
function wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a(arg0, arg1, arg2) {
|
|
1653
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a(arg0, arg1, arg2);
|
|
1654
|
+
if (ret[1]) {
|
|
1655
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
function wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_3(arg0, arg1, arg2) {
|
|
1660
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_3(arg0, arg1, arg2);
|
|
1608
1661
|
if (ret[1]) {
|
|
1609
1662
|
throw takeFromExternrefTable0(ret[0]);
|
|
1610
1663
|
}
|
|
1611
1664
|
}
|
|
1612
1665
|
|
|
1613
|
-
function
|
|
1614
|
-
const ret = wasm.
|
|
1666
|
+
function wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_4(arg0, arg1, arg2) {
|
|
1667
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_4(arg0, arg1, arg2);
|
|
1615
1668
|
if (ret[1]) {
|
|
1616
1669
|
throw takeFromExternrefTable0(ret[0]);
|
|
1617
1670
|
}
|
|
Binary file
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_packedupload_free: (a: number, b: number) => void;
|
|
5
4
|
export const encodedSize: (a: number, b: number, c: number) => number;
|
|
6
5
|
export const generateRecoveryPhrase: () => [number, number];
|
|
7
6
|
export const init: () => void;
|
|
8
|
-
export const packedupload_add: (a: number, b: any) => any;
|
|
9
|
-
export const packedupload_cancel: (a: number) => void;
|
|
10
|
-
export const packedupload_finalize: (a: number) => any;
|
|
11
|
-
export const packedupload_length: (a: number) => number;
|
|
12
|
-
export const packedupload_remaining: (a: number) => number;
|
|
13
|
-
export const packedupload_slabSize: (a: number) => number;
|
|
14
|
-
export const packedupload_slabs: (a: number) => number;
|
|
15
7
|
export const validateRecoveryPhrase: (a: number, b: number) => [number, number];
|
|
8
|
+
export const setLogger: (a: any, b: any) => void;
|
|
16
9
|
export const __wbg_appkey_free: (a: number, b: number) => void;
|
|
17
10
|
export const __wbg_builder_free: (a: number, b: number) => void;
|
|
18
11
|
export const __wbg_objectevent_free: (a: number, b: number) => void;
|
|
12
|
+
export const __wbg_packedupload_free: (a: number, b: number) => void;
|
|
19
13
|
export const __wbg_pinnedobject_free: (a: number, b: number) => void;
|
|
20
14
|
export const __wbg_sdk_free: (a: number, b: number) => void;
|
|
21
15
|
export const appkey_export: (a: number) => [number, number];
|
|
@@ -33,6 +27,13 @@ export const objectevent_deleted: (a: number) => number;
|
|
|
33
27
|
export const objectevent_id: (a: number) => [number, number];
|
|
34
28
|
export const objectevent_object: (a: number) => number;
|
|
35
29
|
export const objectevent_updatedAt: (a: number) => any;
|
|
30
|
+
export const packedupload_add: (a: number, b: any) => any;
|
|
31
|
+
export const packedupload_cancel: (a: number) => void;
|
|
32
|
+
export const packedupload_finalize: (a: number) => any;
|
|
33
|
+
export const packedupload_length: (a: number) => number;
|
|
34
|
+
export const packedupload_optimalDataSize: (a: number) => number;
|
|
35
|
+
export const packedupload_remaining: (a: number) => number;
|
|
36
|
+
export const packedupload_slabs: (a: number) => number;
|
|
36
37
|
export const pinnedobject_createdAt: (a: number) => any;
|
|
37
38
|
export const pinnedobject_encodedSize: (a: number) => number;
|
|
38
39
|
export const pinnedobject_id: (a: number) => [number, number];
|
|
@@ -50,7 +51,7 @@ export const sdk_deleteObject: (a: number, b: number, c: number) => any;
|
|
|
50
51
|
export const sdk_download: (a: number, b: number, c: number) => [number, number, number];
|
|
51
52
|
export const sdk_hosts: (a: number, b: number) => any;
|
|
52
53
|
export const sdk_object: (a: number, b: number, c: number) => any;
|
|
53
|
-
export const sdk_objectEvents: (a: number, b:
|
|
54
|
+
export const sdk_objectEvents: (a: number, b: any, c: number) => any;
|
|
54
55
|
export const sdk_pinObject: (a: number, b: number) => any;
|
|
55
56
|
export const sdk_pruneSlabs: (a: number) => any;
|
|
56
57
|
export const sdk_shareObject: (a: number, b: number, c: any) => [number, number, number, number];
|
|
@@ -59,7 +60,6 @@ export const sdk_slab: (a: number, b: number, c: number) => any;
|
|
|
59
60
|
export const sdk_updateObjectMetadata: (a: number, b: number) => any;
|
|
60
61
|
export const sdk_upload: (a: number, b: number, c: any, d: number) => any;
|
|
61
62
|
export const sdk_uploadPacked: (a: number, b: number) => [number, number, number];
|
|
62
|
-
export const setLogger: (a: any, b: any) => void;
|
|
63
63
|
export const __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
64
64
|
export const intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
|
|
65
65
|
export const intounderlyingbytesource_cancel: (a: number) => void;
|
|
@@ -74,11 +74,12 @@ export const __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
|
74
74
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
75
75
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
76
76
|
export const wasm_bindgen__convert__closures_____invoke__h0c753f5de41a6544: (a: number, b: number, c: any) => [number, number];
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
77
|
+
export const wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a: (a: number, b: number, c: any) => [number, number];
|
|
78
|
+
export const wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_3: (a: number, b: number, c: any) => [number, number];
|
|
79
|
+
export const wasm_bindgen__convert__closures_____invoke__h1c331fb391acea9a_4: (a: number, b: number, c: any) => [number, number];
|
|
79
80
|
export const wasm_bindgen__convert__closures_____invoke__h29f5bd75867abdc1: (a: number, b: number, c: any, d: any) => void;
|
|
80
|
-
export const
|
|
81
|
-
export const
|
|
81
|
+
export const wasm_bindgen__convert__closures_____invoke__hd08ec99393977d92: (a: number, b: number, c: any) => void;
|
|
82
|
+
export const wasm_bindgen__convert__closures_____invoke__he74b9f0460fb8e21: (a: number, b: number) => void;
|
|
82
83
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
83
84
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
84
85
|
export const __wbindgen_exn_store: (a: number) => void;
|