@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 CHANGED
@@ -1 +1 @@
1
- 8f4e5211f80181b2adbb5a1af12625c53e03a0ba
1
+ f28b4efe48db42b43f2358fa9d96d0c663450abd
@@ -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
- crypto_error: any;
922
- communication_error: any;
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
- crypto_error: any;
928
- communication_error: any;
947
+ crypto: any;
948
+ communication: any;
929
949
  }
930
950
  export class VaultClient {
931
951
  private constructor();
@@ -272,6 +272,23 @@ export function isCryptoError(error) {
272
272
  }
273
273
  }
274
274
 
275
+ function getArrayU8FromWasm0(ptr, len) {
276
+ ptr = ptr >>> 0;
277
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
278
+ }
279
+
280
+ function passArray8ToWasm0(arg, malloc) {
281
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
282
+ getUint8ArrayMemory0().set(arg, ptr / 1);
283
+ WASM_VECTOR_LEN = arg.length;
284
+ return ptr;
285
+ }
286
+
287
+ function _assertClass(instance, klass) {
288
+ if (!(instance instanceof klass)) {
289
+ throw new Error(`expected instance of ${klass.name}`);
290
+ }
291
+ }
275
292
  /**
276
293
  * @param {any} error
277
294
  * @returns {boolean}
@@ -403,17 +420,6 @@ export function init_sdk(log_level) {
403
420
  wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
404
421
  }
405
422
 
406
- function passArray8ToWasm0(arg, malloc) {
407
- const ptr = malloc(arg.length * 1, 1) >>> 0;
408
- getUint8ArrayMemory0().set(arg, ptr / 1);
409
- WASM_VECTOR_LEN = arg.length;
410
- return ptr;
411
- }
412
-
413
- function getArrayU8FromWasm0(ptr, len) {
414
- ptr = ptr >>> 0;
415
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
416
- }
417
423
  /**
418
424
  * Generate a new SSH key pair
419
425
  *
@@ -522,7 +528,7 @@ function __wbg_adapter_50(arg0, arg1, arg2) {
522
528
  );
523
529
  }
524
530
 
525
- function __wbg_adapter_191(arg0, arg1, arg2, arg3) {
531
+ function __wbg_adapter_215(arg0, arg1, arg2, arg3) {
526
532
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
527
533
  arg0,
528
534
  arg1,
@@ -1148,6 +1154,145 @@ export class CryptoClient {
1148
1154
  }
1149
1155
  }
1150
1156
 
1157
+ const IncomingMessageFinalization =
1158
+ typeof FinalizationRegistry === "undefined"
1159
+ ? { register: () => {}, unregister: () => {} }
1160
+ : new FinalizationRegistry((ptr) => wasm.__wbg_incomingmessage_free(ptr >>> 0, 1));
1161
+
1162
+ export class IncomingMessage {
1163
+ static __wrap(ptr) {
1164
+ ptr = ptr >>> 0;
1165
+ const obj = Object.create(IncomingMessage.prototype);
1166
+ obj.__wbg_ptr = ptr;
1167
+ IncomingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1168
+ return obj;
1169
+ }
1170
+
1171
+ __destroy_into_raw() {
1172
+ const ptr = this.__wbg_ptr;
1173
+ this.__wbg_ptr = 0;
1174
+ IncomingMessageFinalization.unregister(this);
1175
+ return ptr;
1176
+ }
1177
+
1178
+ free() {
1179
+ const ptr = this.__destroy_into_raw();
1180
+ wasm.__wbg_incomingmessage_free(ptr, 0);
1181
+ }
1182
+ /**
1183
+ * @returns {Uint8Array}
1184
+ */
1185
+ get payload() {
1186
+ try {
1187
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1188
+ wasm.__wbg_get_incomingmessage_payload(retptr, this.__wbg_ptr);
1189
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1190
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1191
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1192
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1193
+ return v1;
1194
+ } finally {
1195
+ wasm.__wbindgen_add_to_stack_pointer(16);
1196
+ }
1197
+ }
1198
+ /**
1199
+ * @param {Uint8Array} arg0
1200
+ */
1201
+ set payload(arg0) {
1202
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
1203
+ const len0 = WASM_VECTOR_LEN;
1204
+ wasm.__wbg_set_incomingmessage_payload(this.__wbg_ptr, ptr0, len0);
1205
+ }
1206
+ /**
1207
+ * @returns {Endpoint}
1208
+ */
1209
+ get destination() {
1210
+ const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
1211
+ return takeObject(ret);
1212
+ }
1213
+ /**
1214
+ * @param {Endpoint} arg0
1215
+ */
1216
+ set destination(arg0) {
1217
+ wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
1218
+ }
1219
+ /**
1220
+ * @returns {Endpoint}
1221
+ */
1222
+ get source() {
1223
+ const ret = wasm.__wbg_get_incomingmessage_source(this.__wbg_ptr);
1224
+ return takeObject(ret);
1225
+ }
1226
+ /**
1227
+ * @param {Endpoint} arg0
1228
+ */
1229
+ set source(arg0) {
1230
+ wasm.__wbg_set_incomingmessage_source(this.__wbg_ptr, addHeapObject(arg0));
1231
+ }
1232
+ /**
1233
+ * @returns {string | undefined}
1234
+ */
1235
+ get topic() {
1236
+ try {
1237
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1238
+ wasm.__wbg_get_incomingmessage_topic(retptr, this.__wbg_ptr);
1239
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1240
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1241
+ let v1;
1242
+ if (r0 !== 0) {
1243
+ v1 = getStringFromWasm0(r0, r1).slice();
1244
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1245
+ }
1246
+ return v1;
1247
+ } finally {
1248
+ wasm.__wbindgen_add_to_stack_pointer(16);
1249
+ }
1250
+ }
1251
+ /**
1252
+ * @param {string | null} [arg0]
1253
+ */
1254
+ set topic(arg0) {
1255
+ var ptr0 = isLikeNone(arg0)
1256
+ ? 0
1257
+ : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1258
+ var len0 = WASM_VECTOR_LEN;
1259
+ wasm.__wbg_set_incomingmessage_topic(this.__wbg_ptr, ptr0, len0);
1260
+ }
1261
+ /**
1262
+ * @param {Uint8Array} payload
1263
+ * @param {Endpoint} destination
1264
+ * @param {Endpoint} source
1265
+ * @param {string | null} [topic]
1266
+ */
1267
+ constructor(payload, destination, source, topic) {
1268
+ const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
1269
+ const len0 = WASM_VECTOR_LEN;
1270
+ var ptr1 = isLikeNone(topic)
1271
+ ? 0
1272
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1273
+ var len1 = WASM_VECTOR_LEN;
1274
+ const ret = wasm.incomingmessage_new(
1275
+ ptr0,
1276
+ len0,
1277
+ addHeapObject(destination),
1278
+ addHeapObject(source),
1279
+ ptr1,
1280
+ len1,
1281
+ );
1282
+ this.__wbg_ptr = ret >>> 0;
1283
+ IncomingMessageFinalization.register(this, this.__wbg_ptr, this);
1284
+ return this;
1285
+ }
1286
+ /**
1287
+ * Try to parse the payload as JSON.
1288
+ * @returns {any} The parsed JSON value, or undefined if the payload is not valid JSON.
1289
+ */
1290
+ parse_payload_as_json() {
1291
+ const ret = wasm.incomingmessage_parse_payload_as_json(this.__wbg_ptr);
1292
+ return takeObject(ret);
1293
+ }
1294
+ }
1295
+
1151
1296
  const IpcClientFinalization =
