@maxandriani/indy-besu-vdr-nodejs 0.0.0-stage → 0.1.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/README.md +73 -2
- package/indy_besu_vdr_wasm.d.ts +511 -0
- package/indy_besu_vdr_wasm.js +2696 -0
- package/indy_besu_vdr_wasm_bg.wasm +0 -0
- package/package.json +22 -4
|
@@ -0,0 +1,2696 @@
|
|
|
1
|
+
|
|
2
|
+
let imports = {};
|
|
3
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
+
|
|
5
|
+
function addToExternrefTable0(obj) {
|
|
6
|
+
const idx = wasm.__externref_table_alloc();
|
|
7
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
8
|
+
return idx;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function _assertClass(instance, klass) {
|
|
12
|
+
if (!(instance instanceof klass)) {
|
|
13
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
18
|
+
? { register: () => {}, unregister: () => {} }
|
|
19
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
20
|
+
|
|
21
|
+
function debugString(val) {
|
|
22
|
+
// primitive types
|
|
23
|
+
const type = typeof val;
|
|
24
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
25
|
+
return `${val}`;
|
|
26
|
+
}
|
|
27
|
+
if (type == 'string') {
|
|
28
|
+
return `"${val}"`;
|
|
29
|
+
}
|
|
30
|
+
if (type == 'symbol') {
|
|
31
|
+
const description = val.description;
|
|
32
|
+
if (description == null) {
|
|
33
|
+
return 'Symbol';
|
|
34
|
+
} else {
|
|
35
|
+
return `Symbol(${description})`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (type == 'function') {
|
|
39
|
+
const name = val.name;
|
|
40
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
41
|
+
return `Function(${name})`;
|
|
42
|
+
} else {
|
|
43
|
+
return 'Function';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// objects
|
|
47
|
+
if (Array.isArray(val)) {
|
|
48
|
+
const length = val.length;
|
|
49
|
+
let debug = '[';
|
|
50
|
+
if (length > 0) {
|
|
51
|
+
debug += debugString(val[0]);
|
|
52
|
+
}
|
|
53
|
+
for(let i = 1; i < length; i++) {
|
|
54
|
+
debug += ', ' + debugString(val[i]);
|
|
55
|
+
}
|
|
56
|
+
debug += ']';
|
|
57
|
+
return debug;
|
|
58
|
+
}
|
|
59
|
+
// Test for built-in
|
|
60
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
61
|
+
let className;
|
|
62
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
63
|
+
className = builtInMatches[1];
|
|
64
|
+
} else {
|
|
65
|
+
// Failed to match the standard '[object ClassName]'
|
|
66
|
+
return toString.call(val);
|
|
67
|
+
}
|
|
68
|
+
if (className == 'Object') {
|
|
69
|
+
// we're a user defined class or Object
|
|
70
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
71
|
+
// easier than looping through ownProperties of `val`.
|
|
72
|
+
try {
|
|
73
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
74
|
+
} catch (_) {
|
|
75
|
+
return 'Object';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// errors
|
|
79
|
+
if (val instanceof Error) {
|
|
80
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
81
|
+
}
|
|
82
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
83
|
+
return className;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
87
|
+
ptr = ptr >>> 0;
|
|
88
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let cachedDataViewMemory0 = null;
|
|
92
|
+
function getDataViewMemory0() {
|
|
93
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
94
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
95
|
+
}
|
|
96
|
+
return cachedDataViewMemory0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function getStringFromWasm0(ptr, len) {
|
|
100
|
+
ptr = ptr >>> 0;
|
|
101
|
+
return decodeText(ptr, len);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let cachedUint32ArrayMemory0 = null;
|
|
105
|
+
function getUint32ArrayMemory0() {
|
|
106
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
107
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
108
|
+
}
|
|
109
|
+
return cachedUint32ArrayMemory0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let cachedUint8ArrayMemory0 = null;
|
|
113
|
+
function getUint8ArrayMemory0() {
|
|
114
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
115
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
116
|
+
}
|
|
117
|
+
return cachedUint8ArrayMemory0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function handleError(f, args) {
|
|
121
|
+
try {
|
|
122
|
+
return f.apply(this, args);
|
|
123
|
+
} catch (e) {
|
|
124
|
+
const idx = addToExternrefTable0(e);
|
|
125
|
+
wasm.__wbindgen_exn_store(idx);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function isLikeNone(x) {
|
|
130
|
+
return x === undefined || x === null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
134
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
135
|
+
const real = (...args) => {
|
|
136
|
+
|
|
137
|
+
// First up with a closure we increment the internal reference
|
|
138
|
+
// count. This ensures that the Rust closure environment won't
|
|
139
|
+
// be deallocated while we're invoking it.
|
|
140
|
+
state.cnt++;
|
|
141
|
+
const a = state.a;
|
|
142
|
+
state.a = 0;
|
|
143
|
+
try {
|
|
144
|
+
return f(a, state.b, ...args);
|
|
145
|
+
} finally {
|
|
146
|
+
state.a = a;
|
|
147
|
+
real._wbg_cb_unref();
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
real._wbg_cb_unref = () => {
|
|
151
|
+
if (--state.cnt === 0) {
|
|
152
|
+
state.dtor(state.a, state.b);
|
|
153
|
+
state.a = 0;
|
|
154
|
+
CLOSURE_DTORS.unregister(state);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
158
|
+
return real;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
162
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
163
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
164
|
+
WASM_VECTOR_LEN = arg.length;
|
|
165
|
+
return ptr;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
169
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
170
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
171
|
+
WASM_VECTOR_LEN = arg.length;
|
|
172
|
+
return ptr;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
176
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
177
|
+
for (let i = 0; i < array.length; i++) {
|
|
178
|
+
const add = addToExternrefTable0(array[i]);
|
|
179
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
180
|
+
}
|
|
181
|
+
WASM_VECTOR_LEN = array.length;
|
|
182
|
+
return ptr;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
186
|
+
if (realloc === undefined) {
|
|
187
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
188
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
189
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
190
|
+
WASM_VECTOR_LEN = buf.length;
|
|
191
|
+
return ptr;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
let len = arg.length;
|
|
195
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
196
|
+
|
|
197
|
+
const mem = getUint8ArrayMemory0();
|
|
198
|
+
|
|
199
|
+
let offset = 0;
|
|
200
|
+
|
|
201
|
+
for (; offset < len; offset++) {
|
|
202
|
+
const code = arg.charCodeAt(offset);
|
|
203
|
+
if (code > 0x7F) break;
|
|
204
|
+
mem[ptr + offset] = code;
|
|
205
|
+
}
|
|
206
|
+
if (offset !== len) {
|
|
207
|
+
if (offset !== 0) {
|
|
208
|
+
arg = arg.slice(offset);
|
|
209
|
+
}
|
|
210
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
211
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
212
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
213
|
+
|
|
214
|
+
offset += ret.written;
|
|
215
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
WASM_VECTOR_LEN = offset;
|
|
219
|
+
return ptr;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function takeFromExternrefTable0(idx) {
|
|
223
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
224
|
+
wasm.__externref_table_dealloc(idx);
|
|
225
|
+
return value;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
229
|
+
cachedTextDecoder.decode();
|
|
230
|
+
function decodeText(ptr, len) {
|
|
231
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const cachedTextEncoder = new TextEncoder();
|
|
235
|
+
|
|
236
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
237
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
238
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
239
|
+
view.set(buf);
|
|
240
|
+
return {
|
|
241
|
+
read: arg.length,
|
|
242
|
+
written: buf.length
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let WASM_VECTOR_LEN = 0;
|
|
248
|
+
|
|
249
|
+
function wasm_bindgen__convert__closures_____invoke__h711c3930aef5dacf(arg0, arg1) {
|
|
250
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h711c3930aef5dacf(arg0, arg1);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function wasm_bindgen__convert__closures_____invoke__hf4d0e3d1df92b3f7(arg0, arg1, arg2) {
|
|
254
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hf4d0e3d1df92b3f7(arg0, arg1, arg2);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function wasm_bindgen__convert__closures_____invoke__h184b7a090947292c(arg0, arg1) {
|
|
258
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h184b7a090947292c(arg0, arg1);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function wasm_bindgen__convert__closures_____invoke__hbabdd7037359511e(arg0, arg1, arg2, arg3) {
|
|
262
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hbabdd7037359511e(arg0, arg1, arg2, arg3);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
266
|
+
|
|
267
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
268
|
+
|
|
269
|
+
const CredentialDefinitionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
270
|
+
? { register: () => {}, unregister: () => {} }
|
|
271
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_credentialdefinition_free(ptr >>> 0, 1));
|
|
272
|
+
|
|
273
|
+
const CredentialDefinitionRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
274
|
+
? { register: () => {}, unregister: () => {} }
|
|
275
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_credentialdefinitionregistry_free(ptr >>> 0, 1));
|
|
276
|
+
|
|
277
|
+
const DidResolverFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
278
|
+
? { register: () => {}, unregister: () => {} }
|
|
279
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_didresolver_free(ptr >>> 0, 1));
|
|
280
|
+
|
|
281
|
+
const EndorsementFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
282
|
+
? { register: () => {}, unregister: () => {} }
|
|
283
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_endorsement_free(ptr >>> 0, 1));
|
|
284
|
+
|
|
285
|
+
const EthrDidRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
286
|
+
? { register: () => {}, unregister: () => {} }
|
|
287
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ethrdidregistry_free(ptr >>> 0, 1));
|
|
288
|
+
|
|
289
|
+
const EventQueryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
290
|
+
? { register: () => {}, unregister: () => {} }
|
|
291
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eventquery_free(ptr >>> 0, 1));
|
|
292
|
+
|
|
293
|
+
const IndyDidRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
294
|
+
? { register: () => {}, unregister: () => {} }
|
|
295
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_indydidregistry_free(ptr >>> 0, 1));
|
|
296
|
+
|
|
297
|
+
const LedgerClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
298
|
+
? { register: () => {}, unregister: () => {} }
|
|
299
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ledgerclient_free(ptr >>> 0, 1));
|
|
300
|
+
|
|
301
|
+
const LegacyMappingRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
302
|
+
? { register: () => {}, unregister: () => {} }
|
|
303
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_legacymappingregistry_free(ptr >>> 0, 1));
|
|
304
|
+
|
|
305
|
+
const RevocationRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
306
|
+
? { register: () => {}, unregister: () => {} }
|
|
307
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_revocationregistry_free(ptr >>> 0, 1));
|
|
308
|
+
|
|
309
|
+
const RevocationRegistryDefinitionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
310
|
+
? { register: () => {}, unregister: () => {} }
|
|
311
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_revocationregistrydefinition_free(ptr >>> 0, 1));
|
|
312
|
+
|
|
313
|
+
const RevocationRegistryEntryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
314
|
+
? { register: () => {}, unregister: () => {} }
|
|
315
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_revocationregistryentry_free(ptr >>> 0, 1));
|
|
316
|
+
|
|
317
|
+
const RevocationRegistryStatusListFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
318
|
+
? { register: () => {}, unregister: () => {} }
|
|
319
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_revocationregistrystatuslist_free(ptr >>> 0, 1));
|
|
320
|
+
|
|
321
|
+
const RoleControlFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
322
|
+
? { register: () => {}, unregister: () => {} }
|
|
323
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rolecontrol_free(ptr >>> 0, 1));
|
|
324
|
+
|
|
325
|
+
const SchemaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
326
|
+
? { register: () => {}, unregister: () => {} }
|
|
327
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_schema_free(ptr >>> 0, 1));
|
|
328
|
+
|
|
329
|
+
const SchemaRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
330
|
+
? { register: () => {}, unregister: () => {} }
|
|
331
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_schemaregistry_free(ptr >>> 0, 1));
|
|
332
|
+
|
|
333
|
+
const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
334
|
+
? { register: () => {}, unregister: () => {} }
|
|
335
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0, 1));
|
|
336
|
+
|
|
337
|
+
const TransactionEndorsingDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
338
|
+
? { register: () => {}, unregister: () => {} }
|
|
339
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transactionendorsingdata_free(ptr >>> 0, 1));
|
|
340
|
+
|
|
341
|
+
const ValidatorControlFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
342
|
+
? { register: () => {}, unregister: () => {} }
|
|
343
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_validatorcontrol_free(ptr >>> 0, 1));
|
|
344
|
+
|
|
345
|
+
class CredentialDefinition {
|
|
346
|
+
static __wrap(ptr) {
|
|
347
|
+
ptr = ptr >>> 0;
|
|
348
|
+
const obj = Object.create(CredentialDefinition.prototype);
|
|
349
|
+
obj.__wbg_ptr = ptr;
|
|
350
|
+
CredentialDefinitionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
351
|
+
return obj;
|
|
352
|
+
}
|
|
353
|
+
__destroy_into_raw() {
|
|
354
|
+
const ptr = this.__wbg_ptr;
|
|
355
|
+
this.__wbg_ptr = 0;
|
|
356
|
+
CredentialDefinitionFinalization.unregister(this);
|
|
357
|
+
return ptr;
|
|
358
|
+
}
|
|
359
|
+
free() {
|
|
360
|
+
const ptr = this.__destroy_into_raw();
|
|
361
|
+
wasm.__wbg_credentialdefinition_free(ptr, 0);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @param {string} string
|
|
365
|
+
* @returns {CredentialDefinition}
|
|
366
|
+
*/
|
|
367
|
+
static fromString(string) {
|
|
368
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
|
+
const len0 = WASM_VECTOR_LEN;
|
|
370
|
+
const ret = wasm.credentialdefinition_fromString(ptr0, len0);
|
|
371
|
+
if (ret[2]) {
|
|
372
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
373
|
+
}
|
|
374
|
+
return CredentialDefinition.__wrap(ret[0]);
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* @param {string} issuer_id
|
|
378
|
+
* @param {string} schema_id
|
|
379
|
+
* @param {string} tag
|
|
380
|
+
* @param {Record<string, unknown>} value
|
|
381
|
+
*/
|
|
382
|
+
constructor(issuer_id, schema_id, tag, value) {
|
|
383
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
384
|
+
const len0 = WASM_VECTOR_LEN;
|
|
385
|
+
const ptr1 = passStringToWasm0(schema_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
386
|
+
const len1 = WASM_VECTOR_LEN;
|
|
387
|
+
const ptr2 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
+
const len2 = WASM_VECTOR_LEN;
|
|
389
|
+
const ret = wasm.credentialdefinition_new(ptr0, len0, ptr1, len1, ptr2, len2, value);
|
|
390
|
+
this.__wbg_ptr = ret >>> 0;
|
|
391
|
+
CredentialDefinitionFinalization.register(this, this.__wbg_ptr, this);
|
|
392
|
+
return this;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* @returns {string}
|
|
396
|
+
*/
|
|
397
|
+
getId() {
|
|
398
|
+
let deferred1_0;
|
|
399
|
+
let deferred1_1;
|
|
400
|
+
try {
|
|
401
|
+
const ret = wasm.credentialdefinition_getId(this.__wbg_ptr);
|
|
402
|
+
deferred1_0 = ret[0];
|
|
403
|
+
deferred1_1 = ret[1];
|
|
404
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
405
|
+
} finally {
|
|
406
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* @returns {CredentialDefinitionData}
|
|
411
|
+
*/
|
|
412
|
+
asValue() {
|
|
413
|
+
const ret = wasm.credentialdefinition_asValue(this.__wbg_ptr);
|
|
414
|
+
if (ret[2]) {
|
|
415
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
416
|
+
}
|
|
417
|
+
return takeFromExternrefTable0(ret[0]);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* @returns {string}
|
|
421
|
+
*/
|
|
422
|
+
toString() {
|
|
423
|
+
let deferred2_0;
|
|
424
|
+
let deferred2_1;
|
|
425
|
+
try {
|
|
426
|
+
const ret = wasm.credentialdefinition_toString(this.__wbg_ptr);
|
|
427
|
+
var ptr1 = ret[0];
|
|
428
|
+
var len1 = ret[1];
|
|
429
|
+
if (ret[3]) {
|
|
430
|
+
ptr1 = 0; len1 = 0;
|
|
431
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
432
|
+
}
|
|
433
|
+
deferred2_0 = ptr1;
|
|
434
|
+
deferred2_1 = len1;
|
|
435
|
+
return getStringFromWasm0(ptr1, len1);
|
|
436
|
+
} finally {
|
|
437
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (Symbol.dispose) CredentialDefinition.prototype[Symbol.dispose] = CredentialDefinition.prototype.free;
|
|
442
|
+
exports.CredentialDefinition = CredentialDefinition;
|
|
443
|
+
|
|
444
|
+
class CredentialDefinitionRegistry {
|
|
445
|
+
__destroy_into_raw() {
|
|
446
|
+
const ptr = this.__wbg_ptr;
|
|
447
|
+
this.__wbg_ptr = 0;
|
|
448
|
+
CredentialDefinitionRegistryFinalization.unregister(this);
|
|
449
|
+
return ptr;
|
|
450
|
+
}
|
|
451
|
+
free() {
|
|
452
|
+
const ptr = this.__destroy_into_raw();
|
|
453
|
+
wasm.__wbg_credentialdefinitionregistry_free(ptr, 0);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* @param {LedgerClient} client
|
|
457
|
+
* @param {string} id
|
|
458
|
+
* @returns {Promise<CredentialDefinition>}
|
|
459
|
+
*/
|
|
460
|
+
static resolveCredentialDefinition(client, id) {
|
|
461
|
+
_assertClass(client, LedgerClient);
|
|
462
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
463
|
+
const len0 = WASM_VECTOR_LEN;
|
|
464
|
+
const ret = wasm.credentialdefinitionregistry_resolveCredentialDefinition(client.__wbg_ptr, ptr0, len0);
|
|
465
|
+
return ret;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* @param {LedgerClient} client
|
|
469
|
+
* @param {Uint8Array} bytes
|
|
470
|
+
* @returns {CredentialDefinitionRecord}
|
|
471
|
+
*/
|
|
472
|
+
static parseResolveCredentialDefinitionResult(client, bytes) {
|
|
473
|
+
_assertClass(client, LedgerClient);
|
|
474
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
476
|
+
const ret = wasm.credentialdefinitionregistry_parseResolveCredentialDefinitionResult(client.__wbg_ptr, ptr0, len0);
|
|
477
|
+
if (ret[2]) {
|
|
478
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
479
|
+
}
|
|
480
|
+
return takeFromExternrefTable0(ret[0]);
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* @param {LedgerClient} client
|
|
484
|
+
* @param {string} from
|
|
485
|
+
* @param {CredentialDefinition} cred_def
|
|
486
|
+
* @returns {Promise<Transaction>}
|
|
487
|
+
*/
|
|
488
|
+
static buildCreateCredentialDefinitionTransaction(client, from, cred_def) {
|
|
489
|
+
_assertClass(client, LedgerClient);
|
|
490
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
+
const len0 = WASM_VECTOR_LEN;
|
|
492
|
+
_assertClass(cred_def, CredentialDefinition);
|
|
493
|
+
const ret = wasm.credentialdefinitionregistry_buildCreateCredentialDefinitionTransaction(client.__wbg_ptr, ptr0, len0, cred_def.__wbg_ptr);
|
|
494
|
+
return ret;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @param {LedgerClient} client
|
|
498
|
+
* @param {string} id
|
|
499
|
+
* @returns {Promise<Transaction>}
|
|
500
|
+
*/
|
|
501
|
+
static buildResolveCredentialDefinitionTransaction(client, id) {
|
|
502
|
+
_assertClass(client, LedgerClient);
|
|
503
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
504
|
+
const len0 = WASM_VECTOR_LEN;
|
|
505
|
+
const ret = wasm.credentialdefinitionregistry_buildResolveCredentialDefinitionTransaction(client.__wbg_ptr, ptr0, len0);
|
|
506
|
+
return ret;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @param {LedgerClient} client
|
|
510
|
+
* @param {CredentialDefinition} cred_def
|
|
511
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
512
|
+
*/
|
|
513
|
+
static buildCreateCredentialDefinitionEndorsingData(client, cred_def) {
|
|
514
|
+
_assertClass(client, LedgerClient);
|
|
515
|
+
_assertClass(cred_def, CredentialDefinition);
|
|
516
|
+
const ret = wasm.credentialdefinitionregistry_buildCreateCredentialDefinitionEndorsingData(client.__wbg_ptr, cred_def.__wbg_ptr);
|
|
517
|
+
return ret;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (Symbol.dispose) CredentialDefinitionRegistry.prototype[Symbol.dispose] = CredentialDefinitionRegistry.prototype.free;
|
|
521
|
+
exports.CredentialDefinitionRegistry = CredentialDefinitionRegistry;
|
|
522
|
+
|
|
523
|
+
class DidResolver {
|
|
524
|
+
__destroy_into_raw() {
|
|
525
|
+
const ptr = this.__wbg_ptr;
|
|
526
|
+
this.__wbg_ptr = 0;
|
|
527
|
+
DidResolverFinalization.unregister(this);
|
|
528
|
+
return ptr;
|
|
529
|
+
}
|
|
530
|
+
free() {
|
|
531
|
+
const ptr = this.__destroy_into_raw();
|
|
532
|
+
wasm.__wbg_didresolver_free(ptr, 0);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @param {LedgerClient} client
|
|
536
|
+
* @param {string} did
|
|
537
|
+
* @param {DidResolutionOptions | undefined | null} options
|
|
538
|
+
* @returns {Promise<DidDocumentWithMeta>}
|
|
539
|
+
*/
|
|
540
|
+
static resolveDid(client, did, options) {
|
|
541
|
+
_assertClass(client, LedgerClient);
|
|
542
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
543
|
+
const len0 = WASM_VECTOR_LEN;
|
|
544
|
+
const ret = wasm.didresolver_resolveDid(client.__wbg_ptr, ptr0, len0, options);
|
|
545
|
+
return ret;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
if (Symbol.dispose) DidResolver.prototype[Symbol.dispose] = DidResolver.prototype.free;
|
|
549
|
+
exports.DidResolver = DidResolver;
|
|
550
|
+
|
|
551
|
+
class Endorsement {
|
|
552
|
+
__destroy_into_raw() {
|
|
553
|
+
const ptr = this.__wbg_ptr;
|
|
554
|
+
this.__wbg_ptr = 0;
|
|
555
|
+
EndorsementFinalization.unregister(this);
|
|
556
|
+
return ptr;
|
|
557
|
+
}
|
|
558
|
+
free() {
|
|
559
|
+
const ptr = this.__destroy_into_raw();
|
|
560
|
+
wasm.__wbg_endorsement_free(ptr, 0);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* @param {LedgerClient} client
|
|
564
|
+
* @param {string} from
|
|
565
|
+
* @param {TransactionEndorsingData} endorsing_data
|
|
566
|
+
* @returns {Promise<Transaction>}
|
|
567
|
+
*/
|
|
568
|
+
static buildEndorsementTransaction(client, from, endorsing_data) {
|
|
569
|
+
_assertClass(client, LedgerClient);
|
|
570
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
571
|
+
const len0 = WASM_VECTOR_LEN;
|
|
572
|
+
_assertClass(endorsing_data, TransactionEndorsingData);
|
|
573
|
+
const ret = wasm.endorsement_buildEndorsementTransaction(client.__wbg_ptr, ptr0, len0, endorsing_data.__wbg_ptr);
|
|
574
|
+
return ret;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (Symbol.dispose) Endorsement.prototype[Symbol.dispose] = Endorsement.prototype.free;
|
|
578
|
+
exports.Endorsement = Endorsement;
|
|
579
|
+
|
|
580
|
+
class EthrDidRegistry {
|
|
581
|
+
__destroy_into_raw() {
|
|
582
|
+
const ptr = this.__wbg_ptr;
|
|
583
|
+
this.__wbg_ptr = 0;
|
|
584
|
+
EthrDidRegistryFinalization.unregister(this);
|
|
585
|
+
return ptr;
|
|
586
|
+
}
|
|
587
|
+
free() {
|
|
588
|
+
const ptr = this.__destroy_into_raw();
|
|
589
|
+
wasm.__wbg_ethrdidregistry_free(ptr, 0);
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* @param {LedgerClient} client
|
|
593
|
+
* @param {Uint8Array} bytes
|
|
594
|
+
* @returns {string}
|
|
595
|
+
*/
|
|
596
|
+
static parseDidOwnerResult(client, bytes) {
|
|
597
|
+
let deferred3_0;
|
|
598
|
+
let deferred3_1;
|
|
599
|
+
try {
|
|
600
|
+
_assertClass(client, LedgerClient);
|
|
601
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
602
|
+
const len0 = WASM_VECTOR_LEN;
|
|
603
|
+
const ret = wasm.ethrdidregistry_parseDidOwnerResult(client.__wbg_ptr, ptr0, len0);
|
|
604
|
+
var ptr2 = ret[0];
|
|
605
|
+
var len2 = ret[1];
|
|
606
|
+
if (ret[3]) {
|
|
607
|
+
ptr2 = 0; len2 = 0;
|
|
608
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
609
|
+
}
|
|
610
|
+
deferred3_0 = ptr2;
|
|
611
|
+
deferred3_1 = len2;
|
|
612
|
+
return getStringFromWasm0(ptr2, len2);
|
|
613
|
+
} finally {
|
|
614
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* @param {LedgerClient} client
|
|
619
|
+
* @param {Uint8Array} bytes
|
|
620
|
+
* @returns {bigint}
|
|
621
|
+
*/
|
|
622
|
+
static parseDidChangedResult(client, bytes) {
|
|
623
|
+
_assertClass(client, LedgerClient);
|
|
624
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
625
|
+
const len0 = WASM_VECTOR_LEN;
|
|
626
|
+
const ret = wasm.ethrdidregistry_parseDidChangedResult(client.__wbg_ptr, ptr0, len0);
|
|
627
|
+
if (ret[2]) {
|
|
628
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
629
|
+
}
|
|
630
|
+
return BigInt.asUintN(64, ret[0]);
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* @param {LedgerClient} client
|
|
634
|
+
* @param {EventLog} log
|
|
635
|
+
* @returns {DidEvent}
|
|
636
|
+
*/
|
|
637
|
+
static parseDidEventResponse(client, log) {
|
|
638
|
+
_assertClass(client, LedgerClient);
|
|
639
|
+
const ret = wasm.ethrdidregistry_parseDidEventResponse(client.__wbg_ptr, log);
|
|
640
|
+
if (ret[2]) {
|
|
641
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
642
|
+
}
|
|
643
|
+
return takeFromExternrefTable0(ret[0]);
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* @param {LedgerClient} client
|
|
647
|
+
* @param {string} did
|
|
648
|
+
* @param {bigint | null} [from_block]
|
|
649
|
+
* @param {bigint | null} [to_block]
|
|
650
|
+
* @returns {Promise<EventQuery>}
|
|
651
|
+
*/
|
|
652
|
+
static buildGetDidEventsQuery(client, did, from_block, to_block) {
|
|
653
|
+
_assertClass(client, LedgerClient);
|
|
654
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
655
|
+
const len0 = WASM_VECTOR_LEN;
|
|
656
|
+
const ret = wasm.ethrdidregistry_buildGetDidEventsQuery(client.__wbg_ptr, ptr0, len0, !isLikeNone(from_block), isLikeNone(from_block) ? BigInt(0) : from_block, !isLikeNone(to_block), isLikeNone(to_block) ? BigInt(0) : to_block);
|
|
657
|
+
return ret;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* @param {LedgerClient} client
|
|
661
|
+
* @param {string} did
|
|
662
|
+
* @returns {Promise<Transaction>}
|
|
663
|
+
*/
|
|
664
|
+
static buildGetDidOwnerTransaction(client, did) {
|
|
665
|
+
_assertClass(client, LedgerClient);
|
|
666
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
667
|
+
const len0 = WASM_VECTOR_LEN;
|
|
668
|
+
const ret = wasm.ethrdidregistry_buildGetDidOwnerTransaction(client.__wbg_ptr, ptr0, len0);
|
|
669
|
+
return ret;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* @param {LedgerClient} client
|
|
673
|
+
* @param {string} did
|
|
674
|
+
* @returns {Promise<Transaction>}
|
|
675
|
+
*/
|
|
676
|
+
static buildGetDidChangedTransaction(client, did) {
|
|
677
|
+
_assertClass(client, LedgerClient);
|
|
678
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
679
|
+
const len0 = WASM_VECTOR_LEN;
|
|
680
|
+
const ret = wasm.ethrdidregistry_buildGetDidChangedTransaction(client.__wbg_ptr, ptr0, len0);
|
|
681
|
+
return ret;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* @param {LedgerClient} client
|
|
685
|
+
* @param {string} sender
|
|
686
|
+
* @param {string} did
|
|
687
|
+
* @param {string} delegate_type
|
|
688
|
+
* @param {string} delegate
|
|
689
|
+
* @param {bigint} validity
|
|
690
|
+
* @returns {Promise<Transaction>}
|
|
691
|
+
*/
|
|
692
|
+
static buildDidAddDelegateTransaction(client, sender, did, delegate_type, delegate, validity) {
|
|
693
|
+
_assertClass(client, LedgerClient);
|
|
694
|
+
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
695
|
+
const len0 = WASM_VECTOR_LEN;
|
|
696
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
697
|
+
const len1 = WASM_VECTOR_LEN;
|
|
698
|
+
const ptr2 = passStringToWasm0(delegate_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
+
const len2 = WASM_VECTOR_LEN;
|
|
700
|
+
const ptr3 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
|
+
const len3 = WASM_VECTOR_LEN;
|
|
702
|
+
const ret = wasm.ethrdidregistry_buildDidAddDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, validity);
|
|
703
|
+
return ret;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* @param {LedgerClient} client
|
|
707
|
+
* @param {string} sender
|
|
708
|
+
* @param {string} did
|
|
709
|
+
* @param {string} new_owner
|
|
710
|
+
* @returns {Promise<Transaction>}
|
|
711
|
+
*/
|
|
712
|
+
static buildDidChangeOwnerTransaction(client, sender, did, new_owner) {
|
|
713
|
+
_assertClass(client, LedgerClient);
|
|
714
|
+
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
715
|
+
const len0 = WASM_VECTOR_LEN;
|
|
716
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
717
|
+
const len1 = WASM_VECTOR_LEN;
|
|
718
|
+
const ptr2 = passStringToWasm0(new_owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
719
|
+
const len2 = WASM_VECTOR_LEN;
|
|
720
|
+
const ret = wasm.ethrdidregistry_buildDidChangeOwnerTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
721
|
+
return ret;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* @param {LedgerClient} client
|
|
725
|
+
* @param {string} sender
|
|
726
|
+
* @param {string} did
|
|
727
|
+
* @param {DidDocAttribute} attribute
|
|
728
|
+
* @param {bigint} validity
|
|
729
|
+
* @returns {Promise<Transaction>}
|
|
730
|
+
*/
|
|
731
|
+
static buildDidSetAttributeTransaction(client, sender, did, attribute, validity) {
|
|
732
|
+
_assertClass(client, LedgerClient);
|
|
733
|
+
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
734
|
+
const len0 = WASM_VECTOR_LEN;
|
|
735
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
736
|
+
const len1 = WASM_VECTOR_LEN;
|
|
737
|
+
const ret = wasm.ethrdidregistry_buildDidSetAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute, validity);
|
|
738
|
+
return ret;
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* @param {LedgerClient} client
|
|
742
|
+
* @param {string} identity
|
|
743
|
+
* @returns {Promise<Transaction>}
|
|
744
|
+
*/
|
|
745
|
+
static buildGetIdentityNonceTransaction(client, identity) {
|
|
746
|
+
_assertClass(client, LedgerClient);
|
|
747
|
+
const ptr0 = passStringToWasm0(identity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
749
|
+
const ret = wasm.ethrdidregistry_buildGetIdentityNonceTransaction(client.__wbg_ptr, ptr0, len0);
|
|
750
|
+
return ret;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* @param {LedgerClient} client
|
|
754
|
+
* @param {string} did
|
|
755
|
+
* @param {string} delegate_type
|
|
756
|
+
* @param {string} delegate
|
|
757
|
+
* @param {bigint} validity
|
|
758
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
759
|
+
*/
|
|
760
|
+
static buildDidAddDelegateEndorsingData(client, did, delegate_type, delegate, validity) {
|
|
761
|
+
_assertClass(client, LedgerClient);
|
|
762
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
763
|
+
const len0 = WASM_VECTOR_LEN;
|
|
764
|
+
const ptr1 = passStringToWasm0(delegate_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
765
|
+
const len1 = WASM_VECTOR_LEN;
|
|
766
|
+
const ptr2 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
767
|
+
const len2 = WASM_VECTOR_LEN;
|
|
768
|
+
const ret = wasm.ethrdidregistry_buildDidAddDelegateEndorsingData(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, validity);
|
|
769
|
+
return ret;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* @param {LedgerClient} client
|
|
773
|
+
* @param {string} did
|
|
774
|
+
* @param {string} new_owner
|
|
775
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
776
|
+
*/
|
|
777
|
+
static buildDidChangeOwnerEndorsingData(client, did, new_owner) {
|
|
778
|
+
_assertClass(client, LedgerClient);
|
|
779
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
780
|
+
const len0 = WASM_VECTOR_LEN;
|
|
781
|
+
const ptr1 = passStringToWasm0(new_owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
782
|
+
const len1 = WASM_VECTOR_LEN;
|
|
783
|
+
const ret = wasm.ethrdidregistry_buildDidChangeOwnerEndorsingData(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
784
|
+
return ret;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* @param {LedgerClient} client
|
|
788
|
+
* @param {string} sender
|
|
789
|
+
* @param {string} did
|
|
790
|
+
* @param {string} delegate_type
|
|
791
|
+
* @param {string} delegate
|
|
792
|
+
* @returns {Promise<Transaction>}
|
|
793
|
+
*/
|
|
794
|
+
static buildDidRevokeDelegateTransaction(client, sender, did, delegate_type, delegate) {
|
|
795
|
+
_assertClass(client, LedgerClient);
|
|
796
|
+
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
797
|
+
const len0 = WASM_VECTOR_LEN;
|
|
798
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
799
|
+
const len1 = WASM_VECTOR_LEN;
|
|
800
|
+
const ptr2 = passStringToWasm0(delegate_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
801
|
+
const len2 = WASM_VECTOR_LEN;
|
|
802
|
+
const ptr3 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
803
|
+
const len3 = WASM_VECTOR_LEN;
|
|
804
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
805
|
+
return ret;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* @param {LedgerClient} client
|
|
809
|
+
* @param {string} sender
|
|
810
|
+
* @param {string} did
|
|
811
|
+
* @param {DidDocAttribute} attribute
|
|
812
|
+
* @returns {Promise<Transaction>}
|
|
813
|
+
*/
|
|
814
|
+
static buildDidRevokeAttributeTransaction(client, sender, did, attribute) {
|
|
815
|
+
_assertClass(client, LedgerClient);
|
|
816
|
+
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
817
|
+
const len0 = WASM_VECTOR_LEN;
|
|
818
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
|
+
const len1 = WASM_VECTOR_LEN;
|
|
820
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute);
|
|
821
|
+
return ret;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @param {LedgerClient} client
|
|
825
|
+
* @param {string} did
|
|
826
|
+
* @param {DidDocAttribute} attribute
|
|
827
|
+
* @param {bigint} validity
|
|
828
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
829
|
+
*/
|
|
830
|
+
static buildDidSetAttributeEndorsingData(client, did, attribute, validity) {
|
|
831
|
+
_assertClass(client, LedgerClient);
|
|
832
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
833
|
+
const len0 = WASM_VECTOR_LEN;
|
|
834
|
+
const ret = wasm.ethrdidregistry_buildDidSetAttributeEndorsingData(client.__wbg_ptr, ptr0, len0, attribute, validity);
|
|
835
|
+
return ret;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* @param {LedgerClient} client
|
|
839
|
+
* @param {EventLog} log
|
|
840
|
+
* @returns {DidOwnerChanged}
|
|
841
|
+
*/
|
|
842
|
+
static parseDidOwnerChangedEventResponse(client, log) {
|
|
843
|
+
_assertClass(client, LedgerClient);
|
|
844
|
+
const ret = wasm.ethrdidregistry_parseDidOwnerChangedEventResponse(client.__wbg_ptr, log);
|
|
845
|
+
if (ret[2]) {
|
|
846
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
847
|
+
}
|
|
848
|
+
return takeFromExternrefTable0(ret[0]);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* @param {LedgerClient} client
|
|
852
|
+
* @param {string} did
|
|
853
|
+
* @param {string} delegate_type
|
|
854
|
+
* @param {string} delegate
|
|
855
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
856
|
+
*/
|
|
857
|
+
static buildDidRevokeDelegateEndorsingData(client, did, delegate_type, delegate) {
|
|
858
|
+
_assertClass(client, LedgerClient);
|
|
859
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
860
|
+
const len0 = WASM_VECTOR_LEN;
|
|
861
|
+
const ptr1 = passStringToWasm0(delegate_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
862
|
+
const len1 = WASM_VECTOR_LEN;
|
|
863
|
+
const ptr2 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
864
|
+
const len2 = WASM_VECTOR_LEN;
|
|
865
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeDelegateEndorsingData(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
866
|
+
return ret;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* @param {LedgerClient} client
|
|
870
|
+
* @param {string} did
|
|
871
|
+
* @param {DidDocAttribute} attribute
|
|
872
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
873
|
+
*/
|
|
874
|
+
static buildDidRevokeAttributeEndorsingData(client, did, attribute) {
|
|
875
|
+
_assertClass(client, LedgerClient);
|
|
876
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
|
+
const len0 = WASM_VECTOR_LEN;
|
|
878
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeAttributeEndorsingData(client.__wbg_ptr, ptr0, len0, attribute);
|
|
879
|
+
return ret;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* @param {LedgerClient} client
|
|
883
|
+
* @param {EventLog} log
|
|
884
|
+
* @returns {DidDelegateChanged}
|
|
885
|
+
*/
|
|
886
|
+
static parseDidDelegateChangedEventResponse(client, log) {
|
|
887
|
+
_assertClass(client, LedgerClient);
|
|
888
|
+
const ret = wasm.ethrdidregistry_parseDidDelegateChangedEventResponse(client.__wbg_ptr, log);
|
|
889
|
+
if (ret[2]) {
|
|
890
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
891
|
+
}
|
|
892
|
+
return takeFromExternrefTable0(ret[0]);
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* @param {LedgerClient} client
|
|
896
|
+
* @param {EventLog} log
|
|
897
|
+
* @returns {DidAttributeChanged}
|
|
898
|
+
*/
|
|
899
|
+
static parseDidAttributeChangedEventResponse(client, log) {
|
|
900
|
+
_assertClass(client, LedgerClient);
|
|
901
|
+
const ret = wasm.ethrdidregistry_parseDidAttributeChangedEventResponse(client.__wbg_ptr, log);
|
|
902
|
+
if (ret[2]) {
|
|
903
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
904
|
+
}
|
|
905
|
+
return takeFromExternrefTable0(ret[0]);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
if (Symbol.dispose) EthrDidRegistry.prototype[Symbol.dispose] = EthrDidRegistry.prototype.free;
|
|
909
|
+
exports.EthrDidRegistry = EthrDidRegistry;
|
|
910
|
+
|
|
911
|
+
class EventQuery {
|
|
912
|
+
static __wrap(ptr) {
|
|
913
|
+
ptr = ptr >>> 0;
|
|
914
|
+
const obj = Object.create(EventQuery.prototype);
|
|
915
|
+
obj.__wbg_ptr = ptr;
|
|
916
|
+
EventQueryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
917
|
+
return obj;
|
|
918
|
+
}
|
|
919
|
+
__destroy_into_raw() {
|
|
920
|
+
const ptr = this.__wbg_ptr;
|
|
921
|
+
this.__wbg_ptr = 0;
|
|
922
|
+
EventQueryFinalization.unregister(this);
|
|
923
|
+
return ptr;
|
|
924
|
+
}
|
|
925
|
+
free() {
|
|
926
|
+
const ptr = this.__destroy_into_raw();
|
|
927
|
+
wasm.__wbg_eventquery_free(ptr, 0);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
if (Symbol.dispose) EventQuery.prototype[Symbol.dispose] = EventQuery.prototype.free;
|
|
931
|
+
exports.EventQuery = EventQuery;
|
|
932
|
+
|
|
933
|
+
class IndyDidRegistry {
|
|
934
|
+
__destroy_into_raw() {
|
|
935
|
+
const ptr = this.__wbg_ptr;
|
|
936
|
+
this.__wbg_ptr = 0;
|
|
937
|
+
IndyDidRegistryFinalization.unregister(this);
|
|
938
|
+
return ptr;
|
|
939
|
+
}
|
|
940
|
+
free() {
|
|
941
|
+
const ptr = this.__destroy_into_raw();
|
|
942
|
+
wasm.__wbg_indydidregistry_free(ptr, 0);
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* @param {LedgerClient} client
|
|
946
|
+
* @param {Uint8Array} bytes
|
|
947
|
+
* @returns {DidRecord}
|
|
948
|
+
*/
|
|
949
|
+
static parseResolveDidResult(client, bytes) {
|
|
950
|
+
_assertClass(client, LedgerClient);
|
|
951
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
952
|
+
const len0 = WASM_VECTOR_LEN;
|
|
953
|
+
const ret = wasm.indydidregistry_parseResolveDidResult(client.__wbg_ptr, ptr0, len0);
|
|
954
|
+
if (ret[2]) {
|
|
955
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
956
|
+
}
|
|
957
|
+
return takeFromExternrefTable0(ret[0]);
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* @param {LedgerClient} client
|
|
961
|
+
* @param {string} from
|
|
962
|
+
* @param {string} did
|
|
963
|
+
* @param {DidDocument} did_doc
|
|
964
|
+
* @returns {Promise<Transaction>}
|
|
965
|
+
*/
|
|
966
|
+
static buildCreateDidTransaction(client, from, did, did_doc) {
|
|
967
|
+
_assertClass(client, LedgerClient);
|
|
968
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
969
|
+
const len0 = WASM_VECTOR_LEN;
|
|
970
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
971
|
+
const len1 = WASM_VECTOR_LEN;
|
|
972
|
+
const ret = wasm.indydidregistry_buildCreateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc);
|
|
973
|
+
return ret;
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* @param {LedgerClient} client
|
|
977
|
+
* @param {string} from
|
|
978
|
+
* @param {string} did
|
|
979
|
+
* @param {DidDocument} did_doc
|
|
980
|
+
* @returns {Promise<Transaction>}
|
|
981
|
+
*/
|
|
982
|
+
static buildUpdateDidTransaction(client, from, did, did_doc) {
|
|
983
|
+
_assertClass(client, LedgerClient);
|
|
984
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
985
|
+
const len0 = WASM_VECTOR_LEN;
|
|
986
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
987
|
+
const len1 = WASM_VECTOR_LEN;
|
|
988
|
+
const ret = wasm.indydidregistry_buildUpdateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc);
|
|
989
|
+
return ret;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* @param {LedgerClient} client
|
|
993
|
+
* @param {string} did
|
|
994
|
+
* @returns {Promise<Transaction>}
|
|
995
|
+
*/
|
|
996
|
+
static buildResolveDidTransaction(client, did) {
|
|
997
|
+
_assertClass(client, LedgerClient);
|
|
998
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
999
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1000
|
+
const ret = wasm.indydidregistry_buildResolveDidTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1001
|
+
return ret;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* @param {LedgerClient} client
|
|
1005
|
+
* @param {string} did
|
|
1006
|
+
* @param {DidDocument} did_doc
|
|
1007
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1008
|
+
*/
|
|
1009
|
+
static buildCreateDidEndorsingData(client, did, did_doc) {
|
|
1010
|
+
_assertClass(client, LedgerClient);
|
|
1011
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1012
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1013
|
+
const ret = wasm.indydidregistry_buildCreateDidEndorsingData(client.__wbg_ptr, ptr0, len0, did_doc);
|
|
1014
|
+
return ret;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* @param {LedgerClient} client
|
|
1018
|
+
* @param {string} did
|
|
1019
|
+
* @param {DidDocument} did_doc
|
|
1020
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1021
|
+
*/
|
|
1022
|
+
static buildUpdateDidEndorsingData(client, did, did_doc) {
|
|
1023
|
+
_assertClass(client, LedgerClient);
|
|
1024
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1025
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1026
|
+
const ret = wasm.indydidregistry_buildUpdateDidEndorsingData(client.__wbg_ptr, ptr0, len0, did_doc);
|
|
1027
|
+
return ret;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* @param {LedgerClient} client
|
|
1031
|
+
* @param {string} from
|
|
1032
|
+
* @param {string} did
|
|
1033
|
+
* @returns {Promise<Transaction>}
|
|
1034
|
+
*/
|
|
1035
|
+
static buildDeactivateDidTransaction(client, from, did) {
|
|
1036
|
+
_assertClass(client, LedgerClient);
|
|
1037
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1038
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1039
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1040
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1041
|
+
const ret = wasm.indydidregistry_buildDeactivateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1042
|
+
return ret;
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* @param {LedgerClient} client
|
|
1046
|
+
* @param {string} did
|
|
1047
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1048
|
+
*/
|
|
1049
|
+
static buildDeactivateDidEndorsingData(client, did) {
|
|
1050
|
+
_assertClass(client, LedgerClient);
|
|
1051
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1052
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1053
|
+
const ret = wasm.indydidregistry_buildDeactivateDidEndorsingData(client.__wbg_ptr, ptr0, len0);
|
|
1054
|
+
return ret;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
if (Symbol.dispose) IndyDidRegistry.prototype[Symbol.dispose] = IndyDidRegistry.prototype.free;
|
|
1058
|
+
exports.IndyDidRegistry = IndyDidRegistry;
|
|
1059
|
+
|
|
1060
|
+
class LedgerClient {
|
|
1061
|
+
__destroy_into_raw() {
|
|
1062
|
+
const ptr = this.__wbg_ptr;
|
|
1063
|
+
this.__wbg_ptr = 0;
|
|
1064
|
+
LedgerClientFinalization.unregister(this);
|
|
1065
|
+
return ptr;
|
|
1066
|
+
}
|
|
1067
|
+
free() {
|
|
1068
|
+
const ptr = this.__destroy_into_raw();
|
|
1069
|
+
wasm.__wbg_ledgerclient_free(ptr, 0);
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* @param {Uint8Array} hash
|
|
1073
|
+
* @returns {Promise<string>}
|
|
1074
|
+
*/
|
|
1075
|
+
getReceipt(hash) {
|
|
1076
|
+
const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
|
|
1077
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1078
|
+
const ret = wasm.ledgerclient_getReceipt(this.__wbg_ptr, ptr0, len0);
|
|
1079
|
+
return ret;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* @param {EventQuery} query
|
|
1083
|
+
* @returns {Promise<EventLog[]>}
|
|
1084
|
+
*/
|
|
1085
|
+
queryEvents(query) {
|
|
1086
|
+
_assertClass(query, EventQuery);
|
|
1087
|
+
const ret = wasm.ledgerclient_queryEvents(this.__wbg_ptr, query.__wbg_ptr);
|
|
1088
|
+
return ret;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* @param {Transaction} transaction
|
|
1092
|
+
* @returns {Promise<number[]>}
|
|
1093
|
+
*/
|
|
1094
|
+
submitTransaction(transaction) {
|
|
1095
|
+
_assertClass(transaction, Transaction);
|
|
1096
|
+
const ret = wasm.ledgerclient_submitTransaction(this.__wbg_ptr, transaction.__wbg_ptr);
|
|
1097
|
+
return ret;
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* @param {number} chain_id
|
|
1101
|
+
* @param {string} node_address
|
|
1102
|
+
* @param {ContractConfig[]} contract_configs
|
|
1103
|
+
* @param {string | null | undefined} network
|
|
1104
|
+
* @param {QuorumConfig | undefined | null} quorum_config
|
|
1105
|
+
*/
|
|
1106
|
+
constructor(chain_id, node_address, contract_configs, network, quorum_config) {
|
|
1107
|
+
const ptr0 = passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1108
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1109
|
+
var ptr1 = isLikeNone(network) ? 0 : passStringToWasm0(network, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1110
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1111
|
+
const ret = wasm.ledgerclient_new(chain_id, ptr0, len0, contract_configs, ptr1, len1, quorum_config);
|
|
1112
|
+
if (ret[2]) {
|
|
1113
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1114
|
+
}
|
|
1115
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
1116
|
+
LedgerClientFinalization.register(this, this.__wbg_ptr, this);
|
|
1117
|
+
return this;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* @returns {Promise<PingStatus>}
|
|
1121
|
+
*/
|
|
1122
|
+
ping() {
|
|
1123
|
+
const ret = wasm.ledgerclient_ping(this.__wbg_ptr);
|
|
1124
|
+
return ret;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
if (Symbol.dispose) LedgerClient.prototype[Symbol.dispose] = LedgerClient.prototype.free;
|
|
1128
|
+
exports.LedgerClient = LedgerClient;
|
|
1129
|
+
|
|
1130
|
+
class LegacyMappingRegistry {
|
|
1131
|
+
__destroy_into_raw() {
|
|
1132
|
+
const ptr = this.__wbg_ptr;
|
|
1133
|
+
this.__wbg_ptr = 0;
|
|
1134
|
+
LegacyMappingRegistryFinalization.unregister(this);
|
|
1135
|
+
return ptr;
|
|
1136
|
+
}
|
|
1137
|
+
free() {
|
|
1138
|
+
const ptr = this.__destroy_into_raw();
|
|
1139
|
+
wasm.__wbg_legacymappingregistry_free(ptr, 0);
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* @param {LedgerClient} client
|
|
1143
|
+
* @param {Uint8Array} bytes
|
|
1144
|
+
* @returns {string}
|
|
1145
|
+
*/
|
|
1146
|
+
static parseDidMappingResult(client, bytes) {
|
|
1147
|
+
let deferred3_0;
|
|
1148
|
+
let deferred3_1;
|
|
1149
|
+
try {
|
|
1150
|
+
_assertClass(client, LedgerClient);
|
|
1151
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1152
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1153
|
+
const ret = wasm.legacymappingregistry_parseDidMappingResult(client.__wbg_ptr, ptr0, len0);
|
|
1154
|
+
var ptr2 = ret[0];
|
|
1155
|
+
var len2 = ret[1];
|
|
1156
|
+
if (ret[3]) {
|
|
1157
|
+
ptr2 = 0; len2 = 0;
|
|
1158
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1159
|
+
}
|
|
1160
|
+
deferred3_0 = ptr2;
|
|
1161
|
+
deferred3_1 = len2;
|
|
1162
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1163
|
+
} finally {
|
|
1164
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* @param {LedgerClient} client
|
|
1169
|
+
* @param {Uint8Array} bytes
|
|
1170
|
+
* @returns {string}
|
|
1171
|
+
*/
|
|
1172
|
+
static parseResourceMappingResult(client, bytes) {
|
|
1173
|
+
let deferred3_0;
|
|
1174
|
+
let deferred3_1;
|
|
1175
|
+
try {
|
|
1176
|
+
_assertClass(client, LedgerClient);
|
|
1177
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1178
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1179
|
+
const ret = wasm.legacymappingregistry_parseResourceMappingResult(client.__wbg_ptr, ptr0, len0);
|
|
1180
|
+
var ptr2 = ret[0];
|
|
1181
|
+
var len2 = ret[1];
|
|
1182
|
+
if (ret[3]) {
|
|
1183
|
+
ptr2 = 0; len2 = 0;
|
|
1184
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1185
|
+
}
|
|
1186
|
+
deferred3_0 = ptr2;
|
|
1187
|
+
deferred3_1 = len2;
|
|
1188
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1189
|
+
} finally {
|
|
1190
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* @param {LedgerClient} client
|
|
1195
|
+
* @param {string} legacy_identifier
|
|
1196
|
+
* @returns {Promise<Transaction>}
|
|
1197
|
+
*/
|
|
1198
|
+
static buildGetDidMappingTransaction(client, legacy_identifier) {
|
|
1199
|
+
_assertClass(client, LedgerClient);
|
|
1200
|
+
const ptr0 = passStringToWasm0(legacy_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1201
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1202
|
+
const ret = wasm.legacymappingregistry_buildGetDidMappingTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1203
|
+
return ret;
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @param {LedgerClient} client
|
|
1207
|
+
* @param {string} from
|
|
1208
|
+
* @param {string} did
|
|
1209
|
+
* @param {string} legacy_did
|
|
1210
|
+
* @param {string} legacy_verkey
|
|
1211
|
+
* @param {Uint8Array} ed25519_signature
|
|
1212
|
+
* @returns {Promise<Transaction>}
|
|
1213
|
+
*/
|
|
1214
|
+
static buildCreateDidMappingTransaction(client, from, did, legacy_did, legacy_verkey, ed25519_signature) {
|
|
1215
|
+
_assertClass(client, LedgerClient);
|
|
1216
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1217
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1218
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1219
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1220
|
+
const ptr2 = passStringToWasm0(legacy_did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1221
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1222
|
+
const ptr3 = passStringToWasm0(legacy_verkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1223
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1224
|
+
const ptr4 = passArray8ToWasm0(ed25519_signature, wasm.__wbindgen_malloc);
|
|
1225
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1226
|
+
const ret = wasm.legacymappingregistry_buildCreateDidMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
1227
|
+
return ret;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* @param {LedgerClient} client
|
|
1231
|
+
* @param {string} legacy_identifier
|
|
1232
|
+
* @returns {Promise<Transaction>}
|
|
1233
|
+
*/
|
|
1234
|
+
static buildGetResourceMappingTransaction(client, legacy_identifier) {
|
|
1235
|
+
_assertClass(client, LedgerClient);
|
|
1236
|
+
const ptr0 = passStringToWasm0(legacy_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1237
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1238
|
+
const ret = wasm.legacymappingregistry_buildGetResourceMappingTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1239
|
+
return ret;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* @param {LedgerClient} client
|
|
1243
|
+
* @param {string} did
|
|
1244
|
+
* @param {string} legacy_did
|
|
1245
|
+
* @param {string} legacy_verkey
|
|
1246
|
+
* @param {Uint8Array} ed25519_signature
|
|
1247
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1248
|
+
*/
|
|
1249
|
+
static buildCreateDidMappingEndorsingData(client, did, legacy_did, legacy_verkey, ed25519_signature) {
|
|
1250
|
+
_assertClass(client, LedgerClient);
|
|
1251
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1252
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1253
|
+
const ptr1 = passStringToWasm0(legacy_did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1254
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1255
|
+
const ptr2 = passStringToWasm0(legacy_verkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1256
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1257
|
+
const ptr3 = passArray8ToWasm0(ed25519_signature, wasm.__wbindgen_malloc);
|
|
1258
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1259
|
+
const ret = wasm.legacymappingregistry_buildCreateDidMappingEndorsingData(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1260
|
+
return ret;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* @param {LedgerClient} client
|
|
1264
|
+
* @param {string} from
|
|
1265
|
+
* @param {string} did
|
|
1266
|
+
* @param {string} legacy_issuer_identifier
|
|
1267
|
+
* @param {string} legacy_identifier
|
|
1268
|
+
* @param {string} new_identifier
|
|
1269
|
+
* @returns {Promise<Transaction>}
|
|
1270
|
+
*/
|
|
1271
|
+
static buildCreateResourceMappingTransaction(client, from, did, legacy_issuer_identifier, legacy_identifier, new_identifier) {
|
|
1272
|
+
_assertClass(client, LedgerClient);
|
|
1273
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1275
|
+
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1276
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1277
|
+
const ptr2 = passStringToWasm0(legacy_issuer_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1278
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1279
|
+
const ptr3 = passStringToWasm0(legacy_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1280
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1281
|
+
const ptr4 = passStringToWasm0(new_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1282
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1283
|
+
const ret = wasm.legacymappingregistry_buildCreateResourceMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
1284
|
+
return ret;
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* @param {LedgerClient} client
|
|
1288
|
+
* @param {string} did
|
|
1289
|
+
* @param {string} legacy_issuer_identifier
|
|
1290
|
+
* @param {string} legacy_identifier
|
|
1291
|
+
* @param {string} new_identifier
|
|
1292
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1293
|
+
*/
|
|
1294
|
+
static buildCreateResourceMappingEndorsingData(client, did, legacy_issuer_identifier, legacy_identifier, new_identifier) {
|
|
1295
|
+
_assertClass(client, LedgerClient);
|
|
1296
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1297
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1298
|
+
const ptr1 = passStringToWasm0(legacy_issuer_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1299
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1300
|
+
const ptr2 = passStringToWasm0(legacy_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1301
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1302
|
+
const ptr3 = passStringToWasm0(new_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1303
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1304
|
+
const ret = wasm.legacymappingregistry_buildCreateResourceMappingEndorsingData(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1305
|
+
return ret;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
if (Symbol.dispose) LegacyMappingRegistry.prototype[Symbol.dispose] = LegacyMappingRegistry.prototype.free;
|
|
1309
|
+
exports.LegacyMappingRegistry = LegacyMappingRegistry;
|
|
1310
|
+
|
|
1311
|
+
class RevocationRegistry {
|
|
1312
|
+
__destroy_into_raw() {
|
|
1313
|
+
const ptr = this.__wbg_ptr;
|
|
1314
|
+
this.__wbg_ptr = 0;
|
|
1315
|
+
RevocationRegistryFinalization.unregister(this);
|
|
1316
|
+
return ptr;
|
|
1317
|
+
}
|
|
1318
|
+
free() {
|
|
1319
|
+
const ptr = this.__destroy_into_raw();
|
|
1320
|
+
wasm.__wbg_revocationregistry_free(ptr, 0);
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* @param {LedgerClient} client
|
|
1324
|
+
* @param {string} id
|
|
1325
|
+
* @returns {Promise<RevocationRegistryDefinition>}
|
|
1326
|
+
*/
|
|
1327
|
+
static resolveRevocationRegistryDefinition(client, id) {
|
|
1328
|
+
_assertClass(client, LedgerClient);
|
|
1329
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1330
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1331
|
+
const ret = wasm.revocationregistry_resolveRevocationRegistryDefinition(client.__wbg_ptr, ptr0, len0);
|
|
1332
|
+
return ret;
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* @param {LedgerClient} client
|
|
1336
|
+
* @param {string} id
|
|
1337
|
+
* @param {bigint} to_timestamp
|
|
1338
|
+
* @returns {Promise<RevocationRegistryStatusList>}
|
|
1339
|
+
*/
|
|
1340
|
+
static resolveRevocationRegistryStatusList(client, id, to_timestamp) {
|
|
1341
|
+
_assertClass(client, LedgerClient);
|
|
1342
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1343
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1344
|
+
const ret = wasm.revocationregistry_resolveRevocationRegistryStatusList(client.__wbg_ptr, ptr0, len0, to_timestamp);
|
|
1345
|
+
return ret;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* @param {LedgerClient} client
|
|
1349
|
+
* @param {string} from
|
|
1350
|
+
* @param {RevocationRegistryEntry} rev_reg_entry
|
|
1351
|
+
* @returns {Promise<Transaction>}
|
|
1352
|
+
*/
|
|
1353
|
+
static buildCreateRevocationRegistryEntryTransaction(client, from, rev_reg_entry) {
|
|
1354
|
+
_assertClass(client, LedgerClient);
|
|
1355
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1356
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1357
|
+
_assertClass(rev_reg_entry, RevocationRegistryEntry);
|
|
1358
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryEntryTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_entry.__wbg_ptr);
|
|
1359
|
+
return ret;
|
|
1360
|
+
}
|
|
1361
|
+
/**
|
|
1362
|
+
* @param {LedgerClient} client
|
|
1363
|
+
* @param {Uint8Array} bytes
|
|
1364
|
+
* @returns {RevocationRegistryDefinitionRecord}
|
|
1365
|
+
*/
|
|
1366
|
+
static parseResolveRevocationRegistryDefinitionResult(client, bytes) {
|
|
1367
|
+
_assertClass(client, LedgerClient);
|
|
1368
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1369
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1370
|
+
const ret = wasm.revocationregistry_parseResolveRevocationRegistryDefinitionResult(client.__wbg_ptr, ptr0, len0);
|
|
1371
|
+
if (ret[2]) {
|
|
1372
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1373
|
+
}
|
|
1374
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* @param {LedgerClient} client
|
|
1378
|
+
* @param {RevocationRegistryEntry} rev_reg_entry
|
|
1379
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1380
|
+
*/
|
|
1381
|
+
static buildCreateRevocationRegistryEntryEndorsingData(client, rev_reg_entry) {
|
|
1382
|
+
_assertClass(client, LedgerClient);
|
|
1383
|
+
_assertClass(rev_reg_entry, RevocationRegistryEntry);
|
|
1384
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryEntryEndorsingData(client.__wbg_ptr, rev_reg_entry.__wbg_ptr);
|
|
1385
|
+
return ret;
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* @param {LedgerClient} client
|
|
1389
|
+
* @param {string} from
|
|
1390
|
+
* @param {RevocationRegistryDefinition} rev_reg_def
|
|
1391
|
+
* @returns {Promise<Transaction>}
|
|
1392
|
+
*/
|
|
1393
|
+
static buildCreateRevocationRegistryDefinitionTransaction(client, from, rev_reg_def) {
|
|
1394
|
+
_assertClass(client, LedgerClient);
|
|
1395
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1396
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1397
|
+
_assertClass(rev_reg_def, RevocationRegistryDefinition);
|
|
1398
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryDefinitionTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_def.__wbg_ptr);
|
|
1399
|
+
return ret;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* @param {LedgerClient} client
|
|
1403
|
+
* @param {string} id
|
|
1404
|
+
* @param {Uint8Array} revocation_registry_status_list
|
|
1405
|
+
* @param {string} accumulator
|
|
1406
|
+
* @returns {Promise<RevocationRegistryEntry>}
|
|
1407
|
+
*/
|
|
1408
|
+
static buildLatestRevocationRegistryEntryFromStatusList(client, id, revocation_registry_status_list, accumulator) {
|
|
1409
|
+
_assertClass(client, LedgerClient);
|
|
1410
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1411
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1412
|
+
const ptr1 = passArray8ToWasm0(revocation_registry_status_list, wasm.__wbindgen_malloc);
|
|
1413
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1414
|
+
const ptr2 = passStringToWasm0(accumulator, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1415
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1416
|
+
const ret = wasm.revocationregistry_buildLatestRevocationRegistryEntryFromStatusList(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1417
|
+
return ret;
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* @param {LedgerClient} client
|
|
1421
|
+
* @param {string} id
|
|
1422
|
+
* @returns {Promise<Transaction>}
|
|
1423
|
+
*/
|
|
1424
|
+
static buildResolveRevocationRegistryDefinitionTransaction(client, id) {
|
|
1425
|
+
_assertClass(client, LedgerClient);
|
|
1426
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1427
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1428
|
+
const ret = wasm.revocationregistry_buildResolveRevocationRegistryDefinitionTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1429
|
+
return ret;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* @param {LedgerClient} client
|
|
1433
|
+
* @param {RevocationRegistryDefinition} rev_reg_def
|
|
1434
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1435
|
+
*/
|
|
1436
|
+
static buildCreateRevocationRegistryDefinitionEndorsingData(client, rev_reg_def) {
|
|
1437
|
+
_assertClass(client, LedgerClient);
|
|
1438
|
+
_assertClass(rev_reg_def, RevocationRegistryDefinition);
|
|
1439
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryDefinitionEndorsingData(client.__wbg_ptr, rev_reg_def.__wbg_ptr);
|
|
1440
|
+
return ret;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
if (Symbol.dispose) RevocationRegistry.prototype[Symbol.dispose] = RevocationRegistry.prototype.free;
|
|
1444
|
+
exports.RevocationRegistry = RevocationRegistry;
|
|
1445
|
+
|
|
1446
|
+
class RevocationRegistryDefinition {
|
|
1447
|
+
static __wrap(ptr) {
|
|
1448
|
+
ptr = ptr >>> 0;
|
|
1449
|
+
const obj = Object.create(RevocationRegistryDefinition.prototype);
|
|
1450
|
+
obj.__wbg_ptr = ptr;
|
|
1451
|
+
RevocationRegistryDefinitionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1452
|
+
return obj;
|
|
1453
|
+
}
|
|
1454
|
+
__destroy_into_raw() {
|
|
1455
|
+
const ptr = this.__wbg_ptr;
|
|
1456
|
+
this.__wbg_ptr = 0;
|
|
1457
|
+
RevocationRegistryDefinitionFinalization.unregister(this);
|
|
1458
|
+
return ptr;
|
|
1459
|
+
}
|
|
1460
|
+
free() {
|
|
1461
|
+
const ptr = this.__destroy_into_raw();
|
|
1462
|
+
wasm.__wbg_revocationregistrydefinition_free(ptr, 0);
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* @param {string} string
|
|
1466
|
+
* @returns {RevocationRegistryDefinition}
|
|
1467
|
+
*/
|
|
1468
|
+
static fromString(string) {
|
|
1469
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1471
|
+
const ret = wasm.revocationregistrydefinition_fromString(ptr0, len0);
|
|
1472
|
+
if (ret[2]) {
|
|
1473
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1474
|
+
}
|
|
1475
|
+
return RevocationRegistryDefinition.__wrap(ret[0]);
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* @param {string} issuer_id
|
|
1479
|
+
* @param {string} cred_def_id
|
|
1480
|
+
* @param {string} tag
|
|
1481
|
+
* @param {RevocationRegistryDefinitionValue} value
|
|
1482
|
+
*/
|
|
1483
|
+
constructor(issuer_id, cred_def_id, tag, value) {
|
|
1484
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1486
|
+
const ptr1 = passStringToWasm0(cred_def_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1487
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1488
|
+
const ptr2 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1489
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1490
|
+
const ret = wasm.revocationregistrydefinition_new(ptr0, len0, ptr1, len1, ptr2, len2, value);
|
|
1491
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1492
|
+
RevocationRegistryDefinitionFinalization.register(this, this.__wbg_ptr, this);
|
|
1493
|
+
return this;
|
|
1494
|
+
}
|
|
1495
|
+
/**
|
|
1496
|
+
* @returns {string}
|
|
1497
|
+
*/
|
|
1498
|
+
getId() {
|
|
1499
|
+
let deferred1_0;
|
|
1500
|
+
let deferred1_1;
|
|
1501
|
+
try {
|
|
1502
|
+
const ret = wasm.revocationregistrydefinition_getId(this.__wbg_ptr);
|
|
1503
|
+
deferred1_0 = ret[0];
|
|
1504
|
+
deferred1_1 = ret[1];
|
|
1505
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1506
|
+
} finally {
|
|
1507
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @returns {RevocationRegistryDefinitionData}
|
|
1512
|
+
*/
|
|
1513
|
+
asValue() {
|
|
1514
|
+
const ret = wasm.revocationregistrydefinition_asValue(this.__wbg_ptr);
|
|
1515
|
+
if (ret[2]) {
|
|
1516
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1517
|
+
}
|
|
1518
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* @returns {string}
|
|
1522
|
+
*/
|
|
1523
|
+
toString() {
|
|
1524
|
+
let deferred2_0;
|
|
1525
|
+
let deferred2_1;
|
|
1526
|
+
try {
|
|
1527
|
+
const ret = wasm.revocationregistrydefinition_toString(this.__wbg_ptr);
|
|
1528
|
+
var ptr1 = ret[0];
|
|
1529
|
+
var len1 = ret[1];
|
|
1530
|
+
if (ret[3]) {
|
|
1531
|
+
ptr1 = 0; len1 = 0;
|
|
1532
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1533
|
+
}
|
|
1534
|
+
deferred2_0 = ptr1;
|
|
1535
|
+
deferred2_1 = len1;
|
|
1536
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1537
|
+
} finally {
|
|
1538
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
if (Symbol.dispose) RevocationRegistryDefinition.prototype[Symbol.dispose] = RevocationRegistryDefinition.prototype.free;
|
|
1543
|
+
exports.RevocationRegistryDefinition = RevocationRegistryDefinition;
|
|
1544
|
+
|
|
1545
|
+
class RevocationRegistryEntry {
|
|
1546
|
+
static __wrap(ptr) {
|
|
1547
|
+
ptr = ptr >>> 0;
|
|
1548
|
+
const obj = Object.create(RevocationRegistryEntry.prototype);
|
|
1549
|
+
obj.__wbg_ptr = ptr;
|
|
1550
|
+
RevocationRegistryEntryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1551
|
+
return obj;
|
|
1552
|
+
}
|
|
1553
|
+
__destroy_into_raw() {
|
|
1554
|
+
const ptr = this.__wbg_ptr;
|
|
1555
|
+
this.__wbg_ptr = 0;
|
|
1556
|
+
RevocationRegistryEntryFinalization.unregister(this);
|
|
1557
|
+
return ptr;
|
|
1558
|
+
}
|
|
1559
|
+
free() {
|
|
1560
|
+
const ptr = this.__destroy_into_raw();
|
|
1561
|
+
wasm.__wbg_revocationregistryentry_free(ptr, 0);
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* @param {string} issuer_id
|
|
1565
|
+
* @param {string} rev_reg_def_id
|
|
1566
|
+
* @param {string} current_accumulator
|
|
1567
|
+
* @param {string | null} [prev_accumulator]
|
|
1568
|
+
* @param {Uint32Array | null} [issued]
|
|
1569
|
+
* @param {Uint32Array | null} [revoked]
|
|
1570
|
+
*/
|
|
1571
|
+
constructor(issuer_id, rev_reg_def_id, current_accumulator, prev_accumulator, issued, revoked) {
|
|
1572
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1573
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1574
|
+
const ptr1 = passStringToWasm0(rev_reg_def_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1575
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1576
|
+
const ptr2 = passStringToWasm0(current_accumulator, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1577
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1578
|
+
var ptr3 = isLikeNone(prev_accumulator) ? 0 : passStringToWasm0(prev_accumulator, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1579
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1580
|
+
var ptr4 = isLikeNone(issued) ? 0 : passArray32ToWasm0(issued, wasm.__wbindgen_malloc);
|
|
1581
|
+
var len4 = WASM_VECTOR_LEN;
|
|
1582
|
+
var ptr5 = isLikeNone(revoked) ? 0 : passArray32ToWasm0(revoked, wasm.__wbindgen_malloc);
|
|
1583
|
+
var len5 = WASM_VECTOR_LEN;
|
|
1584
|
+
const ret = wasm.revocationregistryentry_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
|
|
1585
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1586
|
+
RevocationRegistryEntryFinalization.register(this, this.__wbg_ptr, this);
|
|
1587
|
+
return this;
|
|
1588
|
+
}
|
|
1589
|
+
/**
|
|
1590
|
+
* @returns {RevocationRegistryEntryValue}
|
|
1591
|
+
*/
|
|
1592
|
+
asValue() {
|
|
1593
|
+
const ret = wasm.revocationregistryentry_asValue(this.__wbg_ptr);
|
|
1594
|
+
if (ret[2]) {
|
|
1595
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1596
|
+
}
|
|
1597
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* @returns {string}
|
|
1601
|
+
*/
|
|
1602
|
+
toString() {
|
|
1603
|
+
let deferred2_0;
|
|
1604
|
+
let deferred2_1;
|
|
1605
|
+
try {
|
|
1606
|
+
const ret = wasm.revocationregistryentry_toString(this.__wbg_ptr);
|
|
1607
|
+
var ptr1 = ret[0];
|
|
1608
|
+
var len1 = ret[1];
|
|
1609
|
+
if (ret[3]) {
|
|
1610
|
+
ptr1 = 0; len1 = 0;
|
|
1611
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1612
|
+
}
|
|
1613
|
+
deferred2_0 = ptr1;
|
|
1614
|
+
deferred2_1 = len1;
|
|
1615
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1616
|
+
} finally {
|
|
1617
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
if (Symbol.dispose) RevocationRegistryEntry.prototype[Symbol.dispose] = RevocationRegistryEntry.prototype.free;
|
|
1622
|
+
exports.RevocationRegistryEntry = RevocationRegistryEntry;
|
|
1623
|
+
|
|
1624
|
+
class RevocationRegistryStatusList {
|
|
1625
|
+
static __wrap(ptr) {
|
|
1626
|
+
ptr = ptr >>> 0;
|
|
1627
|
+
const obj = Object.create(RevocationRegistryStatusList.prototype);
|
|
1628
|
+
obj.__wbg_ptr = ptr;
|
|
1629
|
+
RevocationRegistryStatusListFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1630
|
+
return obj;
|
|
1631
|
+
}
|
|
1632
|
+
__destroy_into_raw() {
|
|
1633
|
+
const ptr = this.__wbg_ptr;
|
|
1634
|
+
this.__wbg_ptr = 0;
|
|
1635
|
+
RevocationRegistryStatusListFinalization.unregister(this);
|
|
1636
|
+
return ptr;
|
|
1637
|
+
}
|
|
1638
|
+
free() {
|
|
1639
|
+
const ptr = this.__destroy_into_raw();
|
|
1640
|
+
wasm.__wbg_revocationregistrystatuslist_free(ptr, 0);
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* @returns {RevocationStatusListData}
|
|
1644
|
+
*/
|
|
1645
|
+
asValue() {
|
|
1646
|
+
const ret = wasm.revocationregistrystatuslist_asValue(this.__wbg_ptr);
|
|
1647
|
+
if (ret[2]) {
|
|
1648
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1649
|
+
}
|
|
1650
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* @returns {string}
|
|
1654
|
+
*/
|
|
1655
|
+
toString() {
|
|
1656
|
+
let deferred2_0;
|
|
1657
|
+
let deferred2_1;
|
|
1658
|
+
try {
|
|
1659
|
+
const ret = wasm.revocationregistrystatuslist_toString(this.__wbg_ptr);
|
|
1660
|
+
var ptr1 = ret[0];
|
|
1661
|
+
var len1 = ret[1];
|
|
1662
|
+
if (ret[3]) {
|
|
1663
|
+
ptr1 = 0; len1 = 0;
|
|
1664
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1665
|
+
}
|
|
1666
|
+
deferred2_0 = ptr1;
|
|
1667
|
+
deferred2_1 = len1;
|
|
1668
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1669
|
+
} finally {
|
|
1670
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
if (Symbol.dispose) RevocationRegistryStatusList.prototype[Symbol.dispose] = RevocationRegistryStatusList.prototype.free;
|
|
1675
|
+
exports.RevocationRegistryStatusList = RevocationRegistryStatusList;
|
|
1676
|
+
|
|
1677
|
+
class RoleControl {
|
|
1678
|
+
__destroy_into_raw() {
|
|
1679
|
+
const ptr = this.__wbg_ptr;
|
|
1680
|
+
this.__wbg_ptr = 0;
|
|
1681
|
+
RoleControlFinalization.unregister(this);
|
|
1682
|
+
return ptr;
|
|
1683
|
+
}
|
|
1684
|
+
free() {
|
|
1685
|
+
const ptr = this.__destroy_into_raw();
|
|
1686
|
+
wasm.__wbg_rolecontrol_free(ptr, 0);
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* @param {LedgerClient} client
|
|
1690
|
+
* @param {Uint8Array} bytes
|
|
1691
|
+
* @returns {number}
|
|
1692
|
+
*/
|
|
1693
|
+
static parseGetRoleResult(client, bytes) {
|
|
1694
|
+
_assertClass(client, LedgerClient);
|
|
1695
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1696
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1697
|
+
const ret = wasm.rolecontrol_parseGetRoleResult(client.__wbg_ptr, ptr0, len0);
|
|
1698
|
+
if (ret[2]) {
|
|
1699
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1700
|
+
}
|
|
1701
|
+
return ret[0];
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* @param {LedgerClient} client
|
|
1705
|
+
* @param {Uint8Array} bytes
|
|
1706
|
+
* @returns {boolean}
|
|
1707
|
+
*/
|
|
1708
|
+
static parseHasRoleResult(client, bytes) {
|
|
1709
|
+
_assertClass(client, LedgerClient);
|
|
1710
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1711
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1712
|
+
const ret = wasm.rolecontrol_parseHasRoleResult(client.__wbg_ptr, ptr0, len0);
|
|
1713
|
+
if (ret[2]) {
|
|
1714
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1715
|
+
}
|
|
1716
|
+
return ret[0] !== 0;
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* @param {LedgerClient} client
|
|
1720
|
+
* @param {string} account
|
|
1721
|
+
* @returns {Promise<Transaction>}
|
|
1722
|
+
*/
|
|
1723
|
+
static buildGetRoleTransaction(client, account) {
|
|
1724
|
+
_assertClass(client, LedgerClient);
|
|
1725
|
+
const ptr0 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1726
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1727
|
+
const ret = wasm.rolecontrol_buildGetRoleTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1728
|
+
return ret;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* @param {LedgerClient} client
|
|
1732
|
+
* @param {number} role
|
|
1733
|
+
* @param {string} account
|
|
1734
|
+
* @returns {Promise<Transaction>}
|
|
1735
|
+
*/
|
|
1736
|
+
static buildHasRoleTransaction(client, role, account) {
|
|
1737
|
+
_assertClass(client, LedgerClient);
|
|
1738
|
+
const ptr0 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1739
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1740
|
+
const ret = wasm.rolecontrol_buildHasRoleTransaction(client.__wbg_ptr, role, ptr0, len0);
|
|
1741
|
+
return ret;
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* @param {LedgerClient} client
|
|
1745
|
+
* @param {string} from
|
|
1746
|
+
* @param {number} role
|
|
1747
|
+
* @param {string} account
|
|
1748
|
+
* @returns {Promise<Transaction>}
|
|
1749
|
+
*/
|
|
1750
|
+
static buildAssignRoleTransaction(client, from, role, account) {
|
|
1751
|
+
_assertClass(client, LedgerClient);
|
|
1752
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1753
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1754
|
+
const ptr1 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1755
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1756
|
+
const ret = wasm.rolecontrol_buildAssignRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1);
|
|
1757
|
+
return ret;
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* @param {LedgerClient} client
|
|
1761
|
+
* @param {string} from
|
|
1762
|
+
* @param {number} role
|
|
1763
|
+
* @param {string} account
|
|
1764
|
+
* @returns {Promise<Transaction>}
|
|
1765
|
+
*/
|
|
1766
|
+
static buildRevokeRoleTransaction(client, from, role, account) {
|
|
1767
|
+
_assertClass(client, LedgerClient);
|
|
1768
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1769
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1770
|
+
const ptr1 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1771
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1772
|
+
const ret = wasm.rolecontrol_buildRevokeRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1);
|
|
1773
|
+
return ret;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
if (Symbol.dispose) RoleControl.prototype[Symbol.dispose] = RoleControl.prototype.free;
|
|
1777
|
+
exports.RoleControl = RoleControl;
|
|
1778
|
+
|
|
1779
|
+
class Schema {
|
|
1780
|
+
static __wrap(ptr) {
|
|
1781
|
+
ptr = ptr >>> 0;
|
|
1782
|
+
const obj = Object.create(Schema.prototype);
|
|
1783
|
+
obj.__wbg_ptr = ptr;
|
|
1784
|
+
SchemaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1785
|
+
return obj;
|
|
1786
|
+
}
|
|
1787
|
+
__destroy_into_raw() {
|
|
1788
|
+
const ptr = this.__wbg_ptr;
|
|
1789
|
+
this.__wbg_ptr = 0;
|
|
1790
|
+
SchemaFinalization.unregister(this);
|
|
1791
|
+
return ptr;
|
|
1792
|
+
}
|
|
1793
|
+
free() {
|
|
1794
|
+
const ptr = this.__destroy_into_raw();
|
|
1795
|
+
wasm.__wbg_schema_free(ptr, 0);
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* @param {string} string
|
|
1799
|
+
* @returns {Schema}
|
|
1800
|
+
*/
|
|
1801
|
+
static fromString(string) {
|
|
1802
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1803
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1804
|
+
const ret = wasm.schema_fromString(ptr0, len0);
|
|
1805
|
+
if (ret[2]) {
|
|
1806
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1807
|
+
}
|
|
1808
|
+
return Schema.__wrap(ret[0]);
|
|
1809
|
+
}
|
|
1810
|
+
/**
|
|
1811
|
+
* @param {string} issuer_id
|
|
1812
|
+
* @param {string} name
|
|
1813
|
+
* @param {string} version
|
|
1814
|
+
* @param {string[]} attr_names
|
|
1815
|
+
*/
|
|
1816
|
+
constructor(issuer_id, name, version, attr_names) {
|
|
1817
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1818
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1819
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1820
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1821
|
+
const ptr2 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1822
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1823
|
+
const ptr3 = passArrayJsValueToWasm0(attr_names, wasm.__wbindgen_malloc);
|
|
1824
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1825
|
+
const ret = wasm.schema_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1826
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1827
|
+
SchemaFinalization.register(this, this.__wbg_ptr, this);
|
|
1828
|
+
return this;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* @returns {string}
|
|
1832
|
+
*/
|
|
1833
|
+
getId() {
|
|
1834
|
+
let deferred1_0;
|
|
1835
|
+
let deferred1_1;
|
|
1836
|
+
try {
|
|
1837
|
+
const ret = wasm.schema_getId(this.__wbg_ptr);
|
|
1838
|
+
deferred1_0 = ret[0];
|
|
1839
|
+
deferred1_1 = ret[1];
|
|
1840
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1841
|
+
} finally {
|
|
1842
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* @returns {SchemaData}
|
|
1847
|
+
*/
|
|
1848
|
+
asValue() {
|
|
1849
|
+
const ret = wasm.schema_asValue(this.__wbg_ptr);
|
|
1850
|
+
if (ret[2]) {
|
|
1851
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1852
|
+
}
|
|
1853
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* @returns {string}
|
|
1857
|
+
*/
|
|
1858
|
+
toString() {
|
|
1859
|
+
let deferred2_0;
|
|
1860
|
+
let deferred2_1;
|
|
1861
|
+
try {
|
|
1862
|
+
const ret = wasm.schema_toString(this.__wbg_ptr);
|
|
1863
|
+
var ptr1 = ret[0];
|
|
1864
|
+
var len1 = ret[1];
|
|
1865
|
+
if (ret[3]) {
|
|
1866
|
+
ptr1 = 0; len1 = 0;
|
|
1867
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1868
|
+
}
|
|
1869
|
+
deferred2_0 = ptr1;
|
|
1870
|
+
deferred2_1 = len1;
|
|
1871
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1872
|
+
} finally {
|
|
1873
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
if (Symbol.dispose) Schema.prototype[Symbol.dispose] = Schema.prototype.free;
|
|
1878
|
+
exports.Schema = Schema;
|
|
1879
|
+
|
|
1880
|
+
class SchemaRegistry {
|
|
1881
|
+
__destroy_into_raw() {
|
|
1882
|
+
const ptr = this.__wbg_ptr;
|
|
1883
|
+
this.__wbg_ptr = 0;
|
|
1884
|
+
SchemaRegistryFinalization.unregister(this);
|
|
1885
|
+
return ptr;
|
|
1886
|
+
}
|
|
1887
|
+
free() {
|
|
1888
|
+
const ptr = this.__destroy_into_raw();
|
|
1889
|
+
wasm.__wbg_schemaregistry_free(ptr, 0);
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* @param {LedgerClient} client
|
|
1893
|
+
* @param {string} id
|
|
1894
|
+
* @returns {Promise<Schema>}
|
|
1895
|
+
*/
|
|
1896
|
+
static resolveSchema(client, id) {
|
|
1897
|
+
_assertClass(client, LedgerClient);
|
|
1898
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1899
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1900
|
+
const ret = wasm.schemaregistry_resolveSchema(client.__wbg_ptr, ptr0, len0);
|
|
1901
|
+
return ret;
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* @param {LedgerClient} client
|
|
1905
|
+
* @param {Uint8Array} bytes
|
|
1906
|
+
* @returns {SchemaRecord}
|
|
1907
|
+
*/
|
|
1908
|
+
static parseResolveSchemaResult(client, bytes) {
|
|
1909
|
+
_assertClass(client, LedgerClient);
|
|
1910
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1911
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1912
|
+
const ret = wasm.schemaregistry_parseResolveSchemaResult(client.__wbg_ptr, ptr0, len0);
|
|
1913
|
+
if (ret[2]) {
|
|
1914
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1915
|
+
}
|
|
1916
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1919
|
+
* @param {LedgerClient} client
|
|
1920
|
+
* @param {string} from
|
|
1921
|
+
* @param {Schema} schema
|
|
1922
|
+
* @returns {Promise<Transaction>}
|
|
1923
|
+
*/
|
|
1924
|
+
static buildCreateSchemaTransaction(client, from, schema) {
|
|
1925
|
+
_assertClass(client, LedgerClient);
|
|
1926
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1927
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1928
|
+
_assertClass(schema, Schema);
|
|
1929
|
+
const ret = wasm.schemaregistry_buildCreateSchemaTransaction(client.__wbg_ptr, ptr0, len0, schema.__wbg_ptr);
|
|
1930
|
+
return ret;
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* @param {LedgerClient} client
|
|
1934
|
+
* @param {string} id
|
|
1935
|
+
* @returns {Promise<Transaction>}
|
|
1936
|
+
*/
|
|
1937
|
+
static buildResolveSchemaTransaction(client, id) {
|
|
1938
|
+
_assertClass(client, LedgerClient);
|
|
1939
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1940
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1941
|
+
const ret = wasm.schemaregistry_buildResolveSchemaTransaction(client.__wbg_ptr, ptr0, len0);
|
|
1942
|
+
return ret;
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* @param {LedgerClient} client
|
|
1946
|
+
* @param {Schema} schema
|
|
1947
|
+
* @returns {Promise<TransactionEndorsingData>}
|
|
1948
|
+
*/
|
|
1949
|
+
static buildCreateSchemaEndorsingData(client, schema) {
|
|
1950
|
+
_assertClass(client, LedgerClient);
|
|
1951
|
+
_assertClass(schema, Schema);
|
|
1952
|
+
const ret = wasm.schemaregistry_buildCreateSchemaEndorsingData(client.__wbg_ptr, schema.__wbg_ptr);
|
|
1953
|
+
return ret;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
if (Symbol.dispose) SchemaRegistry.prototype[Symbol.dispose] = SchemaRegistry.prototype.free;
|
|
1957
|
+
exports.SchemaRegistry = SchemaRegistry;
|
|
1958
|
+
|
|
1959
|
+
class Transaction {
|
|
1960
|
+
static __wrap(ptr) {
|
|
1961
|
+
ptr = ptr >>> 0;
|
|
1962
|
+
const obj = Object.create(Transaction.prototype);
|
|
1963
|
+
obj.__wbg_ptr = ptr;
|
|
1964
|
+
TransactionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1965
|
+
return obj;
|
|
1966
|
+
}
|
|
1967
|
+
__destroy_into_raw() {
|
|
1968
|
+
const ptr = this.__wbg_ptr;
|
|
1969
|
+
this.__wbg_ptr = 0;
|
|
1970
|
+
TransactionFinalization.unregister(this);
|
|
1971
|
+
return ptr;
|
|
1972
|
+
}
|
|
1973
|
+
free() {
|
|
1974
|
+
const ptr = this.__destroy_into_raw();
|
|
1975
|
+
wasm.__wbg_transaction_free(ptr, 0);
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* @param {SignatureData} signature_data
|
|
1979
|
+
*/
|
|
1980
|
+
setSignature(signature_data) {
|
|
1981
|
+
const ret = wasm.transaction_setSignature(this.__wbg_ptr, signature_data);
|
|
1982
|
+
if (ret[1]) {
|
|
1983
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* @returns {Uint8Array}
|
|
1988
|
+
*/
|
|
1989
|
+
getSigningBytes() {
|
|
1990
|
+
const ret = wasm.transaction_getSigningBytes(this.__wbg_ptr);
|
|
1991
|
+
if (ret[3]) {
|
|
1992
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1993
|
+
}
|
|
1994
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1995
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1996
|
+
return v1;
|
|
1997
|
+
}
|
|
1998
|
+
/**
|
|
1999
|
+
* @returns {string}
|
|
2000
|
+
*/
|
|
2001
|
+
to() {
|
|
2002
|
+
let deferred2_0;
|
|
2003
|
+
let deferred2_1;
|
|
2004
|
+
try {
|
|
2005
|
+
const ret = wasm.transaction_to(this.__wbg_ptr);
|
|
2006
|
+
var ptr1 = ret[0];
|
|
2007
|
+
var len1 = ret[1];
|
|
2008
|
+
if (ret[3]) {
|
|
2009
|
+
ptr1 = 0; len1 = 0;
|
|
2010
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2011
|
+
}
|
|
2012
|
+
deferred2_0 = ptr1;
|
|
2013
|
+
deferred2_1 = len1;
|
|
2014
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2015
|
+
} finally {
|
|
2016
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
|
|
2021
|
+
exports.Transaction = Transaction;
|
|
2022
|
+
|
|
2023
|
+
class TransactionEndorsingData {
|
|
2024
|
+
static __wrap(ptr) {
|
|
2025
|
+
ptr = ptr >>> 0;
|
|
2026
|
+
const obj = Object.create(TransactionEndorsingData.prototype);
|
|
2027
|
+
obj.__wbg_ptr = ptr;
|
|
2028
|
+
TransactionEndorsingDataFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2029
|
+
return obj;
|
|
2030
|
+
}
|
|
2031
|
+
__destroy_into_raw() {
|
|
2032
|
+
const ptr = this.__wbg_ptr;
|
|
2033
|
+
this.__wbg_ptr = 0;
|
|
2034
|
+
TransactionEndorsingDataFinalization.unregister(this);
|
|
2035
|
+
return ptr;
|
|
2036
|
+
}
|
|
2037
|
+
free() {
|
|
2038
|
+
const ptr = this.__destroy_into_raw();
|
|
2039
|
+
wasm.__wbg_transactionendorsingdata_free(ptr, 0);
|
|
2040
|
+
}
|
|
2041
|
+
/**
|
|
2042
|
+
* @param {SignatureData} signature_data
|
|
2043
|
+
*/
|
|
2044
|
+
setSignature(signature_data) {
|
|
2045
|
+
const ret = wasm.transactionendorsingdata_setSignature(this.__wbg_ptr, signature_data);
|
|
2046
|
+
if (ret[1]) {
|
|
2047
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* @returns {Uint8Array}
|
|
2052
|
+
*/
|
|
2053
|
+
getSigningBytes() {
|
|
2054
|
+
const ret = wasm.transactionendorsingdata_getSigningBytes(this.__wbg_ptr);
|
|
2055
|
+
if (ret[3]) {
|
|
2056
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2057
|
+
}
|
|
2058
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2059
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2060
|
+
return v1;
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
if (Symbol.dispose) TransactionEndorsingData.prototype[Symbol.dispose] = TransactionEndorsingData.prototype.free;
|
|
2064
|
+
exports.TransactionEndorsingData = TransactionEndorsingData;
|
|
2065
|
+
|
|
2066
|
+
class ValidatorControl {
|
|
2067
|
+
__destroy_into_raw() {
|
|
2068
|
+
const ptr = this.__wbg_ptr;
|
|
2069
|
+
this.__wbg_ptr = 0;
|
|
2070
|
+
ValidatorControlFinalization.unregister(this);
|
|
2071
|
+
return ptr;
|
|
2072
|
+
}
|
|
2073
|
+
free() {
|
|
2074
|
+
const ptr = this.__destroy_into_raw();
|
|
2075
|
+
wasm.__wbg_validatorcontrol_free(ptr, 0);
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* @param {LedgerClient} client
|
|
2079
|
+
* @param {Uint8Array} bytes
|
|
2080
|
+
* @returns {AddressString[]}
|
|
2081
|
+
*/
|
|
2082
|
+
static parseGetValidatorsResult(client, bytes) {
|
|
2083
|
+
_assertClass(client, LedgerClient);
|
|
2084
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2085
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2086
|
+
const ret = wasm.validatorcontrol_parseGetValidatorsResult(client.__wbg_ptr, ptr0, len0);
|
|
2087
|
+
if (ret[2]) {
|
|
2088
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2089
|
+
}
|
|
2090
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* @param {LedgerClient} client
|
|
2094
|
+
* @param {string} from
|
|
2095
|
+
* @param {string} validator_address
|
|
2096
|
+
* @returns {Promise<Transaction>}
|
|
2097
|
+
*/
|
|
2098
|
+
static buildAddValidatorTransaction(client, from, validator_address) {
|
|
2099
|
+
_assertClass(client, LedgerClient);
|
|
2100
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2101
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2102
|
+
const ptr1 = passStringToWasm0(validator_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2103
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2104
|
+
const ret = wasm.validatorcontrol_buildAddValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2105
|
+
return ret;
|
|
2106
|
+
}
|
|
2107
|
+
/**
|
|
2108
|
+
* @param {LedgerClient} client
|
|
2109
|
+
* @returns {Promise<Transaction>}
|
|
2110
|
+
*/
|
|
2111
|
+
static buildGetValidatorsTransaction(client) {
|
|
2112
|
+
_assertClass(client, LedgerClient);
|
|
2113
|
+
const ret = wasm.validatorcontrol_buildGetValidatorsTransaction(client.__wbg_ptr);
|
|
2114
|
+
return ret;
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* @param {LedgerClient} client
|
|
2118
|
+
* @param {string} from
|
|
2119
|
+
* @param {string} validator_address
|
|
2120
|
+
* @returns {Promise<Transaction>}
|
|
2121
|
+
*/
|
|
2122
|
+
static buildRemoveValidatorTransaction(client, from, validator_address) {
|
|
2123
|
+
_assertClass(client, LedgerClient);
|
|
2124
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2125
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2126
|
+
const ptr1 = passStringToWasm0(validator_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2127
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2128
|
+
const ret = wasm.validatorcontrol_buildRemoveValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2129
|
+
return ret;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
if (Symbol.dispose) ValidatorControl.prototype[Symbol.dispose] = ValidatorControl.prototype.free;
|
|
2133
|
+
exports.ValidatorControl = ValidatorControl;
|
|
2134
|
+
|
|
2135
|
+
exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
2136
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2137
|
+
return ret;
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
2141
|
+
const v = arg1;
|
|
2142
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
2143
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2144
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2145
|
+
};
|
|
2146
|
+
|
|
2147
|
+
exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
2148
|
+
const v = arg0;
|
|
2149
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
2150
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
2151
|
+
};
|
|
2152
|
+
|
|
2153
|
+
exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
2154
|
+
const ret = debugString(arg1);
|
|
2155
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2156
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2157
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2158
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2159
|
+
};
|
|
2160
|
+
|
|
2161
|
+
exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
2162
|
+
const ret = arg0 in arg1;
|
|
2163
|
+
return ret;
|
|
2164
|
+
};
|
|
2165
|
+
|
|
2166
|
+
exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
2167
|
+
const ret = typeof(arg0) === 'bigint';
|
|
2168
|
+
return ret;
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
2172
|
+
const ret = typeof(arg0) === 'function';
|
|
2173
|
+
return ret;
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
2177
|
+
const val = arg0;
|
|
2178
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2179
|
+
return ret;
|
|
2180
|
+
};
|
|
2181
|
+
|
|
2182
|
+
exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
2183
|
+
const ret = typeof(arg0) === 'string';
|
|
2184
|
+
return ret;
|
|
2185
|
+
};
|
|
2186
|
+
|
|
2187
|
+
exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
2188
|
+
const ret = arg0 === undefined;
|
|
2189
|
+
return ret;
|
|
2190
|
+
};
|
|
2191
|
+
|
|
2192
|
+
exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
2193
|
+
const ret = arg0 === arg1;
|
|
2194
|
+
return ret;
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
2198
|
+
const ret = arg0 == arg1;
|
|
2199
|
+
return ret;
|
|
2200
|
+
};
|
|
2201
|
+
|
|
2202
|
+
exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
2203
|
+
const obj = arg1;
|
|
2204
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2205
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2206
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2207
|
+
};
|
|
2208
|
+
|
|
2209
|
+
exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
2210
|
+
const obj = arg1;
|
|
2211
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2212
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2213
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2214
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2215
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2216
|
+
};
|
|
2217
|
+
|
|
2218
|
+
exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
2219
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2220
|
+
};
|
|
2221
|
+
|
|
2222
|
+
exports.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
2223
|
+
arg0._wbg_cb_unref();
|
|
2224
|
+
};
|
|
2225
|
+
|
|
2226
|
+
exports.__wbg_abort_8d4ada33948fb9ea = function(arg0) {
|
|
2227
|
+
arg0.abort();
|
|
2228
|
+
};
|
|
2229
|
+
|
|
2230
|
+
exports.__wbg_append_7d0ec8d7eeb807f8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2231
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2232
|
+
}, arguments) };
|
|
2233
|
+
|
|
2234
|
+
exports.__wbg_arrayBuffer_244b9be4ec34cae8 = function() { return handleError(function (arg0) {
|
|
2235
|
+
const ret = arg0.arrayBuffer();
|
|
2236
|
+
return ret;
|
|
2237
|
+
}, arguments) };
|
|
2238
|
+
|
|
2239
|
+
exports.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2240
|
+
const ret = arg0.call(arg1, arg2);
|
|
2241
|
+
return ret;
|
|
2242
|
+
}, arguments) };
|
|
2243
|
+
|
|
2244
|
+
exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
2245
|
+
const ret = arg0.call(arg1);
|
|
2246
|
+
return ret;
|
|
2247
|
+
}, arguments) };
|
|
2248
|
+
|
|
2249
|
+
exports.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
2250
|
+
const ret = clearTimeout(arg0);
|
|
2251
|
+
return ret;
|
|
2252
|
+
};
|
|
2253
|
+
|
|
2254
|
+
exports.__wbg_clearTimeout_96804de0ab838f26 = function(arg0) {
|
|
2255
|
+
const ret = clearTimeout(arg0);
|
|
2256
|
+
return ret;
|
|
2257
|
+
};
|
|
2258
|
+
|
|
2259
|
+
exports.__wbg_credentialdefinition_new = function(arg0) {
|
|
2260
|
+
const ret = CredentialDefinition.__wrap(arg0);
|
|
2261
|
+
return ret;
|
|
2262
|
+
};
|
|
2263
|
+
|
|
2264
|
+
exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
2265
|
+
const ret = arg0.done;
|
|
2266
|
+
return ret;
|
|
2267
|
+
};
|
|
2268
|
+
|
|
2269
|
+
exports.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
2270
|
+
const ret = Object.entries(arg0);
|
|
2271
|
+
return ret;
|
|
2272
|
+
};
|
|
2273
|
+
|
|
2274
|
+
exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
2275
|
+
let deferred0_0;
|
|
2276
|
+
let deferred0_1;
|
|
2277
|
+
try {
|
|
2278
|
+
deferred0_0 = arg0;
|
|
2279
|
+
deferred0_1 = arg1;
|
|
2280
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
2281
|
+
} finally {
|
|
2282
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2283
|
+
}
|
|
2284
|
+
};
|
|
2285
|
+
|
|
2286
|
+
exports.__wbg_eventquery_new = function(arg0) {
|
|
2287
|
+
const ret = EventQuery.__wrap(arg0);
|
|
2288
|
+
return ret;
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2291
|
+
exports.__wbg_fetch_f1856afdb49415d1 = function(arg0) {
|
|
2292
|
+
const ret = fetch(arg0);
|
|
2293
|
+
return ret;
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
exports.__wbg_fetch_f649bd7134840205 = function(arg0, arg1) {
|
|
2297
|
+
const ret = arg0.fetch(arg1);
|
|
2298
|
+
return ret;
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
exports.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
|
|
2302
|
+
const ret = arg0.getTime();
|
|
2303
|
+
return ret;
|
|
2304
|
+
};
|
|
2305
|
+
|
|
2306
|
+
exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
2307
|
+
const ret = arg0[arg1 >>> 0];
|
|
2308
|
+
return ret;
|
|
2309
|
+
};
|
|
2310
|
+
|
|
2311
|
+
exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
2312
|
+
const ret = Reflect.get(arg0, arg1);
|
|
2313
|
+
return ret;
|
|
2314
|
+
}, arguments) };
|
|
2315
|
+
|
|
2316
|
+
exports.__wbg_get_with_ref_key_bb8f74a92cb2e784 = function(arg0, arg1) {
|
|
2317
|
+
const ret = arg0[arg1];
|
|
2318
|
+
return ret;
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
exports.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
|
|
2322
|
+
const ret = Reflect.has(arg0, arg1);
|
|
2323
|
+
return ret;
|
|
2324
|
+
}, arguments) };
|
|
2325
|
+
|
|
2326
|
+
exports.__wbg_headers_cc3fc3b432f8aabc = function(arg0) {
|
|
2327
|
+
const ret = arg0.headers;
|
|
2328
|
+
return ret;
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
2332
|
+
let result;
|
|
2333
|
+
try {
|
|
2334
|
+
result = arg0 instanceof ArrayBuffer;
|
|
2335
|
+
} catch (_) {
|
|
2336
|
+
result = false;
|
|
2337
|
+
}
|
|
2338
|
+
const ret = result;
|
|
2339
|
+
return ret;
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
exports.__wbg_instanceof_Response_d1b3f08d4983dc43 = function(arg0) {
|
|
2343
|
+
let result;
|
|
2344
|
+
try {
|
|
2345
|
+
result = arg0 instanceof Response;
|
|
2346
|
+
} catch (_) {
|
|
2347
|
+
result = false;
|
|
2348
|
+
}
|
|
2349
|
+
const ret = result;
|
|
2350
|
+
return ret;
|
|
2351
|
+
};
|
|
2352
|
+
|
|
2353
|
+
exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
2354
|
+
let result;
|
|
2355
|
+
try {
|
|
2356
|
+
result = arg0 instanceof Uint8Array;
|
|
2357
|
+
} catch (_) {
|
|
2358
|
+
result = false;
|
|
2359
|
+
}
|
|
2360
|
+
const ret = result;
|
|
2361
|
+
return ret;
|
|
2362
|
+
};
|
|
2363
|
+
|
|
2364
|
+
exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
2365
|
+
const ret = Array.isArray(arg0);
|
|
2366
|
+
return ret;
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
2370
|
+
const ret = Number.isSafeInteger(arg0);
|
|
2371
|
+
return ret;
|
|
2372
|
+
};
|
|
2373
|
+
|
|
2374
|
+
exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
2375
|
+
const ret = Symbol.iterator;
|
|
2376
|
+
return ret;
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
2380
|
+
const ret = arg0.length;
|
|
2381
|
+
return ret;
|
|
2382
|
+
};
|
|
2383
|
+
|
|
2384
|
+
exports.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
2385
|
+
const ret = arg0.length;
|
|
2386
|
+
return ret;
|
|
2387
|
+
};
|
|
2388
|
+
|
|
2389
|
+
exports.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
2390
|
+
const ret = new Date();
|
|
2391
|
+
return ret;
|
|
2392
|
+
};
|
|
2393
|
+
|
|
2394
|
+
exports.__wbg_new_1ba21ce319a06297 = function() {
|
|
2395
|
+
const ret = new Object();
|
|
2396
|
+
return ret;
|
|
2397
|
+
};
|
|
2398
|
+
|
|
2399
|
+
exports.__wbg_new_25f239778d6112b9 = function() {
|
|
2400
|
+
const ret = new Array();
|
|
2401
|
+
return ret;
|
|
2402
|
+
};
|
|
2403
|
+
|
|
2404
|
+
exports.__wbg_new_3955c5041f5c225a = function() { return handleError(function () {
|
|
2405
|
+
const ret = new AbortController();
|
|
2406
|
+
return ret;
|
|
2407
|
+
}, arguments) };
|
|
2408
|
+
|
|
2409
|
+
exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
2410
|
+
const ret = new Uint8Array(arg0);
|
|
2411
|
+
return ret;
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
2415
|
+
const ret = new Error();
|
|
2416
|
+
return ret;
|
|
2417
|
+
};
|
|
2418
|
+
|
|
2419
|
+
exports.__wbg_new_9d9027fccb1f4cb1 = function() { return handleError(function () {
|
|
2420
|
+
const ret = new Headers();
|
|
2421
|
+
return ret;
|
|
2422
|
+
}, arguments) };
|
|
2423
|
+
|
|
2424
|
+
exports.__wbg_new_b546ae120718850e = function() {
|
|
2425
|
+
const ret = new Map();
|
|
2426
|
+
return ret;
|
|
2427
|
+
};
|
|
2428
|
+
|
|
2429
|
+
exports.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {
|
|
2430
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2431
|
+
return ret;
|
|
2432
|
+
};
|
|
2433
|
+
|
|
2434
|
+
exports.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
2435
|
+
try {
|
|
2436
|
+
var state0 = {a: arg0, b: arg1};
|
|
2437
|
+
var cb0 = (arg0, arg1) => {
|
|
2438
|
+
const a = state0.a;
|
|
2439
|
+
state0.a = 0;
|
|
2440
|
+
try {
|
|
2441
|
+
return wasm_bindgen__convert__closures_____invoke__hbabdd7037359511e(a, state0.b, arg0, arg1);
|
|
2442
|
+
} finally {
|
|
2443
|
+
state0.a = a;
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
const ret = new Promise(cb0);
|
|
2447
|
+
return ret;
|
|
2448
|
+
} finally {
|
|
2449
|
+
state0.a = state0.b = 0;
|
|
2450
|
+
}
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
exports.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
2454
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2455
|
+
return ret;
|
|
2456
|
+
};
|
|
2457
|
+
|
|
2458
|
+
exports.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
2459
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2460
|
+
return ret;
|
|
2461
|
+
};
|
|
2462
|
+
|
|
2463
|
+
exports.__wbg_new_with_str_and_init_80f4e7be678ad35c = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2464
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
2465
|
+
return ret;
|
|
2466
|
+
}, arguments) };
|
|
2467
|
+
|
|
2468
|
+
exports.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
2469
|
+
const ret = arg0.next;
|
|
2470
|
+
return ret;
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
2474
|
+
const ret = arg0.next();
|
|
2475
|
+
return ret;
|
|
2476
|
+
}, arguments) };
|
|
2477
|
+
|
|
2478
|
+
exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
2479
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2480
|
+
};
|
|
2481
|
+
|
|
2482
|
+
exports.__wbg_queueMicrotask_5a8a9131f3f0b37b = function(arg0) {
|
|
2483
|
+
const ret = arg0.queueMicrotask;
|
|
2484
|
+
return ret;
|
|
2485
|
+
};
|
|
2486
|
+
|
|
2487
|
+
exports.__wbg_queueMicrotask_6d79674585219521 = function(arg0) {
|
|
2488
|
+
queueMicrotask(arg0);
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
exports.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
2492
|
+
const ret = Promise.resolve(arg0);
|
|
2493
|
+
return ret;
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
exports.__wbg_revocationregistrydefinition_new = function(arg0) {
|
|
2497
|
+
const ret = RevocationRegistryDefinition.__wrap(arg0);
|
|
2498
|
+
return ret;
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
exports.__wbg_revocationregistryentry_new = function(arg0) {
|
|
2502
|
+
const ret = RevocationRegistryEntry.__wrap(arg0);
|
|
2503
|
+
return ret;
|
|
2504
|
+
};
|
|
2505
|
+
|
|
2506
|
+
exports.__wbg_revocationregistrystatuslist_new = function(arg0) {
|
|
2507
|
+
const ret = RevocationRegistryStatusList.__wrap(arg0);
|
|
2508
|
+
return ret;
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
exports.__wbg_schema_new = function(arg0) {
|
|
2512
|
+
const ret = Schema.__wrap(arg0);
|
|
2513
|
+
return ret;
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2516
|
+
exports.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
2517
|
+
const ret = setTimeout(arg0, arg1);
|
|
2518
|
+
return ret;
|
|
2519
|
+
}, arguments) };
|
|
2520
|
+
|
|
2521
|
+
exports.__wbg_setTimeout_eefe7f4c234b0c6b = function() { return handleError(function (arg0, arg1) {
|
|
2522
|
+
const ret = setTimeout(arg0, arg1);
|
|
2523
|
+
return ret;
|
|
2524
|
+
}, arguments) };
|
|
2525
|
+
|
|
2526
|
+
exports.__wbg_set_3fda3bac07393de4 = function(arg0, arg1, arg2) {
|
|
2527
|
+
arg0[arg1] = arg2;
|
|
2528
|
+
};
|
|
2529
|
+
|
|
2530
|
+
exports.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
2531
|
+
arg0[arg1 >>> 0] = arg2;
|
|
2532
|
+
};
|
|
2533
|
+
|
|
2534
|
+
exports.__wbg_set_body_e622304a359e9997 = function(arg0, arg1) {
|
|
2535
|
+
arg0.body = arg1;
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2538
|
+
exports.__wbg_set_credentials_6c1850c906a4c7d8 = function(arg0, arg1) {
|
|
2539
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2540
|
+
};
|
|
2541
|
+
|
|
2542
|
+
exports.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
2543
|
+
const ret = arg0.set(arg1, arg2);
|
|
2544
|
+
return ret;
|
|
2545
|
+
};
|
|
2546
|
+
|
|
2547
|
+
exports.__wbg_set_headers_37c4507b6650184a = function(arg0, arg1) {
|
|
2548
|
+
arg0.headers = arg1;
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
exports.__wbg_set_method_20004624d0bb3c04 = function(arg0, arg1, arg2) {
|
|
2552
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
2553
|
+
};
|
|
2554
|
+
|
|
2555
|
+
exports.__wbg_set_mode_cfeb23c22a98ee10 = function(arg0, arg1) {
|
|
2556
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2557
|
+
};
|
|
2558
|
+
|
|
2559
|
+
exports.__wbg_set_signal_1c7fc807a0404525 = function(arg0, arg1) {
|
|
2560
|
+
arg0.signal = arg1;
|
|
2561
|
+
};
|
|
2562
|
+
|
|
2563
|
+
exports.__wbg_signal_05cd9a8401da1904 = function(arg0) {
|
|
2564
|
+
const ret = arg0.signal;
|
|
2565
|
+
return ret;
|
|
2566
|
+
};
|
|
2567
|
+
|
|
2568
|
+
exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2569
|
+
const ret = arg1.stack;
|
|
2570
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2571
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2572
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2573
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2574
|
+
};
|
|
2575
|
+
|
|
2576
|
+
exports.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2577
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
2578
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2579
|
+
};
|
|
2580
|
+
|
|
2581
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
2582
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2583
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2584
|
+
};
|
|
2585
|
+
|
|
2586
|
+
exports.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
2587
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
2588
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
exports.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
2592
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
2593
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
exports.__wbg_status_0469c5287b59ffc5 = function(arg0) {
|
|
2597
|
+
const ret = arg0.status;
|
|
2598
|
+
return ret;
|
|
2599
|
+
};
|
|
2600
|
+
|
|
2601
|
+
exports.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
|
|
2602
|
+
const ret = JSON.stringify(arg0);
|
|
2603
|
+
return ret;
|
|
2604
|
+
}, arguments) };
|
|
2605
|
+
|
|
2606
|
+
exports.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
2607
|
+
const ret = arg0.then(arg1, arg2);
|
|
2608
|
+
return ret;
|
|
2609
|
+
};
|
|
2610
|
+
|
|
2611
|
+
exports.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
2612
|
+
const ret = arg0.then(arg1);
|
|
2613
|
+
return ret;
|
|
2614
|
+
};
|
|
2615
|
+
|
|
2616
|
+
exports.__wbg_transaction_new = function(arg0) {
|
|
2617
|
+
const ret = Transaction.__wrap(arg0);
|
|
2618
|
+
return ret;
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
exports.__wbg_transactionendorsingdata_new = function(arg0) {
|
|
2622
|
+
const ret = TransactionEndorsingData.__wrap(arg0);
|
|
2623
|
+
return ret;
|
|
2624
|
+
};
|
|
2625
|
+
|
|
2626
|
+
exports.__wbg_url_0f5a9de9ca05e0eb = function(arg0, arg1) {
|
|
2627
|
+
const ret = arg1.url;
|
|
2628
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2629
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2630
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2631
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2632
|
+
};
|
|
2633
|
+
|
|
2634
|
+
exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
2635
|
+
const ret = arg0.value;
|
|
2636
|
+
return ret;
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2639
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
2640
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2641
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2642
|
+
return ret;
|
|
2643
|
+
};
|
|
2644
|
+
|
|
2645
|
+
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
2646
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
2647
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2648
|
+
return ret;
|
|
2649
|
+
};
|
|
2650
|
+
|
|
2651
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
2652
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
2653
|
+
const ret = arg0;
|
|
2654
|
+
return ret;
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
exports.__wbindgen_cast_af28d61432eab9a8 = function(arg0, arg1) {
|
|
2658
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1190, function: Function { arguments: [], shim_idx: 1191, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2659
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h4683acde6d985fbb, wasm_bindgen__convert__closures_____invoke__h711c3930aef5dacf);
|
|
2660
|
+
return ret;
|
|
2661
|
+
};
|
|
2662
|
+
|
|
2663
|
+
exports.__wbindgen_cast_c47ebd1492a57180 = function(arg0, arg1) {
|
|
2664
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1181, function: Function { arguments: [], shim_idx: 1182, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2665
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb4256b431b7abf1e, wasm_bindgen__convert__closures_____invoke__h184b7a090947292c);
|
|
2666
|
+
return ret;
|
|
2667
|
+
};
|
|
2668
|
+
|
|
2669
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
2670
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
2671
|
+
const ret = arg0;
|
|
2672
|
+
return ret;
|
|
2673
|
+
};
|
|
2674
|
+
|
|
2675
|
+
exports.__wbindgen_cast_d94fdfc916fc4ce2 = function(arg0, arg1) {
|
|
2676
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1283, function: Function { arguments: [Externref], shim_idx: 1284, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2677
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he9ff8ee1ef74c7a5, wasm_bindgen__convert__closures_____invoke__hf4d0e3d1df92b3f7);
|
|
2678
|
+
return ret;
|
|
2679
|
+
};
|
|
2680
|
+
|
|
2681
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
2682
|
+
const table = wasm.__wbindgen_externrefs;
|
|
2683
|
+
const offset = table.grow(4);
|
|
2684
|
+
table.set(0, undefined);
|
|
2685
|
+
table.set(offset + 0, undefined);
|
|
2686
|
+
table.set(offset + 1, null);
|
|
2687
|
+
table.set(offset + 2, true);
|
|
2688
|
+
table.set(offset + 3, false);
|
|
2689
|
+
};
|
|
2690
|
+
|
|
2691
|
+
const wasmPath = `${__dirname}/indy_besu_vdr_wasm_bg.wasm`;
|
|
2692
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
2693
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
2694
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
2695
|
+
|
|
2696
|
+
wasm.__wbindgen_start();
|