@bitwarden/sdk-internal 0.2.0-main.135 → 0.2.0-main.137
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/VERSION +1 -1
- package/bitwarden_wasm_internal.d.ts +35 -15
- package/bitwarden_wasm_internal_bg.js +347 -33
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +44 -9
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +35 -15
- package/node/bitwarden_wasm_internal.js +349 -33
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +44 -9
- package/package.json +1 -1
|
@@ -295,17 +295,6 @@ export type Endpoint =
|
|
|
295
295
|
| "DesktopRenderer"
|
|
296
296
|
| "DesktopMain";
|
|
297
297
|
|
|
298
|
-
export interface OutgoingMessage {
|
|
299
|
-
data: number[];
|
|
300
|
-
destination: Endpoint;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface IncomingMessage {
|
|
304
|
-
data: number[];
|
|
305
|
-
destination: Endpoint;
|
|
306
|
-
source: Endpoint;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
298
|
export interface CommunicationBackend {
|
|
310
299
|
send(message: OutgoingMessage): Promise<void>;
|
|
311
300
|
receive(): Promise<IncomingMessage>;
|
|
@@ -894,12 +883,42 @@ export class CryptoClient {
|
|
|
894
883
|
*/
|
|
895
884
|
verify_asymmetric_keys(request: VerifyAsymmetricKeysRequest): VerifyAsymmetricKeysResponse;
|
|
896
885
|
}
|
|
886
|
+
export class IncomingMessage {
|
|
887
|
+
free(): void;
|
|
888
|
+
constructor(payload: Uint8Array, destination: Endpoint, source: Endpoint, topic?: string | null);
|
|
889
|
+
/**
|
|
890
|
+
* Try to parse the payload as JSON.
|
|
891
|
+
* @returns The parsed JSON value, or undefined if the payload is not valid JSON.
|
|
892
|
+
*/
|
|
893
|
+
parse_payload_as_json(): any;
|
|
894
|
+
payload: Uint8Array;
|
|
895
|
+
destination: Endpoint;
|
|
896
|
+
source: Endpoint;
|
|
897
|
+
get topic(): string | undefined;
|
|
898
|
+
set topic(value: string | null | undefined);
|
|
899
|
+
}
|
|
897
900
|
export class IpcClient {
|
|
898
901
|
free(): void;
|
|
899
902
|
constructor(communication_provider: CommunicationBackend);
|
|
900
903
|
send(message: OutgoingMessage): Promise<void>;
|
|
901
904
|
receive(): Promise<IncomingMessage>;
|
|
902
905
|
}
|
|
906
|
+
export class OutgoingMessage {
|
|
907
|
+
free(): void;
|
|
908
|
+
constructor(payload: Uint8Array, destination: Endpoint, topic?: string | null);
|
|
909
|
+
/**
|
|
910
|
+
* Create a new message and encode the payload as JSON.
|
|
911
|
+
*/
|
|
912
|
+
static new_json_payload(
|
|
913
|
+
payload: any,
|
|
914
|
+
destination: Endpoint,
|
|
915
|
+
topic?: string | null,
|
|
916
|
+
): OutgoingMessage;
|
|
917
|
+
payload: Uint8Array;
|
|
918
|
+
destination: Endpoint;
|
|
919
|
+
get topic(): string | undefined;
|
|
920
|
+
set topic(value: string | null | undefined);
|
|
921
|
+
}
|
|
903
922
|
/**
|
|
904
923
|
* This module represents a stopgap solution to provide access to primitive crypto functions for JS
|
|
905
924
|
* clients. It is not intended to be used outside of the JS clients and this pattern should not be
|
|
@@ -918,14 +937,15 @@ export class PureCrypto {
|
|
|
918
937
|
export class ReceiveError {
|
|
919
938
|
private constructor();
|
|
920
939
|
free(): void;
|
|
921
|
-
|
|
922
|
-
|
|
940
|
+
timeout: boolean;
|
|
941
|
+
crypto: any;
|
|
942
|
+
communication: any;
|
|
923
943
|
}
|
|
924
944
|
export class SendError {
|
|
925
945
|
private constructor();
|
|
926
946
|
free(): void;
|
|
927
|
-
|
|
928
|
-
|
|
947
|
+
crypto: any;
|
|
948
|
+
communication: any;
|
|
929
949
|
}
|
|
930
950
|
export class VaultClient {
|
|
931
951
|
private constructor();
|
|
@@ -266,6 +266,23 @@ module.exports.isCryptoError = function (error) {
|
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
270
|
+
ptr = ptr >>> 0;
|
|
271
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
275
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
276
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
277
|
+
WASM_VECTOR_LEN = arg.length;
|
|
278
|
+
return ptr;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function _assertClass(instance, klass) {
|
|
282
|
+
if (!(instance instanceof klass)) {
|
|
283
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
269
286
|
/**
|
|
270
287
|
* @param {any} error
|
|
271
288
|
* @returns {boolean}
|
|
@@ -397,17 +414,6 @@ module.exports.init_sdk = function (log_level) {
|
|
|
397
414
|
wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
|
|
398
415
|
};
|
|
399
416
|
|
|
400
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
401
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
402
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
403
|
-
WASM_VECTOR_LEN = arg.length;
|
|
404
|
-
return ptr;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
408
|
-
ptr = ptr >>> 0;
|
|
409
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
410
|
-
}
|
|
411
417
|
/**
|
|
412
418
|
* Generate a new SSH key pair
|
|
413
419
|
*
|
|
@@ -516,7 +522,7 @@ function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
|
516
522
|
);
|
|
517
523
|
}
|
|
518
524
|
|
|
519
|
-
function
|
|
525
|
+
function __wbg_adapter_215(arg0, arg1, arg2, arg3) {
|
|
520
526
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
|
|
521
527
|
arg0,
|
|
522
528
|
arg1,
|
|
@@ -1147,6 +1153,146 @@ class CryptoClient {
|
|
|
1147
1153
|
}
|
|
1148
1154
|
module.exports.CryptoClient = CryptoClient;
|
|
1149
1155
|
|
|
1156
|
+
const IncomingMessageFinalization =
|
|
1157
|
+
typeof FinalizationRegistry === "undefined"
|
|
1158
|
+
? { register: () => {}, unregister: () => {} }
|
|
1159
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_incomingmessage_free(ptr >>> 0, 1));
|
|
1160
|
+
|
|
1161
|
+
class IncomingMessage {
|
|
1162
|
+
static __wrap(ptr) {
|
|
1163
|
+
ptr = ptr >>> 0;
|
|
1164
|
+
const obj = Object.create(IncomingMessage.prototype);
|
|
1165
|
+
obj.__wbg_ptr = ptr;
|
|
1166
|
+
IncomingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1167
|
+
return obj;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
__destroy_into_raw() {
|
|
1171
|
+
const ptr = this.__wbg_ptr;
|
|
1172
|
+
this.__wbg_ptr = 0;
|
|
1173
|
+
IncomingMessageFinalization.unregister(this);
|
|
1174
|
+
return ptr;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
free() {
|
|
1178
|
+
const ptr = this.__destroy_into_raw();
|
|
1179
|
+
wasm.__wbg_incomingmessage_free(ptr, 0);
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* @returns {Uint8Array}
|
|
1183
|
+
*/
|
|
1184
|
+
get payload() {
|
|
1185
|
+
try {
|
|
1186
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1187
|
+
wasm.__wbg_get_incomingmessage_payload(retptr, this.__wbg_ptr);
|
|
1188
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1189
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1190
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1191
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1192
|
+
return v1;
|
|
1193
|
+
} finally {
|
|
1194
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* @param {Uint8Array} arg0
|
|
1199
|
+
*/
|
|
1200
|
+
set payload(arg0) {
|
|
1201
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1202
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1203
|
+
wasm.__wbg_set_incomingmessage_payload(this.__wbg_ptr, ptr0, len0);
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @returns {Endpoint}
|
|
1207
|
+
*/
|
|
1208
|
+
get destination() {
|
|
1209
|
+
const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
|
|
1210
|
+
return takeObject(ret);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @param {Endpoint} arg0
|
|
1214
|
+
*/
|
|
1215
|
+
set destination(arg0) {
|
|
1216
|
+
wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* @returns {Endpoint}
|
|
1220
|
+
*/
|
|
1221
|
+
get source() {
|
|
1222
|
+
const ret = wasm.__wbg_get_incomingmessage_source(this.__wbg_ptr);
|
|
1223
|
+
return takeObject(ret);
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* @param {Endpoint} arg0
|
|
1227
|
+
*/
|
|
1228
|
+
set source(arg0) {
|
|
1229
|
+
wasm.__wbg_set_incomingmessage_source(this.__wbg_ptr, addHeapObject(arg0));
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* @returns {string | undefined}
|
|
1233
|
+
*/
|
|
1234
|
+
get topic() {
|
|
1235
|
+
try {
|
|
1236
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1237
|
+
wasm.__wbg_get_incomingmessage_topic(retptr, this.__wbg_ptr);
|
|
1238
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1239
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1240
|
+
let v1;
|
|
1241
|
+
if (r0 !== 0) {
|
|
1242
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1243
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1244
|
+
}
|
|
1245
|
+
return v1;
|
|
1246
|
+
} finally {
|
|
1247
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* @param {string | null} [arg0]
|
|
1252
|
+
*/
|
|
1253
|
+
set topic(arg0) {
|
|
1254
|
+
var ptr0 = isLikeNone(arg0)
|
|
1255
|
+
? 0
|
|
1256
|
+
: passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1257
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1258
|
+
wasm.__wbg_set_incomingmessage_topic(this.__wbg_ptr, ptr0, len0);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* @param {Uint8Array} payload
|
|
1262
|
+
* @param {Endpoint} destination
|
|
1263
|
+
* @param {Endpoint} source
|
|
1264
|
+
* @param {string | null} [topic]
|
|
1265
|
+
*/
|
|
1266
|
+
constructor(payload, destination, source, topic) {
|
|
1267
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
1268
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1269
|
+
var ptr1 = isLikeNone(topic)
|
|
1270
|
+
? 0
|
|
1271
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1272
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1273
|
+
const ret = wasm.incomingmessage_new(
|
|
1274
|
+
ptr0,
|
|
1275
|
+
len0,
|
|
1276
|
+
addHeapObject(destination),
|
|
1277
|
+
addHeapObject(source),
|
|
1278
|
+
ptr1,
|
|
1279
|
+
len1,
|
|
1280
|
+
);
|
|
1281
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1282
|
+
IncomingMessageFinalization.register(this, this.__wbg_ptr, this);
|
|
1283
|
+
return this;
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Try to parse the payload as JSON.
|
|
1287
|
+
* @returns {any} The parsed JSON value, or undefined if the payload is not valid JSON.
|
|
1288
|
+
*/
|
|
1289
|
+
parse_payload_as_json() {
|
|
1290
|
+
const ret = wasm.incomingmessage_parse_payload_as_json(this.__wbg_ptr);
|
|
1291
|
+
return takeObject(ret);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
module.exports.IncomingMessage = IncomingMessage;
|
|
1295
|
+
|
|
1150
1296
|
const IpcClientFinalization =
|
|
1151
1297
|
typeof FinalizationRegistry === "undefined"
|
|
1152
1298
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1178,7 +1324,9 @@ class IpcClient {
|
|
|
1178
1324
|
* @returns {Promise<void>}
|
|
1179
1325
|
*/
|
|
1180
1326
|
send(message) {
|
|
1181
|
-
|
|
1327
|
+
_assertClass(message, OutgoingMessage);
|
|
1328
|
+
var ptr0 = message.__destroy_into_raw();
|
|
1329
|
+
const ret = wasm.ipcclient_send(this.__wbg_ptr, ptr0);
|
|
1182
1330
|
return takeObject(ret);
|
|
1183
1331
|
}
|
|
1184
1332
|
/**
|
|
@@ -1191,6 +1339,149 @@ class IpcClient {
|
|
|
1191
1339
|
}
|
|
1192
1340
|
module.exports.IpcClient = IpcClient;
|
|
1193
1341
|
|
|
1342
|
+
const OutgoingMessageFinalization =
|
|
1343
|
+
typeof FinalizationRegistry === "undefined"
|
|
1344
|
+
? { register: () => {}, unregister: () => {} }
|
|
1345
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_outgoingmessage_free(ptr >>> 0, 1));
|
|
1346
|
+
|
|
1347
|
+
class OutgoingMessage {
|
|
1348
|
+
static __wrap(ptr) {
|
|
1349
|
+
ptr = ptr >>> 0;
|
|
1350
|
+
const obj = Object.create(OutgoingMessage.prototype);
|
|
1351
|
+
obj.__wbg_ptr = ptr;
|
|
1352
|
+
OutgoingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1353
|
+
return obj;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
__destroy_into_raw() {
|
|
1357
|
+
const ptr = this.__wbg_ptr;
|
|
1358
|
+
this.__wbg_ptr = 0;
|
|
1359
|
+
OutgoingMessageFinalization.unregister(this);
|
|
1360
|
+
return ptr;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
free() {
|
|
1364
|
+
const ptr = this.__destroy_into_raw();
|
|
1365
|
+
wasm.__wbg_outgoingmessage_free(ptr, 0);
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* @returns {Uint8Array}
|
|
1369
|
+
*/
|
|
1370
|
+
get payload() {
|
|
1371
|
+
try {
|
|
1372
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1373
|
+
wasm.__wbg_get_outgoingmessage_payload(retptr, this.__wbg_ptr);
|
|
1374
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1375
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1376
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1377
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1378
|
+
return v1;
|
|
1379
|
+
} finally {
|
|
1380
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* @param {Uint8Array} arg0
|
|
1385
|
+
*/
|
|
1386
|
+
set payload(arg0) {
|
|
1387
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1388
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1389
|
+
wasm.__wbg_set_outgoingmessage_payload(this.__wbg_ptr, ptr0, len0);
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* @returns {Endpoint}
|
|
1393
|
+
*/
|
|
1394
|
+
get destination() {
|
|
1395
|
+
const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
|
|
1396
|
+
return takeObject(ret);
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* @param {Endpoint} arg0
|
|
1400
|
+
*/
|
|
1401
|
+
set destination(arg0) {
|
|
1402
|
+
wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* @returns {string | undefined}
|
|
1406
|
+
*/
|
|
1407
|
+
get topic() {
|
|
1408
|
+
try {
|
|
1409
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1410
|
+
wasm.__wbg_get_outgoingmessage_topic(retptr, this.__wbg_ptr);
|
|
1411
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1412
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1413
|
+
let v1;
|
|
1414
|
+
if (r0 !== 0) {
|
|
1415
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1416
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1417
|
+
}
|
|
1418
|
+
return v1;
|
|
1419
|
+
} finally {
|
|
1420
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* @param {string | null} [arg0]
|
|
1425
|
+
*/
|
|
1426
|
+
set topic(arg0) {
|
|
1427
|
+
var ptr0 = isLikeNone(arg0)
|
|
1428
|
+
? 0
|
|
1429
|
+
: passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1430
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1431
|
+
wasm.__wbg_set_outgoingmessage_topic(this.__wbg_ptr, ptr0, len0);
|
|
1432
|
+
}
|
|
1433
|
+
/**
|
|
1434
|
+
* @param {Uint8Array} payload
|
|
1435
|
+
* @param {Endpoint} destination
|
|
1436
|
+
* @param {string | null} [topic]
|
|
1437
|
+
*/
|
|
1438
|
+
constructor(payload, destination, topic) {
|
|
1439
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
1440
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1441
|
+
var ptr1 = isLikeNone(topic)
|
|
1442
|
+
? 0
|
|
1443
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1444
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1445
|
+
const ret = wasm.outgoingmessage_new(ptr0, len0, addHeapObject(destination), ptr1, len1);
|
|
1446
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1447
|
+
OutgoingMessageFinalization.register(this, this.__wbg_ptr, this);
|
|
1448
|
+
return this;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Create a new message and encode the payload as JSON.
|
|
1452
|
+
* @param {any} payload
|
|
1453
|
+
* @param {Endpoint} destination
|
|
1454
|
+
* @param {string | null} [topic]
|
|
1455
|
+
* @returns {OutgoingMessage}
|
|
1456
|
+
*/
|
|
1457
|
+
static new_json_payload(payload, destination, topic) {
|
|
1458
|
+
try {
|
|
1459
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1460
|
+
var ptr0 = isLikeNone(topic)
|
|
1461
|
+
? 0
|
|
1462
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1463
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1464
|
+
wasm.outgoingmessage_new_json_payload(
|
|
1465
|
+
retptr,
|
|
1466
|
+
addHeapObject(payload),
|
|
1467
|
+
addHeapObject(destination),
|
|
1468
|
+
ptr0,
|
|
1469
|
+
len0,
|
|
1470
|
+
);
|
|
1471
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1472
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1473
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1474
|
+
if (r2) {
|
|
1475
|
+
throw takeObject(r1);
|
|
1476
|
+
}
|
|
1477
|
+
return OutgoingMessage.__wrap(r0);
|
|
1478
|
+
} finally {
|
|
1479
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
module.exports.OutgoingMessage = OutgoingMessage;
|
|
1484
|
+
|
|
1194
1485
|
const PureCryptoFinalization =
|
|
1195
1486
|
typeof FinalizationRegistry === "undefined"
|
|
1196
1487
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1390,31 +1681,44 @@ class ReceiveError {
|
|
|
1390
1681
|
const ptr = this.__destroy_into_raw();
|
|
1391
1682
|
wasm.__wbg_receiveerror_free(ptr, 0);
|
|
1392
1683
|
}
|
|
1684
|
+
/**
|
|
1685
|
+
* @returns {boolean}
|
|
1686
|
+
*/
|
|
1687
|
+
get timeout() {
|
|
1688
|
+
const ret = wasm.__wbg_get_receiveerror_timeout(this.__wbg_ptr);
|
|
1689
|
+
return ret !== 0;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* @param {boolean} arg0
|
|
1693
|
+
*/
|
|
1694
|
+
set timeout(arg0) {
|
|
1695
|
+
wasm.__wbg_set_receiveerror_timeout(this.__wbg_ptr, arg0);
|
|
1696
|
+
}
|
|
1393
1697
|
/**
|
|
1394
1698
|
* @returns {any}
|
|
1395
1699
|
*/
|
|
1396
|
-
get
|
|
1397
|
-
const ret = wasm.
|
|
1700
|
+
get crypto() {
|
|
1701
|
+
const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
|
|
1398
1702
|
return takeObject(ret);
|
|
1399
1703
|
}
|
|
1400
1704
|
/**
|
|
1401
1705
|
* @param {any} arg0
|
|
1402
1706
|
*/
|
|
1403
|
-
set
|
|
1404
|
-
wasm.
|
|
1707
|
+
set crypto(arg0) {
|
|
1708
|
+
wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
|
|
1405
1709
|
}
|
|
1406
1710
|
/**
|
|
1407
1711
|
* @returns {any}
|
|
1408
1712
|
*/
|
|
1409
|
-
get
|
|
1410
|
-
const ret = wasm.
|
|
1713
|
+
get communication() {
|
|
1714
|
+
const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
|
|
1411
1715
|
return takeObject(ret);
|
|
1412
1716
|
}
|
|
1413
1717
|
/**
|
|
1414
1718
|
* @param {any} arg0
|
|
1415
1719
|
*/
|
|
1416
|
-
set
|
|
1417
|
-
wasm.
|
|
1720
|
+
set communication(arg0) {
|
|
1721
|
+
wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
|
|
1418
1722
|
}
|
|
1419
1723
|
}
|
|
1420
1724
|
module.exports.ReceiveError = ReceiveError;
|
|
@@ -1447,28 +1751,28 @@ class SendError {
|
|
|
1447
1751
|
/**
|
|
1448
1752
|
* @returns {any}
|
|
1449
1753
|
*/
|
|
1450
|
-
get
|
|
1451
|
-
const ret = wasm.
|
|
1754
|
+
get crypto() {
|
|
1755
|
+
const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
|
|
1452
1756
|
return takeObject(ret);
|
|
1453
1757
|
}
|
|
1454
1758
|
/**
|
|
1455
1759
|
* @param {any} arg0
|
|
1456
1760
|
*/
|
|
1457
|
-
set
|
|
1458
|
-
wasm.
|
|
1761
|
+
set crypto(arg0) {
|
|
1762
|
+
wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
|
|
1459
1763
|
}
|
|
1460
1764
|
/**
|
|
1461
1765
|
* @returns {any}
|
|
1462
1766
|
*/
|
|
1463
|
-
get
|
|
1464
|
-
const ret = wasm.
|
|
1767
|
+
get communication() {
|
|
1768
|
+
const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
|
|
1465
1769
|
return takeObject(ret);
|
|
1466
1770
|
}
|
|
1467
1771
|
/**
|
|
1468
1772
|
* @param {any} arg0
|
|
1469
1773
|
*/
|
|
1470
|
-
set
|
|
1471
|
-
wasm.
|
|
1774
|
+
set communication(arg0) {
|
|
1775
|
+
wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
|
|
1472
1776
|
}
|
|
1473
1777
|
}
|
|
1474
1778
|
module.exports.SendError = SendError;
|
|
@@ -1666,6 +1970,11 @@ module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
|
|
|
1666
1970
|
return addHeapObject(ret);
|
|
1667
1971
|
};
|
|
1668
1972
|
|
|
1973
|
+
module.exports.__wbg_incomingmessage_new = function (arg0) {
|
|
1974
|
+
const ret = IncomingMessage.__wrap(arg0);
|
|
1975
|
+
return addHeapObject(ret);
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1669
1978
|
module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
|
|
1670
1979
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1671
1980
|
};
|
|
@@ -1767,7 +2076,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
1767
2076
|
const a = state0.a;
|
|
1768
2077
|
state0.a = 0;
|
|
1769
2078
|
try {
|
|
1770
|
-
return
|
|
2079
|
+
return __wbg_adapter_215(a, state0.b, arg0, arg1);
|
|
1771
2080
|
} finally {
|
|
1772
2081
|
state0.a = a;
|
|
1773
2082
|
}
|
|
@@ -1877,6 +2186,13 @@ module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
|
|
1877
2186
|
return addHeapObject(ret);
|
|
1878
2187
|
};
|
|
1879
2188
|
|
|
2189
|
+
module.exports.__wbg_parse_def2e24ef1252aff = function () {
|
|
2190
|
+
return handleError(function (arg0, arg1) {
|
|
2191
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
2192
|
+
return addHeapObject(ret);
|
|
2193
|
+
}, arguments);
|
|
2194
|
+
};
|
|
2195
|
+
|
|
1880
2196
|
module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
|
1881
2197
|
const ret = getObject(arg0).process;
|
|
1882
2198
|
return addHeapObject(ret);
|
|
@@ -1928,7 +2244,7 @@ module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
|
|
|
1928
2244
|
|
|
1929
2245
|
module.exports.__wbg_send_c9eacaae08065b18 = function () {
|
|
1930
2246
|
return handleError(function (arg0, arg1) {
|
|
1931
|
-
const ret = getObject(arg0).send(
|
|
2247
|
+
const ret = getObject(arg0).send(OutgoingMessage.__wrap(arg1));
|
|
1932
2248
|
return addHeapObject(ret);
|
|
1933
2249
|
}, arguments);
|
|
1934
2250
|
};
|
|
@@ -2129,8 +2445,8 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
2129
2445
|
return ret;
|
|
2130
2446
|
};
|
|
2131
2447
|
|
|
2132
|
-
module.exports.
|
|
2133
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2448
|
+
module.exports.__wbindgen_closure_wrapper2552 = function (arg0, arg1, arg2) {
|
|
2449
|
+
const ret = makeMutClosure(arg0, arg1, 634, __wbg_adapter_50);
|
|
2134
2450
|
return addHeapObject(ret);
|
|
2135
2451
|
};
|
|
2136
2452
|
|
|
Binary file
|
|
@@ -3,21 +3,56 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const isEncryptionSettingsError: (a: number) => number;
|
|
5
5
|
export const isCryptoError: (a: number) => number;
|
|
6
|
+
export const __wbg_outgoingmessage_free: (a: number, b: number) => void;
|
|
7
|
+
export const __wbg_get_outgoingmessage_payload: (a: number, b: number) => void;
|
|
8
|
+
export const __wbg_set_outgoingmessage_payload: (a: number, b: number, c: number) => void;
|
|
9
|
+
export const __wbg_get_outgoingmessage_topic: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_set_outgoingmessage_topic: (a: number, b: number, c: number) => void;
|
|
11
|
+
export const __wbg_incomingmessage_free: (a: number, b: number) => void;
|
|
12
|
+
export const __wbg_get_incomingmessage_payload: (a: number, b: number) => void;
|
|
13
|
+
export const __wbg_set_incomingmessage_payload: (a: number, b: number, c: number) => void;
|
|
14
|
+
export const __wbg_get_incomingmessage_destination: (a: number) => number;
|
|
15
|
+
export const __wbg_set_incomingmessage_destination: (a: number, b: number) => void;
|
|
16
|
+
export const __wbg_get_incomingmessage_source: (a: number) => number;
|
|
17
|
+
export const __wbg_set_incomingmessage_source: (a: number, b: number) => void;
|
|
18
|
+
export const __wbg_get_incomingmessage_topic: (a: number, b: number) => void;
|
|
19
|
+
export const __wbg_set_incomingmessage_topic: (a: number, b: number, c: number) => void;
|
|
20
|
+
export const __wbg_senderror_free: (a: number, b: number) => void;
|
|
6
21
|
export const __wbg_receiveerror_free: (a: number, b: number) => void;
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
22
|
+
export const __wbg_get_receiveerror_timeout: (a: number) => number;
|
|
23
|
+
export const __wbg_set_receiveerror_timeout: (a: number, b: number) => void;
|
|
24
|
+
export const __wbg_get_receiveerror_crypto: (a: number) => number;
|
|
25
|
+
export const __wbg_set_receiveerror_crypto: (a: number, b: number) => void;
|
|
26
|
+
export const __wbg_get_receiveerror_communication: (a: number) => number;
|
|
27
|
+
export const __wbg_set_receiveerror_communication: (a: number, b: number) => void;
|
|
11
28
|
export const __wbg_ipcclient_free: (a: number, b: number) => void;
|
|
12
29
|
export const ipcclient_new: (a: number) => number;
|
|
13
30
|
export const ipcclient_send: (a: number, b: number) => number;
|
|
14
31
|
export const ipcclient_receive: (a: number) => number;
|
|
32
|
+
export const outgoingmessage_new: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
33
|
+
export const outgoingmessage_new_json_payload: (
|
|
34
|
+
a: number,
|
|
35
|
+
b: number,
|
|
36
|
+
c: number,
|
|
37
|
+
d: number,
|
|
38
|
+
e: number,
|
|
39
|
+
) => void;
|
|
40
|
+
export const incomingmessage_new: (
|
|
41
|
+
a: number,
|
|
42
|
+
b: number,
|
|
43
|
+
c: number,
|
|
44
|
+
d: number,
|
|
45
|
+
e: number,
|
|
46
|
+
f: number,
|
|
47
|
+
) => number;
|
|
48
|
+
export const incomingmessage_parse_payload_as_json: (a: number) => number;
|
|
15
49
|
export const isDeserializeError: (a: number) => number;
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
50
|
+
export const __wbg_set_senderror_crypto: (a: number, b: number) => void;
|
|
51
|
+
export const __wbg_set_senderror_communication: (a: number, b: number) => void;
|
|
52
|
+
export const __wbg_get_senderror_crypto: (a: number) => number;
|
|
53
|
+
export const __wbg_get_senderror_communication: (a: number) => number;
|
|
54
|
+
export const __wbg_get_outgoingmessage_destination: (a: number) => number;
|
|
55
|
+
export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
|
|
21
56
|
export const isSshKeyExportError: (a: number) => number;
|
|
22
57
|
export const isSshKeyImportError: (a: number) => number;
|
|
23
58
|
export const isKeyGenerationError: (a: number) => number;
|