ping-openmls-sdk 0.6.10 → 0.6.12
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/dist/index.cjs +31 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/indexeddb.d.cts +1 -1
- package/dist/storage/indexeddb.d.ts +1 -1
- package/dist/transport/websocket.d.cts +1 -1
- package/dist/transport/websocket.d.ts +1 -1
- package/dist/{types-O6uxcX8f.d.cts → types-BFIVZtWN.d.cts} +4 -0
- package/dist/{types-O6uxcX8f.d.ts → types-BFIVZtWN.d.ts} +4 -0
- package/dist/worker.cjs +4 -0
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.js +6 -0
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/wasm/package.json +1 -1
- package/wasm/ping_wasm.d.ts +17 -3
- package/wasm/ping_wasm.js +77 -17
- package/wasm/ping_wasm_bg.wasm +0 -0
- package/wasm/ping_wasm_bg.wasm.d.ts +5 -3
package/wasm/ping_wasm.js
CHANGED
|
@@ -719,6 +719,66 @@ export function generateMnemonicPhrase() {
|
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
|
|
722
|
+
/**
|
|
723
|
+
* Generic HPKE-Base open — inverse of [`hpke_seal`]. `info` must match the sender.
|
|
724
|
+
* @param {Uint8Array} sealed
|
|
725
|
+
* @param {Uint8Array} recipient_priv
|
|
726
|
+
* @param {Uint8Array} info
|
|
727
|
+
* @returns {Uint8Array}
|
|
728
|
+
*/
|
|
729
|
+
export function hpkeOpen(sealed, recipient_priv, info) {
|
|
730
|
+
try {
|
|
731
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
732
|
+
const ptr0 = passArray8ToWasm0(sealed, wasm.__wbindgen_export);
|
|
733
|
+
const len0 = WASM_VECTOR_LEN;
|
|
734
|
+
const ptr1 = passArray8ToWasm0(recipient_priv, wasm.__wbindgen_export);
|
|
735
|
+
const len1 = WASM_VECTOR_LEN;
|
|
736
|
+
const ptr2 = passArray8ToWasm0(info, wasm.__wbindgen_export);
|
|
737
|
+
const len2 = WASM_VECTOR_LEN;
|
|
738
|
+
wasm.hpkeOpen(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
739
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
740
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
741
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
742
|
+
if (r2) {
|
|
743
|
+
throw takeObject(r1);
|
|
744
|
+
}
|
|
745
|
+
return takeObject(r0);
|
|
746
|
+
} finally {
|
|
747
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Generic HPKE-Base seal of arbitrary bytes under a caller-supplied `info`. One
|
|
753
|
+
* shared HPKE for app-layer envelopes (e.g. device-linking auth envelope) so the
|
|
754
|
+
* web + mobile sides stop hand-rolling HPKE that drifts cross-platform.
|
|
755
|
+
* @param {Uint8Array} plaintext
|
|
756
|
+
* @param {Uint8Array} recipient_pub
|
|
757
|
+
* @param {Uint8Array} info
|
|
758
|
+
* @returns {Uint8Array}
|
|
759
|
+
*/
|
|
760
|
+
export function hpkeSeal(plaintext, recipient_pub, info) {
|
|
761
|
+
try {
|
|
762
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
763
|
+
const ptr0 = passArray8ToWasm0(plaintext, wasm.__wbindgen_export);
|
|
764
|
+
const len0 = WASM_VECTOR_LEN;
|
|
765
|
+
const ptr1 = passArray8ToWasm0(recipient_pub, wasm.__wbindgen_export);
|
|
766
|
+
const len1 = WASM_VECTOR_LEN;
|
|
767
|
+
const ptr2 = passArray8ToWasm0(info, wasm.__wbindgen_export);
|
|
768
|
+
const len2 = WASM_VECTOR_LEN;
|
|
769
|
+
wasm.hpkeSeal(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
770
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
771
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
772
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
773
|
+
if (r2) {
|
|
774
|
+
throw takeObject(r1);
|
|
775
|
+
}
|
|
776
|
+
return takeObject(r0);
|
|
777
|
+
} finally {
|
|
778
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
722
782
|
/**
|
|
723
783
|
* Validate + canonicalise a user-entered phrase (BIP39 wordlist + checksum).
|
|
724
784
|
* @param {string} phrase
|
|
@@ -989,11 +1049,11 @@ function __wbg_get_imports() {
|
|
|
989
1049
|
const ret = getObject(arg0).crypto;
|
|
990
1050
|
return addHeapObject(ret);
|
|
991
1051
|
},
|
|
992
|
-
|
|
1052
|
+
__wbg_del_7042b0486d13225b: function(arg0, arg1, arg2, arg3, arg4) {
|
|
993
1053
|
const ret = getObject(arg0).del(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
994
1054
|
return addHeapObject(ret);
|
|
995
1055
|
},
|
|
996
|
-
|
|
1056
|
+
__wbg_discoverDevices_c0759cdafa0e7176: function(arg0, arg1) {
|
|
997
1057
|
const ret = getObject(arg0).discoverDevices(takeObject(arg1));
|
|
998
1058
|
return addHeapObject(ret);
|
|
999
1059
|
},
|
|
@@ -1019,7 +1079,7 @@ function __wbg_get_imports() {
|
|
|
1019
1079
|
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1020
1080
|
}
|
|
1021
1081
|
},
|
|
1022
|
-
|
|
1082
|
+
__wbg_fetchSince_b17d4a870044fa31: function(arg0, arg1, arg2, arg3) {
|
|
1023
1083
|
const ret = getObject(arg0).fetchSince(takeObject(arg1), takeObject(arg2), arg3 >>> 0);
|
|
1024
1084
|
return addHeapObject(ret);
|
|
1025
1085
|
},
|
|
@@ -1030,7 +1090,7 @@ function __wbg_get_imports() {
|
|
|
1030
1090
|
const a = state0.a;
|
|
1031
1091
|
state0.a = 0;
|
|
1032
1092
|
try {
|
|
1033
|
-
return
|
|
1093
|
+
return __wasm_bindgen_func_elem_2828(a, state0.b, arg0, arg1, arg2);
|
|
1034
1094
|
} finally {
|
|
1035
1095
|
state0.a = a;
|
|
1036
1096
|
}
|
|
@@ -1062,7 +1122,7 @@ function __wbg_get_imports() {
|
|
|
1062
1122
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1063
1123
|
return addHeapObject(ret);
|
|
1064
1124
|
}, arguments); },
|
|
1065
|
-
|
|
1125
|
+
__wbg_get_d7aa81568684f2e1: function(arg0, arg1, arg2, arg3, arg4) {
|
|
1066
1126
|
const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1067
1127
|
return addHeapObject(ret);
|
|
1068
1128
|
},
|
|
@@ -1114,7 +1174,7 @@ function __wbg_get_imports() {
|
|
|
1114
1174
|
const ret = getObject(arg0).length;
|
|
1115
1175
|
return ret;
|
|
1116
1176
|
},
|
|
1117
|
-
|
|
1177
|
+
__wbg_listKeys_7273097f9ce8aa60: function(arg0, arg1, arg2, arg3, arg4) {
|
|
1118
1178
|
const ret = getObject(arg0).listKeys(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1119
1179
|
return addHeapObject(ret);
|
|
1120
1180
|
},
|
|
@@ -1171,7 +1231,7 @@ function __wbg_get_imports() {
|
|
|
1171
1231
|
const a = state0.a;
|
|
1172
1232
|
state0.a = 0;
|
|
1173
1233
|
try {
|
|
1174
|
-
return
|
|
1234
|
+
return __wasm_bindgen_func_elem_2838(a, state0.b, arg0, arg1);
|
|
1175
1235
|
} finally {
|
|
1176
1236
|
state0.a = a;
|
|
1177
1237
|
}
|
|
@@ -1221,7 +1281,7 @@ function __wbg_get_imports() {
|
|
|
1221
1281
|
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
1222
1282
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1223
1283
|
},
|
|
1224
|
-
|
|
1284
|
+
__wbg_put_d33675e0630ae82a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1225
1285
|
const ret = getObject(arg0).put(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), takeObject(arg5));
|
|
1226
1286
|
return addHeapObject(ret);
|
|
1227
1287
|
},
|
|
@@ -1247,11 +1307,11 @@ function __wbg_get_imports() {
|
|
|
1247
1307
|
const ret = getObject(arg0).self;
|
|
1248
1308
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1249
1309
|
},
|
|
1250
|
-
|
|
1310
|
+
__wbg_send_1e02f3097f7f7dab: function(arg0, arg1) {
|
|
1251
1311
|
const ret = getObject(arg0).send(takeObject(arg1));
|
|
1252
1312
|
return addHeapObject(ret);
|
|
1253
1313
|
},
|
|
1254
|
-
|
|
1314
|
+
__wbg_setNextWelcomeRecipients_21e3df0ea488d8f2: function(arg0, arg1, arg2) {
|
|
1255
1315
|
const ret = getObject(arg0).setNextWelcomeRecipients(takeObject(arg1), takeObject(arg2));
|
|
1256
1316
|
return addHeapObject(ret);
|
|
1257
1317
|
},
|
|
@@ -1349,7 +1409,7 @@ function __wbg_get_imports() {
|
|
|
1349
1409
|
},
|
|
1350
1410
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1351
1411
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 780, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1352
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1412
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2814);
|
|
1353
1413
|
return addHeapObject(ret);
|
|
1354
1414
|
},
|
|
1355
1415
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -1393,10 +1453,10 @@ function __wbg_get_imports() {
|
|
|
1393
1453
|
};
|
|
1394
1454
|
}
|
|
1395
1455
|
|
|
1396
|
-
function
|
|
1456
|
+
function __wasm_bindgen_func_elem_2814(arg0, arg1, arg2) {
|
|
1397
1457
|
try {
|
|
1398
1458
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1399
|
-
wasm.
|
|
1459
|
+
wasm.__wasm_bindgen_func_elem_2814(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1400
1460
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1401
1461
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1402
1462
|
if (r1) {
|
|
@@ -1407,12 +1467,12 @@ function __wasm_bindgen_func_elem_2806(arg0, arg1, arg2) {
|
|
|
1407
1467
|
}
|
|
1408
1468
|
}
|
|
1409
1469
|
|
|
1410
|
-
function
|
|
1411
|
-
wasm.
|
|
1470
|
+
function __wasm_bindgen_func_elem_2838(arg0, arg1, arg2, arg3) {
|
|
1471
|
+
wasm.__wasm_bindgen_func_elem_2838(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1412
1472
|
}
|
|
1413
1473
|
|
|
1414
|
-
function
|
|
1415
|
-
wasm.
|
|
1474
|
+
function __wasm_bindgen_func_elem_2828(arg0, arg1, arg2, arg3, arg4) {
|
|
1475
|
+
wasm.__wasm_bindgen_func_elem_2828(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
1416
1476
|
}
|
|
1417
1477
|
|
|
1418
1478
|
const WasmBindgenTestContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/wasm/ping_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -6,6 +6,8 @@ export const decodeCatchupSnapshot: (a: number, b: number, c: number) => void;
|
|
|
6
6
|
export const decryptBackup: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
7
7
|
export const encryptBackup: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
8
8
|
export const generateMnemonicPhrase: (a: number) => void;
|
|
9
|
+
export const hpkeOpen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
10
|
+
export const hpkeSeal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
9
11
|
export const normalizeMnemonicPhrase: (a: number, b: number, c: number) => void;
|
|
10
12
|
export const openHistoryBundle: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
11
13
|
export const openLinkingTicket: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -48,9 +50,9 @@ export const wasmbindgentestcontext_filtered_count: (a: number, b: number) => vo
|
|
|
48
50
|
export const wasmbindgentestcontext_include_ignored: (a: number, b: number) => void;
|
|
49
51
|
export const wasmbindgentestcontext_new: (a: number) => number;
|
|
50
52
|
export const wasmbindgentestcontext_run: (a: number, b: number, c: number) => number;
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const
|
|
53
|
+
export const __wasm_bindgen_func_elem_2828: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
54
|
+
export const __wasm_bindgen_func_elem_2814: (a: number, b: number, c: number, d: number) => void;
|
|
55
|
+
export const __wasm_bindgen_func_elem_2838: (a: number, b: number, c: number, d: number) => void;
|
|
54
56
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
55
57
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
56
58
|
export const __wbindgen_export3: (a: number) => void;
|