phirepass-channel 0.1.238 → 0.1.239
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/package.json +1 -1
- package/phirepass-channel.d.ts +5 -1
- package/phirepass-channel.js +50 -6
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ export class Channel {
|
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
authenticate(token: string, node_id: string, msg_id?: number | null): void;
|
|
8
8
|
connect(): void;
|
|
9
|
+
disable_service(node_id: string, kind: string, host: string, port: number, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
9
10
|
disconnect(): void;
|
|
11
|
+
enable_service(node_id: string, kind: string, host: string, port: number, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
10
12
|
is_connected(): boolean;
|
|
11
13
|
is_disconnected(): boolean;
|
|
12
14
|
constructor(endpoint: string, node_id: string, server_id?: string | null);
|
|
@@ -51,7 +53,9 @@ export interface InitOutput {
|
|
|
51
53
|
readonly __wbg_channel_free: (a: number, b: number) => void;
|
|
52
54
|
readonly channel_authenticate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
53
55
|
readonly channel_connect: (a: number) => void;
|
|
56
|
+
readonly channel_disable_service: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
54
57
|
readonly channel_disconnect: (a: number) => void;
|
|
58
|
+
readonly channel_enable_service: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
55
59
|
readonly channel_is_connected: (a: number) => number;
|
|
56
60
|
readonly channel_is_disconnected: (a: number) => number;
|
|
57
61
|
readonly channel_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
@@ -76,7 +80,7 @@ export interface InitOutput {
|
|
|
76
80
|
readonly __wasm_bindgen_func_elem_40: (a: number, b: number, c: number) => void;
|
|
77
81
|
readonly __wasm_bindgen_func_elem_40_1: (a: number, b: number, c: number) => void;
|
|
78
82
|
readonly __wasm_bindgen_func_elem_40_2: (a: number, b: number, c: number) => void;
|
|
79
|
-
readonly
|
|
83
|
+
readonly __wasm_bindgen_func_elem_44: (a: number, b: number) => void;
|
|
80
84
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
81
85
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
82
86
|
readonly __wbindgen_export3: (a: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -26,9 +26,53 @@ export class Channel {
|
|
|
26
26
|
connect() {
|
|
27
27
|
wasm.channel_connect(this.__wbg_ptr);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} node_id
|
|
31
|
+
* @param {string} kind
|
|
32
|
+
* @param {string} host
|
|
33
|
+
* @param {number} port
|
|
34
|
+
* @param {string | null} [username]
|
|
35
|
+
* @param {string | null} [password]
|
|
36
|
+
* @param {number | null} [msg_id]
|
|
37
|
+
*/
|
|
38
|
+
disable_service(node_id, kind, host, port, username, password, msg_id) {
|
|
39
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
40
|
+
const len0 = WASM_VECTOR_LEN;
|
|
41
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
42
|
+
const len1 = WASM_VECTOR_LEN;
|
|
43
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
44
|
+
const len2 = WASM_VECTOR_LEN;
|
|
45
|
+
var ptr3 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
46
|
+
var len3 = WASM_VECTOR_LEN;
|
|
47
|
+
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
|
+
var len4 = WASM_VECTOR_LEN;
|
|
49
|
+
wasm.channel_disable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
50
|
+
}
|
|
29
51
|
disconnect() {
|
|
30
52
|
wasm.channel_disconnect(this.__wbg_ptr);
|
|
31
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} node_id
|
|
56
|
+
* @param {string} kind
|
|
57
|
+
* @param {string} host
|
|
58
|
+
* @param {number} port
|
|
59
|
+
* @param {string | null} [username]
|
|
60
|
+
* @param {string | null} [password]
|
|
61
|
+
* @param {number | null} [msg_id]
|
|
62
|
+
*/
|
|
63
|
+
enable_service(node_id, kind, host, port, username, password, msg_id) {
|
|
64
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
65
|
+
const len0 = WASM_VECTOR_LEN;
|
|
66
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
|
+
const len1 = WASM_VECTOR_LEN;
|
|
68
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
69
|
+
const len2 = WASM_VECTOR_LEN;
|
|
70
|
+
var ptr3 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
71
|
+
var len3 = WASM_VECTOR_LEN;
|
|
72
|
+
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
73
|
+
var len4 = WASM_VECTOR_LEN;
|
|
74
|
+
wasm.channel_enable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
75
|
+
}
|
|
32
76
|
/**
|
|
33
77
|
* @returns {boolean}
|
|
34
78
|
*/
|
|
@@ -344,7 +388,7 @@ function __wbg_get_imports() {
|
|
|
344
388
|
const ret = Array.from(getObject(arg0));
|
|
345
389
|
return addHeapObject(ret);
|
|
346
390
|
},
|
|
347
|
-
|
|
391
|
+
__wbg_info_e981ac5a3a823282: function(arg0, arg1) {
|
|
348
392
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
349
393
|
},
|
|
350
394
|
__wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {
|
|
@@ -416,7 +460,7 @@ function __wbg_get_imports() {
|
|
|
416
460
|
__wbg_set_onopen_6f3fc5e2ad3144f1: function(arg0, arg1) {
|
|
417
461
|
getObject(arg0).onopen = getObject(arg1);
|
|
418
462
|
},
|
|
419
|
-
|
|
463
|
+
__wbg_warn_88b0b8569df852e5: function(arg0, arg1) {
|
|
420
464
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
421
465
|
},
|
|
422
466
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
@@ -435,8 +479,8 @@ function __wbg_get_imports() {
|
|
|
435
479
|
return addHeapObject(ret);
|
|
436
480
|
},
|
|
437
481
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
438
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
439
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
482
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
483
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44);
|
|
440
484
|
return addHeapObject(ret);
|
|
441
485
|
},
|
|
442
486
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -473,8 +517,8 @@ function __wbg_get_imports() {
|
|
|
473
517
|
};
|
|
474
518
|
}
|
|
475
519
|
|
|
476
|
-
function
|
|
477
|
-
wasm.
|
|
520
|
+
function __wasm_bindgen_func_elem_44(arg0, arg1) {
|
|
521
|
+
wasm.__wasm_bindgen_func_elem_44(arg0, arg1);
|
|
478
522
|
}
|
|
479
523
|
|
|
480
524
|
function __wasm_bindgen_func_elem_40(arg0, arg1, arg2) {
|
|
Binary file
|