ping-openmls-sdk 0.1.2 → 0.2.0
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 +202 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -12
- package/dist/index.d.ts +136 -12
- package/dist/index.js +197 -13
- 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.cjs +2 -2
- package/dist/transport/websocket.cjs.map +1 -1
- package/dist/transport/websocket.d.cts +1 -1
- package/dist/transport/websocket.d.ts +1 -1
- package/dist/transport/websocket.js +2 -2
- package/dist/transport/websocket.js.map +1 -1
- package/dist/{types-jd8CLdi_.d.cts → types-DYtsj5dy.d.cts} +28 -1
- package/dist/{types-jd8CLdi_.d.ts → types-DYtsj5dy.d.ts} +28 -1
- package/dist/worker.cjs +26 -2
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.js +32 -3
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/wasm/package.json +1 -1
- package/wasm/ping_wasm.d.ts +75 -7
- package/wasm/ping_wasm.js +203 -27
- package/wasm/ping_wasm_bg.wasm +0 -0
- package/wasm/ping_wasm_bg.wasm.d.ts +12 -5
package/wasm/ping_wasm.js
CHANGED
|
@@ -18,31 +18,37 @@ export class PingClient {
|
|
|
18
18
|
wasm.__wbg_pingclient_free(ptr, 0);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
+
* Add members ([CR-2]). `entries` is an array of `{ deviceId: Uint8Array,
|
|
22
|
+
* keyPackage: Uint8Array }`. Bundling the device_id with the KeyPackage lets us
|
|
23
|
+
* persist a per-conversation device→leaf map for [`revokeDevice`].
|
|
21
24
|
* @param {Uint8Array} conv_id
|
|
22
|
-
* @param {
|
|
25
|
+
* @param {any} entries
|
|
23
26
|
* @param {number} now_ms
|
|
24
27
|
* @returns {Promise<void>}
|
|
25
28
|
*/
|
|
26
|
-
addMembers(conv_id,
|
|
29
|
+
addMembers(conv_id, entries, now_ms) {
|
|
27
30
|
const ptr0 = passArray8ToWasm0(conv_id, wasm.__wbindgen_export);
|
|
28
31
|
const len0 = WASM_VECTOR_LEN;
|
|
29
|
-
const
|
|
30
|
-
const len1 = WASM_VECTOR_LEN;
|
|
31
|
-
const ret = wasm.pingclient_addMembers(this.__wbg_ptr, ptr0, len0, ptr1, len1, now_ms);
|
|
32
|
+
const ret = wasm.pingclient_addMembers(this.__wbg_ptr, ptr0, len0, addHeapObject(entries), now_ms);
|
|
32
33
|
return takeObject(ret);
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
36
|
+
* Build a `LinkingTicket` ([CR-13] populates `catchup_snapshot` from `last_app_events`).
|
|
37
|
+
*
|
|
38
|
+
* `last_app_events` is an array of `{ conversationId: Uint8Array, appEventBytes:
|
|
39
|
+
* Uint8Array }`. Pass `[]` to suppress catchup data.
|
|
35
40
|
* @param {Uint8Array} new_device_id
|
|
36
41
|
* @param {Uint8Array} new_device_kp
|
|
42
|
+
* @param {any} last_app_events
|
|
37
43
|
* @param {number} now_ms
|
|
38
44
|
* @returns {Promise<any>}
|
|
39
45
|
*/
|
|
40
|
-
buildLinkingTicket(new_device_id, new_device_kp, now_ms) {
|
|
46
|
+
buildLinkingTicket(new_device_id, new_device_kp, last_app_events, now_ms) {
|
|
41
47
|
const ptr0 = passArray8ToWasm0(new_device_id, wasm.__wbindgen_export);
|
|
42
48
|
const len0 = WASM_VECTOR_LEN;
|
|
43
49
|
const ptr1 = passArray8ToWasm0(new_device_kp, wasm.__wbindgen_export);
|
|
44
50
|
const len1 = WASM_VECTOR_LEN;
|
|
45
|
-
const ret = wasm.pingclient_buildLinkingTicket(this.__wbg_ptr, ptr0, len0, ptr1, len1, now_ms);
|
|
51
|
+
const ret = wasm.pingclient_buildLinkingTicket(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(last_app_events), now_ms);
|
|
46
52
|
return takeObject(ret);
|
|
47
53
|
}
|
|
48
54
|
/**
|
|
@@ -81,6 +87,63 @@ export class PingClient {
|
|
|
81
87
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Export a derived secret from a conversation's MLS exporter ([CR-8]).
|
|
92
|
+
*
|
|
93
|
+
* The core wraps the bytes in `Zeroizing<Vec<u8>>`; once they cross the WASM/JS
|
|
94
|
+
* boundary they live in a regular JS `Uint8Array` and JS GC controls the lifetime.
|
|
95
|
+
* Callers in JS MUST treat the buffer as a secret — never log, persist only
|
|
96
|
+
* encrypted, and clear the typed array when done (`u8.fill(0)`).
|
|
97
|
+
* @param {Uint8Array} conv_id
|
|
98
|
+
* @param {string} label
|
|
99
|
+
* @param {Uint8Array} context
|
|
100
|
+
* @param {number} length
|
|
101
|
+
* @returns {Uint8Array}
|
|
102
|
+
*/
|
|
103
|
+
exportConversationSecret(conv_id, label, context, length) {
|
|
104
|
+
try {
|
|
105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
106
|
+
const ptr0 = passArray8ToWasm0(conv_id, wasm.__wbindgen_export);
|
|
107
|
+
const len0 = WASM_VECTOR_LEN;
|
|
108
|
+
const ptr1 = passStringToWasm0(label, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
109
|
+
const len1 = WASM_VECTOR_LEN;
|
|
110
|
+
const ptr2 = passArray8ToWasm0(context, wasm.__wbindgen_export);
|
|
111
|
+
const len2 = WASM_VECTOR_LEN;
|
|
112
|
+
wasm.pingclient_exportConversationSecret(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, length);
|
|
113
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
114
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
115
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
116
|
+
if (r2) {
|
|
117
|
+
throw takeObject(r1);
|
|
118
|
+
}
|
|
119
|
+
return takeObject(r0);
|
|
120
|
+
} finally {
|
|
121
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* [CR-7] Export the MLS state snapshot for one conversation.
|
|
126
|
+
* @param {Uint8Array} conv_id
|
|
127
|
+
* @param {number} now_ms
|
|
128
|
+
* @returns {Uint8Array}
|
|
129
|
+
*/
|
|
130
|
+
exportConversationStateSnapshot(conv_id, now_ms) {
|
|
131
|
+
try {
|
|
132
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
133
|
+
const ptr0 = passArray8ToWasm0(conv_id, wasm.__wbindgen_export);
|
|
134
|
+
const len0 = WASM_VECTOR_LEN;
|
|
135
|
+
wasm.pingclient_exportConversationStateSnapshot(retptr, this.__wbg_ptr, ptr0, len0, now_ms);
|
|
136
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
137
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
138
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
139
|
+
if (r2) {
|
|
140
|
+
throw takeObject(r1);
|
|
141
|
+
}
|
|
142
|
+
return takeObject(r0);
|
|
143
|
+
} finally {
|
|
144
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
84
147
|
/**
|
|
85
148
|
* @returns {Uint8Array}
|
|
86
149
|
*/
|
|
@@ -119,6 +182,19 @@ export class PingClient {
|
|
|
119
182
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
120
183
|
}
|
|
121
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* [CR-7] Import an MLS state snapshot produced by another device of the same
|
|
187
|
+
* user identity. Returns the conversation id the snapshot describes.
|
|
188
|
+
* @param {Uint8Array} snapshot_bytes
|
|
189
|
+
* @param {number} now_ms
|
|
190
|
+
* @returns {Promise<Uint8Array>}
|
|
191
|
+
*/
|
|
192
|
+
importStateSnapshot(snapshot_bytes, now_ms) {
|
|
193
|
+
const ptr0 = passArray8ToWasm0(snapshot_bytes, wasm.__wbindgen_export);
|
|
194
|
+
const len0 = WASM_VECTOR_LEN;
|
|
195
|
+
const ret = wasm.pingclient_importStateSnapshot(this.__wbg_ptr, ptr0, len0, now_ms);
|
|
196
|
+
return takeObject(ret);
|
|
197
|
+
}
|
|
122
198
|
/**
|
|
123
199
|
* Initialise the client. Pass an exported identity (use `generateIdentity()` for a fresh one).
|
|
124
200
|
* @param {Uint8Array} identity_export
|
|
@@ -192,6 +268,21 @@ export class PingClient {
|
|
|
192
268
|
const ret = wasm.pingclient_removeMembers(this.__wbg_ptr, ptr0, len0, ptr1, len1, now_ms);
|
|
193
269
|
return takeObject(ret);
|
|
194
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Revoke a device ([CR-2]). Returns an array of Commit envelopes — one per
|
|
273
|
+
* conversation the device was a locally-known leaf in. Each envelope has already
|
|
274
|
+
* been handed to the transport; the host's hand-back is for any additional
|
|
275
|
+
* receipt-of-revocation handling.
|
|
276
|
+
* @param {Uint8Array} device_id
|
|
277
|
+
* @param {number} now_ms
|
|
278
|
+
* @returns {Promise<any>}
|
|
279
|
+
*/
|
|
280
|
+
revokeDevice(device_id, now_ms) {
|
|
281
|
+
const ptr0 = passArray8ToWasm0(device_id, wasm.__wbindgen_export);
|
|
282
|
+
const len0 = WASM_VECTOR_LEN;
|
|
283
|
+
const ret = wasm.pingclient_revokeDevice(this.__wbg_ptr, ptr0, len0, now_ms);
|
|
284
|
+
return takeObject(ret);
|
|
285
|
+
}
|
|
195
286
|
/**
|
|
196
287
|
* @param {Uint8Array} conv_id
|
|
197
288
|
* @param {Uint8Array} plaintext
|
|
@@ -463,6 +554,91 @@ export function __wbgtest_module_signature() {
|
|
|
463
554
|
export function _start() {
|
|
464
555
|
wasm._start();
|
|
465
556
|
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* HPKE-open a sealed `LinkingTicket` ([CR-3]). Pure function — usable without an
|
|
560
|
+
* initialized `PingClient`, which is exactly the situation the receiving device is in
|
|
561
|
+
* (pre-bootstrap; no identity yet).
|
|
562
|
+
*
|
|
563
|
+
* `new_device_priv` must be 32 bytes (X25519 private key). Errors are returned with a
|
|
564
|
+
* generic message — the new device shouldn't get to discriminate "wrong key" from
|
|
565
|
+
* "tampered ciphertext".
|
|
566
|
+
* [CR-13] Decode a `LinkingTicket.catchup_snapshot` blob. Pure function; no client
|
|
567
|
+
* required. The new device calls this after `consumeLinkingTicket` to populate its
|
|
568
|
+
* initial UI.
|
|
569
|
+
* @param {Uint8Array} snapshot_bytes
|
|
570
|
+
* @returns {any}
|
|
571
|
+
*/
|
|
572
|
+
export function decodeCatchupSnapshot(snapshot_bytes) {
|
|
573
|
+
try {
|
|
574
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
575
|
+
const ptr0 = passArray8ToWasm0(snapshot_bytes, wasm.__wbindgen_export);
|
|
576
|
+
const len0 = WASM_VECTOR_LEN;
|
|
577
|
+
wasm.decodeCatchupSnapshot(retptr, ptr0, len0);
|
|
578
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
579
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
580
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
581
|
+
if (r2) {
|
|
582
|
+
throw takeObject(r1);
|
|
583
|
+
}
|
|
584
|
+
return takeObject(r0);
|
|
585
|
+
} finally {
|
|
586
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* @param {Uint8Array} sealed
|
|
592
|
+
* @param {Uint8Array} new_device_priv
|
|
593
|
+
* @returns {any}
|
|
594
|
+
*/
|
|
595
|
+
export function openLinkingTicket(sealed, new_device_priv) {
|
|
596
|
+
try {
|
|
597
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
598
|
+
const ptr0 = passArray8ToWasm0(sealed, wasm.__wbindgen_export);
|
|
599
|
+
const len0 = WASM_VECTOR_LEN;
|
|
600
|
+
const ptr1 = passArray8ToWasm0(new_device_priv, wasm.__wbindgen_export);
|
|
601
|
+
const len1 = WASM_VECTOR_LEN;
|
|
602
|
+
wasm.openLinkingTicket(retptr, ptr0, len0, ptr1, len1);
|
|
603
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
604
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
605
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
606
|
+
if (r2) {
|
|
607
|
+
throw takeObject(r1);
|
|
608
|
+
}
|
|
609
|
+
return takeObject(r0);
|
|
610
|
+
} finally {
|
|
611
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* HPKE-seal a `LinkingTicket` ([CR-3]). Pure function — does not need an initialized
|
|
617
|
+
* `PingClient`, so it's exported at module scope and the JS facade can call it from an
|
|
618
|
+
* ephemeral worker (no full client init needed on the sender side).
|
|
619
|
+
*
|
|
620
|
+
* `new_device_pub` must be 32 bytes. Returns CBOR-encoded sealed bytes.
|
|
621
|
+
* @param {any} ticket
|
|
622
|
+
* @param {Uint8Array} new_device_pub
|
|
623
|
+
* @returns {Uint8Array}
|
|
624
|
+
*/
|
|
625
|
+
export function sealLinkingTicket(ticket, new_device_pub) {
|
|
626
|
+
try {
|
|
627
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
628
|
+
const ptr0 = passArray8ToWasm0(new_device_pub, wasm.__wbindgen_export);
|
|
629
|
+
const len0 = WASM_VECTOR_LEN;
|
|
630
|
+
wasm.sealLinkingTicket(retptr, addHeapObject(ticket), ptr0, len0);
|
|
631
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
632
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
633
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
634
|
+
if (r2) {
|
|
635
|
+
throw takeObject(r1);
|
|
636
|
+
}
|
|
637
|
+
return takeObject(r0);
|
|
638
|
+
} finally {
|
|
639
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
466
642
|
function __wbg_get_imports() {
|
|
467
643
|
const import0 = {
|
|
468
644
|
__proto__: null,
|
|
@@ -589,11 +765,11 @@ function __wbg_get_imports() {
|
|
|
589
765
|
const ret = getObject(arg0).crypto;
|
|
590
766
|
return addHeapObject(ret);
|
|
591
767
|
},
|
|
592
|
-
|
|
768
|
+
__wbg_del_99e00f07d941c410: function(arg0, arg1, arg2, arg3, arg4) {
|
|
593
769
|
const ret = getObject(arg0).del(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
594
770
|
return addHeapObject(ret);
|
|
595
771
|
},
|
|
596
|
-
|
|
772
|
+
__wbg_discoverDevices_0a164c7016ed3ae1: function(arg0, arg1) {
|
|
597
773
|
const ret = getObject(arg0).discoverDevices(takeObject(arg1));
|
|
598
774
|
return addHeapObject(ret);
|
|
599
775
|
},
|
|
@@ -619,7 +795,7 @@ function __wbg_get_imports() {
|
|
|
619
795
|
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
620
796
|
}
|
|
621
797
|
},
|
|
622
|
-
|
|
798
|
+
__wbg_fetchSince_918cc0023bdd145c: function(arg0, arg1, arg2, arg3) {
|
|
623
799
|
const ret = getObject(arg0).fetchSince(takeObject(arg1), takeObject(arg2), arg3 >>> 0);
|
|
624
800
|
return addHeapObject(ret);
|
|
625
801
|
},
|
|
@@ -630,7 +806,7 @@ function __wbg_get_imports() {
|
|
|
630
806
|
const a = state0.a;
|
|
631
807
|
state0.a = 0;
|
|
632
808
|
try {
|
|
633
|
-
return
|
|
809
|
+
return __wasm_bindgen_func_elem_2609(a, state0.b, arg0, arg1, arg2);
|
|
634
810
|
} finally {
|
|
635
811
|
state0.a = a;
|
|
636
812
|
}
|
|
@@ -654,10 +830,6 @@ function __wbg_get_imports() {
|
|
|
654
830
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
655
831
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
656
832
|
}, arguments); },
|
|
657
|
-
__wbg_get_3b0e701762d26c7f: function(arg0, arg1, arg2, arg3, arg4) {
|
|
658
|
-
const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
659
|
-
return addHeapObject(ret);
|
|
660
|
-
},
|
|
661
833
|
__wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
|
|
662
834
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
663
835
|
return addHeapObject(ret);
|
|
@@ -666,6 +838,10 @@ function __wbg_get_imports() {
|
|
|
666
838
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
667
839
|
return addHeapObject(ret);
|
|
668
840
|
}, arguments); },
|
|
841
|
+
__wbg_get_ef4ff25a244ef485: function(arg0, arg1, arg2, arg3, arg4) {
|
|
842
|
+
const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
843
|
+
return addHeapObject(ret);
|
|
844
|
+
},
|
|
669
845
|
__wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
|
|
670
846
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
671
847
|
return addHeapObject(ret);
|
|
@@ -714,7 +890,7 @@ function __wbg_get_imports() {
|
|
|
714
890
|
const ret = getObject(arg0).length;
|
|
715
891
|
return ret;
|
|
716
892
|
},
|
|
717
|
-
|
|
893
|
+
__wbg_listKeys_ce1ed9d08f2cd2a9: function(arg0, arg1, arg2, arg3, arg4) {
|
|
718
894
|
const ret = getObject(arg0).listKeys(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
719
895
|
return addHeapObject(ret);
|
|
720
896
|
},
|
|
@@ -771,7 +947,7 @@ function __wbg_get_imports() {
|
|
|
771
947
|
const a = state0.a;
|
|
772
948
|
state0.a = 0;
|
|
773
949
|
try {
|
|
774
|
-
return
|
|
950
|
+
return __wasm_bindgen_func_elem_2608(a, state0.b, arg0, arg1);
|
|
775
951
|
} finally {
|
|
776
952
|
state0.a = a;
|
|
777
953
|
}
|
|
@@ -821,7 +997,7 @@ function __wbg_get_imports() {
|
|
|
821
997
|
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
822
998
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
823
999
|
},
|
|
824
|
-
|
|
1000
|
+
__wbg_put_b8e780bed1594753: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
825
1001
|
const ret = getObject(arg0).put(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), takeObject(arg5));
|
|
826
1002
|
return addHeapObject(ret);
|
|
827
1003
|
},
|
|
@@ -847,7 +1023,7 @@ function __wbg_get_imports() {
|
|
|
847
1023
|
const ret = getObject(arg0).self;
|
|
848
1024
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
849
1025
|
},
|
|
850
|
-
|
|
1026
|
+
__wbg_send_7bdc7805d6aca500: function(arg0, arg1) {
|
|
851
1027
|
const ret = getObject(arg0).send(takeObject(arg1));
|
|
852
1028
|
return addHeapObject(ret);
|
|
853
1029
|
},
|
|
@@ -944,8 +1120,8 @@ function __wbg_get_imports() {
|
|
|
944
1120
|
return addHeapObject(ret);
|
|
945
1121
|
},
|
|
946
1122
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
947
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
948
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1123
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 722, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1124
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2599);
|
|
949
1125
|
return addHeapObject(ret);
|
|
950
1126
|
},
|
|
951
1127
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -989,10 +1165,10 @@ function __wbg_get_imports() {
|
|
|
989
1165
|
};
|
|
990
1166
|
}
|
|
991
1167
|
|
|
992
|
-
function
|
|
1168
|
+
function __wasm_bindgen_func_elem_2599(arg0, arg1, arg2) {
|
|
993
1169
|
try {
|
|
994
1170
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
995
|
-
wasm.
|
|
1171
|
+
wasm.__wasm_bindgen_func_elem_2599(retptr, arg0, arg1, addHeapObject(arg2));
|
|
996
1172
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
997
1173
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
998
1174
|
if (r1) {
|
|
@@ -1003,12 +1179,12 @@ function __wasm_bindgen_func_elem_2203(arg0, arg1, arg2) {
|
|
|
1003
1179
|
}
|
|
1004
1180
|
}
|
|
1005
1181
|
|
|
1006
|
-
function
|
|
1007
|
-
wasm.
|
|
1182
|
+
function __wasm_bindgen_func_elem_2608(arg0, arg1, arg2, arg3) {
|
|
1183
|
+
wasm.__wasm_bindgen_func_elem_2608(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1008
1184
|
}
|
|
1009
1185
|
|
|
1010
|
-
function
|
|
1011
|
-
wasm.
|
|
1186
|
+
function __wasm_bindgen_func_elem_2609(arg0, arg1, arg2, arg3, arg4) {
|
|
1187
|
+
wasm.__wasm_bindgen_func_elem_2609(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
1012
1188
|
}
|
|
1013
1189
|
|
|
1014
1190
|
const WasmBindgenTestContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/wasm/ping_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,22 +2,29 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_pingclient_free: (a: number, b: number) => void;
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
5
|
+
export const decodeCatchupSnapshot: (a: number, b: number, c: number) => void;
|
|
6
|
+
export const openLinkingTicket: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
7
|
+
export const pingclient_addMembers: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
8
|
+
export const pingclient_buildLinkingTicket: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
7
9
|
export const pingclient_consumeLinkingTicket: (a: number, b: number, c: number) => number;
|
|
8
10
|
export const pingclient_createConversation: (a: number, b: number, c: number, d: number) => number;
|
|
9
11
|
export const pingclient_deviceId: (a: number, b: number) => void;
|
|
12
|
+
export const pingclient_exportConversationSecret: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
13
|
+
export const pingclient_exportConversationStateSnapshot: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
14
|
export const pingclient_freshKeyPackage: (a: number, b: number) => void;
|
|
11
15
|
export const pingclient_generateIdentity: (a: number) => void;
|
|
16
|
+
export const pingclient_importStateSnapshot: (a: number, b: number, c: number, d: number) => number;
|
|
12
17
|
export const pingclient_init: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
13
18
|
export const pingclient_joinConversation: (a: number, b: number, c: number) => number;
|
|
14
19
|
export const pingclient_listConversations: (a: number, b: number) => void;
|
|
15
20
|
export const pingclient_onMessage: (a: number, b: number) => void;
|
|
16
21
|
export const pingclient_processEnvelope: (a: number, b: number, c: number) => number;
|
|
17
22
|
export const pingclient_removeMembers: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
23
|
+
export const pingclient_revokeDevice: (a: number, b: number, c: number, d: number) => number;
|
|
18
24
|
export const pingclient_send: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
19
25
|
export const pingclient_syncConversations: (a: number, b: number) => number;
|
|
20
26
|
export const pingclient_userId: (a: number, b: number) => void;
|
|
27
|
+
export const sealLinkingTicket: (a: number, b: number, c: number, d: number) => void;
|
|
21
28
|
export const _start: () => void;
|
|
22
29
|
export const __wbg_wasmbindgentestcontext_free: (a: number, b: number) => void;
|
|
23
30
|
export const __wbgbench_dump: (a: number) => void;
|
|
@@ -34,9 +41,9 @@ export const wasmbindgentestcontext_filtered_count: (a: number, b: number) => vo
|
|
|
34
41
|
export const wasmbindgentestcontext_include_ignored: (a: number, b: number) => void;
|
|
35
42
|
export const wasmbindgentestcontext_new: (a: number) => number;
|
|
36
43
|
export const wasmbindgentestcontext_run: (a: number, b: number, c: number) => number;
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
44
|
+
export const __wasm_bindgen_func_elem_2609: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
45
|
+
export const __wasm_bindgen_func_elem_2599: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
+
export const __wasm_bindgen_func_elem_2608: (a: number, b: number, c: number, d: number) => void;
|
|
40
47
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
41
48
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
42
49
|
export const __wbindgen_export3: (a: number) => void;
|