@premai/reticle 0.4.0 → 0.4.1
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/package.json +1 -1
- package/reticle.d.ts +98 -115
- package/reticle.js +1 -1
- package/reticle_bg.js +522 -537
- package/reticle_bg.wasm +0 -0
- package/reticle_main.js +533 -539
package/reticle_bg.js
CHANGED
|
@@ -68,6 +68,56 @@ export class AttestResult {
|
|
|
68
68
|
}
|
|
69
69
|
if (Symbol.dispose) AttestResult.prototype[Symbol.dispose] = AttestResult.prototype.free;
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* A parsed certificate revocation list
|
|
73
|
+
*/
|
|
74
|
+
export class CRL {
|
|
75
|
+
static __wrap(ptr) {
|
|
76
|
+
ptr = ptr >>> 0;
|
|
77
|
+
const obj = Object.create(CRL.prototype);
|
|
78
|
+
obj.__wbg_ptr = ptr;
|
|
79
|
+
CRLFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
__destroy_into_raw() {
|
|
83
|
+
const ptr = this.__wbg_ptr;
|
|
84
|
+
this.__wbg_ptr = 0;
|
|
85
|
+
CRLFinalization.unregister(this);
|
|
86
|
+
return ptr;
|
|
87
|
+
}
|
|
88
|
+
free() {
|
|
89
|
+
const ptr = this.__destroy_into_raw();
|
|
90
|
+
wasm.__wbg_crl_free(ptr, 0);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Passes if the certificates are not in the certificate revocation list
|
|
94
|
+
* Throws `AttestationError` on fail
|
|
95
|
+
* @param {VerifiedChain} chain
|
|
96
|
+
*/
|
|
97
|
+
check_chain(chain) {
|
|
98
|
+
_assertClass(chain, VerifiedChain);
|
|
99
|
+
const ret = wasm.crl_check_chain(this.__wbg_ptr, chain.__wbg_ptr);
|
|
100
|
+
if (ret[1]) {
|
|
101
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Parses a certificate revocation list from DER format binary data
|
|
106
|
+
* @param {Uint8Array} list
|
|
107
|
+
* @returns {CRL}
|
|
108
|
+
*/
|
|
109
|
+
static from_der(list) {
|
|
110
|
+
const ptr0 = passArray8ToWasm0(list, wasm.__wbindgen_malloc);
|
|
111
|
+
const len0 = WASM_VECTOR_LEN;
|
|
112
|
+
const ret = wasm.crl_from_der(ptr0, len0);
|
|
113
|
+
if (ret[2]) {
|
|
114
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
115
|
+
}
|
|
116
|
+
return CRL.__wrap(ret[0]);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (Symbol.dispose) CRL.prototype[Symbol.dispose] = CRL.prototype.free;
|
|
120
|
+
|
|
71
121
|
export class Client {
|
|
72
122
|
static __wrap(ptr) {
|
|
73
123
|
ptr = ptr >>> 0;
|
|
@@ -305,6 +355,148 @@ export const CpuModule = Object.freeze({
|
|
|
305
355
|
Tdx: 1, "1": "Tdx",
|
|
306
356
|
});
|
|
307
357
|
|
|
358
|
+
export class DecodedClaims {
|
|
359
|
+
static __wrap(ptr) {
|
|
360
|
+
ptr = ptr >>> 0;
|
|
361
|
+
const obj = Object.create(DecodedClaims.prototype);
|
|
362
|
+
obj.__wbg_ptr = ptr;
|
|
363
|
+
DecodedClaimsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
364
|
+
return obj;
|
|
365
|
+
}
|
|
366
|
+
__destroy_into_raw() {
|
|
367
|
+
const ptr = this.__wbg_ptr;
|
|
368
|
+
this.__wbg_ptr = 0;
|
|
369
|
+
DecodedClaimsFinalization.unregister(this);
|
|
370
|
+
return ptr;
|
|
371
|
+
}
|
|
372
|
+
free() {
|
|
373
|
+
const ptr = this.__destroy_into_raw();
|
|
374
|
+
wasm.__wbg_decodedclaims_free(ptr, 0);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if (Symbol.dispose) DecodedClaims.prototype[Symbol.dispose] = DecodedClaims.prototype.free;
|
|
378
|
+
|
|
379
|
+
export class EATToken {
|
|
380
|
+
static __wrap(ptr) {
|
|
381
|
+
ptr = ptr >>> 0;
|
|
382
|
+
const obj = Object.create(EATToken.prototype);
|
|
383
|
+
obj.__wbg_ptr = ptr;
|
|
384
|
+
EATTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
385
|
+
return obj;
|
|
386
|
+
}
|
|
387
|
+
__destroy_into_raw() {
|
|
388
|
+
const ptr = this.__wbg_ptr;
|
|
389
|
+
this.__wbg_ptr = 0;
|
|
390
|
+
EATTokenFinalization.unregister(this);
|
|
391
|
+
return ptr;
|
|
392
|
+
}
|
|
393
|
+
free() {
|
|
394
|
+
const ptr = this.__destroy_into_raw();
|
|
395
|
+
wasm.__wbg_eattoken_free(ptr, 0);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* @param {string} from
|
|
399
|
+
* @returns {EATToken}
|
|
400
|
+
*/
|
|
401
|
+
static parse(from) {
|
|
402
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
403
|
+
const len0 = WASM_VECTOR_LEN;
|
|
404
|
+
const ret = wasm.eattoken_parse(ptr0, len0);
|
|
405
|
+
if (ret[2]) {
|
|
406
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
407
|
+
}
|
|
408
|
+
return EATToken.__wrap(ret[0]);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @param {KeyChain} keys
|
|
412
|
+
* @param {NvidiaNonce} nonce
|
|
413
|
+
* @returns {DecodedClaims}
|
|
414
|
+
*/
|
|
415
|
+
verify(keys, nonce) {
|
|
416
|
+
const ptr = this.__destroy_into_raw();
|
|
417
|
+
_assertClass(keys, KeyChain);
|
|
418
|
+
_assertClass(nonce, NvidiaNonce);
|
|
419
|
+
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
420
|
+
if (ret[2]) {
|
|
421
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
422
|
+
}
|
|
423
|
+
return DecodedClaims.__wrap(ret[0]);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
427
|
+
|
|
428
|
+
export class ExportPem {
|
|
429
|
+
static __wrap(ptr) {
|
|
430
|
+
ptr = ptr >>> 0;
|
|
431
|
+
const obj = Object.create(ExportPem.prototype);
|
|
432
|
+
obj.__wbg_ptr = ptr;
|
|
433
|
+
ExportPemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
434
|
+
return obj;
|
|
435
|
+
}
|
|
436
|
+
__destroy_into_raw() {
|
|
437
|
+
const ptr = this.__wbg_ptr;
|
|
438
|
+
this.__wbg_ptr = 0;
|
|
439
|
+
ExportPemFinalization.unregister(this);
|
|
440
|
+
return ptr;
|
|
441
|
+
}
|
|
442
|
+
free() {
|
|
443
|
+
const ptr = this.__destroy_into_raw();
|
|
444
|
+
wasm.__wbg_exportpem_free(ptr, 0);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* @returns {Uint8Array}
|
|
448
|
+
*/
|
|
449
|
+
get ark() {
|
|
450
|
+
const ret = wasm.__wbg_get_exportpem_ark(this.__wbg_ptr);
|
|
451
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
452
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
453
|
+
return v1;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* @returns {Uint8Array}
|
|
457
|
+
*/
|
|
458
|
+
get ask() {
|
|
459
|
+
const ret = wasm.__wbg_get_exportpem_ask(this.__wbg_ptr);
|
|
460
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
461
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
462
|
+
return v1;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @returns {Uint8Array}
|
|
466
|
+
*/
|
|
467
|
+
get vek() {
|
|
468
|
+
const ret = wasm.__wbg_get_exportpem_vek(this.__wbg_ptr);
|
|
469
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
470
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
471
|
+
return v1;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* @param {Uint8Array} arg0
|
|
475
|
+
*/
|
|
476
|
+
set ark(arg0) {
|
|
477
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
478
|
+
const len0 = WASM_VECTOR_LEN;
|
|
479
|
+
wasm.__wbg_set_exportpem_ark(this.__wbg_ptr, ptr0, len0);
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* @param {Uint8Array} arg0
|
|
483
|
+
*/
|
|
484
|
+
set ask(arg0) {
|
|
485
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
487
|
+
wasm.__wbg_set_exportpem_ask(this.__wbg_ptr, ptr0, len0);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* @param {Uint8Array} arg0
|
|
491
|
+
*/
|
|
492
|
+
set vek(arg0) {
|
|
493
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
494
|
+
const len0 = WASM_VECTOR_LEN;
|
|
495
|
+
wasm.__wbg_set_exportpem_vek(this.__wbg_ptr, ptr0, len0);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (Symbol.dispose) ExportPem.prototype[Symbol.dispose] = ExportPem.prototype.free;
|
|
499
|
+
|
|
308
500
|
export class GatewayError {
|
|
309
501
|
static __wrap(ptr) {
|
|
310
502
|
ptr = ptr >>> 0;
|
|
@@ -356,6 +548,74 @@ export const GpuModule = Object.freeze({
|
|
|
356
548
|
Nvidia: 0, "0": "Nvidia",
|
|
357
549
|
});
|
|
358
550
|
|
|
551
|
+
export class Kds {
|
|
552
|
+
__destroy_into_raw() {
|
|
553
|
+
const ptr = this.__wbg_ptr;
|
|
554
|
+
this.__wbg_ptr = 0;
|
|
555
|
+
KdsFinalization.unregister(this);
|
|
556
|
+
return ptr;
|
|
557
|
+
}
|
|
558
|
+
free() {
|
|
559
|
+
const ptr = this.__destroy_into_raw();
|
|
560
|
+
wasm.__wbg_kds_free(ptr, 0);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* @param {ParsedAttestation} attestation
|
|
564
|
+
* @returns {Promise<VerifiedChain>}
|
|
565
|
+
*/
|
|
566
|
+
fetch_certificates(attestation) {
|
|
567
|
+
_assertClass(attestation, ParsedAttestation);
|
|
568
|
+
const ret = wasm.kds_fetch_certificates(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
569
|
+
return ret;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Fetches the certificate revocation list from AMD's KDS
|
|
573
|
+
* @param {ParsedAttestation} attestation
|
|
574
|
+
* @returns {Promise<CRL>}
|
|
575
|
+
*/
|
|
576
|
+
fetch_crl(attestation) {
|
|
577
|
+
_assertClass(attestation, ParsedAttestation);
|
|
578
|
+
const ret = wasm.kds_fetch_crl(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
579
|
+
return ret;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* @param {string} cache_url
|
|
583
|
+
*/
|
|
584
|
+
constructor(cache_url) {
|
|
585
|
+
const ptr0 = passStringToWasm0(cache_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
586
|
+
const len0 = WASM_VECTOR_LEN;
|
|
587
|
+
const ret = wasm.kds_new(ptr0, len0);
|
|
588
|
+
if (ret[2]) {
|
|
589
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
590
|
+
}
|
|
591
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
592
|
+
KdsFinalization.register(this, this.__wbg_ptr, this);
|
|
593
|
+
return this;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (Symbol.dispose) Kds.prototype[Symbol.dispose] = Kds.prototype.free;
|
|
597
|
+
|
|
598
|
+
export class KeyChain {
|
|
599
|
+
static __wrap(ptr) {
|
|
600
|
+
ptr = ptr >>> 0;
|
|
601
|
+
const obj = Object.create(KeyChain.prototype);
|
|
602
|
+
obj.__wbg_ptr = ptr;
|
|
603
|
+
KeyChainFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
604
|
+
return obj;
|
|
605
|
+
}
|
|
606
|
+
__destroy_into_raw() {
|
|
607
|
+
const ptr = this.__wbg_ptr;
|
|
608
|
+
this.__wbg_ptr = 0;
|
|
609
|
+
KeyChainFinalization.unregister(this);
|
|
610
|
+
return ptr;
|
|
611
|
+
}
|
|
612
|
+
free() {
|
|
613
|
+
const ptr = this.__destroy_into_raw();
|
|
614
|
+
wasm.__wbg_keychain_free(ptr, 0);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
if (Symbol.dispose) KeyChain.prototype[Symbol.dispose] = KeyChain.prototype.free;
|
|
618
|
+
|
|
359
619
|
export class Modules {
|
|
360
620
|
static __wrap(ptr) {
|
|
361
621
|
ptr = ptr >>> 0;
|
|
@@ -419,205 +679,30 @@ export class NvidiaAttestResult {
|
|
|
419
679
|
}
|
|
420
680
|
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
421
681
|
|
|
422
|
-
export class
|
|
682
|
+
export class NvidiaNonce {
|
|
683
|
+
static __wrap(ptr) {
|
|
684
|
+
ptr = ptr >>> 0;
|
|
685
|
+
const obj = Object.create(NvidiaNonce.prototype);
|
|
686
|
+
obj.__wbg_ptr = ptr;
|
|
687
|
+
NvidiaNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
688
|
+
return obj;
|
|
689
|
+
}
|
|
423
690
|
__destroy_into_raw() {
|
|
424
691
|
const ptr = this.__wbg_ptr;
|
|
425
692
|
this.__wbg_ptr = 0;
|
|
426
|
-
|
|
693
|
+
NvidiaNonceFinalization.unregister(this);
|
|
427
694
|
return ptr;
|
|
428
695
|
}
|
|
429
696
|
free() {
|
|
430
697
|
const ptr = this.__destroy_into_raw();
|
|
431
|
-
wasm.
|
|
698
|
+
wasm.__wbg_nvidianonce_free(ptr, 0);
|
|
432
699
|
}
|
|
433
700
|
/**
|
|
434
|
-
* @
|
|
435
|
-
* @returns {Promise<Collateral>}
|
|
701
|
+
* @returns {NvidiaNonce}
|
|
436
702
|
*/
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return ret;
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* @param {string} base_url
|
|
444
|
-
*/
|
|
445
|
-
constructor(base_url) {
|
|
446
|
-
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
447
|
-
const len0 = WASM_VECTOR_LEN;
|
|
448
|
-
const ret = wasm.pcs_new(ptr0, len0);
|
|
449
|
-
if (ret[2]) {
|
|
450
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
451
|
-
}
|
|
452
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
453
|
-
PcsFinalization.register(this, this.__wbg_ptr, this);
|
|
454
|
-
return this;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
if (Symbol.dispose) Pcs.prototype[Symbol.dispose] = Pcs.prototype.free;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Generic per-request query parameters.
|
|
461
|
-
*
|
|
462
|
-
* The `nonce` key is reserved and will be rejected.
|
|
463
|
-
*/
|
|
464
|
-
export class QueryParams {
|
|
465
|
-
static __wrap(ptr) {
|
|
466
|
-
ptr = ptr >>> 0;
|
|
467
|
-
const obj = Object.create(QueryParams.prototype);
|
|
468
|
-
obj.__wbg_ptr = ptr;
|
|
469
|
-
QueryParamsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
470
|
-
return obj;
|
|
471
|
-
}
|
|
472
|
-
__destroy_into_raw() {
|
|
473
|
-
const ptr = this.__wbg_ptr;
|
|
474
|
-
this.__wbg_ptr = 0;
|
|
475
|
-
QueryParamsFinalization.unregister(this);
|
|
476
|
-
return ptr;
|
|
477
|
-
}
|
|
478
|
-
free() {
|
|
479
|
-
const ptr = this.__destroy_into_raw();
|
|
480
|
-
wasm.__wbg_queryparams_free(ptr, 0);
|
|
481
|
-
}
|
|
482
|
-
constructor() {
|
|
483
|
-
const ret = wasm.queryparams_new();
|
|
484
|
-
this.__wbg_ptr = ret >>> 0;
|
|
485
|
-
QueryParamsFinalization.register(this, this.__wbg_ptr, this);
|
|
486
|
-
return this;
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Appends a query parameter.
|
|
490
|
-
*
|
|
491
|
-
* Reserved keywords for specific queries will get overwritten
|
|
492
|
-
* @param {string} key
|
|
493
|
-
* @param {string} value
|
|
494
|
-
* @returns {QueryParams}
|
|
495
|
-
*/
|
|
496
|
-
with(key, value) {
|
|
497
|
-
const ptr = this.__destroy_into_raw();
|
|
498
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
499
|
-
const len0 = WASM_VECTOR_LEN;
|
|
500
|
-
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
501
|
-
const len1 = WASM_VECTOR_LEN;
|
|
502
|
-
const ret = wasm.queryparams_with(ptr, ptr0, len0, ptr1, len1);
|
|
503
|
-
return QueryParams.__wrap(ret);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
if (Symbol.dispose) QueryParams.prototype[Symbol.dispose] = QueryParams.prototype.free;
|
|
507
|
-
|
|
508
|
-
export class QuoteVerifier {
|
|
509
|
-
__destroy_into_raw() {
|
|
510
|
-
const ptr = this.__wbg_ptr;
|
|
511
|
-
this.__wbg_ptr = 0;
|
|
512
|
-
QuoteVerifierFinalization.unregister(this);
|
|
513
|
-
return ptr;
|
|
514
|
-
}
|
|
515
|
-
free() {
|
|
516
|
-
const ptr = this.__destroy_into_raw();
|
|
517
|
-
wasm.__wbg_quoteverifier_free(ptr, 0);
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* @param {Collateral} collateral
|
|
521
|
-
* @param {TdxQuote} quote
|
|
522
|
-
*/
|
|
523
|
-
constructor(collateral, quote) {
|
|
524
|
-
_assertClass(collateral, Collateral);
|
|
525
|
-
var ptr0 = collateral.__destroy_into_raw();
|
|
526
|
-
_assertClass(quote, TdxQuote);
|
|
527
|
-
var ptr1 = quote.__destroy_into_raw();
|
|
528
|
-
const ret = wasm.quoteverifier_new(ptr0, ptr1);
|
|
529
|
-
this.__wbg_ptr = ret >>> 0;
|
|
530
|
-
QuoteVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
531
|
-
return this;
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* @param {TdxNonce} nonce
|
|
535
|
-
*/
|
|
536
|
-
verify(nonce) {
|
|
537
|
-
_assertClass(nonce, TdxNonce);
|
|
538
|
-
const ret = wasm.quoteverifier_verify(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
539
|
-
if (ret[1]) {
|
|
540
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
if (Symbol.dispose) QuoteVerifier.prototype[Symbol.dispose] = QuoteVerifier.prototype.free;
|
|
545
|
-
|
|
546
|
-
export class ResponseHeaders {
|
|
547
|
-
static __wrap(ptr) {
|
|
548
|
-
ptr = ptr >>> 0;
|
|
549
|
-
const obj = Object.create(ResponseHeaders.prototype);
|
|
550
|
-
obj.__wbg_ptr = ptr;
|
|
551
|
-
ResponseHeadersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
552
|
-
return obj;
|
|
553
|
-
}
|
|
554
|
-
__destroy_into_raw() {
|
|
555
|
-
const ptr = this.__wbg_ptr;
|
|
556
|
-
this.__wbg_ptr = 0;
|
|
557
|
-
ResponseHeadersFinalization.unregister(this);
|
|
558
|
-
return ptr;
|
|
559
|
-
}
|
|
560
|
-
free() {
|
|
561
|
-
const ptr = this.__destroy_into_raw();
|
|
562
|
-
wasm.__wbg_responseheaders_free(ptr, 0);
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* @param {string} name
|
|
566
|
-
* @returns {string | undefined}
|
|
567
|
-
*/
|
|
568
|
-
get(name) {
|
|
569
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
570
|
-
const len0 = WASM_VECTOR_LEN;
|
|
571
|
-
const ret = wasm.responseheaders_get(this.__wbg_ptr, ptr0, len0);
|
|
572
|
-
let v2;
|
|
573
|
-
if (ret[0] !== 0) {
|
|
574
|
-
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
575
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
576
|
-
}
|
|
577
|
-
return v2;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* @returns {string[]}
|
|
581
|
-
*/
|
|
582
|
-
keys() {
|
|
583
|
-
const ret = wasm.responseheaders_keys(this.__wbg_ptr);
|
|
584
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
585
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
586
|
-
return v1;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
if (Symbol.dispose) ResponseHeaders.prototype[Symbol.dispose] = ResponseHeaders.prototype.free;
|
|
590
|
-
|
|
591
|
-
export class TcbLevels {
|
|
592
|
-
__destroy_into_raw() {
|
|
593
|
-
const ptr = this.__wbg_ptr;
|
|
594
|
-
this.__wbg_ptr = 0;
|
|
595
|
-
TcbLevelsFinalization.unregister(this);
|
|
596
|
-
return ptr;
|
|
597
|
-
}
|
|
598
|
-
free() {
|
|
599
|
-
const ptr = this.__destroy_into_raw();
|
|
600
|
-
wasm.__wbg_tcblevels_free(ptr, 0);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
if (Symbol.dispose) TcbLevels.prototype[Symbol.dispose] = TcbLevels.prototype.free;
|
|
604
|
-
|
|
605
|
-
export class TdxNonce {
|
|
606
|
-
__destroy_into_raw() {
|
|
607
|
-
const ptr = this.__wbg_ptr;
|
|
608
|
-
this.__wbg_ptr = 0;
|
|
609
|
-
TdxNonceFinalization.unregister(this);
|
|
610
|
-
return ptr;
|
|
611
|
-
}
|
|
612
|
-
free() {
|
|
613
|
-
const ptr = this.__destroy_into_raw();
|
|
614
|
-
wasm.__wbg_tdxnonce_free(ptr, 0);
|
|
615
|
-
}
|
|
616
|
-
constructor() {
|
|
617
|
-
const ret = wasm.tdxnonce_generate();
|
|
618
|
-
this.__wbg_ptr = ret >>> 0;
|
|
619
|
-
TdxNonceFinalization.register(this, this.__wbg_ptr, this);
|
|
620
|
-
return this;
|
|
703
|
+
static generate() {
|
|
704
|
+
const ret = wasm.nvidianonce_generate();
|
|
705
|
+
return NvidiaNonce.__wrap(ret);
|
|
621
706
|
}
|
|
622
707
|
/**
|
|
623
708
|
* @returns {string}
|
|
@@ -626,7 +711,7 @@ export class TdxNonce {
|
|
|
626
711
|
let deferred1_0;
|
|
627
712
|
let deferred1_1;
|
|
628
713
|
try {
|
|
629
|
-
const ret = wasm.
|
|
714
|
+
const ret = wasm.nvidianonce_to_hex(this.__wbg_ptr);
|
|
630
715
|
deferred1_0 = ret[0];
|
|
631
716
|
deferred1_1 = ret[1];
|
|
632
717
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -635,429 +720,244 @@ export class TdxNonce {
|
|
|
635
720
|
}
|
|
636
721
|
}
|
|
637
722
|
}
|
|
638
|
-
if (Symbol.dispose)
|
|
723
|
+
if (Symbol.dispose) NvidiaNonce.prototype[Symbol.dispose] = NvidiaNonce.prototype.free;
|
|
639
724
|
|
|
640
|
-
|
|
725
|
+
/**
|
|
726
|
+
* Represents a parsed attestation report with some already
|
|
727
|
+
* parsed commonly accessed fields
|
|
728
|
+
*/
|
|
729
|
+
export class ParsedAttestation {
|
|
641
730
|
static __wrap(ptr) {
|
|
642
731
|
ptr = ptr >>> 0;
|
|
643
|
-
const obj = Object.create(
|
|
732
|
+
const obj = Object.create(ParsedAttestation.prototype);
|
|
644
733
|
obj.__wbg_ptr = ptr;
|
|
645
|
-
|
|
734
|
+
ParsedAttestationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
646
735
|
return obj;
|
|
647
736
|
}
|
|
648
737
|
__destroy_into_raw() {
|
|
649
738
|
const ptr = this.__wbg_ptr;
|
|
650
739
|
this.__wbg_ptr = 0;
|
|
651
|
-
|
|
740
|
+
ParsedAttestationFinalization.unregister(this);
|
|
652
741
|
return ptr;
|
|
653
742
|
}
|
|
654
743
|
free() {
|
|
655
744
|
const ptr = this.__destroy_into_raw();
|
|
656
|
-
wasm.
|
|
745
|
+
wasm.__wbg_parsedattestation_free(ptr, 0);
|
|
657
746
|
}
|
|
658
747
|
/**
|
|
659
|
-
*
|
|
660
|
-
* @param {Uint8Array} quote
|
|
661
|
-
* @returns {TdxQuote}
|
|
748
|
+
* @returns {number}
|
|
662
749
|
*/
|
|
663
|
-
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
const ret = wasm.tdxquote_from_bytes(ptr0, len0);
|
|
667
|
-
if (ret[2]) {
|
|
668
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
669
|
-
}
|
|
670
|
-
return TdxQuote.__wrap(ret[0]);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
if (Symbol.dispose) TdxQuote.prototype[Symbol.dispose] = TdxQuote.prototype.free;
|
|
674
|
-
|
|
675
|
-
class DecodedClaims {
|
|
676
|
-
static __wrap(ptr) {
|
|
677
|
-
ptr = ptr >>> 0;
|
|
678
|
-
const obj = Object.create(DecodedClaims.prototype);
|
|
679
|
-
obj.__wbg_ptr = ptr;
|
|
680
|
-
DecodedClaimsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
681
|
-
return obj;
|
|
682
|
-
}
|
|
683
|
-
__destroy_into_raw() {
|
|
684
|
-
const ptr = this.__wbg_ptr;
|
|
685
|
-
this.__wbg_ptr = 0;
|
|
686
|
-
DecodedClaimsFinalization.unregister(this);
|
|
687
|
-
return ptr;
|
|
688
|
-
}
|
|
689
|
-
free() {
|
|
690
|
-
const ptr = this.__destroy_into_raw();
|
|
691
|
-
wasm.__wbg_nvidia__decodedclaims_free(ptr, 0);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
if (Symbol.dispose) DecodedClaims.prototype[Symbol.dispose] = DecodedClaims.prototype.free;
|
|
695
|
-
|
|
696
|
-
class EATToken {
|
|
697
|
-
static __wrap(ptr) {
|
|
698
|
-
ptr = ptr >>> 0;
|
|
699
|
-
const obj = Object.create(EATToken.prototype);
|
|
700
|
-
obj.__wbg_ptr = ptr;
|
|
701
|
-
EATTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
702
|
-
return obj;
|
|
703
|
-
}
|
|
704
|
-
__destroy_into_raw() {
|
|
705
|
-
const ptr = this.__wbg_ptr;
|
|
706
|
-
this.__wbg_ptr = 0;
|
|
707
|
-
EATTokenFinalization.unregister(this);
|
|
708
|
-
return ptr;
|
|
709
|
-
}
|
|
710
|
-
free() {
|
|
711
|
-
const ptr = this.__destroy_into_raw();
|
|
712
|
-
wasm.__wbg_nvidia__eattoken_free(ptr, 0);
|
|
750
|
+
cpu_fam_id() {
|
|
751
|
+
const ret = wasm.parsedattestation_cpu_fam_id(this.__wbg_ptr);
|
|
752
|
+
return ret;
|
|
713
753
|
}
|
|
714
754
|
/**
|
|
715
|
-
* @
|
|
716
|
-
* @returns {EATToken}
|
|
755
|
+
* @returns {number}
|
|
717
756
|
*/
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const ret = wasm.eattoken_parse(ptr0, len0);
|
|
722
|
-
if (ret[2]) {
|
|
723
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
724
|
-
}
|
|
725
|
-
return EATToken.__wrap(ret[0]);
|
|
757
|
+
cpu_mod_id() {
|
|
758
|
+
const ret = wasm.parsedattestation_cpu_mod_id(this.__wbg_ptr);
|
|
759
|
+
return ret;
|
|
726
760
|
}
|
|
727
761
|
/**
|
|
728
|
-
*
|
|
729
|
-
* @param {
|
|
730
|
-
* @returns {
|
|
762
|
+
* Parses and constructs a new attestation report from a stream of binary data
|
|
763
|
+
* @param {Uint8Array} bytes
|
|
764
|
+
* @returns {ParsedAttestation}
|
|
731
765
|
*/
|
|
732
|
-
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
766
|
+
static new(bytes) {
|
|
767
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
768
|
+
const len0 = WASM_VECTOR_LEN;
|
|
769
|
+
const ret = wasm.parsedattestation_new(ptr0, len0);
|
|
737
770
|
if (ret[2]) {
|
|
738
771
|
throw takeFromExternrefTable0(ret[1]);
|
|
739
772
|
}
|
|
740
|
-
return
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
744
|
-
|
|
745
|
-
class KeyChain {
|
|
746
|
-
static __wrap(ptr) {
|
|
747
|
-
ptr = ptr >>> 0;
|
|
748
|
-
const obj = Object.create(KeyChain.prototype);
|
|
749
|
-
obj.__wbg_ptr = ptr;
|
|
750
|
-
KeyChainFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
751
|
-
return obj;
|
|
752
|
-
}
|
|
753
|
-
__destroy_into_raw() {
|
|
754
|
-
const ptr = this.__wbg_ptr;
|
|
755
|
-
this.__wbg_ptr = 0;
|
|
756
|
-
KeyChainFinalization.unregister(this);
|
|
757
|
-
return ptr;
|
|
758
|
-
}
|
|
759
|
-
free() {
|
|
760
|
-
const ptr = this.__destroy_into_raw();
|
|
761
|
-
wasm.__wbg_nvidia__keychain_free(ptr, 0);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
if (Symbol.dispose) KeyChain.prototype[Symbol.dispose] = KeyChain.prototype.free;
|
|
765
|
-
|
|
766
|
-
class NvidiaNonce {
|
|
767
|
-
static __wrap(ptr) {
|
|
768
|
-
ptr = ptr >>> 0;
|
|
769
|
-
const obj = Object.create(NvidiaNonce.prototype);
|
|
770
|
-
obj.__wbg_ptr = ptr;
|
|
771
|
-
NvidiaNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
772
|
-
return obj;
|
|
773
|
-
}
|
|
774
|
-
__destroy_into_raw() {
|
|
775
|
-
const ptr = this.__wbg_ptr;
|
|
776
|
-
this.__wbg_ptr = 0;
|
|
777
|
-
NvidiaNonceFinalization.unregister(this);
|
|
778
|
-
return ptr;
|
|
779
|
-
}
|
|
780
|
-
free() {
|
|
781
|
-
const ptr = this.__destroy_into_raw();
|
|
782
|
-
wasm.__wbg_nvidia__nvidianonce_free(ptr, 0);
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* @returns {NvidiaNonce}
|
|
786
|
-
*/
|
|
787
|
-
static generate() {
|
|
788
|
-
const ret = wasm.nvidianonce_generate();
|
|
789
|
-
return NvidiaNonce.__wrap(ret);
|
|
773
|
+
return ParsedAttestation.__wrap(ret[0]);
|
|
790
774
|
}
|
|
791
775
|
/**
|
|
792
|
-
*
|
|
776
|
+
* Verifies the attestation report against a certificate chain
|
|
777
|
+
* @param {VerifiedChain} chain
|
|
778
|
+
* @param {SevNonce} nonce
|
|
793
779
|
*/
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
deferred1_1 = ret[1];
|
|
801
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
802
|
-
} finally {
|
|
803
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
780
|
+
verify(chain, nonce) {
|
|
781
|
+
_assertClass(chain, VerifiedChain);
|
|
782
|
+
_assertClass(nonce, SevNonce);
|
|
783
|
+
const ret = wasm.parsedattestation_verify(this.__wbg_ptr, chain.__wbg_ptr, nonce.__wbg_ptr);
|
|
784
|
+
if (ret[1]) {
|
|
785
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
804
786
|
}
|
|
805
787
|
}
|
|
806
788
|
}
|
|
807
|
-
if (Symbol.dispose)
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Same as [`KeyChain:fetch_keychain`], put in for better wasm compatibility
|
|
811
|
-
* @returns {Promise<KeyChain>}
|
|
812
|
-
*/
|
|
813
|
-
function fetch_keychain() {
|
|
814
|
-
const ret = wasm.nvidia__fetch_keychain();
|
|
815
|
-
return ret;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
export const nvidia = {};
|
|
819
|
-
nvidia.DecodedClaims = DecodedClaims;
|
|
820
|
-
nvidia.EATToken = EATToken;
|
|
821
|
-
nvidia.KeyChain = KeyChain;
|
|
822
|
-
nvidia.NvidiaNonce = NvidiaNonce;
|
|
823
|
-
nvidia.fetch_keychain = fetch_keychain;
|
|
789
|
+
if (Symbol.dispose) ParsedAttestation.prototype[Symbol.dispose] = ParsedAttestation.prototype.free;
|
|
824
790
|
|
|
825
|
-
|
|
826
|
-
* A parsed certificate revocation list
|
|
827
|
-
*/
|
|
828
|
-
class CRL {
|
|
829
|
-
static __wrap(ptr) {
|
|
830
|
-
ptr = ptr >>> 0;
|
|
831
|
-
const obj = Object.create(CRL.prototype);
|
|
832
|
-
obj.__wbg_ptr = ptr;
|
|
833
|
-
CRLFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
834
|
-
return obj;
|
|
835
|
-
}
|
|
791
|
+
export class Pcs {
|
|
836
792
|
__destroy_into_raw() {
|
|
837
793
|
const ptr = this.__wbg_ptr;
|
|
838
794
|
this.__wbg_ptr = 0;
|
|
839
|
-
|
|
795
|
+
PcsFinalization.unregister(this);
|
|
840
796
|
return ptr;
|
|
841
797
|
}
|
|
842
798
|
free() {
|
|
843
799
|
const ptr = this.__destroy_into_raw();
|
|
844
|
-
wasm.
|
|
800
|
+
wasm.__wbg_pcs_free(ptr, 0);
|
|
845
801
|
}
|
|
846
802
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
* @param {VerifiedChain} chain
|
|
803
|
+
* @param {TdxQuote} quote
|
|
804
|
+
* @returns {Promise<Collateral>}
|
|
850
805
|
*/
|
|
851
|
-
|
|
852
|
-
_assertClass(
|
|
853
|
-
const ret = wasm.
|
|
854
|
-
|
|
855
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
856
|
-
}
|
|
806
|
+
fetch_collateral(quote) {
|
|
807
|
+
_assertClass(quote, TdxQuote);
|
|
808
|
+
const ret = wasm.pcs_fetch_collateral(this.__wbg_ptr, quote.__wbg_ptr);
|
|
809
|
+
return ret;
|
|
857
810
|
}
|
|
858
811
|
/**
|
|
859
|
-
*
|
|
860
|
-
* @param {Uint8Array} list
|
|
861
|
-
* @returns {CRL}
|
|
812
|
+
* @param {string} base_url
|
|
862
813
|
*/
|
|
863
|
-
|
|
864
|
-
const ptr0 =
|
|
814
|
+
constructor(base_url) {
|
|
815
|
+
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
865
816
|
const len0 = WASM_VECTOR_LEN;
|
|
866
|
-
const ret = wasm.
|
|
817
|
+
const ret = wasm.pcs_new(ptr0, len0);
|
|
867
818
|
if (ret[2]) {
|
|
868
819
|
throw takeFromExternrefTable0(ret[1]);
|
|
869
820
|
}
|
|
870
|
-
|
|
821
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
822
|
+
PcsFinalization.register(this, this.__wbg_ptr, this);
|
|
823
|
+
return this;
|
|
871
824
|
}
|
|
872
825
|
}
|
|
873
|
-
if (Symbol.dispose)
|
|
826
|
+
if (Symbol.dispose) Pcs.prototype[Symbol.dispose] = Pcs.prototype.free;
|
|
874
827
|
|
|
875
|
-
|
|
828
|
+
/**
|
|
829
|
+
* Generic per-request query parameters.
|
|
830
|
+
*
|
|
831
|
+
* The `nonce` key is reserved and will be rejected.
|
|
832
|
+
*/
|
|
833
|
+
export class QueryParams {
|
|
876
834
|
static __wrap(ptr) {
|
|
877
835
|
ptr = ptr >>> 0;
|
|
878
|
-
const obj = Object.create(
|
|
836
|
+
const obj = Object.create(QueryParams.prototype);
|
|
879
837
|
obj.__wbg_ptr = ptr;
|
|
880
|
-
|
|
838
|
+
QueryParamsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
881
839
|
return obj;
|
|
882
840
|
}
|
|
883
841
|
__destroy_into_raw() {
|
|
884
842
|
const ptr = this.__wbg_ptr;
|
|
885
843
|
this.__wbg_ptr = 0;
|
|
886
|
-
|
|
844
|
+
QueryParamsFinalization.unregister(this);
|
|
887
845
|
return ptr;
|
|
888
846
|
}
|
|
889
847
|
free() {
|
|
890
848
|
const ptr = this.__destroy_into_raw();
|
|
891
|
-
wasm.
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* @returns {Uint8Array}
|
|
895
|
-
*/
|
|
896
|
-
get ark() {
|
|
897
|
-
const ret = wasm.__wbg_get_sev__exportpem_ark(this.__wbg_ptr);
|
|
898
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
899
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
900
|
-
return v1;
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* @returns {Uint8Array}
|
|
904
|
-
*/
|
|
905
|
-
get ask() {
|
|
906
|
-
const ret = wasm.__wbg_get_sev__exportpem_ask(this.__wbg_ptr);
|
|
907
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
908
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
909
|
-
return v1;
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* @returns {Uint8Array}
|
|
913
|
-
*/
|
|
914
|
-
get vek() {
|
|
915
|
-
const ret = wasm.__wbg_get_sev__exportpem_vek(this.__wbg_ptr);
|
|
916
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
917
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
918
|
-
return v1;
|
|
919
|
-
}
|
|
920
|
-
/**
|
|
921
|
-
* @param {Uint8Array} arg0
|
|
922
|
-
*/
|
|
923
|
-
set ark(arg0) {
|
|
924
|
-
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
925
|
-
const len0 = WASM_VECTOR_LEN;
|
|
926
|
-
wasm.__wbg_set_sev__exportpem_ark(this.__wbg_ptr, ptr0, len0);
|
|
849
|
+
wasm.__wbg_queryparams_free(ptr, 0);
|
|
927
850
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
const len0 = WASM_VECTOR_LEN;
|
|
934
|
-
wasm.__wbg_set_sev__exportpem_ask(this.__wbg_ptr, ptr0, len0);
|
|
851
|
+
constructor() {
|
|
852
|
+
const ret = wasm.queryparams_new();
|
|
853
|
+
this.__wbg_ptr = ret >>> 0;
|
|
854
|
+
QueryParamsFinalization.register(this, this.__wbg_ptr, this);
|
|
855
|
+
return this;
|
|
935
856
|
}
|
|
936
857
|
/**
|
|
937
|
-
*
|
|
858
|
+
* Appends a query parameter.
|
|
859
|
+
*
|
|
860
|
+
* Reserved keywords for specific queries will get overwritten
|
|
861
|
+
* @param {string} key
|
|
862
|
+
* @param {string} value
|
|
863
|
+
* @returns {QueryParams}
|
|
938
864
|
*/
|
|
939
|
-
|
|
940
|
-
const
|
|
865
|
+
with(key, value) {
|
|
866
|
+
const ptr = this.__destroy_into_raw();
|
|
867
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
941
868
|
const len0 = WASM_VECTOR_LEN;
|
|
942
|
-
|
|
869
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
870
|
+
const len1 = WASM_VECTOR_LEN;
|
|
871
|
+
const ret = wasm.queryparams_with(ptr, ptr0, len0, ptr1, len1);
|
|
872
|
+
return QueryParams.__wrap(ret);
|
|
943
873
|
}
|
|
944
874
|
}
|
|
945
|
-
if (Symbol.dispose)
|
|
875
|
+
if (Symbol.dispose) QueryParams.prototype[Symbol.dispose] = QueryParams.prototype.free;
|
|
946
876
|
|
|
947
|
-
class
|
|
877
|
+
export class QuoteVerifier {
|
|
948
878
|
__destroy_into_raw() {
|
|
949
879
|
const ptr = this.__wbg_ptr;
|
|
950
880
|
this.__wbg_ptr = 0;
|
|
951
|
-
|
|
881
|
+
QuoteVerifierFinalization.unregister(this);
|
|
952
882
|
return ptr;
|
|
953
883
|
}
|
|
954
884
|
free() {
|
|
955
885
|
const ptr = this.__destroy_into_raw();
|
|
956
|
-
wasm.
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* @param {ParsedAttestation} attestation
|
|
960
|
-
* @returns {Promise<VerifiedChain>}
|
|
961
|
-
*/
|
|
962
|
-
fetch_certificates(attestation) {
|
|
963
|
-
_assertClass(attestation, ParsedAttestation);
|
|
964
|
-
const ret = wasm.kds_fetch_certificates(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
965
|
-
return ret;
|
|
886
|
+
wasm.__wbg_quoteverifier_free(ptr, 0);
|
|
966
887
|
}
|
|
967
888
|
/**
|
|
968
|
-
*
|
|
969
|
-
* @param {
|
|
970
|
-
* @returns {Promise<CRL>}
|
|
889
|
+
* @param {Collateral} collateral
|
|
890
|
+
* @param {TdxQuote} quote
|
|
971
891
|
*/
|
|
972
|
-
|
|
973
|
-
_assertClass(
|
|
974
|
-
|
|
975
|
-
|
|
892
|
+
constructor(collateral, quote) {
|
|
893
|
+
_assertClass(collateral, Collateral);
|
|
894
|
+
var ptr0 = collateral.__destroy_into_raw();
|
|
895
|
+
_assertClass(quote, TdxQuote);
|
|
896
|
+
var ptr1 = quote.__destroy_into_raw();
|
|
897
|
+
const ret = wasm.quoteverifier_new(ptr0, ptr1);
|
|
898
|
+
this.__wbg_ptr = ret >>> 0;
|
|
899
|
+
QuoteVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
900
|
+
return this;
|
|
976
901
|
}
|
|
977
902
|
/**
|
|
978
|
-
* @param {
|
|
903
|
+
* @param {TdxNonce} nonce
|
|
979
904
|
*/
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
905
|
+
verify(nonce) {
|
|
906
|
+
_assertClass(nonce, TdxNonce);
|
|
907
|
+
const ret = wasm.quoteverifier_verify(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
908
|
+
if (ret[1]) {
|
|
909
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
986
910
|
}
|
|
987
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
988
|
-
KdsFinalization.register(this, this.__wbg_ptr, this);
|
|
989
|
-
return this;
|
|
990
911
|
}
|
|
991
912
|
}
|
|
992
|
-
if (Symbol.dispose)
|
|
913
|
+
if (Symbol.dispose) QuoteVerifier.prototype[Symbol.dispose] = QuoteVerifier.prototype.free;
|
|
993
914
|
|
|
994
|
-
|
|
995
|
-
* Represents a parsed attestation report with some already
|
|
996
|
-
* parsed commonly accessed fields
|
|
997
|
-
*/
|
|
998
|
-
class ParsedAttestation {
|
|
915
|
+
export class ResponseHeaders {
|
|
999
916
|
static __wrap(ptr) {
|
|
1000
917
|
ptr = ptr >>> 0;
|
|
1001
|
-
const obj = Object.create(
|
|
918
|
+
const obj = Object.create(ResponseHeaders.prototype);
|
|
1002
919
|
obj.__wbg_ptr = ptr;
|
|
1003
|
-
|
|
920
|
+
ResponseHeadersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1004
921
|
return obj;
|
|
1005
922
|
}
|
|
1006
923
|
__destroy_into_raw() {
|
|
1007
924
|
const ptr = this.__wbg_ptr;
|
|
1008
925
|
this.__wbg_ptr = 0;
|
|
1009
|
-
|
|
926
|
+
ResponseHeadersFinalization.unregister(this);
|
|
1010
927
|
return ptr;
|
|
1011
928
|
}
|
|
1012
929
|
free() {
|
|
1013
930
|
const ptr = this.__destroy_into_raw();
|
|
1014
|
-
wasm.
|
|
1015
|
-
}
|
|
1016
|
-
/**
|
|
1017
|
-
* @returns {number}
|
|
1018
|
-
*/
|
|
1019
|
-
cpu_fam_id() {
|
|
1020
|
-
const ret = wasm.parsedattestation_cpu_fam_id(this.__wbg_ptr);
|
|
1021
|
-
return ret;
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* @returns {number}
|
|
1025
|
-
*/
|
|
1026
|
-
cpu_mod_id() {
|
|
1027
|
-
const ret = wasm.parsedattestation_cpu_mod_id(this.__wbg_ptr);
|
|
1028
|
-
return ret;
|
|
931
|
+
wasm.__wbg_responseheaders_free(ptr, 0);
|
|
1029
932
|
}
|
|
1030
933
|
/**
|
|
1031
|
-
*
|
|
1032
|
-
* @
|
|
1033
|
-
* @returns {ParsedAttestation}
|
|
934
|
+
* @param {string} name
|
|
935
|
+
* @returns {string | undefined}
|
|
1034
936
|
*/
|
|
1035
|
-
|
|
1036
|
-
const ptr0 =
|
|
937
|
+
get(name) {
|
|
938
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1037
939
|
const len0 = WASM_VECTOR_LEN;
|
|
1038
|
-
const ret = wasm.
|
|
1039
|
-
|
|
1040
|
-
|
|
940
|
+
const ret = wasm.responseheaders_get(this.__wbg_ptr, ptr0, len0);
|
|
941
|
+
let v2;
|
|
942
|
+
if (ret[0] !== 0) {
|
|
943
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
944
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1041
945
|
}
|
|
1042
|
-
return
|
|
946
|
+
return v2;
|
|
1043
947
|
}
|
|
1044
948
|
/**
|
|
1045
|
-
*
|
|
1046
|
-
* @param {VerifiedChain} chain
|
|
1047
|
-
* @param {SevNonce} nonce
|
|
949
|
+
* @returns {string[]}
|
|
1048
950
|
*/
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1055
|
-
}
|
|
951
|
+
keys() {
|
|
952
|
+
const ret = wasm.responseheaders_keys(this.__wbg_ptr);
|
|
953
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
954
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
955
|
+
return v1;
|
|
1056
956
|
}
|
|
1057
957
|
}
|
|
1058
|
-
if (Symbol.dispose)
|
|
958
|
+
if (Symbol.dispose) ResponseHeaders.prototype[Symbol.dispose] = ResponseHeaders.prototype.free;
|
|
1059
959
|
|
|
1060
|
-
class SevNonce {
|
|
960
|
+
export class SevNonce {
|
|
1061
961
|
static __wrap(ptr) {
|
|
1062
962
|
ptr = ptr >>> 0;
|
|
1063
963
|
const obj = Object.create(SevNonce.prototype);
|
|
@@ -1073,7 +973,7 @@ class SevNonce {
|
|
|
1073
973
|
}
|
|
1074
974
|
free() {
|
|
1075
975
|
const ptr = this.__destroy_into_raw();
|
|
1076
|
-
wasm.
|
|
976
|
+
wasm.__wbg_sevnonce_free(ptr, 0);
|
|
1077
977
|
}
|
|
1078
978
|
/**
|
|
1079
979
|
* @returns {SevNonce}
|
|
@@ -1100,10 +1000,94 @@ class SevNonce {
|
|
|
1100
1000
|
}
|
|
1101
1001
|
if (Symbol.dispose) SevNonce.prototype[Symbol.dispose] = SevNonce.prototype.free;
|
|
1102
1002
|
|
|
1003
|
+
export class TcbLevels {
|
|
1004
|
+
__destroy_into_raw() {
|
|
1005
|
+
const ptr = this.__wbg_ptr;
|
|
1006
|
+
this.__wbg_ptr = 0;
|
|
1007
|
+
TcbLevelsFinalization.unregister(this);
|
|
1008
|
+
return ptr;
|
|
1009
|
+
}
|
|
1010
|
+
free() {
|
|
1011
|
+
const ptr = this.__destroy_into_raw();
|
|
1012
|
+
wasm.__wbg_tcblevels_free(ptr, 0);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
if (Symbol.dispose) TcbLevels.prototype[Symbol.dispose] = TcbLevels.prototype.free;
|
|
1016
|
+
|
|
1017
|
+
export class TdxNonce {
|
|
1018
|
+
__destroy_into_raw() {
|
|
1019
|
+
const ptr = this.__wbg_ptr;
|
|
1020
|
+
this.__wbg_ptr = 0;
|
|
1021
|
+
TdxNonceFinalization.unregister(this);
|
|
1022
|
+
return ptr;
|
|
1023
|
+
}
|
|
1024
|
+
free() {
|
|
1025
|
+
const ptr = this.__destroy_into_raw();
|
|
1026
|
+
wasm.__wbg_tdxnonce_free(ptr, 0);
|
|
1027
|
+
}
|
|
1028
|
+
constructor() {
|
|
1029
|
+
const ret = wasm.tdxnonce_generate();
|
|
1030
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1031
|
+
TdxNonceFinalization.register(this, this.__wbg_ptr, this);
|
|
1032
|
+
return this;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* @returns {string}
|
|
1036
|
+
*/
|
|
1037
|
+
to_hex() {
|
|
1038
|
+
let deferred1_0;
|
|
1039
|
+
let deferred1_1;
|
|
1040
|
+
try {
|
|
1041
|
+
const ret = wasm.tdxnonce_to_hex(this.__wbg_ptr);
|
|
1042
|
+
deferred1_0 = ret[0];
|
|
1043
|
+
deferred1_1 = ret[1];
|
|
1044
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1045
|
+
} finally {
|
|
1046
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
if (Symbol.dispose) TdxNonce.prototype[Symbol.dispose] = TdxNonce.prototype.free;
|
|
1051
|
+
|
|
1052
|
+
export class TdxQuote {
|
|
1053
|
+
static __wrap(ptr) {
|
|
1054
|
+
ptr = ptr >>> 0;
|
|
1055
|
+
const obj = Object.create(TdxQuote.prototype);
|
|
1056
|
+
obj.__wbg_ptr = ptr;
|
|
1057
|
+
TdxQuoteFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1058
|
+
return obj;
|
|
1059
|
+
}
|
|
1060
|
+
__destroy_into_raw() {
|
|
1061
|
+
const ptr = this.__wbg_ptr;
|
|
1062
|
+
this.__wbg_ptr = 0;
|
|
1063
|
+
TdxQuoteFinalization.unregister(this);
|
|
1064
|
+
return ptr;
|
|
1065
|
+
}
|
|
1066
|
+
free() {
|
|
1067
|
+
const ptr = this.__destroy_into_raw();
|
|
1068
|
+
wasm.__wbg_tdxquote_free(ptr, 0);
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Attempts to parse a quote from DCAP bytes.
|
|
1072
|
+
* @param {Uint8Array} quote
|
|
1073
|
+
* @returns {TdxQuote}
|
|
1074
|
+
*/
|
|
1075
|
+
static from_bytes(quote) {
|
|
1076
|
+
const ptr0 = passArray8ToWasm0(quote, wasm.__wbindgen_malloc);
|
|
1077
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1078
|
+
const ret = wasm.tdxquote_from_bytes(ptr0, len0);
|
|
1079
|
+
if (ret[2]) {
|
|
1080
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1081
|
+
}
|
|
1082
|
+
return TdxQuote.__wrap(ret[0]);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
if (Symbol.dispose) TdxQuote.prototype[Symbol.dispose] = TdxQuote.prototype.free;
|
|
1086
|
+
|
|
1103
1087
|
/**
|
|
1104
1088
|
* A chain which has been cryptographically verified
|
|
1105
1089
|
*/
|
|
1106
|
-
class VerifiedChain {
|
|
1090
|
+
export class VerifiedChain {
|
|
1107
1091
|
static __wrap(ptr) {
|
|
1108
1092
|
ptr = ptr >>> 0;
|
|
1109
1093
|
const obj = Object.create(VerifiedChain.prototype);
|
|
@@ -1119,7 +1103,7 @@ class VerifiedChain {
|
|
|
1119
1103
|
}
|
|
1120
1104
|
free() {
|
|
1121
1105
|
const ptr = this.__destroy_into_raw();
|
|
1122
|
-
wasm.
|
|
1106
|
+
wasm.__wbg_verifiedchain_free(ptr, 0);
|
|
1123
1107
|
}
|
|
1124
1108
|
/**
|
|
1125
1109
|
* parses a triad of ark, ask and vek certificates in the PEM format,
|
|
@@ -1155,13 +1139,14 @@ class VerifiedChain {
|
|
|
1155
1139
|
}
|
|
1156
1140
|
if (Symbol.dispose) VerifiedChain.prototype[Symbol.dispose] = VerifiedChain.prototype.free;
|
|
1157
1141
|
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1142
|
+
/**
|
|
1143
|
+
* Same as [`KeyChain:fetch_keychain`], put in for better wasm compatibility
|
|
1144
|
+
* @returns {Promise<KeyChain>}
|
|
1145
|
+
*/
|
|
1146
|
+
export function fetch_keychain() {
|
|
1147
|
+
const ret = wasm.fetch_keychain();
|
|
1148
|
+
return ret;
|
|
1149
|
+
}
|
|
1165
1150
|
export function __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57(arg0, arg1) {
|
|
1166
1151
|
const ret = debugString(arg1);
|
|
1167
1152
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1241,6 +1226,10 @@ export function __wbg_collateral_new(arg0) {
|
|
|
1241
1226
|
const ret = Collateral.__wrap(arg0);
|
|
1242
1227
|
return ret;
|
|
1243
1228
|
}
|
|
1229
|
+
export function __wbg_crl_new(arg0) {
|
|
1230
|
+
const ret = CRL.__wrap(arg0);
|
|
1231
|
+
return ret;
|
|
1232
|
+
}
|
|
1244
1233
|
export function __wbg_crypto_48300657fced39f9(arg0) {
|
|
1245
1234
|
const ret = arg0.crypto;
|
|
1246
1235
|
return ret;
|
|
@@ -1313,6 +1302,10 @@ export function __wbg_iterator_de403ef31815a3e6() {
|
|
|
1313
1302
|
const ret = Symbol.iterator;
|
|
1314
1303
|
return ret;
|
|
1315
1304
|
}
|
|
1305
|
+
export function __wbg_keychain_new(arg0) {
|
|
1306
|
+
const ret = KeyChain.__wrap(arg0);
|
|
1307
|
+
return ret;
|
|
1308
|
+
}
|
|
1316
1309
|
export function __wbg_length_0c32cb8543c8e4c8(arg0) {
|
|
1317
1310
|
const ret = arg0.length;
|
|
1318
1311
|
return ret;
|
|
@@ -1391,14 +1384,14 @@ export function __wbg_node_95beb7570492fd97(arg0) {
|
|
|
1391
1384
|
const ret = arg0.node;
|
|
1392
1385
|
return ret;
|
|
1393
1386
|
}
|
|
1394
|
-
export function __wbg_nvidia__keychain_new(arg0) {
|
|
1395
|
-
const ret = KeyChain.__wrap(arg0);
|
|
1396
|
-
return ret;
|
|
1397
|
-
}
|
|
1398
1387
|
export function __wbg_nvidiaattestresult_new(arg0) {
|
|
1399
1388
|
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1400
1389
|
return ret;
|
|
1401
1390
|
}
|
|
1391
|
+
export function __wbg_parsedattestation_new(arg0) {
|
|
1392
|
+
const ret = ParsedAttestation.__wrap(arg0);
|
|
1393
|
+
return ret;
|
|
1394
|
+
}
|
|
1402
1395
|
export function __wbg_process_b2fea42461d03994(arg0) {
|
|
1403
1396
|
const ret = arg0.process;
|
|
1404
1397
|
return ret;
|
|
@@ -1467,18 +1460,6 @@ export function __wbg_set_name_ab9c98596fd7310a(arg0, arg1, arg2) {
|
|
|
1467
1460
|
export function __wbg_set_signal_8564a226c5c6853c(arg0, arg1) {
|
|
1468
1461
|
arg0.signal = arg1;
|
|
1469
1462
|
}
|
|
1470
|
-
export function __wbg_sev__crl_new(arg0) {
|
|
1471
|
-
const ret = CRL.__wrap(arg0);
|
|
1472
|
-
return ret;
|
|
1473
|
-
}
|
|
1474
|
-
export function __wbg_sev__parsedattestation_new(arg0) {
|
|
1475
|
-
const ret = ParsedAttestation.__wrap(arg0);
|
|
1476
|
-
return ret;
|
|
1477
|
-
}
|
|
1478
|
-
export function __wbg_sev__verifiedchain_new(arg0) {
|
|
1479
|
-
const ret = VerifiedChain.__wrap(arg0);
|
|
1480
|
-
return ret;
|
|
1481
|
-
}
|
|
1482
1463
|
export function __wbg_signal_9172c3282bfba2f5(arg0) {
|
|
1483
1464
|
const ret = arg0.signal;
|
|
1484
1465
|
return ret;
|
|
@@ -1538,6 +1519,10 @@ export function __wbg_value_7f6052747ccf940f(arg0) {
|
|
|
1538
1519
|
const ret = arg0.value;
|
|
1539
1520
|
return ret;
|
|
1540
1521
|
}
|
|
1522
|
+
export function __wbg_verifiedchain_new(arg0) {
|
|
1523
|
+
const ret = VerifiedChain.__wrap(arg0);
|
|
1524
|
+
return ret;
|
|
1525
|
+
}
|
|
1541
1526
|
export function __wbg_versions_215a3ab1c9d5745a(arg0) {
|
|
1542
1527
|
const ret = arg0.versions;
|
|
1543
1528
|
return ret;
|
|
@@ -1618,7 +1603,7 @@ const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1618
1603
|
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr >>> 0, 1));
|
|
1619
1604
|
const CRLFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1620
1605
|
? { register: () => {}, unregister: () => {} }
|
|
1621
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1606
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_crl_free(ptr >>> 0, 1));
|
|
1622
1607
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1623
1608
|
? { register: () => {}, unregister: () => {} }
|
|
1624
1609
|
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
|
|
@@ -1630,22 +1615,22 @@ const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1630
1615
|
: new FinalizationRegistry(ptr => wasm.__wbg_collateral_free(ptr >>> 0, 1));
|
|
1631
1616
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1632
1617
|
? { register: () => {}, unregister: () => {} }
|
|
1633
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1618
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr >>> 0, 1));
|
|
1634
1619
|
const EATTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1635
1620
|
? { register: () => {}, unregister: () => {} }
|
|
1636
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1621
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eattoken_free(ptr >>> 0, 1));
|
|
1637
1622
|
const ExportPemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1638
1623
|
? { register: () => {}, unregister: () => {} }
|
|
1639
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1624
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_exportpem_free(ptr >>> 0, 1));
|
|
1640
1625
|
const GatewayErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1641
1626
|
? { register: () => {}, unregister: () => {} }
|
|
1642
1627
|
: new FinalizationRegistry(ptr => wasm.__wbg_gatewayerror_free(ptr >>> 0, 1));
|
|
1643
1628
|
const KdsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1644
1629
|
? { register: () => {}, unregister: () => {} }
|
|
1645
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1630
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_kds_free(ptr >>> 0, 1));
|
|
1646
1631
|
const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1647
1632
|
? { register: () => {}, unregister: () => {} }
|
|
1648
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1633
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keychain_free(ptr >>> 0, 1));
|
|
1649
1634
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1650
1635
|
? { register: () => {}, unregister: () => {} }
|
|
1651
1636
|
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr >>> 0, 1));
|
|
@@ -1654,10 +1639,10 @@ const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefin
|
|
|
1654
1639
|
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr >>> 0, 1));
|
|
1655
1640
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1656
1641
|
? { register: () => {}, unregister: () => {} }
|
|
1657
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1642
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_nvidianonce_free(ptr >>> 0, 1));
|
|
1658
1643
|
const ParsedAttestationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1659
1644
|
? { register: () => {}, unregister: () => {} }
|
|
1660
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1645
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_parsedattestation_free(ptr >>> 0, 1));
|
|
1661
1646
|
const PcsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1662
1647
|
? { register: () => {}, unregister: () => {} }
|
|
1663
1648
|
: new FinalizationRegistry(ptr => wasm.__wbg_pcs_free(ptr >>> 0, 1));
|
|
@@ -1672,7 +1657,7 @@ const ResponseHeadersFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
1672
1657
|
: new FinalizationRegistry(ptr => wasm.__wbg_responseheaders_free(ptr >>> 0, 1));
|
|
1673
1658
|
const SevNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1674
1659
|
? { register: () => {}, unregister: () => {} }
|
|
1675
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1660
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sevnonce_free(ptr >>> 0, 1));
|
|
1676
1661
|
const TcbLevelsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1677
1662
|
? { register: () => {}, unregister: () => {} }
|
|
1678
1663
|
: new FinalizationRegistry(ptr => wasm.__wbg_tcblevels_free(ptr >>> 0, 1));
|
|
@@ -1684,7 +1669,7 @@ const TdxQuoteFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1684
1669
|
: new FinalizationRegistry(ptr => wasm.__wbg_tdxquote_free(ptr >>> 0, 1));
|
|
1685
1670
|
const VerifiedChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1686
1671
|
? { register: () => {}, unregister: () => {} }
|
|
1687
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1672
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_verifiedchain_free(ptr >>> 0, 1));
|
|
1688
1673
|
|
|
1689
1674
|
function addToExternrefTable0(obj) {
|
|
1690
1675
|
const idx = wasm.__externref_table_alloc();
|