@lat-murmeldjur/weeb_3 0.0.319002 → 0.0.320001
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 +10 -4
- package/package.json +1 -1
- package/weeb_3.d.ts +42 -35
- package/weeb_3.js +347 -332
- package/weeb_3_bg.wasm +0 -0
- package/weeb_3_bg.wasm.d.ts +37 -34
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ await init();
|
|
|
45
45
|
const weeb3node = new Weeb3No103();
|
|
46
46
|
|
|
47
47
|
// Use the built-in mainnet profile and browser-dialable bootnodes.
|
|
48
|
-
|
|
48
|
+
weeb3node.start();
|
|
49
49
|
console.log(await weeb3node.networkState());
|
|
50
50
|
|
|
51
51
|
// Switch explicitly between the built-in profiles.
|
|
@@ -58,9 +58,15 @@ await weeb3node.switchNetwork("testnet");
|
|
|
58
58
|
await weeb3node.switchNetwork("mainnet");
|
|
59
59
|
|
|
60
60
|
// Or start with explicit browser-dialable bootnodes.
|
|
61
|
-
weeb3node.start(
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
weeb3node.start({
|
|
62
|
+
networkId: "1",
|
|
63
|
+
bootstrapNodes: [
|
|
64
|
+
new BootstrapNode("/ip4/example/tcp/443/wss/p2p/examplePeerId", true),
|
|
65
|
+
],
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Or start with the built-in testnet profile.
|
|
69
|
+
weeb3node.start({ testnet: true });
|
|
64
70
|
|
|
65
71
|
const ready = await weeb3node.ready(1, 20_000);
|
|
66
72
|
```
|
package/package.json
CHANGED
package/weeb_3.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export class Weeb3No103 {
|
|
|
69
69
|
networkState(): Promise<object>;
|
|
70
70
|
network_state(): Promise<object>;
|
|
71
71
|
constructor();
|
|
72
|
+
openSecureVault(): object;
|
|
73
|
+
open_secure_vault(): object;
|
|
72
74
|
postFeedBytes(topic: string, bytes: Uint8Array, mime: string, filename: string, encryption: boolean): Promise<object>;
|
|
73
75
|
postPushChunk(data: Uint8Array, soc: boolean, chunk_address: Uint8Array, stamp: Uint8Array): Promise<string>;
|
|
74
76
|
postUploadBytes(bytes: Uint8Array, mime: string, filename: string, encryption: boolean, add_to_feed: boolean, feed_topic: string): Promise<object>;
|
|
@@ -90,7 +92,7 @@ export class Weeb3No103 {
|
|
|
90
92
|
retrieveChunk(address: string): Promise<Uint8Array>;
|
|
91
93
|
retrieve_bytes(address: string): Promise<Uint8Array>;
|
|
92
94
|
retrieve_chunk(address: string): Promise<Uint8Array>;
|
|
93
|
-
start(
|
|
95
|
+
start(options?: any | null): void;
|
|
94
96
|
switchMainnet(): Promise<object>;
|
|
95
97
|
switchNetwork(mode: string): Promise<object>;
|
|
96
98
|
switchTestnet(): Promise<object>;
|
|
@@ -108,12 +110,36 @@ export class Wings {
|
|
|
108
110
|
[Symbol.dispose](): void;
|
|
109
111
|
}
|
|
110
112
|
|
|
113
|
+
export function init_wasm_runtime(): void;
|
|
114
|
+
|
|
111
115
|
export function interweeb(_st: string): Promise<void>;
|
|
112
116
|
|
|
113
117
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
114
118
|
|
|
115
119
|
export interface InitOutput {
|
|
116
120
|
readonly memory: WebAssembly.Memory;
|
|
121
|
+
readonly __wbg_weeb3_free: (a: number, b: number) => void;
|
|
122
|
+
readonly __wbg_wings_free: (a: number, b: number) => void;
|
|
123
|
+
readonly weeb3_acquire: (a: number, b: number, c: number) => any;
|
|
124
|
+
readonly weeb3_acquire_feed: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
125
|
+
readonly weeb3_change_bootnode_address: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
126
|
+
readonly weeb3_get_connections: (a: number) => any;
|
|
127
|
+
readonly weeb3_get_current_logs: (a: number) => any;
|
|
128
|
+
readonly weeb3_get_network_id: (a: number) => any;
|
|
129
|
+
readonly weeb3_get_ongoing_connections: (a: number) => any;
|
|
130
|
+
readonly weeb3_interface_log: (a: number, b: number, c: number) => void;
|
|
131
|
+
readonly weeb3_new: (a: number, b: number) => number;
|
|
132
|
+
readonly weeb3_post_push_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
133
|
+
readonly weeb3_post_upload: (a: number, b: any, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
134
|
+
readonly weeb3_reset_stamp: (a: number) => any;
|
|
135
|
+
readonly weeb3_retrieve_bytes: (a: number, b: number, c: number) => any;
|
|
136
|
+
readonly weeb3_retrieve_chunk_bytes: (a: number, b: number, c: number) => any;
|
|
137
|
+
readonly weeb3_run: (a: number, b: number, c: number) => any;
|
|
138
|
+
readonly weeb3_set_network_id: (a: number, b: number, c: number) => any;
|
|
139
|
+
readonly weeb3_toggle_transfer_pause: (a: number) => any;
|
|
140
|
+
readonly weeb3_transfer_paused: (a: number) => number;
|
|
141
|
+
readonly init_wasm_runtime: () => void;
|
|
142
|
+
readonly interweeb: (a: number, b: number) => any;
|
|
117
143
|
readonly __wbg_bootstrapnode_free: (a: number, b: number) => void;
|
|
118
144
|
readonly __wbg_weeb3no103_free: (a: number, b: number) => void;
|
|
119
145
|
readonly bootstrapnode_multiaddr: (a: number) => [number, number];
|
|
@@ -143,6 +169,7 @@ export interface InitOutput {
|
|
|
143
169
|
readonly weeb3no103_networkState: (a: number) => any;
|
|
144
170
|
readonly weeb3no103_network_state: (a: number) => any;
|
|
145
171
|
readonly weeb3no103_new: () => number;
|
|
172
|
+
readonly weeb3no103_openSecureVault: (a: number) => any;
|
|
146
173
|
readonly weeb3no103_postFeedBytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => any;
|
|
147
174
|
readonly weeb3no103_postPushChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
148
175
|
readonly weeb3no103_postUploadBytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
@@ -164,7 +191,7 @@ export interface InitOutput {
|
|
|
164
191
|
readonly weeb3no103_retrieveChunk: (a: number, b: number, c: number) => any;
|
|
165
192
|
readonly weeb3no103_retrieve_bytes: (a: number, b: number, c: number) => any;
|
|
166
193
|
readonly weeb3no103_retrieve_chunk: (a: number, b: number, c: number) => any;
|
|
167
|
-
readonly weeb3no103_start: (a: number, b: number
|
|
194
|
+
readonly weeb3no103_start: (a: number, b: number) => void;
|
|
168
195
|
readonly weeb3no103_switchMainnet: (a: number) => any;
|
|
169
196
|
readonly weeb3no103_switchNetwork: (a: number, b: number, c: number) => any;
|
|
170
197
|
readonly weeb3no103_switchTestnet: (a: number) => any;
|
|
@@ -174,50 +201,30 @@ export interface InitOutput {
|
|
|
174
201
|
readonly weeb3no103_upload: (a: number, b: any, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
175
202
|
readonly weeb3no103_uploadPrerequisites: (a: number, b: number, c: number) => any;
|
|
176
203
|
readonly weeb3no103_upload_prerequisites: (a: number, b: number, c: number) => any;
|
|
204
|
+
readonly weeb3no103_open_secure_vault: (a: number) => any;
|
|
177
205
|
readonly weeb3no103_feed_topic: (a: number, b: number, c: number) => any;
|
|
178
|
-
readonly interweeb: (a: number, b: number) => any;
|
|
179
|
-
readonly __wbg_weeb3_free: (a: number, b: number) => void;
|
|
180
|
-
readonly __wbg_wings_free: (a: number, b: number) => void;
|
|
181
|
-
readonly weeb3_acquire: (a: number, b: number, c: number) => any;
|
|
182
|
-
readonly weeb3_acquire_feed: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
183
|
-
readonly weeb3_change_bootnode_address: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
184
|
-
readonly weeb3_get_connections: (a: number) => any;
|
|
185
|
-
readonly weeb3_get_current_logs: (a: number) => any;
|
|
186
|
-
readonly weeb3_get_network_id: (a: number) => any;
|
|
187
|
-
readonly weeb3_get_ongoing_connections: (a: number) => any;
|
|
188
|
-
readonly weeb3_interface_log: (a: number, b: number, c: number) => void;
|
|
189
|
-
readonly weeb3_new: (a: number, b: number) => number;
|
|
190
|
-
readonly weeb3_post_push_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
191
|
-
readonly weeb3_post_upload: (a: number, b: any, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
192
|
-
readonly weeb3_reset_stamp: (a: number) => any;
|
|
193
|
-
readonly weeb3_retrieve_bytes: (a: number, b: number, c: number) => any;
|
|
194
|
-
readonly weeb3_retrieve_chunk_bytes: (a: number, b: number, c: number) => any;
|
|
195
|
-
readonly weeb3_run: (a: number, b: number, c: number) => any;
|
|
196
|
-
readonly weeb3_set_network_id: (a: number, b: number, c: number) => any;
|
|
197
|
-
readonly weeb3_toggle_transfer_pause: (a: number) => any;
|
|
198
|
-
readonly weeb3_transfer_paused: (a: number) => number;
|
|
199
206
|
readonly __wbg_requestarguments_free: (a: number, b: number) => void;
|
|
200
207
|
readonly requestarguments_method: (a: number) => [number, number];
|
|
201
208
|
readonly requestarguments_params: (a: number) => any;
|
|
202
|
-
readonly
|
|
203
|
-
readonly
|
|
204
|
-
readonly
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
-
readonly
|
|
209
|
-
readonly
|
|
210
|
-
readonly
|
|
211
|
-
readonly
|
|
212
|
-
readonly
|
|
209
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc61cf82ed5539fc0: (a: number, b: number, c: any) => [number, number];
|
|
210
|
+
readonly wasm_bindgen__convert__closures_____invoke__ha3ccbd176587943b: (a: number, b: number, c: any) => [number, number];
|
|
211
|
+
readonly wasm_bindgen__convert__closures_____invoke__h23d607816848205c: (a: number, b: number, c: any, d: any) => void;
|
|
212
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2ba9a57baa99e61c: (a: number, b: number, c: any) => void;
|
|
213
|
+
readonly wasm_bindgen__convert__closures_____invoke__h06a9db7efe4e0c03: (a: number, b: number, c: any) => void;
|
|
214
|
+
readonly wasm_bindgen__convert__closures_____invoke__hce4d7bcafefc2486: (a: number, b: number, c: any) => void;
|
|
215
|
+
readonly wasm_bindgen__convert__closures_____invoke__h06a9db7efe4e0c03_4: (a: number, b: number, c: any) => void;
|
|
216
|
+
readonly wasm_bindgen__convert__closures_____invoke__h06a9db7efe4e0c03_6: (a: number, b: number, c: any) => void;
|
|
217
|
+
readonly wasm_bindgen__convert__closures_____invoke__h376be826f7c7dcad: (a: number, b: number) => void;
|
|
218
|
+
readonly wasm_bindgen__convert__closures_____invoke__hce415dd57ff2f6ce: (a: number, b: number) => void;
|
|
219
|
+
readonly wasm_bindgen__convert__closures_____invoke__h6da4d6df0f6bffeb: (a: number, b: number) => void;
|
|
213
220
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
214
221
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
215
222
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
216
223
|
readonly __externref_table_alloc: () => number;
|
|
217
224
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
225
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
218
226
|
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
219
227
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
220
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
221
228
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
222
229
|
readonly __wbindgen_start: () => void;
|
|
223
230
|
}
|