@synonymdev/pubky 0.1.16 → 0.2.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/index.cjs +97 -116
- package/index.js +1244 -0
- package/package.json +6 -3
- package/pubky.d.ts +16 -21
- package/pubky_bg.wasm +0 -0
- package/browser.js +0 -1267
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.1
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"index.cjs",
|
|
21
|
-
"
|
|
21
|
+
"index.js",
|
|
22
22
|
"pubky.d.ts",
|
|
23
23
|
"pubky_bg.wasm"
|
|
24
24
|
],
|
|
25
25
|
"main": "index.cjs",
|
|
26
|
-
"browser": "
|
|
26
|
+
"browser": "index.js",
|
|
27
27
|
"types": "pubky.d.ts",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"web",
|
|
@@ -37,5 +37,8 @@
|
|
|
37
37
|
"esmify": "^2.1.1",
|
|
38
38
|
"tape": "^5.8.1",
|
|
39
39
|
"tape-run": "^11.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"fetch-cookie": "^3.0.1"
|
|
40
43
|
}
|
|
41
44
|
}
|
package/pubky.d.ts
CHANGED
|
@@ -47,27 +47,6 @@ export class Keypair {
|
|
|
47
47
|
export class PubkyClient {
|
|
48
48
|
free(): void;
|
|
49
49
|
/**
|
|
50
|
-
*/
|
|
51
|
-
constructor();
|
|
52
|
-
/**
|
|
53
|
-
* Create a client with with configurations appropriate for local testing:
|
|
54
|
-
* - set Pkarr relays to `["http://localhost:15411/pkarr"]` instead of default relay.
|
|
55
|
-
* @returns {PubkyClient}
|
|
56
|
-
*/
|
|
57
|
-
static testnet(): PubkyClient;
|
|
58
|
-
/**
|
|
59
|
-
* Set Pkarr relays used for publishing and resolving Pkarr packets.
|
|
60
|
-
*
|
|
61
|
-
* By default, [PubkyClient] will use `["https://relay.pkarr.org"]`
|
|
62
|
-
* @param {(string)[]} relays
|
|
63
|
-
* @returns {PubkyClient}
|
|
64
|
-
*/
|
|
65
|
-
setPkarrRelays(relays: (string)[]): PubkyClient;
|
|
66
|
-
/**
|
|
67
|
-
* @returns {(string)[]}
|
|
68
|
-
*/
|
|
69
|
-
getPkarrRelays(): (string)[];
|
|
70
|
-
/**
|
|
71
50
|
* Signup to a homeserver and update Pkarr accordingly.
|
|
72
51
|
*
|
|
73
52
|
* The homeserver is a Pkarr domain name, where the TLD is a Pkarr public key
|
|
@@ -153,6 +132,22 @@ export class PubkyClient {
|
|
|
153
132
|
* @returns {Promise<Array<any>>}
|
|
154
133
|
*/
|
|
155
134
|
list(url: string, cursor?: string, reverse?: boolean, limit?: number, shallow?: boolean): Promise<Array<any>>;
|
|
135
|
+
/**
|
|
136
|
+
* Create PubkyClient with default Settings including default relays
|
|
137
|
+
*/
|
|
138
|
+
constructor();
|
|
139
|
+
/**
|
|
140
|
+
* Create a client with with configurations appropriate for local testing:
|
|
141
|
+
* - set Pkarr relays to `["http://localhost:15411/pkarr"]` instead of default relay.
|
|
142
|
+
* @returns {PubkyClient}
|
|
143
|
+
*/
|
|
144
|
+
static testnet(): PubkyClient;
|
|
145
|
+
/**
|
|
146
|
+
* @param {string} url
|
|
147
|
+
* @param {any} init
|
|
148
|
+
* @returns {Promise<Promise<any>>}
|
|
149
|
+
*/
|
|
150
|
+
fetch(url: string, init: any): Promise<Promise<any>>;
|
|
156
151
|
}
|
|
157
152
|
/**
|
|
158
153
|
*/
|
package/pubky_bg.wasm
CHANGED
|
Binary file
|