ping-openmls-sdk 0.1.2 → 0.5.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 +204 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -12
- package/dist/index.d.ts +156 -12
- package/dist/index.js +199 -14
- 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 +32 -3
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.js +38 -4
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/wasm/package.json +1 -1
- package/wasm/ping_wasm.d.ts +88 -9
- package/wasm/ping_wasm.js +219 -29
- package/wasm/ping_wasm_bg.wasm +0 -0
- package/wasm/ping_wasm_bg.wasm.d.ts +13 -6
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,21 +182,48 @@ 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).
|
|
200
|
+
*
|
|
201
|
+
* `device_signing_secret_key`: optional 32-byte Ed25519 secret
|
|
202
|
+
* key the SDK should adopt as its device signing key on FIRST
|
|
203
|
+
* init. When supplied, `device_id` becomes
|
|
204
|
+
* `SHA-256(public_key_of(secret))` — deterministic from the
|
|
205
|
+
* caller's input, so the host can align the SDK's `device_id`
|
|
206
|
+
* (which the SDK stamps into every envelope's `sender_device`)
|
|
207
|
+
* with whatever device_id the auth layer registered in the JWT.
|
|
208
|
+
* Ignored on re-init when a `LocalDevice` is already persisted
|
|
209
|
+
* in `storage`. Pass `null`/`undefined` to keep the legacy
|
|
210
|
+
* random-key behaviour.
|
|
124
211
|
* @param {Uint8Array} identity_export
|
|
125
212
|
* @param {string} device_label
|
|
126
213
|
* @param {JsStorage} storage
|
|
127
214
|
* @param {JsTransport} transport
|
|
128
215
|
* @param {number} now_ms
|
|
216
|
+
* @param {Uint8Array | null} [device_signing_secret_key]
|
|
129
217
|
* @returns {Promise<PingClient>}
|
|
130
218
|
*/
|
|
131
|
-
static init(identity_export, device_label, storage, transport, now_ms) {
|
|
219
|
+
static init(identity_export, device_label, storage, transport, now_ms, device_signing_secret_key) {
|
|
132
220
|
const ptr0 = passArray8ToWasm0(identity_export, wasm.__wbindgen_export);
|
|
133
221
|
const len0 = WASM_VECTOR_LEN;
|
|
134
222
|
const ptr1 = passStringToWasm0(device_label, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
135
223
|
const len1 = WASM_VECTOR_LEN;
|
|
136
|
-
|
|
224
|
+
var ptr2 = isLikeNone(device_signing_secret_key) ? 0 : passArray8ToWasm0(device_signing_secret_key, wasm.__wbindgen_export);
|
|
225
|
+
var len2 = WASM_VECTOR_LEN;
|
|
226
|
+
const ret = wasm.pingclient_init(ptr0, len0, ptr1, len1, addHeapObject(storage), addHeapObject(transport), now_ms, ptr2, len2);
|
|
137
227
|
return takeObject(ret);
|
|
138
228
|
}
|
|
139
229
|
/**
|
|
@@ -192,6 +282,21 @@ export class PingClient {
|
|
|
192
282
|
const ret = wasm.pingclient_removeMembers(this.__wbg_ptr, ptr0, len0, ptr1, len1, now_ms);
|
|
193
283
|
return takeObject(ret);
|
|
194
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Revoke a device ([CR-2]). Returns an array of Commit envelopes — one per
|
|
287
|
+
* conversation the device was a locally-known leaf in. Each envelope has already
|
|
288
|
+
* been handed to the transport; the host's hand-back is for any additional
|
|
289
|
+
* receipt-of-revocation handling.
|
|
290
|
+
* @param {Uint8Array} device_id
|
|
291
|
+
* @param {number} now_ms
|
|
292
|
+
* @returns {Promise<any>}
|
|
293
|
+
*/
|
|
294
|
+
revokeDevice(device_id, now_ms) {
|
|
295
|
+
const ptr0 = passArray8ToWasm0(device_id, wasm.__wbindgen_export);
|
|
296
|
+
const len0 = WASM_VECTOR_LEN;
|
|
297
|
+
const ret = wasm.pingclient_revokeDevice(this.__wbg_ptr, ptr0, len0, now_ms);
|
|
298
|
+
return takeObject(ret);
|
|
299
|
+
}
|
|
195
300
|
/**
|
|
196
301
|
* @param {Uint8Array} conv_id
|
|
197
302
|
* @param {Uint8Array} plaintext
|
|
@@ -463,6 +568,91 @@ export function __wbgtest_module_signature() {
|
|
|
463
568
|
export function _start() {
|
|
464
569
|
wasm._start();
|
|
465
570
|
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* HPKE-open a sealed `LinkingTicket` ([CR-3]). Pure function — usable without an
|
|
574
|
+
* initialized `PingClient`, which is exactly the situation the receiving device is in
|
|
575
|
+
* (pre-bootstrap; no identity yet).
|
|
576
|
+
*
|
|
577
|
+
* `new_device_priv` must be 32 bytes (X25519 private key). Errors are returned with a
|
|
578
|
+
* generic message — the new device shouldn't get to discriminate "wrong key" from
|
|
579
|
+
* "tampered ciphertext".
|
|
580
|
+
* [CR-13] Decode a `LinkingTicket.catchup_snapshot` blob. Pure function; no client
|
|
581
|
+
* required. The new device calls this after `consumeLinkingTicket` to populate its
|
|
582
|
+
* initial UI.
|
|
583
|
+
* @param {Uint8Array} snapshot_bytes
|
|
584
|
+
* @returns {any}
|
|
585
|
+
*/
|
|
586
|
+
export function decodeCatchupSnapshot(snapshot_bytes) {
|
|
587
|
+
try {
|
|
588
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
589
|
+
const ptr0 = passArray8ToWasm0(snapshot_bytes, wasm.__wbindgen_export);
|
|
590
|
+
const len0 = WASM_VECTOR_LEN;
|
|
591
|
+
wasm.decodeCatchupSnapshot(retptr, ptr0, len0);
|
|
592
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
593
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
594
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
595
|
+
if (r2) {
|
|
596
|
+
throw takeObject(r1);
|
|
597
|
+
}
|
|
598
|
+
return takeObject(r0);
|
|
599
|
+
} finally {
|
|
600
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* @param {Uint8Array} sealed
|
|
606
|
+
* @param {Uint8Array} new_device_priv
|
|
607
|
+
* @returns {any}
|
|
608
|
+
*/
|
|
609
|
+
export function openLinkingTicket(sealed, new_device_priv) {
|
|
610
|
+
try {
|
|
611
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
612
|
+
const ptr0 = passArray8ToWasm0(sealed, wasm.__wbindgen_export);
|
|
613
|
+
const len0 = WASM_VECTOR_LEN;
|
|
614
|
+
const ptr1 = passArray8ToWasm0(new_device_priv, wasm.__wbindgen_export);
|
|
615
|
+
const len1 = WASM_VECTOR_LEN;
|
|
616
|
+
wasm.openLinkingTicket(retptr, ptr0, len0, ptr1, len1);
|
|
617
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
618
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
619
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
620
|
+
if (r2) {
|
|
621
|
+
throw takeObject(r1);
|
|
622
|
+
}
|
|
623
|
+
return takeObject(r0);
|
|
624
|
+
} finally {
|
|
625
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* HPKE-seal a `LinkingTicket` ([CR-3]). Pure function — does not need an initialized
|
|
631
|
+
* `PingClient`, so it's exported at module scope and the JS facade can call it from an
|
|
632
|
+
* ephemeral worker (no full client init needed on the sender side).
|
|
633
|
+
*
|
|
634
|
+
* `new_device_pub` must be 32 bytes. Returns CBOR-encoded sealed bytes.
|
|
635
|
+
* @param {any} ticket
|
|
636
|
+
* @param {Uint8Array} new_device_pub
|
|
637
|
+
* @returns {Uint8Array}
|
|
638
|
+
*/
|
|
639
|
+
export function sealLinkingTicket(ticket, new_device_pub) {
|
|
640
|
+
try {
|
|
641
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
642
|
+
const ptr0 = passArray8ToWasm0(new_device_pub, wasm.__wbindgen_export);
|
|
643
|
+
const len0 = WASM_VECTOR_LEN;
|
|
644
|
+
wasm.sealLinkingTicket(retptr, addHeapObject(ticket), ptr0, len0);
|
|
645
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
646
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
647
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
648
|
+
if (r2) {
|
|
649
|
+
throw takeObject(r1);
|
|
650
|
+
}
|
|
651
|
+
return takeObject(r0);
|
|
652
|
+
} finally {
|
|
653
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
466
656
|
function __wbg_get_imports() {
|
|
467
657
|
const import0 = {
|
|
468
658
|
__proto__: null,
|
|
@@ -589,11 +779,11 @@ function __wbg_get_imports() {
|
|
|
589
779
|
const ret = getObject(arg0).crypto;
|
|
590
780
|
return addHeapObject(ret);
|
|
591
781
|
},
|
|
592
|
-
|
|
782
|
+
__wbg_del_66a920fc4595820f: function(arg0, arg1, arg2, arg3, arg4) {
|
|
593
783
|
const ret = getObject(arg0).del(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
594
784
|
return addHeapObject(ret);
|
|
595
785
|
},
|
|
596
|
-
|
|
786
|
+
__wbg_discoverDevices_472613341445f84b: function(arg0, arg1) {
|
|
597
787
|
const ret = getObject(arg0).discoverDevices(takeObject(arg1));
|
|
598
788
|
return addHeapObject(ret);
|
|
599
789
|
},
|
|
@@ -619,7 +809,7 @@ function __wbg_get_imports() {
|
|
|
619
809
|
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
620
810
|
}
|
|
621
811
|
},
|
|
622
|
-
|
|
812
|
+
__wbg_fetchSince_6aecae62f60e0c4d: function(arg0, arg1, arg2, arg3) {
|
|
623
813
|
const ret = getObject(arg0).fetchSince(takeObject(arg1), takeObject(arg2), arg3 >>> 0);
|
|
624
814
|
return addHeapObject(ret);
|
|
625
815
|
},
|
|
@@ -630,7 +820,7 @@ function __wbg_get_imports() {
|
|
|
630
820
|
const a = state0.a;
|
|
631
821
|
state0.a = 0;
|
|
632
822
|
try {
|
|
633
|
-
return
|
|
823
|
+
return __wasm_bindgen_func_elem_2611(a, state0.b, arg0, arg1, arg2);
|
|
634
824
|
} finally {
|
|
635
825
|
state0.a = a;
|
|
636
826
|
}
|
|
@@ -654,14 +844,14 @@ function __wbg_get_imports() {
|
|
|
654
844
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
655
845
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
656
846
|
}, 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
847
|
__wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
|
|
662
848
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
663
849
|
return addHeapObject(ret);
|
|
664
850
|
},
|
|
851
|
+
__wbg_get_766e63dd85cdb219: function(arg0, arg1, arg2, arg3, arg4) {
|
|
852
|
+
const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
853
|
+
return addHeapObject(ret);
|
|
854
|
+
},
|
|
665
855
|
__wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
|
|
666
856
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
667
857
|
return addHeapObject(ret);
|
|
@@ -714,7 +904,7 @@ function __wbg_get_imports() {
|
|
|
714
904
|
const ret = getObject(arg0).length;
|
|
715
905
|
return ret;
|
|
716
906
|
},
|
|
717
|
-
|
|
907
|
+
__wbg_listKeys_4dae540d80e53eed: function(arg0, arg1, arg2, arg3, arg4) {
|
|
718
908
|
const ret = getObject(arg0).listKeys(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
719
909
|
return addHeapObject(ret);
|
|
720
910
|
},
|
|
@@ -771,7 +961,7 @@ function __wbg_get_imports() {
|
|
|
771
961
|
const a = state0.a;
|
|
772
962
|
state0.a = 0;
|
|
773
963
|
try {
|
|
774
|
-
return
|
|
964
|
+
return __wasm_bindgen_func_elem_2610(a, state0.b, arg0, arg1);
|
|
775
965
|
} finally {
|
|
776
966
|
state0.a = a;
|
|
777
967
|
}
|
|
@@ -821,7 +1011,7 @@ function __wbg_get_imports() {
|
|
|
821
1011
|
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
822
1012
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
823
1013
|
},
|
|
824
|
-
|
|
1014
|
+
__wbg_put_427c95e389da8a00: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
825
1015
|
const ret = getObject(arg0).put(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), takeObject(arg5));
|
|
826
1016
|
return addHeapObject(ret);
|
|
827
1017
|
},
|
|
@@ -847,7 +1037,7 @@ function __wbg_get_imports() {
|
|
|
847
1037
|
const ret = getObject(arg0).self;
|
|
848
1038
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
849
1039
|
},
|
|
850
|
-
|
|
1040
|
+
__wbg_send_5d4f40bbf83f6d1b: function(arg0, arg1) {
|
|
851
1041
|
const ret = getObject(arg0).send(takeObject(arg1));
|
|
852
1042
|
return addHeapObject(ret);
|
|
853
1043
|
},
|
|
@@ -944,8 +1134,8 @@ function __wbg_get_imports() {
|
|
|
944
1134
|
return addHeapObject(ret);
|
|
945
1135
|
},
|
|
946
1136
|
__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,
|
|
1137
|
+
// 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`.
|
|
1138
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2601);
|
|
949
1139
|
return addHeapObject(ret);
|
|
950
1140
|
},
|
|
951
1141
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -989,10 +1179,10 @@ function __wbg_get_imports() {
|
|
|
989
1179
|
};
|
|
990
1180
|
}
|
|
991
1181
|
|
|
992
|
-
function
|
|
1182
|
+
function __wasm_bindgen_func_elem_2601(arg0, arg1, arg2) {
|
|
993
1183
|
try {
|
|
994
1184
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
995
|
-
wasm.
|
|
1185
|
+
wasm.__wasm_bindgen_func_elem_2601(retptr, arg0, arg1, addHeapObject(arg2));
|
|
996
1186
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
997
1187
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
998
1188
|
if (r1) {
|
|
@@ -1003,12 +1193,12 @@ function __wasm_bindgen_func_elem_2203(arg0, arg1, arg2) {
|
|
|
1003
1193
|
}
|
|
1004
1194
|
}
|
|
1005
1195
|
|
|
1006
|
-
function
|
|
1007
|
-
wasm.
|
|
1196
|
+
function __wasm_bindgen_func_elem_2610(arg0, arg1, arg2, arg3) {
|
|
1197
|
+
wasm.__wasm_bindgen_func_elem_2610(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1008
1198
|
}
|
|
1009
1199
|
|
|
1010
|
-
function
|
|
1011
|
-
wasm.
|
|
1200
|
+
function __wasm_bindgen_func_elem_2611(arg0, arg1, arg2, arg3, arg4) {
|
|
1201
|
+
wasm.__wasm_bindgen_func_elem_2611(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
1012
1202
|
}
|
|
1013
1203
|
|
|
1014
1204
|
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;
|
|
12
|
-
export const
|
|
16
|
+
export const pingclient_importStateSnapshot: (a: number, b: number, c: number, d: number) => number;
|
|
17
|
+
export const pingclient_init: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: 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_2611: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
45
|
+
export const __wasm_bindgen_func_elem_2601: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
+
export const __wasm_bindgen_func_elem_2610: (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;
|