@maxandriani/indy-besu-vdr-nodejs 0.0.0-stage → 0.2.0

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