@synonymdev/pubky 0.4.2-rc2 → 0.4.2
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/index.cjs +47 -35
- package/index.js +51 -39
- package/package.json +2 -1
- package/pubky.d.ts +7 -1
- package/pubky_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@synonymdev/pubky",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Pubky client",
|
|
5
|
-
"version": "0.4.2
|
|
5
|
+
"version": "0.4.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"browser-resolve": "^2.0.0",
|
|
37
|
+
"browserify": "^17.0.1",
|
|
37
38
|
"esmify": "^2.1.1",
|
|
38
39
|
"tape": "^5.8.1",
|
|
39
40
|
"tape-run": "^11.0.0"
|
package/pubky.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function setLogLevel(level: string): void;
|
|
4
3
|
/**
|
|
5
4
|
* Create a recovery file of the `keypair`, containing the secret key encrypted
|
|
6
5
|
* using the `passphrase`.
|
|
@@ -11,6 +10,7 @@ export function createRecoveryFile(keypair: Keypair, passphrase: string): Uint8A
|
|
|
11
10
|
* using the `passphrase`.
|
|
12
11
|
*/
|
|
13
12
|
export function decryptRecoveryFile(recovery_file: Uint8Array, passphrase: string): Keypair;
|
|
13
|
+
export function setLogLevel(level: string): void;
|
|
14
14
|
export class AuthRequest {
|
|
15
15
|
private constructor();
|
|
16
16
|
free(): void;
|
|
@@ -67,6 +67,12 @@ export class Client {
|
|
|
67
67
|
* source of the pubkyauth request url.
|
|
68
68
|
*/
|
|
69
69
|
sendAuthToken(keypair: Keypair, pubkyauth_url: string): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Get the homeserver id for a given Pubky public key.
|
|
72
|
+
* Looks up the pkarr packet for the given public key and returns the content of the first `_pubky` SVCB record.
|
|
73
|
+
* Throws an error if no homeserver is found.
|
|
74
|
+
*/
|
|
75
|
+
getHomeserver(public_key: PublicKey): Promise<PublicKey>;
|
|
70
76
|
/**
|
|
71
77
|
* Republish the user's PKarr record pointing to their homeserver.
|
|
72
78
|
*
|
package/pubky_bg.wasm
CHANGED
|
Binary file
|