1152
1297
  typeof FinalizationRegistry === "undefined"
1153
1298
  ? { register: () => {}, unregister: () => {} }
@@ -1179,7 +1324,9 @@ export class IpcClient {
1179
1324
  * @returns {Promise<void>}
1180
1325
  */
1181
1326
  send(message) {
1182
- const ret = wasm.ipcclient_send(this.__wbg_ptr, addHeapObject(message));
1327
+ _assertClass(message, OutgoingMessage);
1328
+ var ptr0 = message.__destroy_into_raw();
1329
+ const ret = wasm.ipcclient_send(this.__wbg_ptr, ptr0);
1183
1330
  return takeObject(ret);
1184
1331
  }
1185
1332
  /**
@@ -1191,6 +1338,148 @@ export class IpcClient {
1191
1338
  }
1192
1339
  }
1193
1340
 
1341
+ const OutgoingMessageFinalization =
1342
+ typeof FinalizationRegistry === "undefined"
1343
+ ? { register: () => {}, unregister: () => {} }
1344
+ : new FinalizationRegistry((ptr) => wasm.__wbg_outgoingmessage_free(ptr >>> 0, 1));
1345
+
1346
+ export class OutgoingMessage {
1347
+ static __wrap(ptr) {
1348
+ ptr = ptr >>> 0;
1349
+ const obj = Object.create(OutgoingMessage.prototype);
1350
+ obj.__wbg_ptr = ptr;
1351
+ OutgoingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1352
+ return obj;
1353
+ }
1354
+
1355
+ __destroy_into_raw() {
1356
+ const ptr = this.__wbg_ptr;
1357
+ this.__wbg_ptr = 0;
1358
+ OutgoingMessageFinalization.unregister(this);
1359
+ return ptr;
1360
+ }
1361
+
1362
+ free() {
1363
+ const ptr = this.__destroy_into_raw();
1364
+ wasm.__wbg_outgoingmessage_free(ptr, 0);
1365
+ }
1366
+ /**
1367
+ * @returns {Uint8Array}
1368
+ */
1369
+ get payload() {
1370
+ try {
1371
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1372
+ wasm.__wbg_get_outgoingmessage_payload(retptr, this.__wbg_ptr);
1373
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1374
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1375
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1376
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1377
+ return v1;
1378
+ } finally {
1379
+ wasm.__wbindgen_add_to_stack_pointer(16);
1380
+ }
1381
+ }
1382
+ /**
1383
+ * @param {Uint8Array} arg0
1384
+ */
1385
+ set payload(arg0) {
1386
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
1387
+ const len0 = WASM_VECTOR_LEN;
1388
+ wasm.__wbg_set_outgoingmessage_payload(this.__wbg_ptr, ptr0, len0);
1389
+ }
1390
+ /**
1391
+ * @returns {Endpoint}
1392
+ */
1393
+ get destination() {
1394
+ const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
1395
+ return takeObject(ret);
1396
+ }
1397
+ /**
1398
+ * @param {Endpoint} arg0
1399
+ */
1400
+ set destination(arg0) {
1401
+ wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
1402
+ }
1403
+ /**
1404
+ * @returns {string | undefined}
1405
+ */
1406
+ get topic() {
1407
+ try {
1408
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1409
+ wasm.__wbg_get_outgoingmessage_topic(retptr, this.__wbg_ptr);
1410
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1411
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1412
+ let v1;
1413
+ if (r0 !== 0) {
1414
+ v1 = getStringFromWasm0(r0, r1).slice();
1415
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1416
+ }
1417
+ return v1;
1418
+ } finally {
1419
+ wasm.__wbindgen_add_to_stack_pointer(16);
1420
+ }
1421
+ }
1422
+ /**
1423
+ * @param {string | null} [arg0]
1424
+ */
1425
+ set topic(arg0) {
1426
+ var ptr0 = isLikeNone(arg0)
1427
+ ? 0
1428
+ : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1429
+ var len0 = WASM_VECTOR_LEN;
1430
+ wasm.__wbg_set_outgoingmessage_topic(this.__wbg_ptr, ptr0, len0);
1431
+ }
1432
+ /**
1433
+ * @param {Uint8Array} payload
1434
+ * @param {Endpoint} destination
1435
+ * @param {string | null} [topic]
1436
+ */
1437
+ constructor(payload, destination, topic) {
1438
+ const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
1439
+ const len0 = WASM_VECTOR_LEN;
1440
+ var ptr1 = isLikeNone(topic)
1441
+ ? 0
1442
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1443
+ var len1 = WASM_VECTOR_LEN;
1444
+ const ret = wasm.outgoingmessage_new(ptr0, len0, addHeapObject(destination), ptr1, len1);
1445
+ this.__wbg_ptr = ret >>> 0;
1446
+ OutgoingMessageFinalization.register(this, this.__wbg_ptr, this);
1447
+ return this;
1448
+ }
1449
+ /**
1450
+ * Create a new message and encode the payload as JSON.
1451
+ * @param {any} payload
1452
+ * @param {Endpoint} destination
1453
+ * @param {string | null} [topic]
1454
+ * @returns {OutgoingMessage}
1455
+ */
1456
+ static new_json_payload(payload, destination, topic) {
1457
+ try {
1458
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1459
+ var ptr0 = isLikeNone(topic)
1460
+ ? 0
1461
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1462
+ var len0 = WASM_VECTOR_LEN;
1463
+ wasm.outgoingmessage_new_json_payload(
1464
+ retptr,
1465
+ addHeapObject(payload),
1466
+ addHeapObject(destination),
1467
+ ptr0,
1468
+ len0,
1469
+ );
1470
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1471
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1472
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1473
+ if (r2) {
1474
+ throw takeObject(r1);
1475
+ }
1476
+ return OutgoingMessage.__wrap(r0);
1477
+ } finally {
1478
+ wasm.__wbindgen_add_to_stack_pointer(16);
1479
+ }
1480
+ }
1481
+ }
1482
+
1194
1483
  const PureCryptoFinalization =
