@synonymdev/pubky 0.1.13 → 0.1.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/browser.js +37 -6
- package/index.cjs +36 -5
- package/package.json +1 -1
- package/pubky.d.ts +7 -3
- package/pubky_bg.wasm +0 -0
package/index.cjs
CHANGED
|
@@ -313,8 +313,19 @@ class Keypair {
|
|
|
313
313
|
* @returns {Keypair}
|
|
314
314
|
*/
|
|
315
315
|
static fromSecretKey(secret_key) {
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
try {
|
|
317
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
318
|
+
wasm.keypair_fromSecretKey(retptr, addHeapObject(secret_key));
|
|
319
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
320
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
321
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
322
|
+
if (r2) {
|
|
323
|
+
throw takeObject(r1);
|
|
324
|
+
}
|
|
325
|
+
return Keypair.__wrap(r0);
|
|
326
|
+
} finally {
|
|
327
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
328
|
+
}
|
|
318
329
|
}
|
|
319
330
|
/**
|
|
320
331
|
* Returns the secret key of this keypair.
|
|
@@ -543,10 +554,14 @@ class PubkyClient {
|
|
|
543
554
|
return takeObject(ret);
|
|
544
555
|
}
|
|
545
556
|
/**
|
|
546
|
-
* Returns a list of Pubky
|
|
547
|
-
* respecting the `cursor`, `reverse` and `limit` options.
|
|
557
|
+
* Returns a list of Pubky urls (as strings).
|
|
548
558
|
*
|
|
549
|
-
* `
|
|
559
|
+
* - `url`: The Pubky url (string) to the directory you want to list its content.
|
|
560
|
+
* - `cursor`: Either a full `pubky://` Url (from previous list response),
|
|
561
|
+
* or a path (to a file or directory) relative to the `url`
|
|
562
|
+
* - `reverse`: List in reverse order
|
|
563
|
+
* - `limit` Limit the number of urls in the response
|
|
564
|
+
* - `shallow`: List directories and files, instead of flat list of files.
|
|
550
565
|
* @param {string} url
|
|
551
566
|
* @param {string | undefined} [cursor]
|
|
552
567
|
* @param {boolean | undefined} [reverse]
|
|
@@ -983,6 +998,17 @@ module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
|
|
|
983
998
|
return addHeapObject(ret);
|
|
984
999
|
};
|
|
985
1000
|
|
|
1001
|
+
module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
|
|
1002
|
+
let result;
|
|
1003
|
+
try {
|
|
1004
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1005
|
+
} catch (_) {
|
|
1006
|
+
result = false;
|
|
1007
|
+
}
|
|
1008
|
+
const ret = result;
|
|
1009
|
+
return ret;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
986
1012
|
module.exports.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
|
|
987
1013
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
988
1014
|
return addHeapObject(ret);
|
|
@@ -998,6 +1024,11 @@ module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
|
|
|
998
1024
|
return ret;
|
|
999
1025
|
};
|
|
1000
1026
|
|
|
1027
|
+
module.exports.__wbg_byteLength_58f7b4fab1919d44 = function(arg0) {
|
|
1028
|
+
const ret = getObject(arg0).byteLength;
|
|
1029
|
+
return ret;
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1001
1032
|
module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
|
|
1002
1033
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1003
1034
|
};
|
package/package.json
CHANGED
package/pubky.d.ts
CHANGED
|
@@ -118,10 +118,14 @@ export class PubkyClient {
|
|
|
118
118
|
*/
|
|
119
119
|
delete(url: string): Promise<void>;
|
|
120
120
|
/**
|
|
121
|
-
* Returns a list of Pubky
|
|
122
|
-
* respecting the `cursor`, `reverse` and `limit` options.
|
|
121
|
+
* Returns a list of Pubky urls (as strings).
|
|
123
122
|
*
|
|
124
|
-
* `
|
|
123
|
+
* - `url`: The Pubky url (string) to the directory you want to list its content.
|
|
124
|
+
* - `cursor`: Either a full `pubky://` Url (from previous list response),
|
|
125
|
+
* or a path (to a file or directory) relative to the `url`
|
|
126
|
+
* - `reverse`: List in reverse order
|
|
127
|
+
* - `limit` Limit the number of urls in the response
|
|
128
|
+
* - `shallow`: List directories and files, instead of flat list of files.
|
|
125
129
|
* @param {string} url
|
|
126
130
|
* @param {string | undefined} [cursor]
|
|
127
131
|
* @param {boolean | undefined} [reverse]
|
package/pubky_bg.wasm
CHANGED
|
Binary file
|