@hashiverse/hashiverse-client-wasm 1.0.6 → 1.0.7-rc2
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.
|
@@ -91,12 +91,23 @@ export class HashiverseClientWasm {
|
|
|
91
91
|
*/
|
|
92
92
|
get_post_v1(bucket_location: string, post_id: string): Promise<Post>;
|
|
93
93
|
get_skip_warnings_for_followed_v1(): Promise<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Whether there is background PoW work happening now, or within the last `within_millis`.
|
|
96
|
+
* Polled by the GUI to show/hide the "busy" indicator.
|
|
97
|
+
*/
|
|
98
|
+
is_pow_busy_v1(within_millis: number): Promise<boolean>;
|
|
94
99
|
list_stored_key_ids_v1(): Promise<string[]>;
|
|
95
100
|
logged_in(): boolean;
|
|
96
101
|
multiple_timeline_get_more_followed_hashtags(): Promise<SingleTimelineGetMoreV1Response>;
|
|
97
102
|
multiple_timeline_get_more_followed_users(): Promise<SingleTimelineGetMoreV1Response>;
|
|
98
103
|
multiple_timeline_reset(): Promise<void>;
|
|
99
104
|
post_v1(post: string): Promise<Post>;
|
|
105
|
+
/**
|
|
106
|
+
* Submit a post. With `wait_for_all_submissions == false` this returns as soon as the post
|
|
107
|
+
* secures its first User-bucket commit, finishing the remaining redundancy and secondary
|
|
108
|
+
* buckets on a background task (visible via the PoW busy indicator).
|
|
109
|
+
*/
|
|
110
|
+
post_v2(post: string, wait_for_all_submissions: boolean): Promise<Post>;
|
|
100
111
|
set_bio(nickname: string, status: string, selfie: string, avatar: string): Promise<void>;
|
|
101
112
|
set_content_thresholds_v1(thresholds: any): Promise<void>;
|
|
102
113
|
set_followed_client_id_v1(client_id: string, is_followed: boolean): Promise<void>;
|
|
@@ -201,6 +201,16 @@ export class HashiverseClientWasm {
|
|
|
201
201
|
const ret = wasm.hashiverseclientwasm_get_skip_warnings_for_followed_v1(this.__wbg_ptr);
|
|
202
202
|
return ret;
|
|
203
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Whether there is background PoW work happening now, or within the last `within_millis`.
|
|
206
|
+
* Polled by the GUI to show/hide the "busy" indicator.
|
|
207
|
+
* @param {number} within_millis
|
|
208
|
+
* @returns {Promise<boolean>}
|
|
209
|
+
*/
|
|
210
|
+
is_pow_busy_v1(within_millis) {
|
|
211
|
+
const ret = wasm.hashiverseclientwasm_is_pow_busy_v1(this.__wbg_ptr, within_millis);
|
|
212
|
+
return ret;
|
|
213
|
+
}
|
|
204
214
|
/**
|
|
205
215
|
* @returns {Promise<string[]>}
|
|
206
216
|
*/
|
|
@@ -246,6 +256,20 @@ export class HashiverseClientWasm {
|
|
|
246
256
|
const ret = wasm.hashiverseclientwasm_post_v1(this.__wbg_ptr, ptr0, len0);
|
|
247
257
|
return ret;
|
|
248
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Submit a post. With `wait_for_all_submissions == false` this returns as soon as the post
|
|
261
|
+
* secures its first User-bucket commit, finishing the remaining redundancy and secondary
|
|
262
|
+
* buckets on a background task (visible via the PoW busy indicator).
|
|
263
|
+
* @param {string} post
|
|
264
|
+
* @param {boolean} wait_for_all_submissions
|
|
265
|
+
* @returns {Promise<Post>}
|
|
266
|
+
*/
|
|
267
|
+
post_v2(post, wait_for_all_submissions) {
|
|
268
|
+
const ptr0 = passStringToWasm0(post, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
269
|
+
const len0 = WASM_VECTOR_LEN;
|
|
270
|
+
const ret = wasm.hashiverseclientwasm_post_v2(this.__wbg_ptr, ptr0, len0, wait_for_all_submissions);
|
|
271
|
+
return ret;
|
|
272
|
+
}
|
|
249
273
|
/**
|
|
250
274
|
* @param {string} nickname
|
|
251
275
|
* @param {string} status
|
|
@@ -938,7 +962,7 @@ export function __wbg_new_d8dfd33fa007511d(arg0, arg1) {
|
|
|
938
962
|
const a = state0.a;
|
|
939
963
|
state0.a = 0;
|
|
940
964
|
try {
|
|
941
|
-
return
|
|
965
|
+
return wasm_bindgen_db50852be69b0913___convert__closures_____invoke___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
942
966
|
} finally {
|
|
943
967
|
state0.a = a;
|
|
944
968
|
}
|
|
@@ -968,7 +992,7 @@ export function __wbg_new_typed_c072c4ce9a2a0cdf(arg0, arg1) {
|
|
|
968
992
|
const a = state0.a;
|
|
969
993
|
state0.a = 0;
|
|
970
994
|
try {
|
|
971
|
-
return
|
|
995
|
+
return wasm_bindgen_db50852be69b0913___convert__closures_____invoke___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
972
996
|
} finally {
|
|
973
997
|
state0.a = a;
|
|
974
998
|
}
|
|
@@ -1252,33 +1276,33 @@ export function __wbg_warn_099dd8c85568de56(arg0, arg1, arg2, arg3) {
|
|
|
1252
1276
|
console.warn(arg0, arg1, arg2, arg3);
|
|
1253
1277
|
}
|
|
1254
1278
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1255
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1256
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1279
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1244, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1280
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsError___true_);
|
|
1257
1281
|
return ret;
|
|
1258
1282
|
}
|
|
1259
1283
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1260
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1261
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1284
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 510, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1285
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue______true_);
|
|
1262
1286
|
return ret;
|
|
1263
1287
|
}
|
|
1264
1288
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1265
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
1266
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1289
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 574, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1290
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_Event__Event______true_);
|
|
1267
1291
|
return ret;
|
|
1268
1292
|
}
|
|
1269
1293
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1270
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx:
|
|
1271
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1294
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 512, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1295
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsValue___true_);
|
|
1272
1296
|
return ret;
|
|
1273
1297
|
}
|
|
1274
1298
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1275
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
1276
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1299
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1197, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1300
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_CloseEvent__CloseEvent______true_);
|
|
1277
1301
|
return ret;
|
|
1278
1302
|
}
|
|
1279
1303
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
1280
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1281
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1304
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 576, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1305
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_db50852be69b0913___convert__closures_____invoke_______true_);
|
|
1282
1306
|
return ret;
|
|
1283
1307
|
}
|
|
1284
1308
|
export function __wbindgen_cast_0000000000000007(arg0) {
|
|
@@ -1350,38 +1374,38 @@ export function __wbindgen_init_externref_table() {
|
|
|
1350
1374
|
table.set(offset + 2, true);
|
|
1351
1375
|
table.set(offset + 3, false);
|
|
1352
1376
|
}
|
|
1353
|
-
function
|
|
1354
|
-
wasm.
|
|
1377
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1378
|
+
wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1355
1379
|
}
|
|
1356
1380
|
|
|
1357
|
-
function
|
|
1358
|
-
wasm.
|
|
1381
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue______true_(arg0, arg1, arg2) {
|
|
1382
|
+
wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue______true_(arg0, arg1, arg2);
|
|
1359
1383
|
}
|
|
1360
1384
|
|
|
1361
|
-
function
|
|
1362
|
-
wasm.
|
|
1385
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_Event__Event______true_(arg0, arg1, arg2) {
|
|
1386
|
+
wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_Event__Event______true_(arg0, arg1, arg2);
|
|
1363
1387
|
}
|
|
1364
1388
|
|
|
1365
|
-
function
|
|
1366
|
-
wasm.
|
|
1389
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
|
|
1390
|
+
wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
|
|
1367
1391
|
}
|
|
1368
1392
|
|
|
1369
|
-
function
|
|
1370
|
-
const ret = wasm.
|
|
1393
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsError___true_(arg0, arg1, arg2) {
|
|
1394
|
+
const ret = wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___wasm_bindgen_db50852be69b0913___JsValue__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsError___true_(arg0, arg1, arg2);
|
|
1371
1395
|
if (ret[1]) {
|
|
1372
1396
|
throw takeFromExternrefTable0(ret[0]);
|
|
1373
1397
|
}
|
|
1374
1398
|
}
|
|
1375
1399
|
|
|
1376
|
-
function
|
|
1377
|
-
const ret = wasm.
|
|
1400
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsValue___true_(arg0, arg1, arg2) {
|
|
1401
|
+
const ret = wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___web_sys_69d5f19ef324f22c___features__gen_IdbVersionChangeEvent__IdbVersionChangeEvent__core_d6bbbae82bd85f10___result__Result_____wasm_bindgen_db50852be69b0913___JsValue___true_(arg0, arg1, arg2);
|
|
1378
1402
|
if (ret[1]) {
|
|
1379
1403
|
throw takeFromExternrefTable0(ret[0]);
|
|
1380
1404
|
}
|
|
1381
1405
|
}
|
|
1382
1406
|
|
|
1383
|
-
function
|
|
1384
|
-
wasm.
|
|
1407
|
+
function wasm_bindgen_db50852be69b0913___convert__closures_____invoke___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1408
|
+
wasm.wasm_bindgen_db50852be69b0913___convert__closures_____invoke___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined___js_sys_80e1140400bd31f3___Function_fn_wasm_bindgen_db50852be69b0913___JsValue_____wasm_bindgen_db50852be69b0913___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1385
1409
|
}
|
|
1386
1410
|
|
|
1387
1411
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"James Jardine <mail@jimme.net>"
|
|
6
6
|
],
|
|
7
7
|
"description": "This library provides the rust/wasm backend for the associated hashiverse-client-web repo.",
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.7-rc2",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|