1195
1484
  typeof FinalizationRegistry === "undefined"
1196
1485
  ? { register: () => {}, unregister: () => {} }
@@ -1389,31 +1678,44 @@ export class ReceiveError {
1389
1678
  const ptr = this.__destroy_into_raw();
1390
1679
  wasm.__wbg_receiveerror_free(ptr, 0);
1391
1680
  }
1681
+ /**
1682
+ * @returns {boolean}
1683
+ */
1684
+ get timeout() {
1685
+ const ret = wasm.__wbg_get_receiveerror_timeout(this.__wbg_ptr);
1686
+ return ret !== 0;
1687
+ }
1688
+ /**
1689
+ * @param {boolean} arg0
1690
+ */
1691
+ set timeout(arg0) {
1692
+ wasm.__wbg_set_receiveerror_timeout(this.__wbg_ptr, arg0);
1693
+ }
1392
1694
  /**
1393
1695
  * @returns {any}
1394
1696
  */
1395
- get crypto_error() {
1396
- const ret = wasm.__wbg_get_receiveerror_crypto_error(this.__wbg_ptr);
1697
+ get crypto() {
1698
+ const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
1397
1699
  return takeObject(ret);
1398
1700
  }
1399
1701
  /**
1400
1702
  * @param {any} arg0
1401
1703
  */
1402
- set crypto_error(arg0) {
1403
- wasm.__wbg_set_receiveerror_crypto_error(this.__wbg_ptr, addHeapObject(arg0));
1704
+ set crypto(arg0) {
1705
+ wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
1404
1706
  }
1405
1707
  /**
1406
1708
  * @returns {any}
1407
1709
  */
1408
- get communication_error() {
1409
- const ret = wasm.__wbg_get_receiveerror_communication_error(this.__wbg_ptr);
1710
+ get communication() {
1711
+ const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
1410
1712
  return takeObject(ret);
1411
1713
  }
1412
1714
  /**
1413
1715
  * @param {any} arg0
1414
1716
  */
1415
- set communication_error(arg0) {
1416
- wasm.__wbg_set_receiveerror_communication_error(this.__wbg_ptr, addHeapObject(arg0));
1717
+ set communication(arg0) {
1718
+ wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
1417
1719
  }
1418
1720
  }
1419
1721
 
@@ -1445,28 +1747,28 @@ export class SendError {
1445
1747
  /**
1446
1748
  * @returns {any}
1447
1749
  */
1448
- get crypto_error() {
1449
- const ret = wasm.__wbg_get_receiveerror_crypto_error(this.__wbg_ptr);
1750
+ get crypto() {
1751
+ const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
1450
1752
  return takeObject(ret);
1451
1753
  }
1452
1754
  /**
1453
1755
  * @param {any} arg0
1454
1756
  */
1455
- set crypto_error(arg0) {
1456
- wasm.__wbg_set_receiveerror_crypto_error(this.__wbg_ptr, addHeapObject(arg0));
1757
+ set crypto(arg0) {
1758
+ wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
1457
1759
  }
1458
1760
  /**
1459
1761
  * @returns {any}
1460
1762
  */
1461
- get communication_error() {
1462
- const ret = wasm.__wbg_get_receiveerror_communication_error(this.__wbg_ptr);
1763
+ get communication() {
1764
+ const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
1463
1765
  return takeObject(ret);
1464
1766
  }
1465
1767
  /**
1466
1768
  * @param {any} arg0
1467
1769
  */
1468
- set communication_error(arg0) {
1469
- wasm.__wbg_set_receiveerror_communication_error(this.__wbg_ptr, addHeapObject(arg0));
1770
+ set communication(arg0) {
1771
+ wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
1470
1772
  }
1471
1773
  }
1472
1774
 
@@ -1662,6 +1964,11 @@ export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
1662
1964
  return addHeapObject(ret);
1663
1965
  }
1664
1966
 
1967
+ export function __wbg_incomingmessage_new(arg0) {
1968
+ const ret = IncomingMessage.__wrap(arg0);
1969
+ return addHeapObject(ret);
1970
+ }
1971
+
1665
1972
  export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
1666
1973
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1667
1974
  }
@@ -1763,7 +2070,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1763
2070
  const a = state0.a;
1764
2071
  state0.a = 0;
1765
2072
  try {
1766
- return __wbg_adapter_191(a, state0.b, arg0, arg1);
2073
+ return __wbg_adapter_215(a, state0.b, arg0, arg1);
1767
2074
  } finally {
1768
2075
  state0.a = a;
1769
2076
  }
@@ -1873,6 +2180,13 @@ export function __wbg_node_02999533c4ea02e3(arg0) {
1873
2180
  return addHeapObject(ret);
1874
2181
  }
1875
2182
 
2183
+ export function __wbg_parse_def2e24ef1252aff() {
2184
+ return handleError(function (arg0, arg1) {
2185
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2186
+ return addHeapObject(ret);
2187
+ }, arguments);
2188
+ }
2189
+
1876
2190
  export function __wbg_process_5c1d670bc53614b8(arg0) {
1877
2191
  const ret = getObject(arg0).process;
1878
2192
  return addHeapObject(ret);
@@ -1924,7 +2238,7 @@ export function __wbg_resolve_4851785c9c5f573d(arg0) {
1924
2238
 
1925
2239
  export function __wbg_send_c9eacaae08065b18() {
1926
2240
  return handleError(function (arg0, arg1) {
1927
- const ret = getObject(arg0).send(takeObject(arg1));
2241
+ const ret = getObject(arg0).send(OutgoingMessage.__wrap(arg1));
1928
2242
  return addHeapObject(ret);
1929
2243
  }, arguments);
1930
2244
  }
@@ -2125,8 +2439,8 @@ export function __wbindgen_cb_drop(arg0) {
2125
2439
  return ret;
2126
2440
  }
2127
2441
 
2128
- export function __wbindgen_closure_wrapper2517(arg0, arg1, arg2) {
2129
- const ret = makeMutClosure(arg0, arg1, 635, __wbg_adapter_50);
2442
+ export function __wbindgen_closure_wrapper2552(arg0, arg1, arg2) {
2443
+ const ret = makeMutClosure(arg0, arg1, 634, __wbg_adapter_50);
2130
2444
  return addHeapObject(ret);
2131
2445
  }
2132
2446
 
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 __wbg_get_receiveerror_crypto_error: (a: number) => number;
8
- export const __wbg_set_receiveerror_crypto_error: (a: number, b: number) => void;
9
- export const __wbg_get_receiveerror_communication_error: (a: number) => number;
10
- export const __wbg_set_receiveerror_communication_error: (a: number, b: number) => void;
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 __wbg_set_senderror_crypto_error: (a: number, b: number) => void;
17
- export const __wbg_set_senderror_communication_error: (a: number, b: number) => void;
18
- export const __wbg_get_senderror_crypto_error: (a: number) => number;
19
- export const __wbg_get_senderror_communication_error: (a: number) => number;
20
- export const __wbg_senderror_free: (a: number, b: number) => void;
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;