@janssenproject/cedarling_wasm 2.1.0 → 2.3.0-nodejs
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/cedarling_wasm.d.ts +236 -153
- package/cedarling_wasm.js +1351 -705
- package/cedarling_wasm_bg.wasm +0 -0
- package/package.json +3 -7
package/cedarling_wasm.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
|
|
5
5
|
* Represents the result of an authorization request.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
class AuthorizeResult {
|
|
8
8
|
static __wrap(ptr) {
|
|
9
9
|
const obj = Object.create(AuthorizeResult.prototype);
|
|
10
10
|
obj.__wbg_ptr = ptr;
|
|
@@ -29,12 +29,16 @@ export class AuthorizeResult {
|
|
|
29
29
|
let deferred1_0;
|
|
30
30
|
let deferred1_1;
|
|
31
31
|
try {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33
|
+
wasm.authorizeresult_json_string(retptr, this.__wbg_ptr);
|
|
34
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
35
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
36
|
+
deferred1_0 = r0;
|
|
37
|
+
deferred1_1 = r1;
|
|
38
|
+
return getStringFromWasm0(r0, r1);
|
|
36
39
|
} finally {
|
|
37
|
-
wasm.
|
|
40
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
41
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
@@ -57,12 +61,16 @@ export class AuthorizeResult {
|
|
|
57
61
|
let deferred1_0;
|
|
58
62
|
let deferred1_1;
|
|
59
63
|
try {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
65
|
+
wasm.__wbg_get_authorizeresult_request_id(retptr, this.__wbg_ptr);
|
|
66
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
67
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
68
|
+
deferred1_0 = r0;
|
|
69
|
+
deferred1_1 = r1;
|
|
70
|
+
return getStringFromWasm0(r0, r1);
|
|
64
71
|
} finally {
|
|
65
|
-
wasm.
|
|
72
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
73
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
/**
|
|
@@ -89,7 +97,7 @@ export class AuthorizeResult {
|
|
|
89
97
|
* @param {string} arg0
|
|
90
98
|
*/
|
|
91
99
|
set request_id(arg0) {
|
|
92
|
-
const ptr0 = passStringToWasm0(arg0, wasm.
|
|
100
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
93
101
|
const len0 = WASM_VECTOR_LEN;
|
|
94
102
|
wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
95
103
|
}
|
|
@@ -104,12 +112,13 @@ export class AuthorizeResult {
|
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
|
|
115
|
+
exports.AuthorizeResult = AuthorizeResult;
|
|
107
116
|
|
|
108
117
|
/**
|
|
109
118
|
* A WASM wrapper for the Rust `cedar_policy::Response` struct.
|
|
110
119
|
* Represents the result of an authorization request.
|
|
111
120
|
*/
|
|
112
|
-
|
|
121
|
+
class AuthorizeResultResponse {
|
|
113
122
|
static __wrap(ptr) {
|
|
114
123
|
const obj = Object.create(AuthorizeResultResponse.prototype);
|
|
115
124
|
obj.__wbg_ptr = ptr;
|
|
@@ -144,11 +153,337 @@ export class AuthorizeResultResponse {
|
|
|
144
153
|
}
|
|
145
154
|
}
|
|
146
155
|
if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
|
|
156
|
+
exports.AuthorizeResultResponse = AuthorizeResultResponse;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* WASM wrapper for
|
|
160
|
+
* `cedarling::BatchAuthorizeResponse<Result<MultiIssuerAuthorizeResult, BatchItemError>>`.
|
|
161
|
+
* Same shape as [`BatchAuthorizeUnsignedResponse`] with multi-issuer results.
|
|
162
|
+
*/
|
|
163
|
+
class BatchAuthorizeMultiIssuerResponse {
|
|
164
|
+
static __wrap(ptr) {
|
|
165
|
+
const obj = Object.create(BatchAuthorizeMultiIssuerResponse.prototype);
|
|
166
|
+
obj.__wbg_ptr = ptr;
|
|
167
|
+
BatchAuthorizeMultiIssuerResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
168
|
+
return obj;
|
|
169
|
+
}
|
|
170
|
+
__destroy_into_raw() {
|
|
171
|
+
const ptr = this.__wbg_ptr;
|
|
172
|
+
this.__wbg_ptr = 0;
|
|
173
|
+
BatchAuthorizeMultiIssuerResponseFinalization.unregister(this);
|
|
174
|
+
return ptr;
|
|
175
|
+
}
|
|
176
|
+
free() {
|
|
177
|
+
const ptr = this.__destroy_into_raw();
|
|
178
|
+
wasm.__wbg_batchauthorizemultiissuerresponse_free(ptr, 0);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Shared correlation id stamped on every per-item decision log entry.
|
|
182
|
+
* @returns {string}
|
|
183
|
+
*/
|
|
184
|
+
get batch_id() {
|
|
185
|
+
let deferred1_0;
|
|
186
|
+
let deferred1_1;
|
|
187
|
+
try {
|
|
188
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
189
|
+
wasm.batchauthorizemultiissuerresponse_batch_id(retptr, this.__wbg_ptr);
|
|
190
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
191
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
192
|
+
deferred1_0 = r0;
|
|
193
|
+
deferred1_1 = r1;
|
|
194
|
+
return getStringFromWasm0(r0, r1);
|
|
195
|
+
} finally {
|
|
196
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
197
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Per-item results in input order — each slot is a
|
|
202
|
+
* [`BatchItemMultiIssuerResult`].
|
|
203
|
+
* @returns {BatchItemMultiIssuerResult[]}
|
|
204
|
+
*/
|
|
205
|
+
get results() {
|
|
206
|
+
try {
|
|
207
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
208
|
+
wasm.batchauthorizemultiissuerresponse_results(retptr, this.__wbg_ptr);
|
|
209
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
210
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
211
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
212
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
213
|
+
return v1;
|
|
214
|
+
} finally {
|
|
215
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (Symbol.dispose) BatchAuthorizeMultiIssuerResponse.prototype[Symbol.dispose] = BatchAuthorizeMultiIssuerResponse.prototype.free;
|
|
220
|
+
exports.BatchAuthorizeMultiIssuerResponse = BatchAuthorizeMultiIssuerResponse;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* WASM wrapper for `cedarling::BatchAuthorizeResponse<Result<AuthorizeResult, BatchItemError>>`.
|
|
224
|
+
*
|
|
225
|
+
* Carries a shared `batch_id` (UUIDv7) alongside per-item results. Each result
|
|
226
|
+
* is a [`BatchItemUnsignedResult`] — Cedar decision on `is_ok()`, per-item
|
|
227
|
+
* build failure on `error`. `results[i]` corresponds to `items[i]`.
|
|
228
|
+
*/
|
|
229
|
+
class BatchAuthorizeUnsignedResponse {
|
|
230
|
+
static __wrap(ptr) {
|
|
231
|
+
const obj = Object.create(BatchAuthorizeUnsignedResponse.prototype);
|
|
232
|
+
obj.__wbg_ptr = ptr;
|
|
233
|
+
BatchAuthorizeUnsignedResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
234
|
+
return obj;
|
|
235
|
+
}
|
|
236
|
+
__destroy_into_raw() {
|
|
237
|
+
const ptr = this.__wbg_ptr;
|
|
238
|
+
this.__wbg_ptr = 0;
|
|
239
|
+
BatchAuthorizeUnsignedResponseFinalization.unregister(this);
|
|
240
|
+
return ptr;
|
|
241
|
+
}
|
|
242
|
+
free() {
|
|
243
|
+
const ptr = this.__destroy_into_raw();
|
|
244
|
+
wasm.__wbg_batchauthorizeunsignedresponse_free(ptr, 0);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Shared correlation id stamped on every per-item decision log entry.
|
|
248
|
+
* @returns {string}
|
|
249
|
+
*/
|
|
250
|
+
get batch_id() {
|
|
251
|
+
let deferred1_0;
|
|
252
|
+
let deferred1_1;
|
|
253
|
+
try {
|
|
254
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
255
|
+
wasm.batchauthorizeunsignedresponse_batch_id(retptr, this.__wbg_ptr);
|
|
256
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
257
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
258
|
+
deferred1_0 = r0;
|
|
259
|
+
deferred1_1 = r1;
|
|
260
|
+
return getStringFromWasm0(r0, r1);
|
|
261
|
+
} finally {
|
|
262
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Per-item results in input order — each slot is a
|
|
268
|
+
* [`BatchItemUnsignedResult`].
|
|
269
|
+
* @returns {BatchItemUnsignedResult[]}
|
|
270
|
+
*/
|
|
271
|
+
get results() {
|
|
272
|
+
try {
|
|
273
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
274
|
+
wasm.batchauthorizeunsignedresponse_results(retptr, this.__wbg_ptr);
|
|
275
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
276
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
277
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
278
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
279
|
+
return v1;
|
|
280
|
+
} finally {
|
|
281
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (Symbol.dispose) BatchAuthorizeUnsignedResponse.prototype[Symbol.dispose] = BatchAuthorizeUnsignedResponse.prototype.free;
|
|
286
|
+
exports.BatchAuthorizeUnsignedResponse = BatchAuthorizeUnsignedResponse;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Per-item build failure surfaced inside a batch response at `results[i]`
|
|
290
|
+
* when Cedar couldn't be reached for that item.
|
|
291
|
+
*/
|
|
292
|
+
class BatchItemError {
|
|
293
|
+
static __wrap(ptr) {
|
|
294
|
+
const obj = Object.create(BatchItemError.prototype);
|
|
295
|
+
obj.__wbg_ptr = ptr;
|
|
296
|
+
BatchItemErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
297
|
+
return obj;
|
|
298
|
+
}
|
|
299
|
+
__destroy_into_raw() {
|
|
300
|
+
const ptr = this.__wbg_ptr;
|
|
301
|
+
this.__wbg_ptr = 0;
|
|
302
|
+
BatchItemErrorFinalization.unregister(this);
|
|
303
|
+
return ptr;
|
|
304
|
+
}
|
|
305
|
+
free() {
|
|
306
|
+
const ptr = this.__destroy_into_raw();
|
|
307
|
+
wasm.__wbg_batchitemerror_free(ptr, 0);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Stable variant slug — `action_parse`, `resource_build`, `context_build`,
|
|
311
|
+
* `principal_build`, `schema_validation`, `multi_issuer_entity`,
|
|
312
|
+
* `request_validation`.
|
|
313
|
+
* @returns {string}
|
|
314
|
+
*/
|
|
315
|
+
get category() {
|
|
316
|
+
let deferred1_0;
|
|
317
|
+
let deferred1_1;
|
|
318
|
+
try {
|
|
319
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
320
|
+
wasm.batchitemerror_category(retptr, this.__wbg_ptr);
|
|
321
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
322
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
323
|
+
deferred1_0 = r0;
|
|
324
|
+
deferred1_1 = r1;
|
|
325
|
+
return getStringFromWasm0(r0, r1);
|
|
326
|
+
} finally {
|
|
327
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
328
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Position of the failing item in the original `items` vector.
|
|
333
|
+
* @returns {number}
|
|
334
|
+
*/
|
|
335
|
+
get item_index() {
|
|
336
|
+
const ret = wasm.batchitemerror_item_index(this.__wbg_ptr);
|
|
337
|
+
return ret >>> 0;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Human-readable diagnostic. Safe to log.
|
|
341
|
+
* @returns {string}
|
|
342
|
+
*/
|
|
343
|
+
get message() {
|
|
344
|
+
let deferred1_0;
|
|
345
|
+
let deferred1_1;
|
|
346
|
+
try {
|
|
347
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
348
|
+
wasm.batchitemerror_message(retptr, this.__wbg_ptr);
|
|
349
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
350
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
351
|
+
deferred1_0 = r0;
|
|
352
|
+
deferred1_1 = r1;
|
|
353
|
+
return getStringFromWasm0(r0, r1);
|
|
354
|
+
} finally {
|
|
355
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
356
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (Symbol.dispose) BatchItemError.prototype[Symbol.dispose] = BatchItemError.prototype.free;
|
|
361
|
+
exports.BatchItemError = BatchItemError;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Multi-issuer analog of [`BatchItemUnsignedResult`].
|
|
365
|
+
*/
|
|
366
|
+
class BatchItemMultiIssuerResult {
|
|
367
|
+
static __wrap(ptr) {
|
|
368
|
+
const obj = Object.create(BatchItemMultiIssuerResult.prototype);
|
|
369
|
+
obj.__wbg_ptr = ptr;
|
|
370
|
+
BatchItemMultiIssuerResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
371
|
+
return obj;
|
|
372
|
+
}
|
|
373
|
+
__destroy_into_raw() {
|
|
374
|
+
const ptr = this.__wbg_ptr;
|
|
375
|
+
this.__wbg_ptr = 0;
|
|
376
|
+
BatchItemMultiIssuerResultFinalization.unregister(this);
|
|
377
|
+
return ptr;
|
|
378
|
+
}
|
|
379
|
+
free() {
|
|
380
|
+
const ptr = this.__destroy_into_raw();
|
|
381
|
+
wasm.__wbg_batchitemmultiissuerresult_free(ptr, 0);
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The per-item error if `!is_ok()`; `undefined` otherwise.
|
|
385
|
+
* @returns {BatchItemError | undefined}
|
|
386
|
+
*/
|
|
387
|
+
get error() {
|
|
388
|
+
const ret = wasm.batchitemmultiissuerresult_error(this.__wbg_ptr);
|
|
389
|
+
return ret === 0 ? undefined : BatchItemError.__wrap(ret);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* `true` when Cedar evaluated this item.
|
|
393
|
+
* @returns {boolean}
|
|
394
|
+
*/
|
|
395
|
+
get is_ok() {
|
|
396
|
+
const ret = wasm.batchitemmultiissuerresult_is_ok(this.__wbg_ptr);
|
|
397
|
+
return ret !== 0;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* The multi-issuer decision if `is_ok()`; throws otherwise.
|
|
401
|
+
* @returns {MultiIssuerAuthorizeResult}
|
|
402
|
+
*/
|
|
403
|
+
unwrap() {
|
|
404
|
+
try {
|
|
405
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
406
|
+
wasm.batchitemmultiissuerresult_unwrap(retptr, this.__wbg_ptr);
|
|
407
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
408
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
409
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
410
|
+
if (r2) {
|
|
411
|
+
throw takeObject(r1);
|
|
412
|
+
}
|
|
413
|
+
return MultiIssuerAuthorizeResult.__wrap(r0);
|
|
414
|
+
} finally {
|
|
415
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (Symbol.dispose) BatchItemMultiIssuerResult.prototype[Symbol.dispose] = BatchItemMultiIssuerResult.prototype.free;
|
|
420
|
+
exports.BatchItemMultiIssuerResult = BatchItemMultiIssuerResult;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* One slot in a batch response's `results` array. Callers switch on
|
|
424
|
+
* `is_ok()` — on `true`, read `unwrap()`; on `false`, read `error()`.
|
|
425
|
+
*/
|
|
426
|
+
class BatchItemUnsignedResult {
|
|
427
|
+
static __wrap(ptr) {
|
|
428
|
+
const obj = Object.create(BatchItemUnsignedResult.prototype);
|
|
429
|
+
obj.__wbg_ptr = ptr;
|
|
430
|
+
BatchItemUnsignedResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
431
|
+
return obj;
|
|
432
|
+
}
|
|
433
|
+
__destroy_into_raw() {
|
|
434
|
+
const ptr = this.__wbg_ptr;
|
|
435
|
+
this.__wbg_ptr = 0;
|
|
436
|
+
BatchItemUnsignedResultFinalization.unregister(this);
|
|
437
|
+
return ptr;
|
|
438
|
+
}
|
|
439
|
+
free() {
|
|
440
|
+
const ptr = this.__destroy_into_raw();
|
|
441
|
+
wasm.__wbg_batchitemunsignedresult_free(ptr, 0);
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* The per-item error if `!is_ok()`; `undefined` otherwise.
|
|
445
|
+
* @returns {BatchItemError | undefined}
|
|
446
|
+
*/
|
|
447
|
+
get error() {
|
|
448
|
+
const ret = wasm.batchitemunsignedresult_error(this.__wbg_ptr);
|
|
449
|
+
return ret === 0 ? undefined : BatchItemError.__wrap(ret);
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* `true` when Cedar evaluated this item (Allow or Deny); `false` when it
|
|
453
|
+
* failed to build.
|
|
454
|
+
* @returns {boolean}
|
|
455
|
+
*/
|
|
456
|
+
get is_ok() {
|
|
457
|
+
const ret = wasm.batchitemunsignedresult_is_ok(this.__wbg_ptr);
|
|
458
|
+
return ret !== 0;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The Cedar decision if `is_ok()`; throws otherwise.
|
|
462
|
+
* @returns {AuthorizeResult}
|
|
463
|
+
*/
|
|
464
|
+
unwrap() {
|
|
465
|
+
try {
|
|
466
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
467
|
+
wasm.batchitemunsignedresult_unwrap(retptr, this.__wbg_ptr);
|
|
468
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
469
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
470
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
471
|
+
if (r2) {
|
|
472
|
+
throw takeObject(r1);
|
|
473
|
+
}
|
|
474
|
+
return AuthorizeResult.__wrap(r0);
|
|
475
|
+
} finally {
|
|
476
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (Symbol.dispose) BatchItemUnsignedResult.prototype[Symbol.dispose] = BatchItemUnsignedResult.prototype.free;
|
|
481
|
+
exports.BatchItemUnsignedResult = BatchItemUnsignedResult;
|
|
147
482
|
|
|
148
483
|
/**
|
|
149
484
|
* The instance of the Cedarling application.
|
|
150
485
|
*/
|
|
151
|
-
|
|
486
|
+
class Cedarling {
|
|
152
487
|
static __wrap(ptr) {
|
|
153
488
|
const obj = Object.create(Cedarling.prototype);
|
|
154
489
|
obj.__wbg_ptr = ptr;
|
|
@@ -165,15 +500,171 @@ export class Cedarling {
|
|
|
165
500
|
const ptr = this.__destroy_into_raw();
|
|
166
501
|
wasm.__wbg_cedarling_free(ptr, 0);
|
|
167
502
|
}
|
|
503
|
+
/**
|
|
504
|
+
* Collect every value of the annotation `key` across the given policies,
|
|
505
|
+
* preserving duplicates. Unknown policy IDs are silently skipped.
|
|
506
|
+
*
|
|
507
|
+
* # Arguments
|
|
508
|
+
*
|
|
509
|
+
* * `policy_ids` - List of policy IDs to search. Typically
|
|
510
|
+
* `result.response.diagnostics.reason` from an authorization result.
|
|
511
|
+
* * `key` - The annotation key to collect values for (e.g. `"redirect"`).
|
|
512
|
+
*
|
|
513
|
+
* # Example
|
|
514
|
+
*
|
|
515
|
+
* ```javascript
|
|
516
|
+
* const redirects = cedarling.annotation_values(result.response.diagnostics.reason, "redirect");
|
|
517
|
+
* // ["/upgrade"]
|
|
518
|
+
* ```
|
|
519
|
+
* @param {string[]} policy_ids
|
|
520
|
+
* @param {string} key
|
|
521
|
+
* @returns {string[]}
|
|
522
|
+
*/
|
|
523
|
+
annotation_values(policy_ids, key) {
|
|
524
|
+
try {
|
|
525
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
526
|
+
const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
|
|
527
|
+
const len0 = WASM_VECTOR_LEN;
|
|
528
|
+
const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
529
|
+
const len1 = WASM_VECTOR_LEN;
|
|
530
|
+
wasm.cedarling_annotation_values(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
531
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
532
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
533
|
+
var v3 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
534
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
535
|
+
return v3;
|
|
536
|
+
} finally {
|
|
537
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Return the annotations of each given policy, grouped by policy ID
|
|
542
|
+
* the loss-free companion to `annotations_map`. Unknown policy IDs are
|
|
543
|
+
* silently skipped.
|
|
544
|
+
*
|
|
545
|
+
* # Arguments
|
|
546
|
+
*
|
|
547
|
+
* * `policy_ids` - List of policy IDs whose annotations should be returned
|
|
548
|
+
* grouped by policy ID. Typically `result.response.diagnostics.reason` from
|
|
549
|
+
* an authorization result.
|
|
550
|
+
*
|
|
551
|
+
* # Example
|
|
552
|
+
*
|
|
553
|
+
* ```javascript
|
|
554
|
+
* const byPolicy = cedarling.annotations_by_policy(result.response.diagnostics.reason);
|
|
555
|
+
* // { "5": { redirect: "/upgrade", tier: "premium" } }
|
|
556
|
+
* ```
|
|
557
|
+
* @param {string[]} policy_ids
|
|
558
|
+
* @returns {any}
|
|
559
|
+
*/
|
|
560
|
+
annotations_by_policy(policy_ids) {
|
|
561
|
+
try {
|
|
562
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
563
|
+
const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
|
|
564
|
+
const len0 = WASM_VECTOR_LEN;
|
|
565
|
+
wasm.cedarling_annotations_by_policy(retptr, this.__wbg_ptr, ptr0, len0);
|
|
566
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
567
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
568
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
569
|
+
if (r2) {
|
|
570
|
+
throw takeObject(r1);
|
|
571
|
+
}
|
|
572
|
+
return takeObject(r0);
|
|
573
|
+
} finally {
|
|
574
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Merge the annotations (`@key("value")`) of the given policies into a single object.
|
|
579
|
+
*
|
|
580
|
+
* Intended for resolving the determining policies of an authorization decision:
|
|
581
|
+
* pass `result.response.diagnostics.reason`.
|
|
582
|
+
*
|
|
583
|
+
* Lossy: if the same annotation key appears on several policies, one value wins
|
|
584
|
+
* arbitrarily. Use `annotation_values` / `annotations_by_policy` when duplicates
|
|
585
|
+
* matter. Unknown policy IDs are silently skipped.
|
|
586
|
+
*
|
|
587
|
+
* # Arguments
|
|
588
|
+
*
|
|
589
|
+
* * `policy_ids` - List of policy IDs whose annotations should be merged into
|
|
590
|
+
* a single object. Typically `result.response.diagnostics.reason` from an
|
|
591
|
+
* authorization result.
|
|
592
|
+
*
|
|
593
|
+
* # Example
|
|
594
|
+
*
|
|
595
|
+
* ```javascript
|
|
596
|
+
* const annotations = cedarling.annotations_map(result.response.diagnostics.reason);
|
|
597
|
+
* // { redirect: "/upgrade", tier: "premium" }
|
|
598
|
+
* ```
|
|
599
|
+
* @param {string[]} policy_ids
|
|
600
|
+
* @returns {any}
|
|
601
|
+
*/
|
|
602
|
+
annotations_map(policy_ids) {
|
|
603
|
+
try {
|
|
604
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
605
|
+
const ptr0 = passArrayJsValueToWasm0(policy_ids, wasm.__wbindgen_export);
|
|
606
|
+
const len0 = WASM_VECTOR_LEN;
|
|
607
|
+
wasm.cedarling_annotations_map(retptr, this.__wbg_ptr, ptr0, len0);
|
|
608
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
609
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
610
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
611
|
+
if (r2) {
|
|
612
|
+
throw takeObject(r1);
|
|
613
|
+
}
|
|
614
|
+
return takeObject(r0);
|
|
615
|
+
} finally {
|
|
616
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
168
619
|
/**
|
|
169
620
|
* Authorize multi-issuer request.
|
|
170
|
-
* Makes authorization decision based on multiple JWT tokens from different issuers
|
|
171
|
-
*
|
|
621
|
+
* Makes authorization decision based on multiple JWT tokens from different issuers.
|
|
622
|
+
*
|
|
623
|
+
* # Arguments
|
|
624
|
+
*
|
|
625
|
+
* * `request` - JSON string representation of [`AuthorizeMultiIssuerRequest`].
|
|
626
|
+
*
|
|
627
|
+
* # Example
|
|
628
|
+
*
|
|
629
|
+
* ```javascript
|
|
630
|
+
* const result = await cedarling.authorize_multi_issuer(JSON.stringify(request));
|
|
631
|
+
* ```
|
|
632
|
+
* @param {string} request
|
|
172
633
|
* @returns {Promise<MultiIssuerAuthorizeResult>}
|
|
173
634
|
*/
|
|
174
635
|
authorize_multi_issuer(request) {
|
|
175
|
-
const
|
|
176
|
-
|
|
636
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
637
|
+
const len0 = WASM_VECTOR_LEN;
|
|
638
|
+
const ret = wasm.cedarling_authorize_multi_issuer(this.__wbg_ptr, ptr0, len0);
|
|
639
|
+
return takeObject(ret);
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Authorize a batch of multi-issuer requests against one shared token set.
|
|
643
|
+
*
|
|
644
|
+
* Tokens are validated and token/issuer entities are built once, then
|
|
645
|
+
* each item is evaluated in input order. Batch-level failures (validation,
|
|
646
|
+
* JWT verification, status-list refresh) reject the whole call; per-item
|
|
647
|
+
* failures are returned as `BatchItemError` results and exposed by WASM
|
|
648
|
+
* with `is_ok=false` and `error`, while genuine Cedar denials remain
|
|
649
|
+
* `AuthorizeResult` values with `decision=false`.
|
|
650
|
+
*
|
|
651
|
+
* # Arguments
|
|
652
|
+
*
|
|
653
|
+
* * `request` - JSON string representation of [`BatchAuthorizeMultiIssuerRequest`].
|
|
654
|
+
*
|
|
655
|
+
* # Example
|
|
656
|
+
*
|
|
657
|
+
* ```javascript
|
|
658
|
+
* const result = await cedarling.authorize_multi_issuer_batch(JSON.stringify(batchRequest));
|
|
659
|
+
* ```
|
|
660
|
+
* @param {string} request
|
|
661
|
+
* @returns {Promise<BatchAuthorizeMultiIssuerResponse>}
|
|
662
|
+
*/
|
|
663
|
+
authorize_multi_issuer_batch(request) {
|
|
664
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
665
|
+
const len0 = WASM_VECTOR_LEN;
|
|
666
|
+
const ret = wasm.cedarling_authorize_multi_issuer_batch(this.__wbg_ptr, ptr0, len0);
|
|
667
|
+
return takeObject(ret);
|
|
177
668
|
}
|
|
178
669
|
/**
|
|
179
670
|
* Authorize an unsigned request carrying an optional single principal.
|
|
@@ -183,12 +674,52 @@ export class Cedarling {
|
|
|
183
674
|
* partial evaluation; residual-dependent requests fail closed with
|
|
184
675
|
* `Decision::Deny` and surface residual policy ids in
|
|
185
676
|
* `response.diagnostics.reason`.
|
|
186
|
-
*
|
|
677
|
+
*
|
|
678
|
+
* # Arguments
|
|
679
|
+
*
|
|
680
|
+
* * `request` - JSON string representation of [`RequestUnsigned`].
|
|
681
|
+
*
|
|
682
|
+
* # Example
|
|
683
|
+
*
|
|
684
|
+
* ```javascript
|
|
685
|
+
* const result = await cedarling.authorize_unsigned(JSON.stringify(request));
|
|
686
|
+
* ```
|
|
687
|
+
* @param {string} request
|
|
187
688
|
* @returns {Promise<AuthorizeResult>}
|
|
188
689
|
*/
|
|
189
690
|
authorize_unsigned(request) {
|
|
190
|
-
const
|
|
191
|
-
|
|
691
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
692
|
+
const len0 = WASM_VECTOR_LEN;
|
|
693
|
+
const ret = wasm.cedarling_authorize_unsigned(this.__wbg_ptr, ptr0, len0);
|
|
694
|
+
return takeObject(ret);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Authorize a batch of unsigned requests against one shared principal.
|
|
698
|
+
*
|
|
699
|
+
* Setup work (principal build + pushed-data snapshot) runs once and each
|
|
700
|
+
* item is evaluated in input order. Results are returned inside a
|
|
701
|
+
* [`BatchAuthorizeUnsignedResponse`] carrying the shared `batch_id`.
|
|
702
|
+
* Batch-level failures (validation, principal parse) reject the whole
|
|
703
|
+
* call; per-item failures are returned as `BatchItemError` results and
|
|
704
|
+
* exposed by WASM with `is_ok=false` and `error`, while genuine Cedar
|
|
705
|
+
* denials remain `AuthorizeResult` values with `decision=false`.
|
|
706
|
+
* # Arguments
|
|
707
|
+
*
|
|
708
|
+
* * `request` - JSON string representation of [`BatchAuthorizeUnsignedRequest`].
|
|
709
|
+
*
|
|
710
|
+
* # Example
|
|
711
|
+
*
|
|
712
|
+
* ```javascript
|
|
713
|
+
* const result = await cedarling.authorize_unsigned_batch(JSON.stringify(batchRequest));
|
|
714
|
+
* ```
|
|
715
|
+
* @param {string} request
|
|
716
|
+
* @returns {Promise<BatchAuthorizeUnsignedResponse>}
|
|
717
|
+
*/
|
|
718
|
+
authorize_unsigned_batch(request) {
|
|
719
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
720
|
+
const len0 = WASM_VECTOR_LEN;
|
|
721
|
+
const ret = wasm.cedarling_authorize_unsigned_batch(this.__wbg_ptr, ptr0, len0);
|
|
722
|
+
return takeObject(ret);
|
|
192
723
|
}
|
|
193
724
|
/**
|
|
194
725
|
* Clear all entries from the data store.
|
|
@@ -201,9 +732,16 @@ export class Cedarling {
|
|
|
201
732
|
* ```
|
|
202
733
|
*/
|
|
203
734
|
clear_data_ctx() {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
735
|
+
try {
|
|
736
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
737
|
+
wasm.cedarling_clear_data_ctx(retptr, this.__wbg_ptr);
|
|
738
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
739
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
740
|
+
if (r1) {
|
|
741
|
+
throw takeObject(r0);
|
|
742
|
+
}
|
|
743
|
+
} finally {
|
|
744
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
207
745
|
}
|
|
208
746
|
}
|
|
209
747
|
/**
|
|
@@ -218,7 +756,7 @@ export class Cedarling {
|
|
|
218
756
|
*/
|
|
219
757
|
failed_trusted_issuer_ids() {
|
|
220
758
|
const ret = wasm.cedarling_failed_trusted_issuer_ids(this.__wbg_ptr);
|
|
221
|
-
return ret;
|
|
759
|
+
return takeObject(ret);
|
|
222
760
|
}
|
|
223
761
|
/**
|
|
224
762
|
* Get a value from the data store by key.
|
|
@@ -240,13 +778,21 @@ export class Cedarling {
|
|
|
240
778
|
* @returns {any}
|
|
241
779
|
*/
|
|
242
780
|
get_data_ctx(key) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
781
|
+
try {
|
|
782
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
783
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
784
|
+
const len0 = WASM_VECTOR_LEN;
|
|
785
|
+
wasm.cedarling_get_data_ctx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
786
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
787
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
788
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
789
|
+
if (r2) {
|
|
790
|
+
throw takeObject(r1);
|
|
791
|
+
}
|
|
792
|
+
return takeObject(r0);
|
|
793
|
+
} finally {
|
|
794
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
248
795
|
}
|
|
249
|
-
return takeFromExternrefTable0(ret[0]);
|
|
250
796
|
}
|
|
251
797
|
/**
|
|
252
798
|
* Get a data entry with full metadata by key.
|
|
@@ -272,13 +818,21 @@ export class Cedarling {
|
|
|
272
818
|
* @returns {DataEntry | undefined}
|
|
273
819
|
*/
|
|
274
820
|
get_data_entry_ctx(key) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
821
|
+
try {
|
|
822
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
823
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
824
|
+
const len0 = WASM_VECTOR_LEN;
|
|
825
|
+
wasm.cedarling_get_data_entry_ctx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
826
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
827
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
828
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
829
|
+
if (r2) {
|
|
830
|
+
throw takeObject(r1);
|
|
831
|
+
}
|
|
832
|
+
return r0 === 0 ? undefined : DataEntry.__wrap(r0);
|
|
833
|
+
} finally {
|
|
834
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
280
835
|
}
|
|
281
|
-
return ret[0] === 0 ? undefined : DataEntry.__wrap(ret[0]);
|
|
282
836
|
}
|
|
283
837
|
/**
|
|
284
838
|
* Get specific log entry.
|
|
@@ -287,13 +841,21 @@ export class Cedarling {
|
|
|
287
841
|
* @returns {any}
|
|
288
842
|
*/
|
|
289
843
|
get_log_by_id(id) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
844
|
+
try {
|
|
845
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
846
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
847
|
+
const len0 = WASM_VECTOR_LEN;
|
|
848
|
+
wasm.cedarling_get_log_by_id(retptr, this.__wbg_ptr, ptr0, len0);
|
|
849
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
850
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
851
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
852
|
+
if (r2) {
|
|
853
|
+
throw takeObject(r1);
|
|
854
|
+
}
|
|
855
|
+
return takeObject(r0);
|
|
856
|
+
} finally {
|
|
857
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
295
858
|
}
|
|
296
|
-
return takeFromExternrefTable0(ret[0]);
|
|
297
859
|
}
|
|
298
860
|
/**
|
|
299
861
|
* Returns a list of all log ids.
|
|
@@ -302,7 +864,7 @@ export class Cedarling {
|
|
|
302
864
|
*/
|
|
303
865
|
get_log_ids() {
|
|
304
866
|
const ret = wasm.cedarling_get_log_ids(this.__wbg_ptr);
|
|
305
|
-
return ret;
|
|
867
|
+
return takeObject(ret);
|
|
306
868
|
}
|
|
307
869
|
/**
|
|
308
870
|
* Get logs by request_id.
|
|
@@ -311,15 +873,24 @@ export class Cedarling {
|
|
|
311
873
|
* @returns {any[]}
|
|
312
874
|
*/
|
|
313
875
|
get_logs_by_request_id(request_id) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
876
|
+
try {
|
|
877
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
878
|
+
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
879
|
+
const len0 = WASM_VECTOR_LEN;
|
|
880
|
+
wasm.cedarling_get_logs_by_request_id(retptr, this.__wbg_ptr, ptr0, len0);
|
|
881
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
882
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
883
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
884
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
885
|
+
if (r3) {
|
|
886
|
+
throw takeObject(r2);
|
|
887
|
+
}
|
|
888
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
889
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
890
|
+
return v2;
|
|
891
|
+
} finally {
|
|
892
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
319
893
|
}
|
|
320
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
321
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
322
|
-
return v2;
|
|
323
894
|
}
|
|
324
895
|
/**
|
|
325
896
|
* Get log by request_id and tag, like composite key `request_id` + `log_kind`.
|
|
@@ -330,17 +901,26 @@ export class Cedarling {
|
|
|
330
901
|
* @returns {any[]}
|
|
331
902
|
*/
|
|
332
903
|
get_logs_by_request_id_and_tag(request_id, tag) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
904
|
+
try {
|
|
905
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
906
|
+
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
907
|
+
const len0 = WASM_VECTOR_LEN;
|
|
908
|
+
const ptr1 = passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
909
|
+
const len1 = WASM_VECTOR_LEN;
|
|
910
|
+
wasm.cedarling_get_logs_by_request_id_and_tag(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
911
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
912
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
913
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
914
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
915
|
+
if (r3) {
|
|
916
|
+
throw takeObject(r2);
|
|
917
|
+
}
|
|
918
|
+
var v3 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
919
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
920
|
+
return v3;
|
|
921
|
+
} finally {
|
|
922
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
340
923
|
}
|
|
341
|
-
var v3 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
342
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
343
|
-
return v3;
|
|
344
924
|
}
|
|
345
925
|
/**
|
|
346
926
|
* Get logs by tag, like `log_kind` or `log level`.
|
|
@@ -349,15 +929,24 @@ export class Cedarling {
|
|
|
349
929
|
* @returns {any[]}
|
|
350
930
|
*/
|
|
351
931
|
get_logs_by_tag(tag) {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
932
|
+
try {
|
|
933
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
934
|
+
const ptr0 = passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
935
|
+
const len0 = WASM_VECTOR_LEN;
|
|
936
|
+
wasm.cedarling_get_logs_by_tag(retptr, this.__wbg_ptr, ptr0, len0);
|
|
937
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
938
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
939
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
940
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
941
|
+
if (r3) {
|
|
942
|
+
throw takeObject(r2);
|
|
943
|
+
}
|
|
944
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
945
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
946
|
+
return v2;
|
|
947
|
+
} finally {
|
|
948
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
357
949
|
}
|
|
358
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
359
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
360
|
-
return v2;
|
|
361
950
|
}
|
|
362
951
|
/**
|
|
363
952
|
* Get statistics about the data store.
|
|
@@ -373,11 +962,19 @@ export class Cedarling {
|
|
|
373
962
|
* @returns {DataStoreStats}
|
|
374
963
|
*/
|
|
375
964
|
get_stats_ctx() {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
965
|
+
try {
|
|
966
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
967
|
+
wasm.cedarling_get_stats_ctx(retptr, this.__wbg_ptr);
|
|
968
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
969
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
970
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
971
|
+
if (r2) {
|
|
972
|
+
throw takeObject(r1);
|
|
973
|
+
}
|
|
974
|
+
return DataStoreStats.__wrap(r0);
|
|
975
|
+
} finally {
|
|
976
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
379
977
|
}
|
|
380
|
-
return DataStoreStats.__wrap(ret[0]);
|
|
381
978
|
}
|
|
382
979
|
/**
|
|
383
980
|
* Check whether a trusted issuer was loaded by `iss` claim.
|
|
@@ -395,7 +992,7 @@ export class Cedarling {
|
|
|
395
992
|
* @returns {boolean}
|
|
396
993
|
*/
|
|
397
994
|
is_trusted_issuer_loaded_by_iss(iss_claim) {
|
|
398
|
-
const ptr0 = passStringToWasm0(iss_claim, wasm.
|
|
995
|
+
const ptr0 = passStringToWasm0(iss_claim, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
399
996
|
const len0 = WASM_VECTOR_LEN;
|
|
400
997
|
const ret = wasm.cedarling_is_trusted_issuer_loaded_by_iss(this.__wbg_ptr, ptr0, len0);
|
|
401
998
|
return ret !== 0;
|
|
@@ -416,7 +1013,7 @@ export class Cedarling {
|
|
|
416
1013
|
* @returns {boolean}
|
|
417
1014
|
*/
|
|
418
1015
|
is_trusted_issuer_loaded_by_name(issuer_id) {
|
|
419
|
-
const ptr0 = passStringToWasm0(issuer_id, wasm.
|
|
1016
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
420
1017
|
const len0 = WASM_VECTOR_LEN;
|
|
421
1018
|
const ret = wasm.cedarling_is_trusted_issuer_loaded_by_name(this.__wbg_ptr, ptr0, len0);
|
|
422
1019
|
return ret !== 0;
|
|
@@ -436,11 +1033,19 @@ export class Cedarling {
|
|
|
436
1033
|
* @returns {Array<any>}
|
|
437
1034
|
*/
|
|
438
1035
|
list_data_ctx() {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
1036
|
+
try {
|
|
1037
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1038
|
+
wasm.cedarling_list_data_ctx(retptr, this.__wbg_ptr);
|
|
1039
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1040
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1041
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1042
|
+
if (r2) {
|
|
1043
|
+
throw takeObject(r1);
|
|
1044
|
+
}
|
|
1045
|
+
return takeObject(r0);
|
|
1046
|
+
} finally {
|
|
1047
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
442
1048
|
}
|
|
443
|
-
return takeFromExternrefTable0(ret[0]);
|
|
444
1049
|
}
|
|
445
1050
|
/**
|
|
446
1051
|
* Get trusted issuer identifiers loaded successfully.
|
|
@@ -454,7 +1059,7 @@ export class Cedarling {
|
|
|
454
1059
|
*/
|
|
455
1060
|
loaded_trusted_issuer_ids() {
|
|
456
1061
|
const ret = wasm.cedarling_loaded_trusted_issuer_ids(this.__wbg_ptr);
|
|
457
|
-
return ret;
|
|
1062
|
+
return takeObject(ret);
|
|
458
1063
|
}
|
|
459
1064
|
/**
|
|
460
1065
|
* Get the number of trusted issuers loaded successfully.
|
|
@@ -477,8 +1082,8 @@ export class Cedarling {
|
|
|
477
1082
|
* @returns {Promise<Cedarling>}
|
|
478
1083
|
*/
|
|
479
1084
|
static new(config) {
|
|
480
|
-
const ret = wasm.cedarling_new(config);
|
|
481
|
-
return ret;
|
|
1085
|
+
const ret = wasm.cedarling_new(addHeapObject(config));
|
|
1086
|
+
return takeObject(ret);
|
|
482
1087
|
}
|
|
483
1088
|
/**
|
|
484
1089
|
* Create a new instance of the Cedarling application.
|
|
@@ -487,8 +1092,8 @@ export class Cedarling {
|
|
|
487
1092
|
* @returns {Promise<Cedarling>}
|
|
488
1093
|
*/
|
|
489
1094
|
static new_from_map(config) {
|
|
490
|
-
const ret = wasm.cedarling_new_from_map(config);
|
|
491
|
-
return ret;
|
|
1095
|
+
const ret = wasm.cedarling_new_from_map(addHeapObject(config));
|
|
1096
|
+
return takeObject(ret);
|
|
492
1097
|
}
|
|
493
1098
|
/**
|
|
494
1099
|
* Get logs and remove them from the storage.
|
|
@@ -496,11 +1101,19 @@ export class Cedarling {
|
|
|
496
1101
|
* @returns {Array<any>}
|
|
497
1102
|
*/
|
|
498
1103
|
pop_logs() {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
1104
|
+
try {
|
|
1105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1106
|
+
wasm.cedarling_pop_logs(retptr, this.__wbg_ptr);
|
|
1107
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1108
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1109
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1110
|
+
if (r2) {
|
|
1111
|
+
throw takeObject(r1);
|
|
1112
|
+
}
|
|
1113
|
+
return takeObject(r0);
|
|
1114
|
+
} finally {
|
|
1115
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
502
1116
|
}
|
|
503
|
-
return takeFromExternrefTable0(ret[0]);
|
|
504
1117
|
}
|
|
505
1118
|
/**
|
|
506
1119
|
* Push a value into the data store with an optional TTL.
|
|
@@ -524,11 +1137,18 @@ export class Cedarling {
|
|
|
524
1137
|
* @param {bigint | null} [ttl_secs]
|
|
525
1138
|
*/
|
|
526
1139
|
push_data_ctx(key, value, ttl_secs) {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1140
|
+
try {
|
|
1141
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1142
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1143
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1144
|
+
wasm.cedarling_push_data_ctx(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value), !isLikeNone(ttl_secs), isLikeNone(ttl_secs) ? BigInt(0) : ttl_secs);
|
|
1145
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1146
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1147
|
+
if (r1) {
|
|
1148
|
+
throw takeObject(r0);
|
|
1149
|
+
}
|
|
1150
|
+
} finally {
|
|
1151
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
532
1152
|
}
|
|
533
1153
|
}
|
|
534
1154
|
/**
|
|
@@ -551,13 +1171,21 @@ export class Cedarling {
|
|
|
551
1171
|
* @returns {boolean}
|
|
552
1172
|
*/
|
|
553
1173
|
remove_data_ctx(key) {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
1174
|
+
try {
|
|
1175
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1176
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1177
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1178
|
+
wasm.cedarling_remove_data_ctx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1179
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1180
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1181
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1182
|
+
if (r2) {
|
|
1183
|
+
throw takeObject(r1);
|
|
1184
|
+
}
|
|
1185
|
+
return r0 !== 0;
|
|
1186
|
+
} finally {
|
|
1187
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
559
1188
|
}
|
|
560
|
-
return ret[0] !== 0;
|
|
561
1189
|
}
|
|
562
1190
|
/**
|
|
563
1191
|
* Closes the connections to the Lock Server and pushes all available logs.
|
|
@@ -565,7 +1193,7 @@ export class Cedarling {
|
|
|
565
1193
|
*/
|
|
566
1194
|
shut_down() {
|
|
567
1195
|
const ret = wasm.cedarling_shut_down(this.__wbg_ptr);
|
|
568
|
-
return ret;
|
|
1196
|
+
return takeObject(ret);
|
|
569
1197
|
}
|
|
570
1198
|
/**
|
|
571
1199
|
* Get the total number of trusted issuer entries discovered.
|
|
@@ -583,12 +1211,13 @@ export class Cedarling {
|
|
|
583
1211
|
}
|
|
584
1212
|
}
|
|
585
1213
|
if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
|
|
1214
|
+
exports.Cedarling = Cedarling;
|
|
586
1215
|
|
|
587
1216
|
/**
|
|
588
1217
|
* A WASM wrapper for the Rust `cedarling::DataEntry` struct.
|
|
589
1218
|
* Represents a data entry in the DataStore with value and metadata.
|
|
590
1219
|
*/
|
|
591
|
-
|
|
1220
|
+
class DataEntry {
|
|
592
1221
|
static __wrap(ptr) {
|
|
593
1222
|
const obj = Object.create(DataEntry.prototype);
|
|
594
1223
|
obj.__wbg_ptr = ptr;
|
|
@@ -613,12 +1242,16 @@ export class DataEntry {
|
|
|
613
1242
|
let deferred1_0;
|
|
614
1243
|
let deferred1_1;
|
|
615
1244
|
try {
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
1245
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1246
|
+
wasm.dataentry_json_string(retptr, this.__wbg_ptr);
|
|
1247
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1248
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1249
|
+
deferred1_0 = r0;
|
|
1250
|
+
deferred1_1 = r1;
|
|
1251
|
+
return getStringFromWasm0(r0, r1);
|
|
620
1252
|
} finally {
|
|
621
|
-
wasm.
|
|
1253
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1254
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
622
1255
|
}
|
|
623
1256
|
}
|
|
624
1257
|
/**
|
|
@@ -626,11 +1259,19 @@ export class DataEntry {
|
|
|
626
1259
|
* @returns {any}
|
|
627
1260
|
*/
|
|
628
1261
|
value() {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1262
|
+
try {
|
|
1263
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1264
|
+
wasm.dataentry_value(retptr, this.__wbg_ptr);
|
|
1265
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1266
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1267
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1268
|
+
if (r2) {
|
|
1269
|
+
throw takeObject(r1);
|
|
1270
|
+
}
|
|
1271
|
+
return takeObject(r0);
|
|
1272
|
+
} finally {
|
|
1273
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
632
1274
|
}
|
|
633
|
-
return takeFromExternrefTable0(ret[0]);
|
|
634
1275
|
}
|
|
635
1276
|
/**
|
|
636
1277
|
* Number of times this entry has been accessed
|
|
@@ -648,12 +1289,16 @@ export class DataEntry {
|
|
|
648
1289
|
let deferred1_0;
|
|
649
1290
|
let deferred1_1;
|
|
650
1291
|
try {
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
1292
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1293
|
+
wasm.__wbg_get_dataentry_created_at(retptr, this.__wbg_ptr);
|
|
1294
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1295
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1296
|
+
deferred1_0 = r0;
|
|
1297
|
+
deferred1_1 = r1;
|
|
1298
|
+
return getStringFromWasm0(r0, r1);
|
|
655
1299
|
} finally {
|
|
656
|
-
wasm.
|
|
1300
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1301
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
657
1302
|
}
|
|
658
1303
|
}
|
|
659
1304
|
/**
|
|
@@ -664,12 +1309,16 @@ export class DataEntry {
|
|
|
664
1309
|
let deferred1_0;
|
|
665
1310
|
let deferred1_1;
|
|
666
1311
|
try {
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
1312
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1313
|
+
wasm.__wbg_get_dataentry_data_type(retptr, this.__wbg_ptr);
|
|
1314
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1315
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1316
|
+
deferred1_0 = r0;
|
|
1317
|
+
deferred1_1 = r1;
|
|
1318
|
+
return getStringFromWasm0(r0, r1);
|
|
671
1319
|
} finally {
|
|
672
|
-
wasm.
|
|
1320
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1321
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
673
1322
|
}
|
|
674
1323
|
}
|
|
675
1324
|
/**
|
|
@@ -677,13 +1326,20 @@ export class DataEntry {
|
|
|
677
1326
|
* @returns {string | undefined}
|
|
678
1327
|
*/
|
|
679
1328
|
get expires_at() {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
1329
|
+
try {
|
|
1330
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1331
|
+
wasm.__wbg_get_dataentry_expires_at(retptr, this.__wbg_ptr);
|
|
1332
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1333
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1334
|
+
let v1;
|
|
1335
|
+
if (r0 !== 0) {
|
|
1336
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1337
|
+
wasm.__wbindgen_export5(r0, r1 * 1, 1);
|
|
1338
|
+
}
|
|
1339
|
+
return v1;
|
|
1340
|
+
} finally {
|
|
1341
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
685
1342
|
}
|
|
686
|
-
return v1;
|
|
687
1343
|
}
|
|
688
1344
|
/**
|
|
689
1345
|
* The key for this entry
|
|
@@ -693,12 +1349,16 @@ export class DataEntry {
|
|
|
693
1349
|
let deferred1_0;
|
|
694
1350
|
let deferred1_1;
|
|
695
1351
|
try {
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
1352
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1353
|
+
wasm.__wbg_get_dataentry_key(retptr, this.__wbg_ptr);
|
|
1354
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1355
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1356
|
+
deferred1_0 = r0;
|
|
1357
|
+
deferred1_1 = r1;
|
|
1358
|
+
return getStringFromWasm0(r0, r1);
|
|
700
1359
|
} finally {
|
|
701
|
-
wasm.
|
|
1360
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1361
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
702
1362
|
}
|
|
703
1363
|
}
|
|
704
1364
|
/**
|
|
@@ -713,7 +1373,7 @@ export class DataEntry {
|
|
|
713
1373
|
* @param {string} arg0
|
|
714
1374
|
*/
|
|
715
1375
|
set created_at(arg0) {
|
|
716
|
-
const ptr0 = passStringToWasm0(arg0, wasm.
|
|
1376
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
717
1377
|
const len0 = WASM_VECTOR_LEN;
|
|
718
1378
|
wasm.__wbg_set_dataentry_created_at(this.__wbg_ptr, ptr0, len0);
|
|
719
1379
|
}
|
|
@@ -722,7 +1382,7 @@ export class DataEntry {
|
|
|
722
1382
|
* @param {string} arg0
|
|
723
1383
|
*/
|
|
724
1384
|
set data_type(arg0) {
|
|
725
|
-
const ptr0 = passStringToWasm0(arg0, wasm.
|
|
1385
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
726
1386
|
const len0 = WASM_VECTOR_LEN;
|
|
727
1387
|
wasm.__wbg_set_dataentry_data_type(this.__wbg_ptr, ptr0, len0);
|
|
728
1388
|
}
|
|
@@ -731,7 +1391,7 @@ export class DataEntry {
|
|
|
731
1391
|
* @param {string | null} [arg0]
|
|
732
1392
|
*/
|
|
733
1393
|
set expires_at(arg0) {
|
|
734
|
-
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.
|
|
1394
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
735
1395
|
var len0 = WASM_VECTOR_LEN;
|
|
736
1396
|
wasm.__wbg_set_dataentry_expires_at(this.__wbg_ptr, ptr0, len0);
|
|
737
1397
|
}
|
|
@@ -740,18 +1400,19 @@ export class DataEntry {
|
|
|
740
1400
|
* @param {string} arg0
|
|
741
1401
|
*/
|
|
742
1402
|
set key(arg0) {
|
|
743
|
-
const ptr0 = passStringToWasm0(arg0, wasm.
|
|
1403
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
744
1404
|
const len0 = WASM_VECTOR_LEN;
|
|
745
1405
|
wasm.__wbg_set_dataentry_key(this.__wbg_ptr, ptr0, len0);
|
|
746
1406
|
}
|
|
747
1407
|
}
|
|
748
1408
|
if (Symbol.dispose) DataEntry.prototype[Symbol.dispose] = DataEntry.prototype.free;
|
|
1409
|
+
exports.DataEntry = DataEntry;
|
|
749
1410
|
|
|
750
1411
|
/**
|
|
751
1412
|
* A WASM wrapper for the Rust `cedarling::DataStoreStats` struct.
|
|
752
1413
|
* Statistics about the DataStore.
|
|
753
1414
|
*/
|
|
754
|
-
|
|
1415
|
+
class DataStoreStats {
|
|
755
1416
|
static __wrap(ptr) {
|
|
756
1417
|
const obj = Object.create(DataStoreStats.prototype);
|
|
757
1418
|
obj.__wbg_ptr = ptr;
|
|
@@ -776,12 +1437,16 @@ export class DataStoreStats {
|
|
|
776
1437
|
let deferred1_0;
|
|
777
1438
|
let deferred1_1;
|
|
778
1439
|
try {
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
1440
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1441
|
+
wasm.datastorestats_json_string(retptr, this.__wbg_ptr);
|
|
1442
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1443
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1444
|
+
deferred1_0 = r0;
|
|
1445
|
+
deferred1_1 = r1;
|
|
1446
|
+
return getStringFromWasm0(r0, r1);
|
|
783
1447
|
} finally {
|
|
784
|
-
wasm.
|
|
1448
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1449
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
785
1450
|
}
|
|
786
1451
|
}
|
|
787
1452
|
/**
|
|
@@ -921,6 +1586,7 @@ export class DataStoreStats {
|
|
|
921
1586
|
}
|
|
922
1587
|
}
|
|
923
1588
|
if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.prototype.free;
|
|
1589
|
+
exports.DataStoreStats = DataStoreStats;
|
|
924
1590
|
|
|
925
1591
|
/**
|
|
926
1592
|
* Diagnostics
|
|
@@ -928,7 +1594,7 @@ if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.pr
|
|
|
928
1594
|
*
|
|
929
1595
|
* Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
|
|
930
1596
|
*/
|
|
931
|
-
|
|
1597
|
+
class Diagnostics {
|
|
932
1598
|
static __wrap(ptr) {
|
|
933
1599
|
const obj = Object.create(Diagnostics.prototype);
|
|
934
1600
|
obj.__wbg_ptr = ptr;
|
|
@@ -951,10 +1617,17 @@ export class Diagnostics {
|
|
|
951
1617
|
* @returns {PolicyEvaluationError[]}
|
|
952
1618
|
*/
|
|
953
1619
|
get errors() {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1620
|
+
try {
|
|
1621
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1622
|
+
wasm.diagnostics_errors(retptr, this.__wbg_ptr);
|
|
1623
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1624
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1625
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1626
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
1627
|
+
return v1;
|
|
1628
|
+
} finally {
|
|
1629
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1630
|
+
}
|
|
958
1631
|
}
|
|
959
1632
|
/**
|
|
960
1633
|
* `PolicyId`s of the policies that contributed to the decision.
|
|
@@ -964,15 +1637,23 @@ export class Diagnostics {
|
|
|
964
1637
|
* @returns {string[]}
|
|
965
1638
|
*/
|
|
966
1639
|
get reason() {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1640
|
+
try {
|
|
1641
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1642
|
+
wasm.diagnostics_reason(retptr, this.__wbg_ptr);
|
|
1643
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1644
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1645
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1646
|
+
wasm.__wbindgen_export5(r0, r1 * 4, 4);
|
|
1647
|
+
return v1;
|
|
1648
|
+
} finally {
|
|
1649
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1650
|
+
}
|
|
971
1651
|
}
|
|
972
1652
|
}
|
|
973
1653
|
if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
|
|
1654
|
+
exports.Diagnostics = Diagnostics;
|
|
974
1655
|
|
|
975
|
-
|
|
1656
|
+
class IntoUnderlyingByteSource {
|
|
976
1657
|
__destroy_into_raw() {
|
|
977
1658
|
const ptr = this.__wbg_ptr;
|
|
978
1659
|
this.__wbg_ptr = 0;
|
|
@@ -999,14 +1680,14 @@ export class IntoUnderlyingByteSource {
|
|
|
999
1680
|
* @returns {Promise<any>}
|
|
1000
1681
|
*/
|
|
1001
1682
|
pull(controller) {
|
|
1002
|
-
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
1003
|
-
return ret;
|
|
1683
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
1684
|
+
return takeObject(ret);
|
|
1004
1685
|
}
|
|
1005
1686
|
/**
|
|
1006
1687
|
* @param {ReadableByteStreamController} controller
|
|
1007
1688
|
*/
|
|
1008
1689
|
start(controller) {
|
|
1009
|
-
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
1690
|
+
wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
|
|
1010
1691
|
}
|
|
1011
1692
|
/**
|
|
1012
1693
|
* @returns {ReadableStreamType}
|
|
@@ -1017,8 +1698,9 @@ export class IntoUnderlyingByteSource {
|
|
|
1017
1698
|
}
|
|
1018
1699
|
}
|
|
1019
1700
|
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
1701
|
+
exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
|
|
1020
1702
|
|
|
1021
|
-
|
|
1703
|
+
class IntoUnderlyingSink {
|
|
1022
1704
|
__destroy_into_raw() {
|
|
1023
1705
|
const ptr = this.__wbg_ptr;
|
|
1024
1706
|
this.__wbg_ptr = 0;
|
|
@@ -1035,8 +1717,8 @@ export class IntoUnderlyingSink {
|
|
|
1035
1717
|
*/
|
|
1036
1718
|
abort(reason) {
|
|
1037
1719
|
const ptr = this.__destroy_into_raw();
|
|
1038
|
-
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
1039
|
-
return ret;
|
|
1720
|
+
const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
|
|
1721
|
+
return takeObject(ret);
|
|
1040
1722
|
}
|
|
1041
1723
|
/**
|
|
1042
1724
|
* @returns {Promise<any>}
|
|
@@ -1044,20 +1726,21 @@ export class IntoUnderlyingSink {
|
|
|
1044
1726
|
close() {
|
|
1045
1727
|
const ptr = this.__destroy_into_raw();
|
|
1046
1728
|
const ret = wasm.intounderlyingsink_close(ptr);
|
|
1047
|
-
return ret;
|
|
1729
|
+
return takeObject(ret);
|
|
1048
1730
|
}
|
|
1049
1731
|
/**
|
|
1050
1732
|
* @param {any} chunk
|
|
1051
1733
|
* @returns {Promise<any>}
|
|
1052
1734
|
*/
|
|
1053
1735
|
write(chunk) {
|
|
1054
|
-
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
1055
|
-
return ret;
|
|
1736
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
|
|
1737
|
+
return takeObject(ret);
|
|
1056
1738
|
}
|
|
1057
1739
|
}
|
|
1058
1740
|
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
1741
|
+
exports.IntoUnderlyingSink = IntoUnderlyingSink;
|
|
1059
1742
|
|
|
1060
|
-
|
|
1743
|
+
class IntoUnderlyingSource {
|
|
1061
1744
|
__destroy_into_raw() {
|
|
1062
1745
|
const ptr = this.__wbg_ptr;
|
|
1063
1746
|
this.__wbg_ptr = 0;
|
|
@@ -1077,17 +1760,18 @@ export class IntoUnderlyingSource {
|
|
|
1077
1760
|
* @returns {Promise<any>}
|
|
1078
1761
|
*/
|
|
1079
1762
|
pull(controller) {
|
|
1080
|
-
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
|
|
1081
|
-
return ret;
|
|
1763
|
+
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
|
|
1764
|
+
return takeObject(ret);
|
|
1082
1765
|
}
|
|
1083
1766
|
}
|
|
1084
1767
|
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
1768
|
+
exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
1085
1769
|
|
|
1086
1770
|
/**
|
|
1087
1771
|
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
1088
1772
|
* Represents the result of a multi-issuer authorization request.
|
|
1089
1773
|
*/
|
|
1090
|
-
|
|
1774
|
+
class MultiIssuerAuthorizeResult {
|
|
1091
1775
|
static __wrap(ptr) {
|
|
1092
1776
|
const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
|
|
1093
1777
|
obj.__wbg_ptr = ptr;
|
|
@@ -1122,12 +1806,16 @@ export class MultiIssuerAuthorizeResult {
|
|
|
1122
1806
|
let deferred1_0;
|
|
1123
1807
|
let deferred1_1;
|
|
1124
1808
|
try {
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1809
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1810
|
+
wasm.__wbg_get_multiissuerauthorizeresult_request_id(retptr, this.__wbg_ptr);
|
|
1811
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1812
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1813
|
+
deferred1_0 = r0;
|
|
1814
|
+
deferred1_1 = r1;
|
|
1815
|
+
return getStringFromWasm0(r0, r1);
|
|
1129
1816
|
} finally {
|
|
1130
|
-
wasm.
|
|
1817
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1818
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
1131
1819
|
}
|
|
1132
1820
|
}
|
|
1133
1821
|
/**
|
|
@@ -1146,12 +1834,16 @@ export class MultiIssuerAuthorizeResult {
|
|
|
1146
1834
|
let deferred1_0;
|
|
1147
1835
|
let deferred1_1;
|
|
1148
1836
|
try {
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1837
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1838
|
+
wasm.multiissuerauthorizeresult_json_string(retptr, this.__wbg_ptr);
|
|
1839
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1840
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1841
|
+
deferred1_0 = r0;
|
|
1842
|
+
deferred1_1 = r1;
|
|
1843
|
+
return getStringFromWasm0(r0, r1);
|
|
1153
1844
|
} finally {
|
|
1154
|
-
wasm.
|
|
1845
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1846
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
1155
1847
|
}
|
|
1156
1848
|
}
|
|
1157
1849
|
/**
|
|
@@ -1168,7 +1860,7 @@ export class MultiIssuerAuthorizeResult {
|
|
|
1168
1860
|
* @param {string} arg0
|
|
1169
1861
|
*/
|
|
1170
1862
|
set request_id(arg0) {
|
|
1171
|
-
const ptr0 = passStringToWasm0(arg0, wasm.
|
|
1863
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1172
1864
|
const len0 = WASM_VECTOR_LEN;
|
|
1173
1865
|
wasm.__wbg_set_multiissuerauthorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
1174
1866
|
}
|
|
@@ -1183,6 +1875,7 @@ export class MultiIssuerAuthorizeResult {
|
|
|
1183
1875
|
}
|
|
1184
1876
|
}
|
|
1185
1877
|
if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
|
|
1878
|
+
exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
|
|
1186
1879
|
|
|
1187
1880
|
/**
|
|
1188
1881
|
* PolicyEvaluationError
|
|
@@ -1190,7 +1883,7 @@ if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = Multi
|
|
|
1190
1883
|
*
|
|
1191
1884
|
* Represents an error that occurred when evaluating a Cedar policy.
|
|
1192
1885
|
*/
|
|
1193
|
-
|
|
1886
|
+
class PolicyEvaluationError {
|
|
1194
1887
|
static __wrap(ptr) {
|
|
1195
1888
|
const obj = Object.create(PolicyEvaluationError.prototype);
|
|
1196
1889
|
obj.__wbg_ptr = ptr;
|
|
@@ -1215,12 +1908,16 @@ export class PolicyEvaluationError {
|
|
|
1215
1908
|
let deferred1_0;
|
|
1216
1909
|
let deferred1_1;
|
|
1217
1910
|
try {
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1911
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1912
|
+
wasm.policyevaluationerror_error(retptr, this.__wbg_ptr);
|
|
1913
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1914
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1915
|
+
deferred1_0 = r0;
|
|
1916
|
+
deferred1_1 = r1;
|
|
1917
|
+
return getStringFromWasm0(r0, r1);
|
|
1222
1918
|
} finally {
|
|
1223
|
-
wasm.
|
|
1919
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1920
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
1224
1921
|
}
|
|
1225
1922
|
}
|
|
1226
1923
|
/**
|
|
@@ -1231,16 +1928,21 @@ export class PolicyEvaluationError {
|
|
|
1231
1928
|
let deferred1_0;
|
|
1232
1929
|
let deferred1_1;
|
|
1233
1930
|
try {
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1931
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1932
|
+
wasm.policyevaluationerror_id(retptr, this.__wbg_ptr);
|
|
1933
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1934
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1935
|
+
deferred1_0 = r0;
|
|
1936
|
+
deferred1_1 = r1;
|
|
1937
|
+
return getStringFromWasm0(r0, r1);
|
|
1238
1938
|
} finally {
|
|
1239
|
-
wasm.
|
|
1939
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1940
|
+
wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
|
|
1240
1941
|
}
|
|
1241
1942
|
}
|
|
1242
1943
|
}
|
|
1243
1944
|
if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
|
|
1945
|
+
exports.PolicyEvaluationError = PolicyEvaluationError;
|
|
1244
1946
|
|
|
1245
1947
|
/**
|
|
1246
1948
|
* Create a new instance of the Cedarling application.
|
|
@@ -1248,10 +1950,11 @@ if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEval
|
|
|
1248
1950
|
* @param {any} config
|
|
1249
1951
|
* @returns {Promise<Cedarling>}
|
|
1250
1952
|
*/
|
|
1251
|
-
|
|
1252
|
-
const ret = wasm.init(config);
|
|
1253
|
-
return ret;
|
|
1953
|
+
function init(config) {
|
|
1954
|
+
const ret = wasm.init(addHeapObject(config));
|
|
1955
|
+
return takeObject(ret);
|
|
1254
1956
|
}
|
|
1957
|
+
exports.init = init;
|
|
1255
1958
|
|
|
1256
1959
|
/**
|
|
1257
1960
|
* Create a new instance of the Cedarling application from archive bytes.
|
|
@@ -1273,679 +1976,680 @@ export function init(config) {
|
|
|
1273
1976
|
* @param {Uint8Array} archive_bytes
|
|
1274
1977
|
* @returns {Promise<Cedarling>}
|
|
1275
1978
|
*/
|
|
1276
|
-
|
|
1277
|
-
const ret = wasm.init_from_archive_bytes(config, archive_bytes);
|
|
1278
|
-
return ret;
|
|
1979
|
+
function init_from_archive_bytes(config, archive_bytes) {
|
|
1980
|
+
const ret = wasm.init_from_archive_bytes(addHeapObject(config), addHeapObject(archive_bytes));
|
|
1981
|
+
return takeObject(ret);
|
|
1279
1982
|
}
|
|
1983
|
+
exports.init_from_archive_bytes = init_from_archive_bytes;
|
|
1280
1984
|
function __wbg_get_imports() {
|
|
1281
1985
|
const import0 = {
|
|
1282
1986
|
__proto__: null,
|
|
1283
|
-
|
|
1987
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
1284
1988
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1285
|
-
return ret;
|
|
1989
|
+
return addHeapObject(ret);
|
|
1286
1990
|
},
|
|
1287
|
-
|
|
1288
|
-
const ret = Number(arg0);
|
|
1991
|
+
__wbg_Number_9a4e0ecb0fa16705: function(arg0) {
|
|
1992
|
+
const ret = Number(getObject(arg0));
|
|
1289
1993
|
return ret;
|
|
1290
1994
|
},
|
|
1291
|
-
|
|
1292
|
-
const v = arg1;
|
|
1995
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
1996
|
+
const v = getObject(arg1);
|
|
1293
1997
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1294
1998
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1295
1999
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1296
2000
|
},
|
|
1297
|
-
|
|
1298
|
-
const v = arg0;
|
|
2001
|
+
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
2002
|
+
const v = getObject(arg0);
|
|
1299
2003
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1300
2004
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1301
2005
|
},
|
|
1302
|
-
|
|
1303
|
-
const ret = debugString(arg1);
|
|
1304
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
2006
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
2007
|
+
const ret = debugString(getObject(arg1));
|
|
2008
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1305
2009
|
const len1 = WASM_VECTOR_LEN;
|
|
1306
2010
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1307
2011
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1308
2012
|
},
|
|
1309
|
-
|
|
1310
|
-
const ret = arg0 in arg1;
|
|
2013
|
+
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
2014
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1311
2015
|
return ret;
|
|
1312
2016
|
},
|
|
1313
|
-
|
|
1314
|
-
const ret = typeof(arg0) === 'bigint';
|
|
2017
|
+
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
2018
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
1315
2019
|
return ret;
|
|
1316
2020
|
},
|
|
1317
|
-
|
|
1318
|
-
const ret = typeof(arg0) === 'function';
|
|
2021
|
+
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
2022
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
1319
2023
|
return ret;
|
|
1320
2024
|
},
|
|
1321
|
-
|
|
1322
|
-
const val = arg0;
|
|
2025
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
2026
|
+
const val = getObject(arg0);
|
|
1323
2027
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1324
2028
|
return ret;
|
|
1325
2029
|
},
|
|
1326
|
-
|
|
1327
|
-
const ret = typeof(arg0) === 'string';
|
|
2030
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
2031
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
1328
2032
|
return ret;
|
|
1329
2033
|
},
|
|
1330
|
-
|
|
1331
|
-
const ret = arg0 === undefined;
|
|
2034
|
+
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
2035
|
+
const ret = getObject(arg0) === undefined;
|
|
1332
2036
|
return ret;
|
|
1333
2037
|
},
|
|
1334
|
-
|
|
1335
|
-
const ret = arg0 === arg1;
|
|
2038
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
2039
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
1336
2040
|
return ret;
|
|
1337
2041
|
},
|
|
1338
|
-
|
|
1339
|
-
const ret = arg0 == arg1;
|
|
2042
|
+
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
2043
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1340
2044
|
return ret;
|
|
1341
2045
|
},
|
|
1342
|
-
|
|
1343
|
-
const obj = arg1;
|
|
2046
|
+
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
2047
|
+
const obj = getObject(arg1);
|
|
1344
2048
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1345
2049
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1346
2050
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1347
2051
|
},
|
|
1348
|
-
|
|
1349
|
-
const obj = arg1;
|
|
2052
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
2053
|
+
const obj = getObject(arg1);
|
|
1350
2054
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1351
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.
|
|
2055
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1352
2056
|
var len1 = WASM_VECTOR_LEN;
|
|
1353
2057
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1354
2058
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1355
2059
|
},
|
|
1356
|
-
|
|
2060
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
1357
2061
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1358
2062
|
},
|
|
1359
|
-
|
|
1360
|
-
arg0._wbg_cb_unref();
|
|
2063
|
+
__wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
|
|
2064
|
+
getObject(arg0)._wbg_cb_unref();
|
|
1361
2065
|
},
|
|
1362
|
-
|
|
1363
|
-
arg0.abort(
|
|
2066
|
+
__wbg_abort_8bae0f33e7833997: function(arg0) {
|
|
2067
|
+
getObject(arg0).abort();
|
|
1364
2068
|
},
|
|
1365
|
-
|
|
1366
|
-
arg0.abort();
|
|
2069
|
+
__wbg_abort_eee9248a6d680839: function(arg0, arg1) {
|
|
2070
|
+
getObject(arg0).abort(getObject(arg1));
|
|
1367
2071
|
},
|
|
1368
|
-
|
|
1369
|
-
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2072
|
+
__wbg_append_01c74e5c6b58aa64: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2073
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1370
2074
|
}, arguments); },
|
|
1371
|
-
|
|
1372
|
-
const ret = arg0.arrayBuffer();
|
|
1373
|
-
return ret;
|
|
2075
|
+
__wbg_arrayBuffer_3b637f0fa65c5351: function() { return handleError(function (arg0) {
|
|
2076
|
+
const ret = getObject(arg0).arrayBuffer();
|
|
2077
|
+
return addHeapObject(ret);
|
|
1374
2078
|
}, arguments); },
|
|
1375
2079
|
__wbg_authorizeresult_new: function(arg0) {
|
|
1376
2080
|
const ret = AuthorizeResult.__wrap(arg0);
|
|
1377
|
-
return ret;
|
|
2081
|
+
return addHeapObject(ret);
|
|
1378
2082
|
},
|
|
1379
|
-
|
|
1380
|
-
const ret = arg0
|
|
1381
|
-
return
|
|
2083
|
+
__wbg_batchauthorizemultiissuerresponse_new: function(arg0) {
|
|
2084
|
+
const ret = BatchAuthorizeMultiIssuerResponse.__wrap(arg0);
|
|
2085
|
+
return addHeapObject(ret);
|
|
1382
2086
|
},
|
|
1383
|
-
|
|
1384
|
-
const ret = arg0
|
|
1385
|
-
return ret;
|
|
2087
|
+
__wbg_batchauthorizeunsignedresponse_new: function(arg0) {
|
|
2088
|
+
const ret = BatchAuthorizeUnsignedResponse.__wrap(arg0);
|
|
2089
|
+
return addHeapObject(ret);
|
|
1386
2090
|
},
|
|
1387
|
-
|
|
1388
|
-
const ret = arg0
|
|
1389
|
-
return
|
|
2091
|
+
__wbg_batchitemmultiissuerresult_new: function(arg0) {
|
|
2092
|
+
const ret = BatchItemMultiIssuerResult.__wrap(arg0);
|
|
2093
|
+
return addHeapObject(ret);
|
|
1390
2094
|
},
|
|
1391
|
-
|
|
1392
|
-
const ret = arg0
|
|
1393
|
-
return ret;
|
|
2095
|
+
__wbg_batchitemunsignedresult_new: function(arg0) {
|
|
2096
|
+
const ret = BatchItemUnsignedResult.__wrap(arg0);
|
|
2097
|
+
return addHeapObject(ret);
|
|
2098
|
+
},
|
|
2099
|
+
__wbg_body_18c9f2ac15ead4b2: function(arg0) {
|
|
2100
|
+
const ret = getObject(arg0).body;
|
|
2101
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2102
|
+
},
|
|
2103
|
+
__wbg_buffer_54b87055582c8a81: function(arg0) {
|
|
2104
|
+
const ret = getObject(arg0).buffer;
|
|
2105
|
+
return addHeapObject(ret);
|
|
2106
|
+
},
|
|
2107
|
+
__wbg_byobRequest_06b654bb15590436: function(arg0) {
|
|
2108
|
+
const ret = getObject(arg0).byobRequest;
|
|
2109
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1394
2110
|
},
|
|
1395
|
-
|
|
1396
|
-
const ret = arg0.
|
|
2111
|
+
__wbg_byteLength_41862ca4020b9c43: function(arg0) {
|
|
2112
|
+
const ret = getObject(arg0).byteLength;
|
|
1397
2113
|
return ret;
|
|
1398
2114
|
},
|
|
1399
|
-
|
|
1400
|
-
const ret = arg0.
|
|
2115
|
+
__wbg_byteOffset_d42e18c4441f628b: function(arg0) {
|
|
2116
|
+
const ret = getObject(arg0).byteOffset;
|
|
1401
2117
|
return ret;
|
|
2118
|
+
},
|
|
2119
|
+
__wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
|
|
2120
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2121
|
+
return addHeapObject(ret);
|
|
1402
2122
|
}, arguments); },
|
|
1403
|
-
|
|
1404
|
-
const ret = arg0.call(arg1, arg2);
|
|
1405
|
-
return ret;
|
|
2123
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2124
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2125
|
+
return addHeapObject(ret);
|
|
1406
2126
|
}, arguments); },
|
|
1407
|
-
|
|
1408
|
-
const ret = arg0.cancel();
|
|
1409
|
-
return ret;
|
|
2127
|
+
__wbg_cancel_3983a93e24cc66b3: function(arg0) {
|
|
2128
|
+
const ret = getObject(arg0).cancel();
|
|
2129
|
+
return addHeapObject(ret);
|
|
1410
2130
|
},
|
|
1411
|
-
|
|
1412
|
-
const ret = arg0.catch(arg1);
|
|
1413
|
-
return ret;
|
|
2131
|
+
__wbg_catch_c1a60df4c30d76d3: function(arg0, arg1) {
|
|
2132
|
+
const ret = getObject(arg0).catch(getObject(arg1));
|
|
2133
|
+
return addHeapObject(ret);
|
|
1414
2134
|
},
|
|
1415
2135
|
__wbg_cedarling_new: function(arg0) {
|
|
1416
2136
|
const ret = Cedarling.__wrap(arg0);
|
|
1417
|
-
return ret;
|
|
2137
|
+
return addHeapObject(ret);
|
|
1418
2138
|
},
|
|
1419
|
-
|
|
1420
|
-
const ret = clearTimeout(arg0);
|
|
1421
|
-
return ret;
|
|
2139
|
+
__wbg_clearTimeout_333bba87532ab9d3: function(arg0) {
|
|
2140
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2141
|
+
return addHeapObject(ret);
|
|
1422
2142
|
},
|
|
1423
2143
|
__wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
|
|
1424
|
-
const ret = clearTimeout(arg0);
|
|
1425
|
-
return ret;
|
|
2144
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2145
|
+
return addHeapObject(ret);
|
|
1426
2146
|
},
|
|
1427
2147
|
__wbg_clearTimeout_c122f92fd48cd749: function(arg0) {
|
|
1428
|
-
const ret = clearTimeout(arg0);
|
|
1429
|
-
return ret;
|
|
2148
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2149
|
+
return addHeapObject(ret);
|
|
1430
2150
|
},
|
|
1431
|
-
|
|
1432
|
-
arg0.close();
|
|
2151
|
+
__wbg_close_249a23304523681b: function() { return handleError(function (arg0) {
|
|
2152
|
+
getObject(arg0).close();
|
|
1433
2153
|
}, arguments); },
|
|
1434
|
-
|
|
1435
|
-
arg0.close();
|
|
2154
|
+
__wbg_close_72d318d9c16e83ef: function() { return handleError(function (arg0) {
|
|
2155
|
+
getObject(arg0).close();
|
|
1436
2156
|
}, arguments); },
|
|
1437
2157
|
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1438
|
-
const ret = arg0.crypto;
|
|
1439
|
-
return ret;
|
|
2158
|
+
const ret = getObject(arg0).crypto;
|
|
2159
|
+
return addHeapObject(ret);
|
|
1440
2160
|
},
|
|
1441
2161
|
__wbg_dataentry_new: function(arg0) {
|
|
1442
2162
|
const ret = DataEntry.__wrap(arg0);
|
|
1443
|
-
return ret;
|
|
2163
|
+
return addHeapObject(ret);
|
|
1444
2164
|
},
|
|
1445
|
-
|
|
1446
|
-
console.debug(...arg0);
|
|
2165
|
+
__wbg_debug_42a6fcd9d74e106e: function(arg0) {
|
|
2166
|
+
console.debug(...getObject(arg0));
|
|
1447
2167
|
},
|
|
1448
|
-
|
|
1449
|
-
const ret = arg0.done;
|
|
2168
|
+
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
2169
|
+
const ret = getObject(arg0).done;
|
|
1450
2170
|
return ret;
|
|
1451
2171
|
},
|
|
1452
|
-
|
|
1453
|
-
arg0.enqueue(arg1);
|
|
2172
|
+
__wbg_enqueue_6d83b4c6281bafd6: function() { return handleError(function (arg0, arg1) {
|
|
2173
|
+
getObject(arg0).enqueue(getObject(arg1));
|
|
1454
2174
|
}, arguments); },
|
|
1455
|
-
|
|
1456
|
-
const ret =
|
|
1457
|
-
return ret;
|
|
2175
|
+
__wbg_entries_00d7283394649868: function(arg0) {
|
|
2176
|
+
const ret = getObject(arg0).entries();
|
|
2177
|
+
return addHeapObject(ret);
|
|
1458
2178
|
},
|
|
1459
|
-
|
|
1460
|
-
const ret =
|
|
1461
|
-
return ret;
|
|
2179
|
+
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
2180
|
+
const ret = Object.entries(getObject(arg0));
|
|
2181
|
+
return addHeapObject(ret);
|
|
1462
2182
|
},
|
|
1463
|
-
|
|
1464
|
-
const ret = arg0.entries();
|
|
1465
|
-
return ret;
|
|
2183
|
+
__wbg_entries_900cefd6f70eb290: function(arg0) {
|
|
2184
|
+
const ret = getObject(arg0).entries();
|
|
2185
|
+
return addHeapObject(ret);
|
|
1466
2186
|
},
|
|
1467
|
-
|
|
1468
|
-
console.error(...arg0);
|
|
2187
|
+
__wbg_error_5847f49bc6527dd7: function(arg0) {
|
|
2188
|
+
console.error(...getObject(arg0));
|
|
1469
2189
|
},
|
|
1470
|
-
|
|
1471
|
-
const ret =
|
|
1472
|
-
return ret;
|
|
2190
|
+
__wbg_fetch_074561c3e313c86f: function(arg0) {
|
|
2191
|
+
const ret = fetch(getObject(arg0));
|
|
2192
|
+
return addHeapObject(ret);
|
|
1473
2193
|
},
|
|
1474
2194
|
__wbg_fetch_5e2e4a3d60c8d1d3: function(arg0, arg1) {
|
|
1475
|
-
const ret = fetch(arg0, arg1);
|
|
1476
|
-
return ret;
|
|
2195
|
+
const ret = fetch(getObject(arg0), getObject(arg1));
|
|
2196
|
+
return addHeapObject(ret);
|
|
1477
2197
|
},
|
|
1478
|
-
|
|
1479
|
-
const ret = arg0.fetch(arg1
|
|
1480
|
-
return ret;
|
|
2198
|
+
__wbg_fetch_b5951fc96f52f786: function(arg0, arg1) {
|
|
2199
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
2200
|
+
return addHeapObject(ret);
|
|
1481
2201
|
},
|
|
1482
|
-
|
|
1483
|
-
const ret =
|
|
1484
|
-
return ret;
|
|
2202
|
+
__wbg_fetch_fadfd227089fdf80: function(arg0, arg1, arg2) {
|
|
2203
|
+
const ret = getObject(arg0).fetch(getObject(arg1), getObject(arg2));
|
|
2204
|
+
return addHeapObject(ret);
|
|
1485
2205
|
},
|
|
1486
|
-
|
|
1487
|
-
const ret = Object.fromEntries(arg0);
|
|
1488
|
-
return ret;
|
|
1489
|
-
}, arguments); },
|
|
1490
|
-
__wbg_getRandomValues_76dfc69825c9c552: function() { return handleError(function (arg0, arg1) {
|
|
1491
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
2206
|
+
__wbg_fromEntries_0eddbdac354a0a78: function() { return handleError(function (arg0) {
|
|
2207
|
+
const ret = Object.fromEntries(getObject(arg0));
|
|
2208
|
+
return addHeapObject(ret);
|
|
1492
2209
|
}, arguments); },
|
|
1493
2210
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1494
|
-
arg0.getRandomValues(arg1);
|
|
2211
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2212
|
+
}, arguments); },
|
|
2213
|
+
__wbg_getRandomValues_cc7f052a444bb2ce: function() { return handleError(function (arg0, arg1) {
|
|
2214
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1495
2215
|
}, arguments); },
|
|
1496
2216
|
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
1497
|
-
const ret = arg0.getReader();
|
|
1498
|
-
return ret;
|
|
2217
|
+
const ret = getObject(arg0).getReader();
|
|
2218
|
+
return addHeapObject(ret);
|
|
1499
2219
|
}, arguments); },
|
|
1500
|
-
|
|
1501
|
-
const ret = arg0.getTime();
|
|
2220
|
+
__wbg_getTime_d6f070c088c9b5ed: function(arg0) {
|
|
2221
|
+
const ret = getObject(arg0).getTime();
|
|
1502
2222
|
return ret;
|
|
1503
2223
|
},
|
|
1504
|
-
|
|
1505
|
-
const ret = arg0.getTimezoneOffset();
|
|
2224
|
+
__wbg_getTimezoneOffset_dc9862c79e5a81a3: function(arg0) {
|
|
2225
|
+
const ret = getObject(arg0).getTimezoneOffset();
|
|
1506
2226
|
return ret;
|
|
1507
2227
|
},
|
|
1508
|
-
|
|
1509
|
-
const ret =
|
|
1510
|
-
return ret;
|
|
1511
|
-
}, arguments); },
|
|
1512
|
-
__wbg_get_98fdf51d029a75eb: function(arg0, arg1) {
|
|
1513
|
-
const ret = arg0[arg1 >>> 0];
|
|
1514
|
-
return ret;
|
|
2228
|
+
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
2229
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2230
|
+
return addHeapObject(ret);
|
|
1515
2231
|
},
|
|
1516
|
-
|
|
1517
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1518
|
-
return ret;
|
|
2232
|
+
__wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
|
|
2233
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2234
|
+
return addHeapObject(ret);
|
|
2235
|
+
}, arguments); },
|
|
2236
|
+
__wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
|
|
2237
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2238
|
+
return addHeapObject(ret);
|
|
1519
2239
|
}, arguments); },
|
|
1520
|
-
|
|
1521
|
-
const ret = arg0.done;
|
|
2240
|
+
__wbg_get_done_670108eb06ecbe46: function(arg0) {
|
|
2241
|
+
const ret = getObject(arg0).done;
|
|
1522
2242
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1523
2243
|
},
|
|
1524
|
-
|
|
1525
|
-
const ret = arg0[arg1 >>> 0];
|
|
1526
|
-
return ret;
|
|
2244
|
+
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
2245
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2246
|
+
return addHeapObject(ret);
|
|
1527
2247
|
},
|
|
1528
|
-
|
|
1529
|
-
const ret = arg0.value;
|
|
1530
|
-
return ret;
|
|
2248
|
+
__wbg_get_value_f465f5be30aa0963: function(arg0) {
|
|
2249
|
+
const ret = getObject(arg0).value;
|
|
2250
|
+
return addHeapObject(ret);
|
|
1531
2251
|
},
|
|
1532
2252
|
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1533
|
-
const ret = arg0[arg1];
|
|
1534
|
-
return ret;
|
|
2253
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
2254
|
+
return addHeapObject(ret);
|
|
1535
2255
|
},
|
|
1536
|
-
|
|
1537
|
-
const ret = Reflect.has(arg0, arg1);
|
|
2256
|
+
__wbg_has_8374cf06984d8bfc: function() { return handleError(function (arg0, arg1) {
|
|
2257
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1538
2258
|
return ret;
|
|
1539
2259
|
}, arguments); },
|
|
1540
|
-
|
|
1541
|
-
const ret = arg0.headers;
|
|
1542
|
-
return ret;
|
|
2260
|
+
__wbg_headers_cf9c80f30e2a4eff: function(arg0) {
|
|
2261
|
+
const ret = getObject(arg0).headers;
|
|
2262
|
+
return addHeapObject(ret);
|
|
1543
2263
|
},
|
|
1544
|
-
|
|
1545
|
-
console.info(...arg0);
|
|
2264
|
+
__wbg_info_45ebac60f2b820a4: function(arg0) {
|
|
2265
|
+
console.info(...getObject(arg0));
|
|
1546
2266
|
},
|
|
1547
|
-
|
|
2267
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
1548
2268
|
let result;
|
|
1549
2269
|
try {
|
|
1550
|
-
result = arg0 instanceof ArrayBuffer;
|
|
2270
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1551
2271
|
} catch (_) {
|
|
1552
2272
|
result = false;
|
|
1553
2273
|
}
|
|
1554
2274
|
const ret = result;
|
|
1555
2275
|
return ret;
|
|
1556
2276
|
},
|
|
1557
|
-
|
|
2277
|
+
__wbg_instanceof_Array_de0fa65266a8c7c0: function(arg0) {
|
|
1558
2278
|
let result;
|
|
1559
2279
|
try {
|
|
1560
|
-
result = arg0 instanceof Array;
|
|
2280
|
+
result = getObject(arg0) instanceof Array;
|
|
1561
2281
|
} catch (_) {
|
|
1562
2282
|
result = false;
|
|
1563
2283
|
}
|
|
1564
2284
|
const ret = result;
|
|
1565
2285
|
return ret;
|
|
1566
2286
|
},
|
|
1567
|
-
|
|
2287
|
+
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
1568
2288
|
let result;
|
|
1569
2289
|
try {
|
|
1570
|
-
result = arg0 instanceof Map;
|
|
2290
|
+
result = getObject(arg0) instanceof Map;
|
|
1571
2291
|
} catch (_) {
|
|
1572
2292
|
result = false;
|
|
1573
2293
|
}
|
|
1574
2294
|
const ret = result;
|
|
1575
2295
|
return ret;
|
|
1576
2296
|
},
|
|
1577
|
-
|
|
2297
|
+
__wbg_instanceof_Response_c8b64b2256f01bec: function(arg0) {
|
|
1578
2298
|
let result;
|
|
1579
2299
|
try {
|
|
1580
|
-
result = arg0 instanceof Response;
|
|
2300
|
+
result = getObject(arg0) instanceof Response;
|
|
1581
2301
|
} catch (_) {
|
|
1582
2302
|
result = false;
|
|
1583
2303
|
}
|
|
1584
2304
|
const ret = result;
|
|
1585
2305
|
return ret;
|
|
1586
2306
|
},
|
|
1587
|
-
|
|
2307
|
+
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
1588
2308
|
let result;
|
|
1589
2309
|
try {
|
|
1590
|
-
result = arg0 instanceof Uint8Array;
|
|
2310
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1591
2311
|
} catch (_) {
|
|
1592
2312
|
result = false;
|
|
1593
2313
|
}
|
|
1594
2314
|
const ret = result;
|
|
1595
2315
|
return ret;
|
|
1596
2316
|
},
|
|
1597
|
-
|
|
1598
|
-
const ret = Array.isArray(arg0);
|
|
2317
|
+
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
2318
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1599
2319
|
return ret;
|
|
1600
2320
|
},
|
|
1601
|
-
|
|
1602
|
-
const ret = Number.isSafeInteger(arg0);
|
|
2321
|
+
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
2322
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1603
2323
|
return ret;
|
|
1604
2324
|
},
|
|
1605
|
-
|
|
2325
|
+
__wbg_iterator_6f722e4a93058b71: function() {
|
|
1606
2326
|
const ret = Symbol.iterator;
|
|
1607
|
-
return ret;
|
|
2327
|
+
return addHeapObject(ret);
|
|
1608
2328
|
},
|
|
1609
|
-
|
|
1610
|
-
const ret = Object.keys(arg0);
|
|
1611
|
-
return ret;
|
|
2329
|
+
__wbg_keys_58421f8f96795607: function(arg0) {
|
|
2330
|
+
const ret = Object.keys(getObject(arg0));
|
|
2331
|
+
return addHeapObject(ret);
|
|
1612
2332
|
},
|
|
1613
|
-
|
|
1614
|
-
const ret = arg0.length;
|
|
2333
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
2334
|
+
const ret = getObject(arg0).length;
|
|
1615
2335
|
return ret;
|
|
1616
2336
|
},
|
|
1617
|
-
|
|
1618
|
-
const ret = arg0.length;
|
|
2337
|
+
__wbg_length_370319915dc99107: function(arg0) {
|
|
2338
|
+
const ret = getObject(arg0).length;
|
|
1619
2339
|
return ret;
|
|
1620
2340
|
},
|
|
1621
|
-
|
|
1622
|
-
console.log(...arg0);
|
|
2341
|
+
__wbg_log_ff0e9e235d10713d: function(arg0) {
|
|
2342
|
+
console.log(...getObject(arg0));
|
|
1623
2343
|
},
|
|
1624
2344
|
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1625
|
-
const ret = arg0.msCrypto;
|
|
1626
|
-
return ret;
|
|
2345
|
+
const ret = getObject(arg0).msCrypto;
|
|
2346
|
+
return addHeapObject(ret);
|
|
1627
2347
|
},
|
|
1628
2348
|
__wbg_multiissuerauthorizeresult_new: function(arg0) {
|
|
1629
2349
|
const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
|
|
1630
|
-
return ret;
|
|
2350
|
+
return addHeapObject(ret);
|
|
1631
2351
|
},
|
|
1632
|
-
|
|
1633
|
-
const ret = new
|
|
1634
|
-
return ret;
|
|
2352
|
+
__wbg_new_0_3da9e97f24fc69be: function() {
|
|
2353
|
+
const ret = new Date();
|
|
2354
|
+
return addHeapObject(ret);
|
|
1635
2355
|
},
|
|
1636
|
-
|
|
1637
|
-
const ret = new
|
|
1638
|
-
return ret;
|
|
2356
|
+
__wbg_new_0d809930cd1354c6: function() { return handleError(function () {
|
|
2357
|
+
const ret = new Headers();
|
|
2358
|
+
return addHeapObject(ret);
|
|
2359
|
+
}, arguments); },
|
|
2360
|
+
__wbg_new_32b398fb48b6d94a: function() {
|
|
2361
|
+
const ret = new Array();
|
|
2362
|
+
return addHeapObject(ret);
|
|
1639
2363
|
},
|
|
1640
|
-
|
|
1641
|
-
const ret = new
|
|
1642
|
-
return ret;
|
|
2364
|
+
__wbg_new_4339b2a2675a03e3: function() { return handleError(function () {
|
|
2365
|
+
const ret = new AbortController();
|
|
2366
|
+
return addHeapObject(ret);
|
|
2367
|
+
}, arguments); },
|
|
2368
|
+
__wbg_new_7796ffc7ed656783: function() {
|
|
2369
|
+
const ret = new Map();
|
|
2370
|
+
return addHeapObject(ret);
|
|
1643
2371
|
},
|
|
1644
|
-
|
|
2372
|
+
__wbg_new_b667d279fd5aa943: function(arg0, arg1) {
|
|
1645
2373
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1646
|
-
return ret;
|
|
2374
|
+
return addHeapObject(ret);
|
|
1647
2375
|
},
|
|
1648
|
-
|
|
1649
|
-
const ret = new
|
|
1650
|
-
return ret;
|
|
2376
|
+
__wbg_new_cc984128914cfc6f: function(arg0) {
|
|
2377
|
+
const ret = new Date(getObject(arg0));
|
|
2378
|
+
return addHeapObject(ret);
|
|
1651
2379
|
},
|
|
1652
|
-
|
|
1653
|
-
const ret = new Uint8Array(arg0);
|
|
1654
|
-
return ret;
|
|
2380
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
2381
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
2382
|
+
return addHeapObject(ret);
|
|
1655
2383
|
},
|
|
1656
|
-
|
|
1657
|
-
const ret = new
|
|
1658
|
-
return ret;
|
|
2384
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
2385
|
+
const ret = new Object();
|
|
2386
|
+
return addHeapObject(ret);
|
|
1659
2387
|
},
|
|
1660
|
-
|
|
1661
|
-
const ret = new AbortController();
|
|
1662
|
-
return ret;
|
|
1663
|
-
}, arguments); },
|
|
1664
|
-
__wbg_new_ee0be486d8f01282: function() { return handleError(function () {
|
|
1665
|
-
const ret = new Headers();
|
|
1666
|
-
return ret;
|
|
1667
|
-
}, arguments); },
|
|
1668
|
-
__wbg_new_from_slice_269e35316ed2d061: function(arg0, arg1) {
|
|
2388
|
+
__wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
|
|
1669
2389
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1670
|
-
return ret;
|
|
2390
|
+
return addHeapObject(ret);
|
|
1671
2391
|
},
|
|
1672
|
-
|
|
2392
|
+
__wbg_new_typed_1824d93f294193e5: function(arg0, arg1) {
|
|
1673
2393
|
try {
|
|
1674
2394
|
var state0 = {a: arg0, b: arg1};
|
|
1675
2395
|
var cb0 = (arg0, arg1) => {
|
|
1676
2396
|
const a = state0.a;
|
|
1677
2397
|
state0.a = 0;
|
|
1678
2398
|
try {
|
|
1679
|
-
return
|
|
2399
|
+
return __wasm_bindgen_func_elem_8836(a, state0.b, arg0, arg1);
|
|
1680
2400
|
} finally {
|
|
1681
2401
|
state0.a = a;
|
|
1682
2402
|
}
|
|
1683
2403
|
};
|
|
1684
2404
|
const ret = new Promise(cb0);
|
|
1685
|
-
return ret;
|
|
2405
|
+
return addHeapObject(ret);
|
|
1686
2406
|
} finally {
|
|
1687
2407
|
state0.a = 0;
|
|
1688
2408
|
}
|
|
1689
2409
|
},
|
|
1690
|
-
|
|
1691
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1692
|
-
return ret;
|
|
2410
|
+
__wbg_new_with_byte_offset_and_length_54c7724ee3ec7d82: function(arg0, arg1, arg2) {
|
|
2411
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
2412
|
+
return addHeapObject(ret);
|
|
1693
2413
|
},
|
|
1694
|
-
|
|
2414
|
+
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
1695
2415
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1696
|
-
return ret;
|
|
2416
|
+
return addHeapObject(ret);
|
|
1697
2417
|
},
|
|
1698
|
-
|
|
1699
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1700
|
-
return ret;
|
|
2418
|
+
__wbg_new_with_str_and_init_d95cbe11ce28e65e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2419
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
2420
|
+
return addHeapObject(ret);
|
|
1701
2421
|
}, arguments); },
|
|
1702
|
-
|
|
1703
|
-
const ret = arg0.next;
|
|
1704
|
-
return ret;
|
|
2422
|
+
__wbg_next_6dbf2c0ac8cde20f: function(arg0) {
|
|
2423
|
+
const ret = getObject(arg0).next;
|
|
2424
|
+
return addHeapObject(ret);
|
|
1705
2425
|
},
|
|
1706
|
-
|
|
1707
|
-
const ret = arg0.next();
|
|
1708
|
-
return ret;
|
|
2426
|
+
__wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
|
|
2427
|
+
const ret = getObject(arg0).next();
|
|
2428
|
+
return addHeapObject(ret);
|
|
1709
2429
|
}, arguments); },
|
|
1710
2430
|
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1711
|
-
const ret = arg0.node;
|
|
1712
|
-
return ret;
|
|
2431
|
+
const ret = getObject(arg0).node;
|
|
2432
|
+
return addHeapObject(ret);
|
|
1713
2433
|
},
|
|
1714
2434
|
__wbg_policyevaluationerror_new: function(arg0) {
|
|
1715
2435
|
const ret = PolicyEvaluationError.__wrap(arg0);
|
|
1716
|
-
return ret;
|
|
2436
|
+
return addHeapObject(ret);
|
|
1717
2437
|
},
|
|
1718
2438
|
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1719
|
-
const ret = arg0.process;
|
|
1720
|
-
return ret;
|
|
2439
|
+
const ret = getObject(arg0).process;
|
|
2440
|
+
return addHeapObject(ret);
|
|
1721
2441
|
},
|
|
1722
|
-
|
|
1723
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2442
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
2443
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1724
2444
|
},
|
|
1725
|
-
|
|
1726
|
-
const ret = arg0.push(arg1);
|
|
2445
|
+
__wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
|
|
2446
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1727
2447
|
return ret;
|
|
1728
2448
|
},
|
|
1729
|
-
|
|
1730
|
-
const ret = arg0.queueMicrotask;
|
|
1731
|
-
return ret;
|
|
2449
|
+
__wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
|
|
2450
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
2451
|
+
return addHeapObject(ret);
|
|
1732
2452
|
},
|
|
1733
|
-
|
|
1734
|
-
queueMicrotask(arg0);
|
|
2453
|
+
__wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
|
|
2454
|
+
queueMicrotask(getObject(arg0));
|
|
1735
2455
|
},
|
|
1736
2456
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1737
|
-
arg0.randomFillSync(arg1);
|
|
2457
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1738
2458
|
}, arguments); },
|
|
1739
|
-
|
|
1740
|
-
const ret = arg0.read();
|
|
1741
|
-
return ret;
|
|
2459
|
+
__wbg_read_8afa15f12a160ef8: function(arg0) {
|
|
2460
|
+
const ret = getObject(arg0).read();
|
|
2461
|
+
return addHeapObject(ret);
|
|
1742
2462
|
},
|
|
1743
|
-
|
|
1744
|
-
arg0.releaseLock();
|
|
2463
|
+
__wbg_releaseLock_5b92874cad775644: function(arg0) {
|
|
2464
|
+
getObject(arg0).releaseLock();
|
|
1745
2465
|
},
|
|
1746
2466
|
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1747
2467
|
const ret = module.require;
|
|
1748
|
-
return ret;
|
|
2468
|
+
return addHeapObject(ret);
|
|
1749
2469
|
}, arguments); },
|
|
1750
|
-
|
|
1751
|
-
const ret = Promise.resolve(arg0);
|
|
1752
|
-
return ret;
|
|
2470
|
+
__wbg_resolve_2191a4dfe481c25b: function(arg0) {
|
|
2471
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
2472
|
+
return addHeapObject(ret);
|
|
1753
2473
|
},
|
|
1754
|
-
|
|
1755
|
-
arg0.respond(arg1 >>> 0);
|
|
2474
|
+
__wbg_respond_510e32df8aeb6817: function() { return handleError(function (arg0, arg1) {
|
|
2475
|
+
getObject(arg0).respond(arg1 >>> 0);
|
|
1756
2476
|
}, arguments); },
|
|
1757
|
-
|
|
1758
|
-
const ret = setTimeout(arg0, arg1);
|
|
1759
|
-
return ret;
|
|
2477
|
+
__wbg_setTimeout_3a808dd861dd3c12: function(arg0, arg1) {
|
|
2478
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2479
|
+
return addHeapObject(ret);
|
|
1760
2480
|
},
|
|
1761
2481
|
__wbg_setTimeout_56bcdccbad22fd44: function() { return handleError(function (arg0, arg1) {
|
|
1762
|
-
const ret = setTimeout(arg0, arg1);
|
|
1763
|
-
return ret;
|
|
2482
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2483
|
+
return addHeapObject(ret);
|
|
1764
2484
|
}, arguments); },
|
|
1765
2485
|
__wbg_setTimeout_9f4169770fc5a5c3: function(arg0, arg1) {
|
|
1766
|
-
const ret = setTimeout(arg0, arg1);
|
|
1767
|
-
return ret;
|
|
2486
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2487
|
+
return addHeapObject(ret);
|
|
2488
|
+
},
|
|
2489
|
+
__wbg_set_0de9c62c23d04ad5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2490
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2491
|
+
}, arguments); },
|
|
2492
|
+
__wbg_set_4d7dd76f3dae2926: function(arg0, arg1, arg2) {
|
|
2493
|
+
getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
|
|
1768
2494
|
},
|
|
1769
|
-
|
|
1770
|
-
arg0.set(
|
|
2495
|
+
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
2496
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
2497
|
+
return addHeapObject(ret);
|
|
1771
2498
|
},
|
|
1772
2499
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1773
|
-
arg0[arg1] = arg2;
|
|
1774
|
-
},
|
|
1775
|
-
__wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {
|
|
1776
|
-
arg0[arg1 >>> 0] = arg2;
|
|
2500
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1777
2501
|
},
|
|
1778
|
-
|
|
1779
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
2502
|
+
__wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2503
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1780
2504
|
return ret;
|
|
1781
2505
|
}, arguments); },
|
|
1782
|
-
|
|
1783
|
-
arg0
|
|
2506
|
+
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
2507
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1784
2508
|
},
|
|
1785
|
-
|
|
1786
|
-
arg0.
|
|
2509
|
+
__wbg_set_body_029f2d171e0a005f: function(arg0, arg1) {
|
|
2510
|
+
getObject(arg0).body = getObject(arg1);
|
|
1787
2511
|
},
|
|
1788
|
-
|
|
1789
|
-
arg0.
|
|
2512
|
+
__wbg_set_cache_b4a740b195c051f4: function(arg0, arg1) {
|
|
2513
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
1790
2514
|
},
|
|
1791
|
-
|
|
1792
|
-
arg0.
|
|
1793
|
-
}, arguments); },
|
|
1794
|
-
__wbg_set_facb7a5914e0fa39: function(arg0, arg1, arg2) {
|
|
1795
|
-
const ret = arg0.set(arg1, arg2);
|
|
1796
|
-
return ret;
|
|
2515
|
+
__wbg_set_credentials_bb34a40189e3b43b: function(arg0, arg1) {
|
|
2516
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1797
2517
|
},
|
|
1798
|
-
|
|
1799
|
-
arg0.headers = arg1;
|
|
2518
|
+
__wbg_set_headers_9c61d123c3ee1f10: function(arg0, arg1) {
|
|
2519
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1800
2520
|
},
|
|
1801
|
-
|
|
1802
|
-
arg0.integrity = getStringFromWasm0(arg1, arg2);
|
|
2521
|
+
__wbg_set_integrity_13c390f33acee59c: function(arg0, arg1, arg2) {
|
|
2522
|
+
getObject(arg0).integrity = getStringFromWasm0(arg1, arg2);
|
|
1803
2523
|
},
|
|
1804
|
-
|
|
1805
|
-
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
2524
|
+
__wbg_set_method_5532d59b92d76467: function(arg0, arg1, arg2) {
|
|
2525
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1806
2526
|
},
|
|
1807
|
-
|
|
1808
|
-
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2527
|
+
__wbg_set_mode_66c79886ad78fc05: function(arg0, arg1) {
|
|
2528
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1809
2529
|
},
|
|
1810
|
-
|
|
1811
|
-
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
2530
|
+
__wbg_set_redirect_badd73a0bcb765e3: function(arg0, arg1) {
|
|
2531
|
+
getObject(arg0).redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
1812
2532
|
},
|
|
1813
|
-
|
|
1814
|
-
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
2533
|
+
__wbg_set_referrer_02890bb2de855af1: function(arg0, arg1, arg2) {
|
|
2534
|
+
getObject(arg0).referrer = getStringFromWasm0(arg1, arg2);
|
|
1815
2535
|
},
|
|
1816
|
-
|
|
1817
|
-
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
2536
|
+
__wbg_set_referrer_policy_e49a6d0d7473fd16: function(arg0, arg1) {
|
|
2537
|
+
getObject(arg0).referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
1818
2538
|
},
|
|
1819
|
-
|
|
1820
|
-
arg0.signal = arg1;
|
|
1821
|
-
},
|
|
1822
|
-
__wbg_signal_304beac95c8c5ea0: function(arg0) {
|
|
1823
|
-
const ret = arg0.signal;
|
|
1824
|
-
return ret;
|
|
2539
|
+
__wbg_set_signal_c4ef8faddb4c1446: function(arg0, arg1) {
|
|
2540
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1825
2541
|
},
|
|
1826
|
-
|
|
1827
|
-
const ret =
|
|
1828
|
-
return
|
|
2542
|
+
__wbg_signal_dad7cb35193abd31: function(arg0) {
|
|
2543
|
+
const ret = getObject(arg0).signal;
|
|
2544
|
+
return addHeapObject(ret);
|
|
1829
2545
|
},
|
|
1830
|
-
|
|
2546
|
+
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
1831
2547
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1832
|
-
return isLikeNone(ret) ? 0 :
|
|
2548
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2549
|
+
},
|
|
2550
|
+
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
2551
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2552
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1833
2553
|
},
|
|
1834
|
-
|
|
2554
|
+
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
1835
2555
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1836
|
-
return isLikeNone(ret) ? 0 :
|
|
2556
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1837
2557
|
},
|
|
1838
|
-
|
|
2558
|
+
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
1839
2559
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1840
|
-
return isLikeNone(ret) ? 0 :
|
|
2560
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1841
2561
|
},
|
|
1842
|
-
|
|
1843
|
-
const ret = arg0.status;
|
|
2562
|
+
__wbg_status_c45b3b9b3033184a: function(arg0) {
|
|
2563
|
+
const ret = getObject(arg0).status;
|
|
1844
2564
|
return ret;
|
|
1845
2565
|
},
|
|
1846
|
-
|
|
1847
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1848
|
-
return ret;
|
|
2566
|
+
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
2567
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2568
|
+
return addHeapObject(ret);
|
|
1849
2569
|
},
|
|
1850
|
-
|
|
1851
|
-
const ret = arg0.
|
|
1852
|
-
return ret;
|
|
1853
|
-
}, arguments); },
|
|
1854
|
-
__wbg_then_837494e384b37459: function(arg0, arg1) {
|
|
1855
|
-
const ret = arg0.then(arg1);
|
|
1856
|
-
return ret;
|
|
2570
|
+
__wbg_then_16d107c451e9905d: function(arg0, arg1, arg2) {
|
|
2571
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2572
|
+
return addHeapObject(ret);
|
|
1857
2573
|
},
|
|
1858
|
-
|
|
1859
|
-
const ret = arg0.then(arg1
|
|
1860
|
-
return ret;
|
|
2574
|
+
__wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
|
|
2575
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2576
|
+
return addHeapObject(ret);
|
|
1861
2577
|
},
|
|
1862
|
-
|
|
1863
|
-
const ret = arg0.toString();
|
|
1864
|
-
return ret;
|
|
2578
|
+
__wbg_toString_b201c2690bbe445a: function(arg0) {
|
|
2579
|
+
const ret = getObject(arg0).toString();
|
|
2580
|
+
return addHeapObject(ret);
|
|
1865
2581
|
},
|
|
1866
|
-
|
|
1867
|
-
console.trace(...arg0);
|
|
2582
|
+
__wbg_trace_11b7832abd361806: function(arg0) {
|
|
2583
|
+
console.trace(...getObject(arg0));
|
|
1868
2584
|
},
|
|
1869
|
-
|
|
1870
|
-
const ret = arg1.url;
|
|
1871
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
2585
|
+
__wbg_url_abdb8fb08377f8c0: function(arg0, arg1) {
|
|
2586
|
+
const ret = getObject(arg1).url;
|
|
2587
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1872
2588
|
const len1 = WASM_VECTOR_LEN;
|
|
1873
2589
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1874
2590
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1875
2591
|
},
|
|
1876
|
-
|
|
1877
|
-
const ret = arg0.value;
|
|
1878
|
-
return ret;
|
|
2592
|
+
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
2593
|
+
const ret = getObject(arg0).value;
|
|
2594
|
+
return addHeapObject(ret);
|
|
1879
2595
|
},
|
|
1880
2596
|
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1881
|
-
const ret = arg0.versions;
|
|
1882
|
-
return ret;
|
|
2597
|
+
const ret = getObject(arg0).versions;
|
|
2598
|
+
return addHeapObject(ret);
|
|
1883
2599
|
},
|
|
1884
|
-
|
|
1885
|
-
const ret = arg0.view;
|
|
1886
|
-
return isLikeNone(ret) ? 0 :
|
|
2600
|
+
__wbg_view_21f1d4a4f175dfa9: function(arg0) {
|
|
2601
|
+
const ret = getObject(arg0).view;
|
|
2602
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1887
2603
|
},
|
|
1888
|
-
|
|
1889
|
-
console.warn(...arg0);
|
|
2604
|
+
__wbg_warn_5b6b926b392ba289: function(arg0) {
|
|
2605
|
+
console.warn(...getObject(arg0));
|
|
1890
2606
|
},
|
|
1891
2607
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1892
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1893
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1894
|
-
return ret;
|
|
2608
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1193, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2609
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12259);
|
|
2610
|
+
return addHeapObject(ret);
|
|
1895
2611
|
},
|
|
1896
2612
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1897
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1898
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1899
|
-
return ret;
|
|
2613
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 992, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2614
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_8781);
|
|
2615
|
+
return addHeapObject(ret);
|
|
1900
2616
|
},
|
|
1901
2617
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1902
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1903
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1904
|
-
return ret;
|
|
1905
|
-
},
|
|
1906
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1907
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 626, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1908
|
-
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h6f2d88ffbcba67ef);
|
|
1909
|
-
return ret;
|
|
2618
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 876, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2619
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_8616);
|
|
2620
|
+
return addHeapObject(ret);
|
|
1910
2621
|
},
|
|
1911
|
-
|
|
1912
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 787, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1913
|
-
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h32cbe4603be323e5);
|
|
1914
|
-
return ret;
|
|
1915
|
-
},
|
|
1916
|
-
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
2622
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
1917
2623
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1918
2624
|
const ret = arg0;
|
|
1919
|
-
return ret;
|
|
2625
|
+
return addHeapObject(ret);
|
|
1920
2626
|
},
|
|
1921
|
-
|
|
2627
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
1922
2628
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1923
2629
|
const ret = arg0;
|
|
1924
|
-
return ret;
|
|
2630
|
+
return addHeapObject(ret);
|
|
1925
2631
|
},
|
|
1926
|
-
|
|
2632
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1927
2633
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1928
2634
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1929
|
-
return ret;
|
|
2635
|
+
return addHeapObject(ret);
|
|
1930
2636
|
},
|
|
1931
|
-
|
|
2637
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1932
2638
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1933
2639
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1934
|
-
return ret;
|
|
2640
|
+
return addHeapObject(ret);
|
|
1935
2641
|
},
|
|
1936
|
-
|
|
2642
|
+
__wbindgen_cast_0000000000000008: function(arg0) {
|
|
1937
2643
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1938
2644
|
const ret = BigInt.asUintN(64, arg0);
|
|
1939
|
-
return ret;
|
|
2645
|
+
return addHeapObject(ret);
|
|
2646
|
+
},
|
|
2647
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
2648
|
+
const ret = getObject(arg0);
|
|
2649
|
+
return addHeapObject(ret);
|
|
1940
2650
|
},
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
const offset = table.grow(4);
|
|
1944
|
-
table.set(0, undefined);
|
|
1945
|
-
table.set(offset + 0, undefined);
|
|
1946
|
-
table.set(offset + 1, null);
|
|
1947
|
-
table.set(offset + 2, true);
|
|
1948
|
-
table.set(offset + 3, false);
|
|
2651
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
2652
|
+
takeObject(arg0);
|
|
1949
2653
|
},
|
|
1950
2654
|
};
|
|
1951
2655
|
return {
|
|
@@ -1954,31 +2658,30 @@ function __wbg_get_imports() {
|
|
|
1954
2658
|
};
|
|
1955
2659
|
}
|
|
1956
2660
|
|
|
1957
|
-
function
|
|
1958
|
-
wasm.
|
|
2661
|
+
function __wasm_bindgen_func_elem_8616(arg0, arg1) {
|
|
2662
|
+
wasm.__wasm_bindgen_func_elem_8616(arg0, arg1);
|
|
1959
2663
|
}
|
|
1960
2664
|
|
|
1961
|
-
function
|
|
1962
|
-
wasm.
|
|
2665
|
+
function __wasm_bindgen_func_elem_12259(arg0, arg1, arg2) {
|
|
2666
|
+
wasm.__wasm_bindgen_func_elem_12259(arg0, arg1, addHeapObject(arg2));
|
|
1963
2667
|
}
|
|
1964
2668
|
|
|
1965
|
-
function
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
2669
|
+
function __wasm_bindgen_func_elem_8781(arg0, arg1, arg2) {
|
|
2670
|
+
try {
|
|
2671
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2672
|
+
wasm.__wasm_bindgen_func_elem_8781(retptr, arg0, arg1, addHeapObject(arg2));
|
|
2673
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2674
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2675
|
+
if (r1) {
|
|
2676
|
+
throw takeObject(r0);
|
|
2677
|
+
}
|
|
2678
|
+
} finally {
|
|
2679
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1977
2680
|
}
|
|
1978
2681
|
}
|
|
1979
2682
|
|
|
1980
|
-
function
|
|
1981
|
-
wasm.
|
|
2683
|
+
function __wasm_bindgen_func_elem_8836(arg0, arg1, arg2, arg3) {
|
|
2684
|
+
wasm.__wasm_bindgen_func_elem_8836(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1982
2685
|
}
|
|
1983
2686
|
|
|
1984
2687
|
|
|
@@ -2004,6 +2707,21 @@ const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
2004
2707
|
const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2005
2708
|
? { register: () => {}, unregister: () => {} }
|
|
2006
2709
|
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr, 1));
|
|
2710
|
+
const BatchAuthorizeMultiIssuerResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2711
|
+
? { register: () => {}, unregister: () => {} }
|
|
2712
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchauthorizemultiissuerresponse_free(ptr, 1));
|
|
2713
|
+
const BatchAuthorizeUnsignedResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2714
|
+
? { register: () => {}, unregister: () => {} }
|
|
2715
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchauthorizeunsignedresponse_free(ptr, 1));
|
|
2716
|
+
const BatchItemErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2717
|
+
? { register: () => {}, unregister: () => {} }
|
|
2718
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchitemerror_free(ptr, 1));
|
|
2719
|
+
const BatchItemMultiIssuerResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2720
|
+
? { register: () => {}, unregister: () => {} }
|
|
2721
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchitemmultiissuerresult_free(ptr, 1));
|
|
2722
|
+
const BatchItemUnsignedResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2723
|
+
? { register: () => {}, unregister: () => {} }
|
|
2724
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchitemunsignedresult_free(ptr, 1));
|
|
2007
2725
|
const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2008
2726
|
? { register: () => {}, unregister: () => {} }
|
|
2009
2727
|
: new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr, 1));
|
|
@@ -2032,9 +2750,12 @@ const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'unde
|
|
|
2032
2750
|
? { register: () => {}, unregister: () => {} }
|
|
2033
2751
|
: new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr, 1));
|
|
2034
2752
|
|
|
2035
|
-
function
|
|
2036
|
-
|
|
2037
|
-
|
|
2753
|
+
function addHeapObject(obj) {
|
|
2754
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
2755
|
+
const idx = heap_next;
|
|
2756
|
+
heap_next = heap[idx];
|
|
2757
|
+
|
|
2758
|
+
heap[idx] = obj;
|
|
2038
2759
|
return idx;
|
|
2039
2760
|
}
|
|
2040
2761
|
|
|
@@ -2046,7 +2767,7 @@ function _assertClass(instance, klass) {
|
|
|
2046
2767
|
|
|
2047
2768
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
2048
2769
|
? { register: () => {}, unregister: () => {} }
|
|
2049
|
-
: new FinalizationRegistry(state => wasm.
|
|
2770
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
|
|
2050
2771
|
|
|
2051
2772
|
function debugString(val) {
|
|
2052
2773
|
// primitive types
|
|
@@ -2113,14 +2834,19 @@ function debugString(val) {
|
|
|
2113
2834
|
return className;
|
|
2114
2835
|
}
|
|
2115
2836
|
|
|
2837
|
+
function dropObject(idx) {
|
|
2838
|
+
if (idx < 1028) return;
|
|
2839
|
+
heap[idx] = heap_next;
|
|
2840
|
+
heap_next = idx;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2116
2843
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2117
2844
|
ptr = ptr >>> 0;
|
|
2118
2845
|
const mem = getDataViewMemory0();
|
|
2119
2846
|
const result = [];
|
|
2120
2847
|
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
2121
|
-
result.push(
|
|
2848
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
2122
2849
|
}
|
|
2123
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
2124
2850
|
return result;
|
|
2125
2851
|
}
|
|
2126
2852
|
|
|
@@ -2149,15 +2875,21 @@ function getUint8ArrayMemory0() {
|
|
|
2149
2875
|
return cachedUint8ArrayMemory0;
|
|
2150
2876
|
}
|
|
2151
2877
|
|
|
2878
|
+
function getObject(idx) { return heap[idx]; }
|
|
2879
|
+
|
|
2152
2880
|
function handleError(f, args) {
|
|
2153
2881
|
try {
|
|
2154
2882
|
return f.apply(this, args);
|
|
2155
2883
|
} catch (e) {
|
|
2156
|
-
|
|
2157
|
-
wasm.__wbindgen_exn_store(idx);
|
|
2884
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2158
2885
|
}
|
|
2159
2886
|
}
|
|
2160
2887
|
|
|
2888
|
+
let heap = new Array(1024).fill(undefined);
|
|
2889
|
+
heap.push(undefined, null, true, false);
|
|
2890
|
+
|
|
2891
|
+
let heap_next = heap.length;
|
|
2892
|
+
|
|
2161
2893
|
function isLikeNone(x) {
|
|
2162
2894
|
return x === undefined || x === null;
|
|
2163
2895
|
}
|
|
@@ -2181,7 +2913,7 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
2181
2913
|
};
|
|
2182
2914
|
real._wbg_cb_unref = () => {
|
|
2183
2915
|
if (--state.cnt === 0) {
|
|
2184
|
-
wasm.
|
|
2916
|
+
wasm.__wbindgen_export4(state.a, state.b);
|
|
2185
2917
|
state.a = 0;
|
|
2186
2918
|
CLOSURE_DTORS.unregister(state);
|
|
2187
2919
|
}
|
|
@@ -2190,6 +2922,16 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
2190
2922
|
return real;
|
|
2191
2923
|
}
|
|
2192
2924
|
|
|
2925
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2926
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2927
|
+
const mem = getDataViewMemory0();
|
|
2928
|
+
for (let i = 0; i < array.length; i++) {
|
|
2929
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2930
|
+
}
|
|
2931
|
+
WASM_VECTOR_LEN = array.length;
|
|
2932
|
+
return ptr;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2193
2935
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
2194
2936
|
if (realloc === undefined) {
|
|
2195
2937
|
const buf = cachedTextEncoder.encode(arg);
|
|
@@ -2227,23 +2969,15 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
2227
2969
|
return ptr;
|
|
2228
2970
|
}
|
|
2229
2971
|
|
|
2230
|
-
function
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2233
|
-
return
|
|
2972
|
+
function takeObject(idx) {
|
|
2973
|
+
const ret = getObject(idx);
|
|
2974
|
+
dropObject(idx);
|
|
2975
|
+
return ret;
|
|
2234
2976
|
}
|
|
2235
2977
|
|
|
2236
2978
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2237
2979
|
cachedTextDecoder.decode();
|
|
2238
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2239
|
-
let numBytesDecoded = 0;
|
|
2240
2980
|
function decodeText(ptr, len) {
|
|
2241
|
-
numBytesDecoded += len;
|
|
2242
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2243
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2244
|
-
cachedTextDecoder.decode();
|
|
2245
|
-
numBytesDecoded = len;
|
|
2246
|
-
}
|
|
2247
2981
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2248
2982
|
}
|
|
2249
2983
|
|
|
@@ -2262,96 +2996,8 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
2262
2996
|
|
|
2263
2997
|
let WASM_VECTOR_LEN = 0;
|
|
2264
2998
|
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
cachedDataViewMemory0 = null;
|
|
2271
|
-
cachedUint8ArrayMemory0 = null;
|
|
2272
|
-
wasm.__wbindgen_start();
|
|
2273
|
-
return wasm;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
async function __wbg_load(module, imports) {
|
|
2277
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
2278
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
2279
|
-
try {
|
|
2280
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
2281
|
-
} catch (e) {
|
|
2282
|
-
const validResponse = module.ok && expectedResponseType(module.type);
|
|
2283
|
-
|
|
2284
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
2285
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
2286
|
-
|
|
2287
|
-
} else { throw e; }
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
|
-
const bytes = await module.arrayBuffer();
|
|
2292
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
2293
|
-
} else {
|
|
2294
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
2295
|
-
|
|
2296
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
2297
|
-
return { instance, module };
|
|
2298
|
-
} else {
|
|
2299
|
-
return instance;
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
function expectedResponseType(type) {
|
|
2304
|
-
switch (type) {
|
|
2305
|
-
case 'basic': case 'cors': case 'default': return true;
|
|
2306
|
-
}
|
|
2307
|
-
return false;
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
function initSync(module) {
|
|
2312
|
-
if (wasm !== undefined) return wasm;
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
if (module !== undefined) {
|
|
2316
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2317
|
-
({module} = module)
|
|
2318
|
-
} else {
|
|
2319
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
const imports = __wbg_get_imports();
|
|
2324
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
2325
|
-
module = new WebAssembly.Module(module);
|
|
2326
|
-
}
|
|
2327
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
2328
|
-
return __wbg_finalize_init(instance, module);
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
async function __wbg_init(module_or_path) {
|
|
2332
|
-
if (wasm !== undefined) return wasm;
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
if (module_or_path !== undefined) {
|
|
2336
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2337
|
-
({module_or_path} = module_or_path)
|
|
2338
|
-
} else {
|
|
2339
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
if (module_or_path === undefined) {
|
|
2344
|
-
module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
|
|
2345
|
-
}
|
|
2346
|
-
const imports = __wbg_get_imports();
|
|
2347
|
-
|
|
2348
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
2349
|
-
module_or_path = fetch(module_or_path);
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2353
|
-
|
|
2354
|
-
return __wbg_finalize_init(instance, module);
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
export { initSync, __wbg_init as default };
|
|
2999
|
+
const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
|
|
3000
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
3001
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
3002
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
3003
|
+
let wasm = wasmInstance.exports;
|