@siafoundation/sia-storage 0.0.14 → 0.1.1
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 +132 -5
- package/dist/chunk-QYQQIWFH.js +74 -0
- package/dist/chunk-QYQQIWFH.js.map +1 -0
- package/dist/cli.js +13 -0
- package/dist/index.d.ts +90 -2
- package/dist/index.js +309 -0
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +30 -0
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +160 -6
- package/dist/next.d.ts +3 -0
- package/dist/next.js +12 -0
- package/dist/sia-storage-sw.js +2 -0
- package/dist/stream-worker.d.ts +51 -0
- package/dist/stream-worker.js +441 -0
- package/dist/stream-worker.js.map +1 -0
- package/dist/vite.d.ts +39 -0
- package/dist/vite.js +32 -0
- package/package.json +24 -8
- package/wasm/sia_storage_wasm.d.ts +237 -37
- package/wasm/sia_storage_wasm.js +462 -59
- package/wasm/sia_storage_wasm_bg.wasm +0 -0
- package/wasm/sia_storage_wasm_bg.wasm.d.ts +36 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siafoundation/sia-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
+
"bin": {
|
|
12
|
+
"sia-storage-worker": "dist/cli.js"
|
|
13
|
+
},
|
|
11
14
|
"files": [
|
|
12
15
|
"dist",
|
|
13
16
|
"wasm"
|
|
@@ -32,27 +35,40 @@
|
|
|
32
35
|
"default": "./dist/index.js"
|
|
33
36
|
}
|
|
34
37
|
},
|
|
38
|
+
"./stream-worker": {
|
|
39
|
+
"types": "./dist/stream-worker.d.ts",
|
|
40
|
+
"default": "./dist/stream-worker.js"
|
|
41
|
+
},
|
|
42
|
+
"./vite": {
|
|
43
|
+
"types": "./dist/vite.d.ts",
|
|
44
|
+
"default": "./dist/vite.js"
|
|
45
|
+
},
|
|
46
|
+
"./next": {
|
|
47
|
+
"types": "./dist/next.d.ts",
|
|
48
|
+
"default": "./dist/next.js"
|
|
49
|
+
},
|
|
50
|
+
"./sia-storage-sw.js": "./dist/sia-storage-sw.js",
|
|
35
51
|
"./wasm": "./wasm/sia_storage_wasm.js",
|
|
36
52
|
"./wasm/*": "./wasm/*"
|
|
37
53
|
},
|
|
38
54
|
"scripts": {
|
|
39
|
-
"build": "bun run build-wasm && tsup && bun run scripts/build-node-types.ts",
|
|
55
|
+
"build": "bun run build-wasm && tsup --config tsup.worker.config.ts && tsup && bun run scripts/build-node-types.ts",
|
|
40
56
|
"build-wasm": "bun run scripts/build-wasm.ts",
|
|
41
57
|
"setup": "bun run scripts/setup-rust.ts",
|
|
42
58
|
"setup-napi-test": "bun run scripts/setup-napi-test.ts",
|
|
43
59
|
"typecheck": "tsc --noEmit",
|
|
44
60
|
"test": "bun test src/tests/install-integration.test.ts",
|
|
45
|
-
"test:browser": "bun test src/tests/vite-integration.test.ts src/tests/esbuild-integration.test.ts src/tests/webpack-integration.test.ts src/tests/rollup-integration.test.ts src/tests/nextjs-integration.test.ts",
|
|
61
|
+
"test:browser": "bun test src/tests/vite-integration.test.ts src/tests/esbuild-integration.test.ts src/tests/webpack-integration.test.ts src/tests/rollup-integration.test.ts src/tests/nextjs-integration.test.ts src/tests/streaming.test.ts src/tests/stream-prebuilt-worker.test.ts",
|
|
46
62
|
"test:all": "bun test",
|
|
47
63
|
"prepublishOnly": "bun run build && bun test",
|
|
48
64
|
"publish-npm": "bun run scripts/publish.ts"
|
|
49
65
|
},
|
|
50
66
|
"optionalDependencies": {
|
|
51
|
-
"@siafoundation/sia-storage-darwin-arm64": "0.
|
|
52
|
-
"@siafoundation/sia-storage-darwin-x64": "0.
|
|
53
|
-
"@siafoundation/sia-storage-linux-x64-gnu": "0.
|
|
54
|
-
"@siafoundation/sia-storage-linux-arm64-gnu": "0.
|
|
55
|
-
"@siafoundation/sia-storage-win32-x64-msvc": "0.
|
|
67
|
+
"@siafoundation/sia-storage-darwin-arm64": "0.1.1",
|
|
68
|
+
"@siafoundation/sia-storage-darwin-x64": "0.1.1",
|
|
69
|
+
"@siafoundation/sia-storage-linux-x64-gnu": "0.1.1",
|
|
70
|
+
"@siafoundation/sia-storage-linux-arm64-gnu": "0.1.1",
|
|
71
|
+
"@siafoundation/sia-storage-win32-x64-msvc": "0.1.1"
|
|
56
72
|
},
|
|
57
73
|
"devDependencies": {
|
|
58
74
|
"@types/bun": "^1.3.12",
|
|
@@ -17,19 +17,6 @@ export interface DownloadOptions {
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
export interface SealedObject {
|
|
21
|
-
encryptedDataKey: string;
|
|
22
|
-
slabs: Slab[];
|
|
23
|
-
dataSignature: string;
|
|
24
|
-
encryptedMetadataKey?: string;
|
|
25
|
-
encryptedMetadata?: string;
|
|
26
|
-
metadataSignature: string;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
20
|
export interface Sector {
|
|
34
21
|
root: string;
|
|
35
22
|
hostKey: string;
|
|
@@ -87,6 +74,12 @@ interface Sdk {
|
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
|
|
77
|
+
|
|
78
|
+
interface SharedSdk {
|
|
79
|
+
download(object: PinnedObject, options?: DownloadOptions): ReadableStream;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
90
83
|
/**
|
|
91
84
|
* Application info registered with the indexer.
|
|
92
85
|
*/
|
|
@@ -99,7 +92,15 @@ export interface App {
|
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
/**
|
|
102
|
-
*
|
|
95
|
+
* Geographic coordinates used to sort hosts by proximity.
|
|
96
|
+
*/
|
|
97
|
+
export interface GeoLocation {
|
|
98
|
+
latitude: number;
|
|
99
|
+
longitude: number;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Information about the user's account on the indexer.
|
|
103
104
|
*/
|
|
104
105
|
export interface Account {
|
|
105
106
|
accountKey: string;
|
|
@@ -130,13 +131,14 @@ export interface ShardProgress {
|
|
|
130
131
|
* Query parameters for filtering hosts.
|
|
131
132
|
*/
|
|
132
133
|
export interface HostQuery {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
location?: GeoLocation;
|
|
135
|
+
country?: string;
|
|
136
|
+
limit?: number;
|
|
137
|
+
offset?: number;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
/**
|
|
139
|
-
* TS interface for `Builder::new
|
|
141
|
+
* TS interface for `Builder::new`'s `app` parameter. Field names must
|
|
140
142
|
* match the Reflect reads in `helpers::make_app_metadata`.
|
|
141
143
|
*/
|
|
142
144
|
export interface AppMetadata {
|
|
@@ -149,7 +151,7 @@ export interface AppMetadata {
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
/**
|
|
152
|
-
* TS interface for `Sdk::objectEvents
|
|
154
|
+
* TS interface for `Sdk::objectEvents`'s `cursor` parameter. Field
|
|
153
155
|
* names must match the Reflect reads in `sdk.rs`.
|
|
154
156
|
*/
|
|
155
157
|
export interface ObjectsCursor {
|
|
@@ -157,7 +159,30 @@ export interface ObjectsCursor {
|
|
|
157
159
|
after: Date;
|
|
158
160
|
}
|
|
159
161
|
|
|
160
|
-
|
|
162
|
+
/**
|
|
163
|
+
* What a recipient can see about the sharing key they hold. The counts are a
|
|
164
|
+
* snapshot, not a live view.
|
|
165
|
+
*/
|
|
166
|
+
export interface KeyStats {
|
|
167
|
+
objectCount: number;
|
|
168
|
+
objectSize: number;
|
|
169
|
+
pinnedData: number;
|
|
170
|
+
pinnedSize: number;
|
|
171
|
+
expiresAt: Date | undefined;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
updatedAt: Date;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type SealedObject = {
|
|
177
|
+
encryptedDataKey: string;
|
|
178
|
+
slabs: Slab[];
|
|
179
|
+
dataSignature: string;
|
|
180
|
+
encryptedMetadataKey?: string;
|
|
181
|
+
encryptedMetadata?: string;
|
|
182
|
+
metadataSignature: string;
|
|
183
|
+
createdAt: string;
|
|
184
|
+
updatedAt: string;
|
|
185
|
+
};
|
|
161
186
|
|
|
162
187
|
|
|
163
188
|
/**
|
|
@@ -200,14 +225,38 @@ export class AppKey {
|
|
|
200
225
|
export class Builder {
|
|
201
226
|
free(): void;
|
|
202
227
|
[Symbol.dispose](): void;
|
|
228
|
+
/**
|
|
229
|
+
* Connects using a pre-authorized key, bypassing the interactive approval
|
|
230
|
+
* flow, and returns a Sdk. `preAuthorizedKeySeed` is the 32-byte
|
|
231
|
+
* pre-authorized private key (Uint8Array); `mnemonic` derives the app key.
|
|
232
|
+
*/
|
|
233
|
+
connectPreAuthorized(pre_authorized_key_seed: Uint8Array, mnemonic: string): Promise<Sdk>;
|
|
203
234
|
/**
|
|
204
235
|
* Attempts to connect using an existing AppKey.
|
|
205
236
|
* Returns a Sdk if the key is valid, or undefined if not registered.
|
|
206
237
|
*/
|
|
207
238
|
connected(app_key: AppKey): Promise<Sdk | undefined>;
|
|
239
|
+
/**
|
|
240
|
+
* Returns whether `mnemonic` derives an application key that is already
|
|
241
|
+
* registered with the indexer. Unlike `register`, the builder remains
|
|
242
|
+
* usable. Only valid after `waitForApproval` has resolved.
|
|
243
|
+
*/
|
|
244
|
+
matchesExistingAppKey(mnemonic: string): Promise<boolean>;
|
|
208
245
|
constructor(indexer_url: string, app: AppMetadata);
|
|
246
|
+
/**
|
|
247
|
+
* Returns whether the connect key the user approved with already has an
|
|
248
|
+
* account for this application. Only valid after `waitForApproval` has
|
|
249
|
+
* resolved.
|
|
250
|
+
*
|
|
251
|
+
* The connect key may have accounts under more than one recovery phrase.
|
|
252
|
+
* Use `matchesExistingAppKey` to check a particular phrase.
|
|
253
|
+
*/
|
|
254
|
+
reconnecting(): boolean;
|
|
209
255
|
/**
|
|
210
256
|
* Completes registration and returns a Sdk instance.
|
|
257
|
+
*
|
|
258
|
+
* A different recovery phrase registers a new application key even when
|
|
259
|
+
* `reconnecting()` is true.
|
|
211
260
|
*/
|
|
212
261
|
register(mnemonic: string): Promise<Sdk>;
|
|
213
262
|
/**
|
|
@@ -252,6 +301,27 @@ export class IntoUnderlyingSource {
|
|
|
252
301
|
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
253
302
|
}
|
|
254
303
|
|
|
304
|
+
/**
|
|
305
|
+
* The indexer's record for a sharing key, including how many objects it grants
|
|
306
|
+
* access to and how much space they use. The counts are a snapshot, not a live
|
|
307
|
+
* view.
|
|
308
|
+
*/
|
|
309
|
+
export class KeyRecord {
|
|
310
|
+
private constructor();
|
|
311
|
+
free(): void;
|
|
312
|
+
[Symbol.dispose](): void;
|
|
313
|
+
readonly description: string;
|
|
314
|
+
/**
|
|
315
|
+
* The key this record describes.
|
|
316
|
+
*/
|
|
317
|
+
readonly key: SharingKey;
|
|
318
|
+
/**
|
|
319
|
+
* A snapshot of how many objects the key grants access to and how much
|
|
320
|
+
* space they use.
|
|
321
|
+
*/
|
|
322
|
+
readonly stats: KeyStats;
|
|
323
|
+
}
|
|
324
|
+
|
|
255
325
|
/**
|
|
256
326
|
* An object event from the indexer.
|
|
257
327
|
*/
|
|
@@ -381,6 +451,10 @@ export class PinnedObject {
|
|
|
381
451
|
* Returns the slabs that make up the object.
|
|
382
452
|
*/
|
|
383
453
|
slabs(): Slab[];
|
|
454
|
+
/**
|
|
455
|
+
* Returns a new object truncated to the requested length.
|
|
456
|
+
*/
|
|
457
|
+
truncate(length: bigint): PinnedObject;
|
|
384
458
|
/**
|
|
385
459
|
* Updates the object's metadata.
|
|
386
460
|
*/
|
|
@@ -407,6 +481,10 @@ export class Sdk {
|
|
|
407
481
|
* Returns the AppKey used by this SDK instance.
|
|
408
482
|
*/
|
|
409
483
|
appKey(): AppKey;
|
|
484
|
+
/**
|
|
485
|
+
* Creates a sharing key. Attach objects to it with `Sdk.shareObject`.
|
|
486
|
+
*/
|
|
487
|
+
createSharingKey(description: string, expires_at?: Date | null): Promise<SharingKey>;
|
|
410
488
|
/**
|
|
411
489
|
* Deletes an object from the indexer by its hex ID.
|
|
412
490
|
*/
|
|
@@ -439,6 +517,17 @@ export class Sdk {
|
|
|
439
517
|
* Returns object events for syncing local state with the indexer.
|
|
440
518
|
*/
|
|
441
519
|
objectEvents(cursor: ObjectsCursor | null | undefined, limit: number): Promise<ObjectEvent[]>;
|
|
520
|
+
/**
|
|
521
|
+
* Resolves a share URL (sia://...) and returns the shared object.
|
|
522
|
+
* The encryption key is extracted from the URL fragment (never sent
|
|
523
|
+
* to the indexer).
|
|
524
|
+
*/
|
|
525
|
+
objectFromShareUrl(share_url: string): Promise<PinnedObject>;
|
|
526
|
+
/**
|
|
527
|
+
* Generates a signed share URL for an object. Anyone with the URL can
|
|
528
|
+
* download and decrypt the object until `validUntil`.
|
|
529
|
+
*/
|
|
530
|
+
objectShareUrl(object: PinnedObject, valid_until: Date): string;
|
|
442
531
|
/**
|
|
443
532
|
* Pins an object to the indexer so it persists beyond temporary storage.
|
|
444
533
|
*/
|
|
@@ -448,20 +537,38 @@ export class Sdk {
|
|
|
448
537
|
*/
|
|
449
538
|
pruneSlabs(): Promise<void>;
|
|
450
539
|
/**
|
|
451
|
-
*
|
|
452
|
-
*
|
|
540
|
+
* Deletes a sharing key along with all of its attachments, revoking
|
|
541
|
+
* recipients' access. Account tokens already issued stay valid until they
|
|
542
|
+
* expire, so a download in flight can keep reading for up to five minutes.
|
|
453
543
|
*/
|
|
454
|
-
|
|
544
|
+
revokeSharingKey(key: SharingKey): Promise<void>;
|
|
455
545
|
/**
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
546
|
+
* Attaches an object to a sharing key, re-sealing its encryption keys under
|
|
547
|
+
* the key so recipients can decrypt it. Attaching an already-attached
|
|
548
|
+
* object replaces its re-sealed keys, so a failed call can be retried.
|
|
549
|
+
*/
|
|
550
|
+
shareObject(key: SharingKey, object: PinnedObject): Promise<void>;
|
|
551
|
+
/**
|
|
552
|
+
* Lists and decrypts a page of the objects a sharing key grants access to.
|
|
553
|
+
*/
|
|
554
|
+
sharedObjects(key: SharingKey, offset: number, limit: number): Promise<PinnedObject[]>;
|
|
555
|
+
/**
|
|
556
|
+
* Fetches the indexer's record for a key, including its counts.
|
|
557
|
+
*/
|
|
558
|
+
sharingKey(key: SharingKey): Promise<KeyRecord>;
|
|
559
|
+
/**
|
|
560
|
+
* Lists the account's sharing keys, most recently created first.
|
|
459
561
|
*/
|
|
460
|
-
|
|
562
|
+
sharingKeys(offset: number, limit: number): Promise<KeyRecord[]>;
|
|
461
563
|
/**
|
|
462
564
|
* Retrieves a pinned slab from the indexer by its hex ID.
|
|
463
565
|
*/
|
|
464
566
|
slab(slab_id: string): Promise<PinnedSlab>;
|
|
567
|
+
/**
|
|
568
|
+
* Detaches an object from a sharing key, leaving the key and its other
|
|
569
|
+
* attachments in place.
|
|
570
|
+
*/
|
|
571
|
+
unshareObject(key: SharingKey, id: string): Promise<void>;
|
|
465
572
|
/**
|
|
466
573
|
* Updates an object's metadata on the indexer.
|
|
467
574
|
*/
|
|
@@ -488,6 +595,73 @@ export class Sdk {
|
|
|
488
595
|
uploadPacked(options?: any | null): PackedUpload;
|
|
489
596
|
}
|
|
490
597
|
|
|
598
|
+
/**
|
|
599
|
+
* A read-only SDK for the objects a sharing key grants access to.
|
|
600
|
+
*
|
|
601
|
+
* Unlike `Sdk`, it authenticates with a sharing key rather than an app key and
|
|
602
|
+
* cannot upload, pin, or delete. Downloads are paid for by the key's owner.
|
|
603
|
+
*/
|
|
604
|
+
export class SharedSdk {
|
|
605
|
+
private constructor();
|
|
606
|
+
free(): void;
|
|
607
|
+
[Symbol.dispose](): void;
|
|
608
|
+
/**
|
|
609
|
+
* Connects to `indexerUrl` as the recipient of the sharing key derived
|
|
610
|
+
* from `seed`, which is the hex string the key's owner handed out.
|
|
611
|
+
*/
|
|
612
|
+
static connect(indexer_url: string, seed: string): Promise<SharedSdk>;
|
|
613
|
+
/**
|
|
614
|
+
* Streams a shared object's data.
|
|
615
|
+
*/
|
|
616
|
+
download(object: PinnedObject, options?: any | null): ReadableStream;
|
|
617
|
+
/**
|
|
618
|
+
* Returns the hosts serving this key's objects, optionally filtered by a
|
|
619
|
+
* HostQuery. Mirrors `Sdk.hosts()` but is scoped to the sharing key, so the
|
|
620
|
+
* set is already limited to hosts holding its objects.
|
|
621
|
+
*/
|
|
622
|
+
hosts(query?: HostQuery | null): Promise<Host[]>;
|
|
623
|
+
/**
|
|
624
|
+
* Fetches and decrypts one object the key grants access to.
|
|
625
|
+
*/
|
|
626
|
+
object(id: string): Promise<PinnedObject>;
|
|
627
|
+
/**
|
|
628
|
+
* Lists and decrypts a page of the objects the key grants access to.
|
|
629
|
+
*/
|
|
630
|
+
objects(offset: number, limit: number): Promise<PinnedObject[]>;
|
|
631
|
+
/**
|
|
632
|
+
* Fetches the sharing key's stats from the indexer.
|
|
633
|
+
*/
|
|
634
|
+
stats(): Promise<KeyStats>;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* A sharing key, granting read-only access to the objects attached to it.
|
|
639
|
+
*
|
|
640
|
+
* It is just the credential; the operations that use it live on `Sdk`.
|
|
641
|
+
*/
|
|
642
|
+
export class SharingKey {
|
|
643
|
+
private constructor();
|
|
644
|
+
free(): void;
|
|
645
|
+
[Symbol.dispose](): void;
|
|
646
|
+
/**
|
|
647
|
+
* Imports a sharing key from the hex seed its owner handed out.
|
|
648
|
+
*
|
|
649
|
+
* Pass the string returned by [seed](Self::seed).
|
|
650
|
+
*/
|
|
651
|
+
static fromSeed(seed: string): SharingKey;
|
|
652
|
+
/**
|
|
653
|
+
* Returns the seed a recipient needs to read the key's objects, as hex.
|
|
654
|
+
*
|
|
655
|
+
* It is the whole credential. Pair it with the indexer's url in
|
|
656
|
+
* `SharedSdk.connect`.
|
|
657
|
+
*/
|
|
658
|
+
seed(): string;
|
|
659
|
+
/**
|
|
660
|
+
* The key's public half, which identifies it.
|
|
661
|
+
*/
|
|
662
|
+
readonly publicKey: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
491
665
|
/**
|
|
492
666
|
* Calculates the encoded size of data after erasure coding.
|
|
493
667
|
*/
|
|
@@ -524,17 +698,22 @@ export interface InitOutput {
|
|
|
524
698
|
readonly memory: WebAssembly.Memory;
|
|
525
699
|
readonly __wbg_appkey_free: (a: number, b: number) => void;
|
|
526
700
|
readonly __wbg_builder_free: (a: number, b: number) => void;
|
|
701
|
+
readonly __wbg_keyrecord_free: (a: number, b: number) => void;
|
|
527
702
|
readonly __wbg_objectevent_free: (a: number, b: number) => void;
|
|
528
703
|
readonly __wbg_packedupload_free: (a: number, b: number) => void;
|
|
529
704
|
readonly __wbg_pinnedobject_free: (a: number, b: number) => void;
|
|
530
705
|
readonly __wbg_sdk_free: (a: number, b: number) => void;
|
|
706
|
+
readonly __wbg_sharedsdk_free: (a: number, b: number) => void;
|
|
531
707
|
readonly appkey_export: (a: number) => [number, number];
|
|
532
708
|
readonly appkey_new: (a: number, b: number) => [number, number, number];
|
|
533
709
|
readonly appkey_publicKey: (a: number) => [number, number];
|
|
534
710
|
readonly appkey_sign: (a: number, b: number, c: number) => [number, number];
|
|
535
711
|
readonly appkey_verifySignature: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
712
|
+
readonly builder_connectPreAuthorized: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
536
713
|
readonly builder_connected: (a: number, b: number) => any;
|
|
714
|
+
readonly builder_matchesExistingAppKey: (a: number, b: number, c: number) => any;
|
|
537
715
|
readonly builder_new: (a: number, b: number, c: any) => [number, number, number];
|
|
716
|
+
readonly builder_reconnecting: (a: number) => [number, number, number];
|
|
538
717
|
readonly builder_register: (a: number, b: number, c: number) => any;
|
|
539
718
|
readonly builder_requestConnection: (a: number) => any;
|
|
540
719
|
readonly builder_responseUrl: (a: number) => [number, number, number, number];
|
|
@@ -542,6 +721,9 @@ export interface InitOutput {
|
|
|
542
721
|
readonly encodedSize: (a: number, b: number, c: number) => number;
|
|
543
722
|
readonly generateRecoveryPhrase: () => [number, number];
|
|
544
723
|
readonly init: () => void;
|
|
724
|
+
readonly keyrecord_description: (a: number) => [number, number];
|
|
725
|
+
readonly keyrecord_key: (a: number) => number;
|
|
726
|
+
readonly keyrecord_stats: (a: number) => [number, number, number];
|
|
545
727
|
readonly objectevent_deleted: (a: number) => number;
|
|
546
728
|
readonly objectevent_id: (a: number) => [number, number];
|
|
547
729
|
readonly objectevent_object: (a: number) => number;
|
|
@@ -559,28 +741,46 @@ export interface InitOutput {
|
|
|
559
741
|
readonly pinnedobject_metadata: (a: number) => [number, number];
|
|
560
742
|
readonly pinnedobject_new: () => number;
|
|
561
743
|
readonly pinnedobject_open: (a: number, b: any) => [number, number, number];
|
|
562
|
-
readonly pinnedobject_seal: (a: number, b: number) =>
|
|
744
|
+
readonly pinnedobject_seal: (a: number, b: number) => [number, number, number];
|
|
563
745
|
readonly pinnedobject_size: (a: number) => number;
|
|
564
746
|
readonly pinnedobject_slabs: (a: number) => [number, number, number];
|
|
747
|
+
readonly pinnedobject_truncate: (a: number, b: bigint) => number;
|
|
565
748
|
readonly pinnedobject_updateMetadata: (a: number, b: number, c: number) => void;
|
|
566
749
|
readonly pinnedobject_updatedAt: (a: number) => any;
|
|
567
750
|
readonly sdk_account: (a: number) => any;
|
|
568
751
|
readonly sdk_appKey: (a: number) => number;
|
|
752
|
+
readonly sdk_createSharingKey: (a: number, b: number, c: number, d: number) => any;
|
|
569
753
|
readonly sdk_deleteObject: (a: number, b: number, c: number) => any;
|
|
570
754
|
readonly sdk_download: (a: number, b: number, c: number) => [number, number, number];
|
|
571
755
|
readonly sdk_hosts: (a: number, b: number) => any;
|
|
572
756
|
readonly sdk_object: (a: number, b: number, c: number) => any;
|
|
573
757
|
readonly sdk_objectEvents: (a: number, b: any, c: number) => any;
|
|
758
|
+
readonly sdk_objectFromShareUrl: (a: number, b: number, c: number) => any;
|
|
759
|
+
readonly sdk_objectShareUrl: (a: number, b: number, c: any) => [number, number, number, number];
|
|
574
760
|
readonly sdk_pinObject: (a: number, b: number) => any;
|
|
575
761
|
readonly sdk_pruneSlabs: (a: number) => any;
|
|
576
|
-
readonly
|
|
577
|
-
readonly
|
|
762
|
+
readonly sdk_revokeSharingKey: (a: number, b: number) => any;
|
|
763
|
+
readonly sdk_shareObject: (a: number, b: number, c: number) => any;
|
|
764
|
+
readonly sdk_sharedObjects: (a: number, b: number, c: number, d: number) => any;
|
|
765
|
+
readonly sdk_sharingKey: (a: number, b: number) => any;
|
|
766
|
+
readonly sdk_sharingKeys: (a: number, b: number, c: number) => any;
|
|
578
767
|
readonly sdk_slab: (a: number, b: number, c: number) => any;
|
|
768
|
+
readonly sdk_unshareObject: (a: number, b: number, c: number, d: number) => any;
|
|
579
769
|
readonly sdk_updateObjectMetadata: (a: number, b: number) => any;
|
|
580
770
|
readonly sdk_upload: (a: number, b: number, c: any, d: number) => any;
|
|
581
771
|
readonly sdk_uploadPacked: (a: number, b: number) => [number, number, number];
|
|
582
772
|
readonly setLogger: (a: any, b: any) => void;
|
|
773
|
+
readonly sharedsdk_connect: (a: number, b: number, c: number, d: number) => any;
|
|
774
|
+
readonly sharedsdk_download: (a: number, b: number, c: number) => [number, number, number];
|
|
775
|
+
readonly sharedsdk_hosts: (a: number, b: number) => any;
|
|
776
|
+
readonly sharedsdk_object: (a: number, b: number, c: number) => any;
|
|
777
|
+
readonly sharedsdk_objects: (a: number, b: number, c: number) => any;
|
|
778
|
+
readonly sharedsdk_stats: (a: number) => any;
|
|
779
|
+
readonly sharingkey_fromSeed: (a: number, b: number) => [number, number, number];
|
|
780
|
+
readonly sharingkey_publicKey: (a: number) => [number, number];
|
|
781
|
+
readonly sharingkey_seed: (a: number) => [number, number];
|
|
583
782
|
readonly validateRecoveryPhrase: (a: number, b: number) => [number, number];
|
|
783
|
+
readonly __wbg_sharingkey_free: (a: number, b: number) => void;
|
|
584
784
|
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
585
785
|
readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
586
786
|
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
@@ -594,13 +794,13 @@ export interface InitOutput {
|
|
|
594
794
|
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
595
795
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
596
796
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
597
|
-
readonly
|
|
598
|
-
readonly
|
|
599
|
-
readonly
|
|
600
|
-
readonly
|
|
601
|
-
readonly
|
|
602
|
-
readonly
|
|
603
|
-
readonly
|
|
797
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___wasm_bindgen_baa1b51bcdcd1a91___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_baa1b51bcdcd1a91___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
798
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___wasm_bindgen_baa1b51bcdcd1a91___sys__Undefined__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_baa1b51bcdcd1a91___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
799
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___wasm_bindgen_baa1b51bcdcd1a91___sys__Undefined__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_baa1b51bcdcd1a91___JsError___true__3: (a: number, b: number, c: any) => [number, number];
|
|
800
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___wasm_bindgen_baa1b51bcdcd1a91___sys__Undefined__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_baa1b51bcdcd1a91___JsError___true__4: (a: number, b: number, c: any) => [number, number];
|
|
801
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___js_sys_bdd470c3fe1f6d69___Function_fn_wasm_bindgen_baa1b51bcdcd1a91___JsValue_____wasm_bindgen_baa1b51bcdcd1a91___sys__Undefined___js_sys_bdd470c3fe1f6d69___Function_fn_wasm_bindgen_baa1b51bcdcd1a91___JsValue_____wasm_bindgen_baa1b51bcdcd1a91___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
802
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke___wasm_bindgen_baa1b51bcdcd1a91___JsValue______true_: (a: number, b: number, c: any) => void;
|
|
803
|
+
readonly wasm_bindgen_baa1b51bcdcd1a91___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
604
804
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
605
805
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
606
806
|
readonly __wbindgen_exn_store: (a: number) => void;
|