@keyhive/keyhive 0.0.0-alpha.2 → 0.0.0-alpha.21
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/README.md +1 -6
- package/package.json +4 -2
- package/pkg/README.md +1 -6
- package/pkg/keyhive_wasm.d.ts +5 -2
- package/pkg/keyhive_wasm_bg.js +130 -144
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +112 -109
- package/pkg-node/README.md +1 -6
- package/pkg-node/keyhive_wasm.d.ts +5 -2
- package/pkg-node/keyhive_wasm.js +129 -143
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +112 -109
- package/pkg-slim/README.md +1 -6
- package/pkg-slim/keyhive_wasm.d.ts +117 -111
- package/pkg-slim/keyhive_wasm.js +123 -135
- package/pkg-slim/keyhive_wasm_bg.wasm +0 -0
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.js +1 -1
- package/pkg-slim/keyhive_wasm_bg.wasm.d.ts +112 -109
package/pkg-slim/keyhive_wasm.js
CHANGED
|
@@ -182,11 +182,22 @@ function debugString(val) {
|
|
|
182
182
|
return className;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
186
|
+
ptr = ptr >>> 0;
|
|
187
|
+
const mem = getDataViewMemory0();
|
|
188
|
+
const result = [];
|
|
189
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
190
|
+
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
191
|
+
}
|
|
192
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
|
|
185
196
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
186
197
|
? { register: () => {}, unregister: () => {} }
|
|
187
198
|
: new FinalizationRegistry(
|
|
188
199
|
state => {
|
|
189
|
-
wasm.
|
|
200
|
+
wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
|
|
190
201
|
}
|
|
191
202
|
);
|
|
192
203
|
|
|
@@ -204,7 +215,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
204
215
|
return f(a, state.b, ...args);
|
|
205
216
|
} finally {
|
|
206
217
|
if (--state.cnt === 0) {
|
|
207
|
-
wasm.
|
|
218
|
+
wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
|
|
208
219
|
CLOSURE_DTORS.unregister(state);
|
|
209
220
|
} else {
|
|
210
221
|
state.a = a;
|
|
@@ -216,15 +227,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
216
227
|
return real;
|
|
217
228
|
}
|
|
218
229
|
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const result = [];
|
|
223
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
224
|
-
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
230
|
+
function _assertClass(instance, klass) {
|
|
231
|
+
if (!(instance instanceof klass)) {
|
|
232
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
225
233
|
}
|
|
226
|
-
|
|
227
|
-
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
237
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
238
|
+
for (let i = 0; i < array.length; i++) {
|
|
239
|
+
const add = addToExternrefTable0(array[i]);
|
|
240
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
241
|
+
}
|
|
242
|
+
WASM_VECTOR_LEN = array.length;
|
|
243
|
+
return ptr;
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -239,12 +255,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
239
255
|
wasm.__externref_table_dealloc(idx);
|
|
240
256
|
return value;
|
|
241
257
|
}
|
|
242
|
-
|
|
243
|
-
function _assertClass(instance, klass) {
|
|
244
|
-
if (!(instance instanceof klass)) {
|
|
245
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
258
|
/**
|
|
249
259
|
* Panic hook lets us get better error messages if our Rust code ever panics.
|
|
250
260
|
*
|
|
@@ -255,21 +265,12 @@ export function setPanicHook() {
|
|
|
255
265
|
wasm.setPanicHook();
|
|
256
266
|
}
|
|
257
267
|
|
|
258
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
259
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
260
|
-
for (let i = 0; i < array.length; i++) {
|
|
261
|
-
const add = addToExternrefTable0(array[i]);
|
|
262
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
263
|
-
}
|
|
264
|
-
WASM_VECTOR_LEN = array.length;
|
|
265
|
-
return ptr;
|
|
266
|
-
}
|
|
267
268
|
function __wbg_adapter_6(arg0, arg1, arg2) {
|
|
268
|
-
wasm.
|
|
269
|
+
wasm.closure494_externref_shim(arg0, arg1, arg2);
|
|
269
270
|
}
|
|
270
271
|
|
|
271
|
-
function
|
|
272
|
-
wasm.
|
|
272
|
+
function __wbg_adapter_269(arg0, arg1, arg2, arg3) {
|
|
273
|
+
wasm.closure651_externref_shim(arg0, arg1, arg2, arg3);
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -331,14 +332,6 @@ const AddMemberErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
331
332
|
|
|
332
333
|
export class AddMemberError {
|
|
333
334
|
|
|
334
|
-
static __wrap(ptr) {
|
|
335
|
-
ptr = ptr >>> 0;
|
|
336
|
-
const obj = Object.create(AddMemberError.prototype);
|
|
337
|
-
obj.__wbg_ptr = ptr;
|
|
338
|
-
AddMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
339
|
-
return obj;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
335
|
__destroy_into_raw() {
|
|
343
336
|
const ptr = this.__wbg_ptr;
|
|
344
337
|
this.__wbg_ptr = 0;
|
|
@@ -1045,6 +1038,13 @@ export class Document {
|
|
|
1045
1038
|
const ret = wasm.document_toAgent(this.__wbg_ptr);
|
|
1046
1039
|
return Agent.__wrap(ret);
|
|
1047
1040
|
}
|
|
1041
|
+
/**
|
|
1042
|
+
* @returns {Membered}
|
|
1043
|
+
*/
|
|
1044
|
+
toMembered() {
|
|
1045
|
+
const ret = wasm.document_toMembered(this.__wbg_ptr);
|
|
1046
|
+
return Membered.__wrap(ret);
|
|
1047
|
+
}
|
|
1048
1048
|
}
|
|
1049
1049
|
if (Symbol.dispose) Document.prototype[Symbol.dispose] = Document.prototype.free;
|
|
1050
1050
|
|
|
@@ -1090,11 +1090,11 @@ export class DocumentId {
|
|
|
1090
1090
|
/**
|
|
1091
1091
|
* @returns {string}
|
|
1092
1092
|
*/
|
|
1093
|
-
|
|
1093
|
+
toString() {
|
|
1094
1094
|
let deferred1_0;
|
|
1095
1095
|
let deferred1_1;
|
|
1096
1096
|
try {
|
|
1097
|
-
const ret = wasm.
|
|
1097
|
+
const ret = wasm.documentid_toString(this.__wbg_ptr);
|
|
1098
1098
|
deferred1_0 = ret[0];
|
|
1099
1099
|
deferred1_1 = ret[1];
|
|
1100
1100
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1322,14 +1322,6 @@ const GenerateDocErrorFinalization = (typeof FinalizationRegistry === 'undefined
|
|
|
1322
1322
|
|
|
1323
1323
|
export class GenerateDocError {
|
|
1324
1324
|
|
|
1325
|
-
static __wrap(ptr) {
|
|
1326
|
-
ptr = ptr >>> 0;
|
|
1327
|
-
const obj = Object.create(GenerateDocError.prototype);
|
|
1328
|
-
obj.__wbg_ptr = ptr;
|
|
1329
|
-
GenerateDocErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1330
|
-
return obj;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
1325
|
__destroy_into_raw() {
|
|
1334
1326
|
const ptr = this.__wbg_ptr;
|
|
1335
1327
|
this.__wbg_ptr = 0;
|
|
@@ -1787,14 +1779,6 @@ const JsDecryptErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1787
1779
|
|
|
1788
1780
|
export class JsDecryptError {
|
|
1789
1781
|
|
|
1790
|
-
static __wrap(ptr) {
|
|
1791
|
-
ptr = ptr >>> 0;
|
|
1792
|
-
const obj = Object.create(JsDecryptError.prototype);
|
|
1793
|
-
obj.__wbg_ptr = ptr;
|
|
1794
|
-
JsDecryptErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1795
|
-
return obj;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
1782
|
__destroy_into_raw() {
|
|
1799
1783
|
const ptr = this.__wbg_ptr;
|
|
1800
1784
|
this.__wbg_ptr = 0;
|
|
@@ -1815,14 +1799,6 @@ const JsEncryptErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1815
1799
|
|
|
1816
1800
|
export class JsEncryptError {
|
|
1817
1801
|
|
|
1818
|
-
static __wrap(ptr) {
|
|
1819
|
-
ptr = ptr >>> 0;
|
|
1820
|
-
const obj = Object.create(JsEncryptError.prototype);
|
|
1821
|
-
obj.__wbg_ptr = ptr;
|
|
1822
|
-
JsEncryptErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1823
|
-
return obj;
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
1802
|
__destroy_into_raw() {
|
|
1827
1803
|
const ptr = this.__wbg_ptr;
|
|
1828
1804
|
this.__wbg_ptr = 0;
|
|
@@ -1843,14 +1819,6 @@ const JsReceivePreKeyOpErrorFinalization = (typeof FinalizationRegistry === 'und
|
|
|
1843
1819
|
|
|
1844
1820
|
export class JsReceivePreKeyOpError {
|
|
1845
1821
|
|
|
1846
|
-
static __wrap(ptr) {
|
|
1847
|
-
ptr = ptr >>> 0;
|
|
1848
|
-
const obj = Object.create(JsReceivePreKeyOpError.prototype);
|
|
1849
|
-
obj.__wbg_ptr = ptr;
|
|
1850
|
-
JsReceivePreKeyOpErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1851
|
-
return obj;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
1822
|
__destroy_into_raw() {
|
|
1855
1823
|
const ptr = this.__wbg_ptr;
|
|
1856
1824
|
this.__wbg_ptr = 0;
|
|
@@ -1945,6 +1913,13 @@ export class Keyhive {
|
|
|
1945
1913
|
const ret = wasm.keyhive_id(this.__wbg_ptr);
|
|
1946
1914
|
return IndividualId.__wrap(ret);
|
|
1947
1915
|
}
|
|
1916
|
+
/**
|
|
1917
|
+
* @returns {Individual}
|
|
1918
|
+
*/
|
|
1919
|
+
get individual() {
|
|
1920
|
+
const ret = wasm.keyhive_individual(this.__wbg_ptr);
|
|
1921
|
+
return Individual.__wrap(ret);
|
|
1922
|
+
}
|
|
1948
1923
|
/**
|
|
1949
1924
|
* @returns {string}
|
|
1950
1925
|
*/
|
|
@@ -2005,14 +1980,13 @@ export class Keyhive {
|
|
|
2005
1980
|
*/
|
|
2006
1981
|
tryEncrypt(doc, content_ref, pred_refs, content) {
|
|
2007
1982
|
_assertClass(doc, Document);
|
|
2008
|
-
var ptr0 = doc.__destroy_into_raw();
|
|
2009
1983
|
_assertClass(content_ref, ChangeRef);
|
|
2010
|
-
var
|
|
2011
|
-
const
|
|
1984
|
+
var ptr0 = content_ref.__destroy_into_raw();
|
|
1985
|
+
const ptr1 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
|
|
1986
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1987
|
+
const ptr2 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
2012
1988
|
const len2 = WASM_VECTOR_LEN;
|
|
2013
|
-
const
|
|
2014
|
-
const len3 = WASM_VECTOR_LEN;
|
|
2015
|
-
const ret = wasm.keyhive_tryEncrypt(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
|
|
1989
|
+
const ret = wasm.keyhive_tryEncrypt(this.__wbg_ptr, doc.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2);
|
|
2016
1990
|
return ret;
|
|
2017
1991
|
}
|
|
2018
1992
|
/**
|
|
@@ -2024,14 +1998,13 @@ export class Keyhive {
|
|
|
2024
1998
|
*/
|
|
2025
1999
|
tryEncryptArchive(doc, content_ref, pred_refs, content) {
|
|
2026
2000
|
_assertClass(doc, Document);
|
|
2027
|
-
var ptr0 = doc.__destroy_into_raw();
|
|
2028
2001
|
_assertClass(content_ref, ChangeRef);
|
|
2029
|
-
var
|
|
2030
|
-
const
|
|
2002
|
+
var ptr0 = content_ref.__destroy_into_raw();
|
|
2003
|
+
const ptr1 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
|
|
2004
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2005
|
+
const ptr2 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
2031
2006
|
const len2 = WASM_VECTOR_LEN;
|
|
2032
|
-
const
|
|
2033
|
-
const len3 = WASM_VECTOR_LEN;
|
|
2034
|
-
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
|
|
2007
|
+
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2);
|
|
2035
2008
|
return ret;
|
|
2036
2009
|
}
|
|
2037
2010
|
/**
|
|
@@ -2041,16 +2014,14 @@ export class Keyhive {
|
|
|
2041
2014
|
*/
|
|
2042
2015
|
tryDecrypt(doc, encrypted) {
|
|
2043
2016
|
_assertClass(doc, Document);
|
|
2044
|
-
var ptr0 = doc.__destroy_into_raw();
|
|
2045
2017
|
_assertClass(encrypted, Encrypted);
|
|
2046
|
-
|
|
2047
|
-
const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, ptr0, ptr1);
|
|
2018
|
+
const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
|
|
2048
2019
|
if (ret[3]) {
|
|
2049
2020
|
throw takeFromExternrefTable0(ret[2]);
|
|
2050
2021
|
}
|
|
2051
|
-
var
|
|
2022
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2052
2023
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2053
|
-
return
|
|
2024
|
+
return v1;
|
|
2054
2025
|
}
|
|
2055
2026
|
/**
|
|
2056
2027
|
* @param {Agent} to_add
|
|
@@ -2129,8 +2100,7 @@ export class Keyhive {
|
|
|
2129
2100
|
*/
|
|
2130
2101
|
receiveContactCard(contact_card) {
|
|
2131
2102
|
_assertClass(contact_card, ContactCard);
|
|
2132
|
-
|
|
2133
|
-
const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, ptr0);
|
|
2103
|
+
const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, contact_card.__wbg_ptr);
|
|
2134
2104
|
if (ret[2]) {
|
|
2135
2105
|
throw takeFromExternrefTable0(ret[1]);
|
|
2136
2106
|
}
|
|
@@ -2146,14 +2116,23 @@ export class Keyhive {
|
|
|
2146
2116
|
return ret === 0 ? undefined : Agent.__wrap(ret);
|
|
2147
2117
|
}
|
|
2148
2118
|
/**
|
|
2149
|
-
* @param {
|
|
2119
|
+
* @param {GroupId} id
|
|
2150
2120
|
* @returns {Group | undefined}
|
|
2151
2121
|
*/
|
|
2152
2122
|
getGroup(id) {
|
|
2153
|
-
_assertClass(id,
|
|
2123
|
+
_assertClass(id, GroupId);
|
|
2154
2124
|
const ret = wasm.keyhive_getGroup(this.__wbg_ptr, id.__wbg_ptr);
|
|
2155
2125
|
return ret === 0 ? undefined : Group.__wrap(ret);
|
|
2156
2126
|
}
|
|
2127
|
+
/**
|
|
2128
|
+
* @param {DocumentId} id
|
|
2129
|
+
* @returns {Document | undefined}
|
|
2130
|
+
*/
|
|
2131
|
+
getDocument(id) {
|
|
2132
|
+
_assertClass(id, DocumentId);
|
|
2133
|
+
const ret = wasm.keyhive_getDocument(this.__wbg_ptr, id.__wbg_ptr);
|
|
2134
|
+
return ret === 0 ? undefined : Document.__wrap(ret);
|
|
2135
|
+
}
|
|
2157
2136
|
/**
|
|
2158
2137
|
* @param {DocumentId} doc_id
|
|
2159
2138
|
* @returns {SimpleCapability[]}
|
|
@@ -2384,14 +2363,6 @@ const RevokeMemberErrorFinalization = (typeof FinalizationRegistry === 'undefine
|
|
|
2384
2363
|
|
|
2385
2364
|
export class RevokeMemberError {
|
|
2386
2365
|
|
|
2387
|
-
static __wrap(ptr) {
|
|
2388
|
-
ptr = ptr >>> 0;
|
|
2389
|
-
const obj = Object.create(RevokeMemberError.prototype);
|
|
2390
|
-
obj.__wbg_ptr = ptr;
|
|
2391
|
-
RevokeMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2392
|
-
return obj;
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
2366
|
__destroy_into_raw() {
|
|
2396
2367
|
const ptr = this.__wbg_ptr;
|
|
2397
2368
|
this.__wbg_ptr = 0;
|
|
@@ -3082,10 +3053,6 @@ function __wbg_get_imports() {
|
|
|
3082
3053
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
3083
3054
|
return ret;
|
|
3084
3055
|
};
|
|
3085
|
-
imports.wbg.__wbg_addmembererror_new = function(arg0) {
|
|
3086
|
-
const ret = AddMemberError.__wrap(arg0);
|
|
3087
|
-
return ret;
|
|
3088
|
-
};
|
|
3089
3056
|
imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
3090
3057
|
const ret = arg0.call(arg1);
|
|
3091
3058
|
return ret;
|
|
@@ -3122,10 +3089,6 @@ function __wbg_get_imports() {
|
|
|
3122
3089
|
const ret = arg0.crypto;
|
|
3123
3090
|
return ret;
|
|
3124
3091
|
};
|
|
3125
|
-
imports.wbg.__wbg_crypto_92ce5ebc02988b17 = function() { return handleError(function (arg0) {
|
|
3126
|
-
const ret = arg0.crypto;
|
|
3127
|
-
return ret;
|
|
3128
|
-
}, arguments) };
|
|
3129
3092
|
imports.wbg.__wbg_doccontentrefs_new = function(arg0) {
|
|
3130
3093
|
const ret = DocContentRefs.__wrap(arg0);
|
|
3131
3094
|
return ret;
|
|
@@ -3165,10 +3128,6 @@ function __wbg_get_imports() {
|
|
|
3165
3128
|
const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
|
|
3166
3129
|
return ret;
|
|
3167
3130
|
}, arguments) };
|
|
3168
|
-
imports.wbg.__wbg_generatedocerror_new = function(arg0) {
|
|
3169
|
-
const ret = GenerateDocError.__wrap(arg0);
|
|
3170
|
-
return ret;
|
|
3171
|
-
};
|
|
3172
3131
|
imports.wbg.__wbg_generatewebcryptoerror_new = function(arg0) {
|
|
3173
3132
|
const ret = GenerateWebCryptoError.__wrap(arg0);
|
|
3174
3133
|
return ret;
|
|
@@ -3176,6 +3135,10 @@ function __wbg_get_imports() {
|
|
|
3176
3135
|
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
3177
3136
|
arg0.getRandomValues(arg1);
|
|
3178
3137
|
}, arguments) };
|
|
3138
|
+
imports.wbg.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
3139
|
+
const ret = Reflect.get(arg0, arg1);
|
|
3140
|
+
return ret;
|
|
3141
|
+
}, arguments) };
|
|
3179
3142
|
imports.wbg.__wbg_getprivatekey_2b060a8a8c19d828 = function(arg0) {
|
|
3180
3143
|
const ret = arg0.privateKey;
|
|
3181
3144
|
return ret;
|
|
@@ -3188,28 +3151,16 @@ function __wbg_get_imports() {
|
|
|
3188
3151
|
const ret = Group.__wrap(arg0);
|
|
3189
3152
|
return ret;
|
|
3190
3153
|
};
|
|
3191
|
-
imports.wbg.
|
|
3154
|
+
imports.wbg.__wbg_instanceof_Crypto_33ac2d91cca59233 = function(arg0) {
|
|
3192
3155
|
let result;
|
|
3193
3156
|
try {
|
|
3194
|
-
result = arg0 instanceof
|
|
3157
|
+
result = arg0 instanceof Crypto;
|
|
3195
3158
|
} catch (_) {
|
|
3196
3159
|
result = false;
|
|
3197
3160
|
}
|
|
3198
3161
|
const ret = result;
|
|
3199
3162
|
return ret;
|
|
3200
3163
|
};
|
|
3201
|
-
imports.wbg.__wbg_jsdecrypterror_new = function(arg0) {
|
|
3202
|
-
const ret = JsDecryptError.__wrap(arg0);
|
|
3203
|
-
return ret;
|
|
3204
|
-
};
|
|
3205
|
-
imports.wbg.__wbg_jsencrypterror_new = function(arg0) {
|
|
3206
|
-
const ret = JsEncryptError.__wrap(arg0);
|
|
3207
|
-
return ret;
|
|
3208
|
-
};
|
|
3209
|
-
imports.wbg.__wbg_jsreceiveprekeyoperror_new = function(arg0) {
|
|
3210
|
-
const ret = JsReceivePreKeyOpError.__wrap(arg0);
|
|
3211
|
-
return ret;
|
|
3212
|
-
};
|
|
3213
3164
|
imports.wbg.__wbg_jsreceivestaticeventerror_new = function(arg0) {
|
|
3214
3165
|
const ret = JsReceiveStaticEventError.__wrap(arg0);
|
|
3215
3166
|
return ret;
|
|
@@ -3222,6 +3173,47 @@ function __wbg_get_imports() {
|
|
|
3222
3173
|
const ret = arg0.length;
|
|
3223
3174
|
return ret;
|
|
3224
3175
|
};
|
|
3176
|
+
imports.wbg.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
3177
|
+
let deferred0_0;
|
|
3178
|
+
let deferred0_1;
|
|
3179
|
+
try {
|
|
3180
|
+
deferred0_0 = arg0;
|
|
3181
|
+
deferred0_1 = arg1;
|
|
3182
|
+
console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
3183
|
+
} finally {
|
|
3184
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3185
|
+
}
|
|
3186
|
+
};
|
|
3187
|
+
imports.wbg.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
|
|
3188
|
+
let deferred0_0;
|
|
3189
|
+
let deferred0_1;
|
|
3190
|
+
try {
|
|
3191
|
+
deferred0_0 = arg0;
|
|
3192
|
+
deferred0_1 = arg1;
|
|
3193
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
3194
|
+
} finally {
|
|
3195
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3196
|
+
}
|
|
3197
|
+
};
|
|
3198
|
+
imports.wbg.__wbg_mark_7438147ce31e9d4b = function(arg0, arg1) {
|
|
3199
|
+
performance.mark(getStringFromWasm0(arg0, arg1));
|
|
3200
|
+
};
|
|
3201
|
+
imports.wbg.__wbg_measure_fb7825c11612c823 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3202
|
+
let deferred0_0;
|
|
3203
|
+
let deferred0_1;
|
|
3204
|
+
let deferred1_0;
|
|
3205
|
+
let deferred1_1;
|
|
3206
|
+
try {
|
|
3207
|
+
deferred0_0 = arg0;
|
|
3208
|
+
deferred0_1 = arg1;
|
|
3209
|
+
deferred1_0 = arg2;
|
|
3210
|
+
deferred1_1 = arg3;
|
|
3211
|
+
performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
3212
|
+
} finally {
|
|
3213
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3214
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3215
|
+
}
|
|
3216
|
+
}, arguments) };
|
|
3225
3217
|
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
3226
3218
|
const ret = arg0.msCrypto;
|
|
3227
3219
|
return ret;
|
|
@@ -3233,7 +3225,7 @@ function __wbg_get_imports() {
|
|
|
3233
3225
|
const a = state0.a;
|
|
3234
3226
|
state0.a = 0;
|
|
3235
3227
|
try {
|
|
3236
|
-
return
|
|
3228
|
+
return __wbg_adapter_269(a, state0.b, arg0, arg1);
|
|
3237
3229
|
} finally {
|
|
3238
3230
|
state0.a = a;
|
|
3239
3231
|
}
|
|
@@ -3293,10 +3285,6 @@ function __wbg_get_imports() {
|
|
|
3293
3285
|
const ret = Promise.resolve(arg0);
|
|
3294
3286
|
return ret;
|
|
3295
3287
|
};
|
|
3296
|
-
imports.wbg.__wbg_revokemembererror_new = function(arg0) {
|
|
3297
|
-
const ret = RevokeMemberError.__wrap(arg0);
|
|
3298
|
-
return ret;
|
|
3299
|
-
};
|
|
3300
3288
|
imports.wbg.__wbg_serializationerror_new = function(arg0) {
|
|
3301
3289
|
const ret = SerializationError.__wrap(arg0);
|
|
3302
3290
|
return ret;
|
|
@@ -3420,11 +3408,6 @@ function __wbg_get_imports() {
|
|
|
3420
3408
|
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
3421
3409
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3422
3410
|
};
|
|
3423
|
-
imports.wbg.__wbindgen_cast_133053e9d0cd85aa = function(arg0, arg1) {
|
|
3424
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 422, function: Function { arguments: [Externref], shim_idx: 423, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3425
|
-
const ret = makeMutClosure(arg0, arg1, 422, __wbg_adapter_6);
|
|
3426
|
-
return ret;
|
|
3427
|
-
};
|
|
3428
3411
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3429
3412
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3430
3413
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -3437,6 +3420,11 @@ function __wbg_get_imports() {
|
|
|
3437
3420
|
const ret = v0;
|
|
3438
3421
|
return ret;
|
|
3439
3422
|
};
|
|
3423
|
+
imports.wbg.__wbindgen_cast_670db80a6df12494 = function(arg0, arg1) {
|
|
3424
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 493, function: Function { arguments: [Externref], shim_idx: 494, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3425
|
+
const ret = makeMutClosure(arg0, arg1, 493, __wbg_adapter_6);
|
|
3426
|
+
return ret;
|
|
3427
|
+
};
|
|
3440
3428
|
imports.wbg.__wbindgen_cast_ae91babfc5c19b28 = function(arg0, arg1) {
|
|
3441
3429
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3442
3430
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
Binary file
|