#
tokens: 31107/50000 3/54 files (page 2/3)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 2 of 3. Use http://codebase.md/0xfreysa/trusted-mcp-server?lines=true&page={x} to view the full context.

# Directory Structure

```
├── Dockerfile
├── gmail_mcp
│   ├── pyproject.toml
│   └── server.py
├── gvproxy.sh
├── Makefile
├── README.md
├── run-enclave.sh
├── setup.sh
├── start.sh
└── verifier
    ├── mcp
    │   └── react-ts-webpack
    │       ├── index.ejs
    │       ├── package.json
    │       ├── pnpm-lock.yaml
    │       ├── postcss.config.js
    │       ├── README.md
    │       ├── src
    │       │   ├── app.css
    │       │   ├── app.tsx
    │       │   ├── components
    │       │   │   ├── alert.tsx
    │       │   │   ├── button.tsx
    │       │   │   ├── shadcn.tsx
    │       │   │   ├── verify-mcp.tsx
    │       │   │   └── verify-tee.tsx
    │       │   └── utils
    │       │       ├── misc.ts
    │       │       ├── requests.ts
    │       │       └── worker.ts
    │       ├── tailwind.config.js
    │       ├── tsconfig.json
    │       └── webpack.js
    ├── package.json
    ├── pnpm-lock.yaml
    ├── rust-toolchain
    ├── serve.json
    ├── src
    │   ├── lib.ts
    │   ├── types.ts
    │   └── utils.ts
    ├── test
    │   ├── assets
    │   │   ├── notary.pem
    │   │   ├── simple_proof_expected.json
    │   │   └── simple_proof_redacted.json
    │   ├── specs
    │   │   ├── full-integration-swapi.spec.ts
    │   │   └── simple-verify.spec.ts
    │   ├── test.ejs
    │   ├── testRunner.ts
    │   ├── utils.ts
    │   └── worker.ts
    ├── tsconfig.compile.json
    ├── tsconfig.json
    ├── utils
    │   ├── build-tlsn-binaries.sh
    │   └── check-wasm.sh
    ├── wasm
    │   ├── pkg
    │   │   ├── package.json
    │   │   ├── README.md
    │   │   ├── snippets
    │   │   │   ├── wasm-bindgen-futures-a509390b5b548b61
    │   │   │   │   └── src
    │   │   │   │       └── task
    │   │   │   │           └── worker.js
    │   │   │   └── wasm-bindgen-rayon-3e04391371ad0a8e
    │   │   │       └── src
    │   │   │           ├── workerHelpers.js
    │   │   │           └── workerHelpers.worker.js
    │   │   ├── tlsn_wasm_bg.wasm
    │   │   ├── tlsn_wasm_bg.wasm.d.ts
    │   │   ├── tlsn_wasm.d.ts
    │   │   └── tlsn_wasm.js
    │   └── remote-attestation-verifier
    │       ├── package.json
    │       ├── remote_attestation_verifier_bg.wasm
    │       ├── remote_attestation_verifier_bg.wasm.d.ts
    │       ├── remote_attestation_verifier.d.ts
    │       └── remote_attestation_verifier.js
    ├── webpack.build.config.js
    └── webpack.web.dev.config.js
```

# Files

--------------------------------------------------------------------------------
/verifier/test/specs/simple-verify.spec.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { TlsProof as _TlsProof } from '../../src/lib';
 2 | import { assert } from '../utils';
 3 | import * as Comlink from 'comlink';
 4 | 
 5 | const { init, TlsProof }: any = Comlink.wrap(
 6 |   // @ts-ignore
 7 |   new Worker(new URL('../worker.ts', import.meta.url)),
 8 | );
 9 | 
10 | (async function verify_simple() {
11 |   try {
12 |     await init({ loggingLevel: 'Debug' });
13 | 
14 |     console.time('verify');
15 |     const proofHex = `ec5957996676ebb7a9fae815b95fc1810f51da828330451a98ac42d0fba400a04fdceca500ec864f455f80059eb489f39479fc6627a07c6b878fa12a4d0b81a18800000000000000d50300000000000083d0b96600000000000000004100000000000000048b68632f53328caddef6fd3bd7fb941e86817baa8c253b208c244842ecabef403f0ecfff9b8677be3126b746b74e87fcfd07c7dcde3630c184ddf2b6f8a751b4cfd0297a1196dab752fe9c8a178292c689e53b8c1d5705c117451402d1f7d90901000000007ea696ce46ee2a8d47d740d0bed704382a09b947cbd195467516bcc98823c33d2fb1f3a987a2cf7f26f675a14da6632c08797a1f62cecc68037dbcc7e442154c00000000090000000000000073776170692e646576f55ad8214e395cff68b4473e01edd56f7ae8fb13a82bb7a14dd15209ea92cc820200000000000000e504000000000000308204e1308203c9a0030201020212040e6bddc9c867581bd1fe861e51effc6741300d06092a864886f70d01010b05003033310b300906035504061302555331163014060355040a130d4c6574277320456e6372797074310c300a06035504031303523130301e170d3234303732353138313030325a170d3234313032333138313030315a3014311230100603550403130973776170692e64657630820122300d06092a864886f70d01010105000382010f003082010a0282010100ab14ab8a1c5d57666595d89614a985463bcb64057e324b5f747da1fc3ad527b0c3582849971c07e8815bed09414e5e18bde5e353bf8d9df4662c858dc39614cd2c2f688c413ebe38738db4e812b9505149e777ff2f694a3318ffe04f62f7052c7442b73515f2058b9c6db5f94daea900eba8c1c8dd0db05f7467996f73cb7ffc7ce930e0f2e95d6c420dba923412065003ea8ba716a0232f2dfd16368f6274fb23663b7561b8f38d3b061c49e5b5d35bba2b03f428af683074b38b33d6fcde4a9722a800ad4d4fba2cdf22b0b1444dc744c322c597fee0edc698fdd3c7cfaaa8fa63c23529b6995863552636dbadb358281bdf16ab7c5236a4eeb9ae2352aee10203010001a382020c30820208300e0603551d0f0101ff0404030205a0301d0603551d250416301406082b0601050507030106082b06010505070302300c0603551d130101ff04023000301d0603551d0e041604145b2712a1f0716bc6a81589f49af7ba123c7bfdac301f0603551d23041830168014bbbcc347a5e4bca9c6c3a4720c108da235e1c8e8305706082b06010505070101044b3049302206082b060105050730018616687474703a2f2f7231302e6f2e6c656e63722e6f7267302306082b060105050730028617687474703a2f2f7231302e692e6c656e63722e6f72672f30140603551d11040d300b820973776170692e64657630130603551d20040c300a3008060667810c01020130820103060a2b06010401d6790204020481f40481f100ef0075003f174b4fd7224758941d651c84be0d12ed90377f1f856aebc1bf2885ecf8646e00000190eb4ce2b30000040300463044022002dc6df6010b672341044a043bd0f226a8e7d82a91ec625b538caecc86e7a128022011f0a85da14142642ead5e2a9d48fd44914940df2044942500097f313693a1e100760048b0e36bdaa647340fe56a02fa9d30eb1c5201cb56dd2c81d9bbbfab39d8847300000190eb4ce2aa00000403004730450220720519eda2def160c991ea840ccc032f42f7f1ff32a200d9a2699c62366b7fbb022100de0aa1bff38efdef5c4e4ee8ae42eb02831a95d8c5a5df32a94c01672efc70e7300d06092a864886f70d01010b050003820101001386e3aa6c1e17247420870f89615f903c5020df62fa842e24a950516e6c7c82002befe448326db8b1baecdd7484c41b5256fc64b0f727e96e57189e45dbb6b7d9b8fcb4600154b1620738781643129a763c4761bb5e8781a11157654fc3fafad14c654e5dc8c3b131e61023ea03b9285bc651ff209f31a8d617b42524644731233ed88a5722a4ed5406ff6c877c20ed55fce6eb377d3d4018dbba99ba680932772cf1bb07d7e8e48cb1b210d1780ce168738e4d78bcf1da5a619c07d645629b5b0a3d0dca55aef13f24dc592266cf39fb1cdccca25a93f270c56c581776ba87a52cc7291496cd5feac433dffb986c7484643233232e11fa893634d0c7fc3bd9090500000000000030820505308202eda00302010202104ba85293f79a2fa273064ba8048d75d0300d06092a864886f70d01010b0500304f310b300906035504061302555331293027060355040a1320496e7465726e65742053656375726974792052657365617263682047726f7570311530130603550403130c4953524720526f6f74205831301e170d3234303331333030303030305a170d3237303331323233353935395a3033310b300906035504061302555331163014060355040a130d4c6574277320456e6372797074310c300a0603550403130352313030820122300d06092a864886f70d01010105000382010f003082010a0282010100cf57e5e6c45412edb447fec92758764650288c1d3e88df059dd5b51829bdddb55abffaf6cea3beaf00214b625a5a3c012fc55803f689ff8e1143ebc1b5e01407968f6f1fd7e7ba8139097565b7c2af185b372628e7a3f4072b6d1affab58bc95ae40ffe9cb57c4b55b7f780d1861bc17e754c6bb4991cd6e18d18085eea66536bc74eabc504ceafc21f338169394bab0d36b3806cd16127aca5275c8ad76b2c29c5d98455c6f617bc62dee3c13528601d957e6381cdf8db51f92919ae74a1ccc45a87255f0b0e6a307ecfda71b669e3f488b71847158c93afaef5ef25b442b3c74e78fb247c1076acd9ab70d96f712812651540aec61f6f7f5e2f28ac8950d8d0203010001a381f83081f5300e0603551d0f0101ff040403020186301d0603551d250416301406082b0601050507030206082b0601050507030130120603551d130101ff040830060101ff020100301d0603551d0e04160414bbbcc347a5e4bca9c6c3a4720c108da235e1c8e8301f0603551d2304183016801479b459e67bb6e5e40173800888c81a58f6e99b6e303206082b0601050507010104263024302206082b060105050730028616687474703a2f2f78312e692e6c656e63722e6f72672f30130603551d20040c300a3008060667810c01020130270603551d1f0420301e301ca01aa0188616687474703a2f2f78312e632e6c656e63722e6f72672f300d06092a864886f70d01010b0500038202010092b1e74137eb799d81e6cde225e13a20e9904495a3815ccfc35dfdbda070d5b19628220bd2f228cf0ce7d4e6438c24221dc14292d109af9f4bf4c8704f2016b15add01f61ff81f616b1427b0728d63aeeee2ce4bcf37ddbba3d4cde7ad50adbdbfe3ec3e6236709931a7e88dddea62e212aef59cd43d2c0caad09c79beea3d5c446e9631635a7dd67e4f24a04b057f5e6fd2d4ea5f334b13d657b6cade51b85da3098274fdc7789eb3b9ac16da4a2b96c3b68b628ff97419a29e03dee96f9bb00fd2a05af6855cc204b7c8d54e32c4bf045dbc29f6f7818f0c5d3c53c940908bfbb60865b9a421d509e51384843782ce1028fc76c206257a46524dda5372a4273f6270acbe694800fb670fdb5ba1e8d703212dd7c9f69942398343df770a1208f125d6ba9419541888a5c58ee11a9993796bec1cf93140b0cc3200df9f5ee7b492ab9082918d0de01e95ba593b2e4b5fc2b74635523906c0bdaaac52c122a0449799f70ca021a7a16c714716170168c0caa62665047cb3aec9e79455c26f9b3c1ca9f92ec5201af076e0beec18d64fd825fb7611e8bfe6210fe8e8ccb5b6a7d5b8f79f41cf6122466a83b668972e7cea4e95db23eb2ec82b2884a460e949f4442e3bf9ca625701e25d9016f9c9fc7a23488ea6d58172f128fa5dcefbed4e738f942ed241949899dba7af705ff5befb0220bf66276cb4adfa75120b2b3ece039e000000000000000000450000000000000003001741048b68632f53328caddef6fd3bd7fb941e86817baa8c253b208c244842ecabef403f0ecfff9b8677be3126b746b74e87fcfd07c7dcde3630c184ddf2b6f8a751b40600000000010000000000009d5146d5eacf609424a546a7b5532f54b60477c42ef1d511f2043da4d477dc19cc4dffb952bcc2a7754fbd0d58e2bc661a22cb037884bb796a59f7a6174e9f6c83dd800348dc6003135b40a2d29f63e9dc3b3f58092d12e51d831d0ae6703d8da918608c9e16516a7d702124ac898960cb7715d69219913d2d67284075a3480516c92fe6f28755428edf2fa92b0ed7a85631c346fc967e684ae417c41b70eb4971fe48b9139d00f0f7039ae7dd2724287c977ab906866e8cd59e6d0a08b33480736174d338b7773556404b97233dbec2bb0fd4cf188d28803d1d6468ddbdf11fedcf46ad0c4410661d5d198a3c7c28b2d81cbf8e4903edfa63de5caececda0035933d5b159e211a21317fa891cc4fdb5d7a55ca2c420759e72a39a5652212403c035ed659e636c81f1b36c4de9d53e36c9c8bea8d58a0303ec6f1525070ba9f43e000000000000000c00000000000000010000000000000084000000000000008500000000000000000000000000000001000000000000000d96ea206d6cb514d4a521403a8f703df35a343096122e178bc371f4e6f977f8b80f00000000000000010000000000000087000000000000008800000000000000000000000000000001000000000000000a3ea7ca7907af7a044eda999f335e90be84d922f9ba85be940150b43a8bb8985b0d00000000000000010000000000000085000000000000008600000000000000000000000000000001000000000000000aa2978b41a6fc1cdcecad50e11a8ced659c5488a1fd1c398236ddee36ac4fb13c0b00000000000000010000000000000074000000000000007500000000000000000000000000000001000000000000000af8a18f79bb1e69ed549129fc14446b219ff2dd9105cdcffbc259e3d877bd12501900000000000000010000000000000013010000000000003e0100000000000001000000000000002b000000000000005374726963742d5472616e73706f72742d53656375726974793a206d61782d6167653d31353736383030304c1cb0fcb15fdc9f6a3caa4e5653bc0d00717fc341bd9d28a3370751d824ad8a300000000000000001000000000000003f010000000000004001000000000000010000000000000001000000000000000a8195e9e6fb4776adad311559b8258b3e4aa71d4468e99f76d491ac6de654614c130000000000000001000000000000006c00000000000000860000000000000001000000000000001a000000000000005472616e736665722d456e636f64696e673a206368756e6b656493951defb16681d7e39b835ccf7c1ff00f55f6bab0665298cfc5d499e08aba592f0000000000000001000000000000003e010000000000003f01000000000000010000000000000001000000000000000d19eb18e0780cc4bd5f52a5462ebad35d1286aa0be47e5a018f61e25b26099b910300000000000000010000000000000000000000000000002b0000000000000000000000000000002b000000000000004745542068747470733a2f2f73776170692e6465762f6170692f70656f706c652f3120485454502f312e3191f6427b0957d686f9d019c78a4b759dc73ca58d23012ede5036f5318265afe73200000000000000010000000000000041010000000000004201000000000000010000000000000001000000000000000a185f1b2cb31096c5c0b5dee69bc955921e2af2fe004e538fbbcc8683df4986fe2a000000000000000100000000000000cd00000000000000ce00000000000000010000000000000001000000000000000a7e6e59de6e12f0d94b46c369ed893368a9d31bd835a5adbd399f2b938ec60fef2b000000000000000100000000000000f600000000000000f700000000000000010000000000000001000000000000000da561eb1758111ed2f7b7668f71d217c4c74f7d1c5801cd9bbe8e35d294eed47c0a00000000000000010000000000000073000000000000007400000000000000000000000000000001000000000000000d391781437999aab0326c51a126148d35b9269c2c284892b4b0b3d132e3009f0416000000000000000100000000000000b100000000000000cc0000000000000001000000000000001b00000000000000582d4672616d652d4f7074696f6e733a2053414d454f524947494e34bf35470e84cd2d9be6e420614d8eb6156b3cf392cf7d31168e1cecdddbd49729000000000000000100000000000000cc00000000000000cd00000000000000010000000000000001000000000000000d4f250e99698e7a42429d7697d3430ee6d97946d1ab545aa2f78dabef14a35443260000000000000001000000000000009a000000000000009b00000000000000010000000000000001000000000000000a2ad5b887a7cbdb9c0c063f37e45c373934e8dae42663414e6368da3ac2e4ab4028000000000000000100000000000000b000000000000000b100000000000000010000000000000001000000000000000a9ade1262ce9d20636872c5195612797fc63c5b128b508b731f2fa5f00c13eec8050000000000000001000000000000002c000000000000002d00000000000000000000000000000001000000000000000a2db755cd1a725ceca8f82dbaaa511f6148cb5503751ef9576e2df9f6291f1407040000000000000001000000000000002b000000000000002c00000000000000000000000000000001000000000000000d78f1fa51a78c78cedb3b417c049cf5a9cc21b8a88909af2aa3dcba6a8c8879b82d00000000000000010000000000000011010000000000001201000000000000010000000000000001000000000000000dc1be20726463291e024c5cee58f71c048b51293ed506fcd6e16cd225e3840970140000000000000001000000000000008800000000000000990000000000000001000000000000001100000000000000436f6e6e656374696f6e3a20636c6f7365c2babe38c5b1dd0f05083790b3a517b314c2856b2e514b334f7f37809c34ab4d17000000000000000100000000000000ce00000000000000f60000000000000001000000000000002800000000000000455461673a20226565333938363130343335633332386634643061346531623064326637626263221fa41cfa8a43f9c429362030ebfc485b7f22760be68a857ba363ca07f4d5c3841a00000000000000010000000000000000000000000000000f0000000000000001000000000000000f00000000000000485454502f312e3120323030204f4b5fd6cde8f919ba0651fc0fa175b1e8b0757c6059614797bee69ab28cb1306b0a1c00000000000000010000000000000010000000000000001100000000000000010000000000000001000000000000000a8d5e96737b598e8b0e066b3d41d6c75403567f8f05a1507a8aa5d57a537586d8220000000000000001000000000000006b000000000000006c00000000000000010000000000000001000000000000000ac4f99df5c308cf1ad9767055247b6bc178b58ce5083386ad7274e6ace5aacd3a2300000000000000010000000000000086000000000000008700000000000000010000000000000001000000000000000d3cb4641d2933f9188a63e9a972bfd6ed61a6072cb04b8a65bb3cef1114c07b2e39000000000000000100000000000000d303000000000000d403000000000000010000000000000001000000000000000d6809f86ac50d7ee3571e5fa6d62174fc7ea40f85b078387625c0057f01ec54d12e00000000000000010000000000000012010000000000001301000000000000010000000000000001000000000000000a824f8ac9162621f92208b25371907f6275d1b4dae50bca84deee6b79e42414b1120000000000000001000000000000004c000000000000006a0000000000000001000000000000001e00000000000000436f6e74656e742d547970653a206170706c69636174696f6e2f6a736f6e9ce594f77e4978550932f5d37bb61840ecce13cbe72423e9c223b1778ab4be5837000000000000000100000000000000d103000000000000d203000000000000010000000000000001000000000000000dc3b9d065640a3a95ff63029bc7d3f665f2bb0d0cb853aa0a3eb49f85b51968b13a000000000000000100000000000000d403000000000000d503000000000000010000000000000001000000000000000a0f807fcc122d881d8c975b095ff3ab1451c0582f44a87a8b412c68df8111d7121b0000000000000001000000000000000f000000000000001000000000000000010000000000000001000000000000000d38f49f3d34cfa61378015e4452f7cdf5daa757d5f90adfd5f90e3885c624ff7c0100000000000000010000000000000040000000000000005e0000000000000000000000000000001e00000000000000636f6e74656e742d747970653a206170706c69636174696f6e2f6a736f6eea8a9887350c64d961458aeb624f9cacbe5a3eabfc27fe586370445ad5b16a69150000000000000001000000000000009b00000000000000af0000000000000001000000000000001400000000000000566172793a204163636570742c20436f6f6b6965fc5a7ad9d7076f630ced01ffade7c60452750b0221921196c0128b9ae2c14d79080000000000000001000000000000005e000000000000005f00000000000000000000000000000001000000000000000dc223c0a0710aa6aafe2b9b63fc55c75e323c54ac09aa26d697b26e7a953d84a0000000000000000001000000000000002d000000000000003e0000000000000000000000000000001100000000000000636f6e6e656374696f6e3a20636c6f7365b1ca8bada5de8742fb4b1529cadaa44b8846172f50640b6ad8c841cf7cb71e051100000000000000010000000000000027000000000000004a0000000000000001000000000000002300000000000000446174653a204d6f6e2c2031322041756720323032342030393a30363a313420474d54d4182cd518018b0682322fb898162712db26c55b65e4a7e62e676a1cac51d0a0060000000000000001000000000000003e000000000000003f00000000000000000000000000000001000000000000000d7535c4bd59ea5028214ca997f9959c0dcef89b2c22fbad6e5c732eb4a8c201cd1000000000000000010000000000000011000000000000002500000000000000010000000000000014000000000000005365727665723a206e67696e782f312e31362e31dde166c44d35970fe58402beb14a2b8c2c76b8f9bda5acc070532f13107be1041e00000000000000010000000000000026000000000000002700000000000000010000000000000001000000000000000af89d3abf1d5865424fdb77a64717a8d91ee3cea0ee82b30599ed536ec55aa1f53100000000000000010000000000000040010000000000004101000000000000010000000000000001000000000000000d1aaafceee08d60020624b60a0d662447b5bd312d59c137b9c515e80c104fbd74200000000000000001000000000000004b000000000000004c00000000000000010000000000000001000000000000000a5840710fc7c0c7aa80c18bae02039128b0c3812783c82aa93be577915d3f70d73400000000000000010000000000000046010000000000004701000000000000010000000000000001000000000000000a12219d2d9de8ac0f025793a72012d193b9a1e88645fe728fa442ff67af3406fc0e00000000000000010000000000000086000000000000008700000000000000000000000000000001000000000000000d23ee390e5a382e87e2ff17b8bd3fba8217cc22f89258bf2803eda68d9e3ffbfb18000000000000000100000000000000f800000000000000110100000000000001000000000000001900000000000000416c6c6f773a204745542c20484541442c204f5054494f4e531c00a0bcc34c4e940f89a1b3de0a3b84434dee9e3c334ab2d88028a1e629697e3c0000000000000001000000000000007b010000000000008f010000000000000100000000000000140000000000000022686169725f636f6c6f72223a22626c6f6e64229369bfd64d9a4d0e86ccc6c7f445c02a58f73668af8849561909c2a9ac51514127000000000000000100000000000000af00000000000000b000000000000000010000000000000001000000000000000d49237ad294a8a63cae251b6d2fa87d40a07a74a9409d9e3fe36e3d709297c3f535000000000000000100000000000000ce03000000000000cf03000000000000010000000000000001000000000000000dc81c989bbafe60febde627f6a168e52fa88f7a5c92eca55c1019b6de1a5d86da36000000000000000100000000000000cf03000000000000d003000000000000010000000000000001000000000000000afd886fa5c8607003090aa3fab243fae4616c487dd15d81dd802f8a4bb67907b43300000000000000010000000000000045010000000000004601000000000000010000000000000001000000000000000d6e68c045711cf1e6af7f0f4e6d08bd228079d08848919469d3868732b6872c7e210000000000000001000000000000006a000000000000006b00000000000000010000000000000001000000000000000d7352c55880b9df7aa73a1b1d190b4a90efb11adfcb469c90ff9c8981000cb60c020000000000000001000000000000007500000000000000840000000000000000000000000000000f00000000000000686f73743a2073776170692e6465768cb75633fd51040f767560709611c315317d6413582979d4a64d5e83a51a35332400000000000000010000000000000087000000000000008800000000000000010000000000000001000000000000000a153fa7b21dfb2773ff3762b00af6821e2d0c5ec8bf533aa4f43d1f57c18b504d090000000000000001000000000000005f000000000000006000000000000000000000000000000001000000000000000aa7dfbe3c9a5bad316bb4fb9e270de851674cd014e2f599873175fcbdf58fe468070000000000000001000000000000003f000000000000004000000000000000000000000000000001000000000000000a5a6ed55ff196b48e1cfe516d9d8edd3524ec83cea8e012ad30f6cb7d9cad59a73d0000000000000001000000000000009001000000000000a3010000000000000100000000000000130000000000000022736b696e5f636f6c6f72223a226661697222ed76c9d8a2592a8558e125d57ea4ebc09c7c8c2fb295861a67ddb4feaa6362273b00000000000000010000000000000048010000000000005f0100000000000001000000000000001700000000000000226e616d65223a224c756b6520536b7977616c6b65722224d38a6c588dbd4dafd2537e4fd30524496dc27e883f5fc1bf3ee963687c52dc2500000000000000010000000000000099000000000000009a00000000000000010000000000000001000000000000000de63e2efda1904a47fbcc650d33a69a52ccc4790c0f9c4d1ce6a981bf7d599a7038000000000000000100000000000000d203000000000000d303000000000000010000000000000001000000000000000a144f0599d0f524c0c13420fcf3b0c95c4d47541cad82f7fd6fbb8b6e8bf8dc931d00000000000000010000000000000025000000000000002600000000000000010000000000000001000000000000000debc5da6e2952358474248c5271436e6cf125ff89e62de8b557936bd07d6eb2681f0000000000000001000000000000004a000000000000004b00000000000000010000000000000001000000000000000dd5a8b218331287f4c1160b03144cb80f3ab4c6dccfee0b7f4844b50c81ee86262c000000000000000100000000000000f700000000000000f800000000000000010000000000000001000000000000000afa4fc1b6cb445a8137ffb39b2c9851ab21e5ae69e344da19be301a31f77d299000000000000000003e00000000000000`;
16 |     const proof = (await new TlsProof(proofHex)) as _TlsProof;
17 |     const result = await proof.verify({
18 |       typ: 'P256',
19 |       key: `-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBv36FI4ZFszJa0DQFJ3wWCXvVLFr\ncRzMG5kaTeHGoSzDu6cFqx3uEWYpFGo6C0EOUgf+mEgbktLrXocv5yHzKg==\n-----END PUBLIC KEY-----\n`,
20 |     });
21 |     console.timeEnd('verify');
22 | 
23 |     console.log(result);
24 |     assert(result.sent.includes('host: swapi.dev'));
25 |     assert(!result.sent.includes('secret: test_secret'));
26 |     assert(result.recv.includes('"name":"Luke Skywalker"'));
27 |     assert(result.recv.includes('"hair_color":"blond"'));
28 |     assert(result.recv.includes('"skin_color":"fair"'));
29 | 
30 |     // @ts-ignore
31 |     document.getElementById('simple-verify').textContent = 'OK';
32 |   } catch (err) {
33 |     console.log('caught error from wasm');
34 |     console.error(err);
35 | 
36 |     // @ts-ignore
37 |     document.getElementById('simple-verify').textContent = err.message;
38 |   }
39 | })();
40 | 
```

--------------------------------------------------------------------------------
/gmail_mcp/server.py:
--------------------------------------------------------------------------------

```python
  1 | # Imports
  2 | from mcp.server.fastmcp import FastMCP
  3 | from mcp.server.sse import SseServerTransport
  4 | from starlette.applications import Starlette
  5 | from starlette.routing import Mount, Route
  6 | from fastapi import FastAPI
  7 | import uvicorn
  8 | import asyncio
  9 | from datetime import datetime, timedelta
 10 | import email
 11 | import imaplib
 12 | import smtplib
 13 | from email.mime.text import MIMEText
 14 | from email.mime.multipart import MIMEMultipart
 15 | from urllib.parse import unquote
 16 | from dataclasses import dataclass
 17 | import ssl
 18 | from loguru import logger
 19 | import sys
 20 | import uuid
 21 | from starlette.requests import Request
 22 | from weakref import WeakValueDictionary
 23 | 
 24 | # Setup logging
 25 | logger.remove()  # Remove default handler
 26 | logger.add(
 27 |     sys.stderr,
 28 |     format="<green>{time:YYYY-MM-DD HH:mm:ss}</green> | <level>{level: <8}</level> | <cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> - <level>{message}</level>",
 29 |     level="INFO",
 30 |     colorize=True,
 31 | )
 32 | 
 33 | # Constants
 34 | SEARCH_TIMEOUT = 60  # seconds
 35 | MAX_EMAILS = 100
 36 | 
 37 | # Setup FastAPI app and MCP server
 38 | app = FastAPI()
 39 | mcp = FastMCP("Email Client")
 40 | 
 41 | # Global session management - using WeakValueDictionary to allow garbage collection
 42 | # and avoid memory leaks when connections close
 43 | ACTIVE_SESSIONS = WeakValueDictionary()
 44 | 
 45 | #################################
 46 | # DATACLASSES
 47 | #################################
 48 | 
 49 | 
 50 | @dataclass
 51 | class DateRange:
 52 |     """Date range operations for email searches"""
 53 | 
 54 |     start: str | None = None
 55 |     end: str | None = None
 56 | 
 57 |     @staticmethod
 58 |     def format_date(
 59 |         date_str: str | None, default_days_ago: int = 0
 60 |     ) -> tuple[datetime, str]:
 61 |         """Format a date string to IMAP format, with default if None"""
 62 |         if date_str:
 63 |             date_obj = datetime.strptime(date_str, "%Y-%m-%d")
 64 |         else:
 65 |             date_obj = datetime.now() - timedelta(days=default_days_ago)
 66 |         return date_obj, date_obj.strftime("%d-%b-%Y")
 67 | 
 68 |     def get_days(self) -> list[datetime]:
 69 |         """Get all days in the date range (inclusive)"""
 70 |         start_obj, _ = self.format_date(self.start, 7)  # Default 7 days ago
 71 |         end_obj, _ = self.format_date(self.end, 0)  # Default today
 72 | 
 73 |         days = []
 74 |         current = start_obj
 75 |         while current <= end_obj:
 76 |             days.append(current)
 77 |             current += timedelta(days=1)
 78 |         return days
 79 | 
 80 | 
 81 | class SearchCriteria:
 82 |     """Builder for IMAP search criteria strings"""
 83 | 
 84 |     @staticmethod
 85 |     def create_date_criteria(start: str | None = None, end: str | None = None) -> str:
 86 |         """Create IMAP search criteria for date range"""
 87 |         start_obj, start_fmt = DateRange.format_date(start, 7)  # Default 7 days ago
 88 |         end_obj, end_fmt = DateRange.format_date(end, 0)  # Default today
 89 | 
 90 |         # Build date criteria
 91 |         if start_fmt == end_fmt:
 92 |             # If searching for a single day
 93 |             return f'ON "{start_fmt}"'
 94 |         else:
 95 |             # Calculate next day for BEFORE (which is exclusive)
 96 |             next_day = (end_obj + timedelta(days=1)).strftime("%d-%b-%Y")
 97 |             return f'SINCE "{start_fmt}" BEFORE "{next_day}"'
 98 | 
 99 |     @staticmethod
100 |     def create_search_criteria(
101 |         start: str | None = None, end: str | None = None, keyword: str | None = None
102 |     ) -> str:
103 |         """Create complete IMAP search string for the given parameters"""
104 |         date_criteria = SearchCriteria.create_date_criteria(start, end)
105 | 
106 |         # Add keyword if provided
107 |         if keyword:
108 |             keyword_criteria = f'(OR SUBJECT "{keyword}" BODY "{keyword}")'
109 |             return f"({keyword_criteria} {date_criteria})"
110 | 
111 |         return date_criteria
112 | 
113 | 
114 | @dataclass
115 | class EmailSummary:
116 |     """Summary information about an email"""
117 | 
118 |     id: str
119 |     sender: str = "Unknown"
120 |     date: str = "Unknown"
121 |     subject: str = "No Subject"
122 | 
123 |     def __str__(self) -> str:
124 |         """Format email summary as a table row"""
125 |         return f"{self.id} | {self.sender} | {self.date} | {self.subject}"
126 | 
127 |     @classmethod
128 |     def from_message_data(cls, msg_data: tuple) -> "EmailSummary":
129 |         """Create an EmailSummary from IMAP message data."""
130 |         email_body = email.message_from_bytes(msg_data[0][1])
131 | 
132 |         return cls(
133 |             id=msg_data[0][0].split()[0].decode(),  # Get the email ID
134 |             sender=email_body.get("From", "Unknown"),
135 |             date=email_body.get("Date", "Unknown"),
136 |             subject=email_body.get("Subject", "No Subject"),
137 |         )
138 | 
139 | 
140 | @dataclass
141 | class EmailContent(EmailSummary):
142 |     """Full content of an email including body"""
143 | 
144 |     to: str = "Unknown"
145 |     content: str = ""
146 | 
147 |     def __str__(self) -> str:
148 |         """Format email content for display"""
149 |         return (
150 |             f"From: {self.sender}\n"
151 |             f"To: {self.to}\n"
152 |             f"Date: {self.date}\n"
153 |             f"Subject: {self.subject}\n"
154 |             f"\nContent:\n{self.content}"
155 |         )
156 | 
157 |     @classmethod
158 |     def from_message_data(cls, msg_data: tuple) -> "EmailContent":
159 |         """Create an EmailContent from IMAP message data."""
160 |         email_body = email.message_from_bytes(msg_data[0][1])
161 | 
162 |         # Extract body content
163 |         body = ""
164 |         if email_body.is_multipart():
165 |             # Handle multipart messages
166 |             for part in email_body.walk():
167 |                 if part.get_content_type() == "text/plain":
168 |                     body = part.get_payload(decode=True).decode()
169 |                     break
170 |                 elif part.get_content_type() == "text/html":
171 |                     # If no plain text found, use HTML content
172 |                     if not body:
173 |                         body = part.get_payload(decode=True).decode()
174 |         else:
175 |             # Handle non-multipart messages
176 |             body = email_body.get_payload(decode=True).decode()
177 | 
178 |         return cls(
179 |             id=msg_data[0][0].split()[0].decode(),
180 |             sender=email_body.get("From", "Unknown"),
181 |             to=email_body.get("To", "Unknown"),
182 |             date=email_body.get("Date", "Unknown"),
183 |             subject=email_body.get("Subject", "No Subject"),
184 |             content=body,
185 |         )
186 | 
187 | 
188 | @dataclass
189 | class EmailResults:
190 |     """Container for formatted email search results"""
191 | 
192 |     emails: list[EmailSummary]
193 | 
194 |     def format_table(self) -> str:
195 |         """Format search results as a table"""
196 |         if not self.emails:
197 |             return "No emails found matching the criteria."
198 | 
199 |         result = "Found emails:\n\n"
200 |         result += "ID | From | Date | Subject\n"
201 |         result += "-" * 80 + "\n"
202 | 
203 |         for email_ in self.emails:
204 |             result += f"{email_}\n"
205 | 
206 |         result += "\nUse get-email-content with an email ID to view the full content of a specific email."
207 |         return result
208 | 
209 |     @classmethod
210 |     def format_daily_counts(cls, date_counts: list[tuple[datetime, int | str]]) -> str:
211 |         """Format daily email counts as a table"""
212 |         result = "Daily email counts:\n\n"
213 |         result += "Date | Count\n"
214 |         result += "-" * 30 + "\n"
215 | 
216 |         for date, count in date_counts:
217 |             result += f"{date.strftime('%Y-%m-%d')} | {count}\n"
218 | 
219 |         return result
220 | 
221 | 
222 | class EmailMessageFactory:
223 |     """Utility for creating email messages"""
224 | 
225 |     @staticmethod
226 |     def create_message(
227 |         from_email: str, to: list[str], subject: str, content: str, cc: list[str] = None
228 |     ) -> MIMEMultipart:
229 |         """Create an email message"""
230 |         msg = MIMEMultipart()
231 |         msg["From"] = from_email
232 |         msg["To"] = ", ".join(to)
233 |         if cc:
234 |             msg["Cc"] = ", ".join(cc)
235 |         msg["Subject"] = subject
236 |         msg.attach(MIMEText(content, "plain", "utf-8"))
237 |         return msg
238 | 
239 | 
240 | @dataclass
241 | class EmailSession:
242 |     """Email connection credentials and server configuration"""
243 | 
244 |     email: str
245 |     password: str
246 |     imap_server: str = "imap.gmail.com"
247 |     smtp_server: str = "smtp.gmail.com"
248 |     smtp_port: int = 587
249 | 
250 |     @classmethod
251 |     def from_request(cls, request: Request) -> "EmailSession | None":
252 |         """Extract email session configuration from request parameters"""
253 |         try:
254 |             if "ADDR" in request.query_params and "ASP" in request.query_params:
255 |                 email_addr = unquote(request.query_params["ADDR"])
256 |                 password = unquote(request.query_params["ASP"])
257 |                 return cls(email=email_addr, password=password)
258 |             else:
259 |                 logger.error("Missing required connection parameters")
260 |         except Exception as e:
261 |             logger.error(f"Config extraction error: {e}")
262 | 
263 |         return None
264 | 
265 |     @classmethod
266 |     def from_current_session(cls) -> "EmailSession | None":
267 |         """Get the current session configuration based on the current request"""
268 |         # First try to get from mcp._current_request
269 |         if hasattr(mcp, "_current_request"):
270 |             request = mcp._current_request
271 |             return cls.from_request(request)
272 |         # Then try server request
273 |         elif hasattr(mcp, "_mcp_server") and hasattr(mcp._mcp_server, "_request"):
274 |             request = mcp._mcp_server._request
275 |             return cls.from_request(request)
276 |         else:
277 |             logger.error("Cannot find request object")
278 |             return None
279 | 
280 |     async def connect_imap(self, folder: str = "inbox"):
281 |         """Connect to IMAP server and select folder"""
282 |         mail = imaplib.IMAP4_SSL(self.imap_server)
283 |         mail.login(self.email, self.password)
284 | 
285 |         if folder == "sent":
286 |             mail.select('"[Gmail]/Sent Mail"')  # For Gmail
287 |         else:
288 |             mail.select("inbox")
289 | 
290 |         return mail
291 | 
292 |     def close_imap(self, mail):
293 |         """Safely close IMAP connection"""
294 |         try:
295 |             mail.close()
296 |             mail.logout()
297 |         except Exception as e:
298 |             logger.error(f"IMAP close error: {e}")
299 | 
300 | 
301 | #################################
302 | # EMAIL ASYNC OPERATIONS
303 | #################################
304 | 
305 | 
306 | async def search_emails_async(
307 |     mail: imaplib.IMAP4_SSL, search_criteria: str
308 | ) -> list[EmailSummary]:
309 |     """Asynchronously search emails with timeout."""
310 |     loop = asyncio.get_event_loop()
311 |     try:
312 |         _, messages = await loop.run_in_executor(
313 |             None, lambda: mail.search(None, search_criteria)
314 |         )
315 |         if not messages[0]:
316 |             return []
317 | 
318 |         email_list = []
319 |         for num in messages[0].split()[:MAX_EMAILS]:  # Limit to MAX_EMAILS
320 |             _, msg_data = await loop.run_in_executor(
321 |                 None, lambda: mail.fetch(num, "(RFC822)")
322 |             )
323 |             email_list.append(EmailSummary.from_message_data(msg_data))
324 | 
325 |         return email_list
326 |     except Exception as e:
327 |         raise Exception(f"Error searching emails: {str(e)}")
328 | 
329 | 
330 | async def get_email_content_async(
331 |     mail: imaplib.IMAP4_SSL, email_id: str
332 | ) -> EmailContent:
333 |     """Asynchronously get full content of a specific email."""
334 |     loop = asyncio.get_event_loop()
335 |     try:
336 |         _, msg_data = await loop.run_in_executor(
337 |             None, lambda: mail.fetch(email_id, "(RFC822)")
338 |         )
339 |         return EmailContent.from_message_data(msg_data)
340 |     except Exception as e:
341 |         raise Exception(f"Error fetching email content: {str(e)}")
342 | 
343 | 
344 | async def count_emails_async(mail: imaplib.IMAP4_SSL, search_criteria: str) -> int:
345 |     """Asynchronously count emails matching the search criteria."""
346 |     loop = asyncio.get_event_loop()
347 |     try:
348 |         _, messages = await loop.run_in_executor(
349 |             None, lambda: mail.search(None, search_criteria)
350 |         )
351 |         return len(messages[0].split()) if messages[0] else 0
352 |     except Exception as e:
353 |         raise Exception(f"Error counting emails: {str(e)}")
354 | 
355 | 
356 | async def send_email_async(
357 |     to_addresses: list[str],
358 |     subject: str,
359 |     content: str,
360 |     cc_addresses: list[str] | None = None,
361 |     config: EmailSession = None,
362 | ) -> None:
363 |     """Asynchronously send an email."""
364 |     try:
365 |         # Create message
366 |         msg = EmailMessageFactory.create_message(
367 |             from_email=config.email,
368 |             to=to_addresses,
369 |             subject=subject,
370 |             content=content,
371 |             cc=cc_addresses,
372 |         )
373 | 
374 |         context = ssl.create_default_context()
375 |         server = smtplib.SMTP(config.smtp_server, config.smtp_port)
376 |         await asyncio.to_thread(server.starttls, context=context)
377 |         await asyncio.to_thread(server.login, config.email, config.password)
378 | 
379 |         all_recipients = to_addresses
380 |         if cc_addresses:
381 |             all_recipients += cc_addresses
382 | 
383 |         await asyncio.to_thread(
384 |             server.sendmail, config.email, all_recipients, msg.as_string()
385 |         )
386 |         server.quit()
387 |     except Exception as e:
388 |         logger.error(f"Error in send_email_async: {str(e)}")
389 |         raise
390 | 
391 | 
392 | #################################
393 | # MCP TOOL FUNCTIONS
394 | #################################
395 | 
396 | 
397 | @mcp.tool()
398 | async def search_emails(
399 |     start_date: str = None,
400 |     end_date: str = None,
401 |     keyword: str = None,
402 |     folder: str = "inbox",
403 | ) -> str:
404 |     """Search emails within a date range and/or with specific keywords"""
405 |     try:
406 |         # Get session-specific config
407 |         email_session = EmailSession.from_current_session()
408 |         if not email_session:
409 |             return "Error: No valid email configuration found for this session."
410 | 
411 |         # Connect to IMAP server using connection-specific credentials
412 |         mail = imaplib.IMAP4_SSL(email_session.imap_server)
413 |         mail.login(email_session.email, email_session.password)
414 | 
415 |         # Select folder
416 |         if folder == "sent":
417 |             mail.select('"[Gmail]/Sent Mail"')  # For Gmail
418 |         else:
419 |             mail.select("inbox")
420 | 
421 |         # Get search criteria
422 |         search_criteria = SearchCriteria.create_search_criteria(
423 |             start_date, end_date, keyword
424 |         )
425 | 
426 |         try:
427 |             async with asyncio.timeout(SEARCH_TIMEOUT):
428 |                 email_list = await search_emails_async(mail, search_criteria)
429 | 
430 |                 # Format results using the EmailResults class
431 |                 results = EmailResults(email_list)
432 |                 return results.format_table()
433 | 
434 |         except asyncio.TimeoutError:
435 |             return "Search operation timed out. Please try with a more specific search criteria."
436 |         finally:
437 |             email_session.close_imap(mail)
438 |     except Exception as e:
439 |         logger.error(f"Error in search_emails: {str(e)}")
440 |         return f"An error occurred: {str(e)}"
441 | 
442 | 
443 | @mcp.tool()
444 | async def get_email_content(email_id: str) -> str:
445 |     """Get the full content of a specific email by its ID"""
446 |     try:
447 |         # Get session-specific config
448 |         email_session = EmailSession.from_current_session()
449 |         if not email_session:
450 |             return "Error: No valid email configuration found for this session."
451 | 
452 |         mail = await email_session.connect_imap()
453 | 
454 |         try:
455 |             async with asyncio.timeout(SEARCH_TIMEOUT):
456 |                 email_content = await get_email_content_async(mail, email_id)
457 |                 return str(email_content)
458 |         except asyncio.TimeoutError:
459 |             return "Operation timed out while fetching email content."
460 |         finally:
461 |             email_session.close_imap(mail)
462 |     except Exception as e:
463 |         logger.error(f"Error in get_email_content: {str(e)}")
464 |         return f"An error occurred: {str(e)}"
465 | 
466 | 
467 | @mcp.tool()
468 | async def count_daily_emails(start_date: str, end_date: str) -> str:
469 |     """Count emails received for each day in a date range"""
470 |     try:
471 |         # Get session-specific config
472 |         email_session = EmailSession.from_current_session()
473 |         if not email_session:
474 |             return "Error: No valid email configuration found for this session."
475 | 
476 |         mail = imaplib.IMAP4_SSL(email_session.imap_server)
477 |         mail.login(email_session.email, email_session.password)
478 |         mail.select("inbox")
479 | 
480 |         try:
481 |             # Get all days in the range
482 |             date_range = DateRange(start=start_date, end=end_date)
483 |             days = date_range.get_days()
484 | 
485 |             date_counts = []
486 |             for day in days:
487 |                 date_str = day.strftime("%d-%b-%Y")
488 |                 search_criteria = f'(ON "{date_str}")'
489 | 
490 |                 try:
491 |                     async with asyncio.timeout(SEARCH_TIMEOUT):
492 |                         count = await count_emails_async(mail, search_criteria)
493 |                         date_counts.append((day, count))
494 |                 except asyncio.TimeoutError:
495 |                     date_counts.append((day, "Timeout"))
496 | 
497 |             # Format results using EmailResults class
498 |             return EmailResults.format_daily_counts(date_counts)
499 | 
500 |         finally:
501 |             email_session.close_imap(mail)
502 |     except Exception as e:
503 |         logger.error(f"Error in count_daily_emails: {str(e)}")
504 |         return f"An error occurred: {str(e)}"
505 | 
506 | 
507 | @mcp.tool()
508 | async def send_email(
509 |     to: list[str], subject: str, content: str, cc: list[str] = None
510 | ) -> str:
511 |     """CONFIRMATION STEP: Actually send the email after user confirms the details."""
512 |     if not to:
513 |         return "At least one recipient email address is required."
514 | 
515 |     try:
516 |         # No logging of email addresses or content
517 | 
518 |         # Get session-specific config
519 |         email_session = EmailSession.from_current_session()
520 |         if not email_session:
521 |             return "Error: No valid email configuration found for this session."
522 | 
523 |         async with asyncio.timeout(SEARCH_TIMEOUT):
524 |             await send_email_async(to, subject, content, cc, config=email_session)
525 |             return "Email sent successfully!"
526 |     except asyncio.TimeoutError:
527 |         return "Operation timed out while sending email."
528 |     except Exception as e:
529 |         error_msg = str(e)
530 |         return f"Failed to send email: {error_msg}\n\nPlease check:\n1. Email and password are correct\n2. SMTP settings are correct\n3. Less secure app access is enabled (for Gmail)\n4. Using App Password if 2FA is enabled"
531 | 
532 | 
533 | #################################
534 | # SERVER SETUP
535 | #################################
536 | 
537 | 
538 | def create_sse_server(mcp):
539 |     """Create a Starlette app that handles SSE connections and message handling"""
540 |     transport = SseServerTransport("/messages/")
541 | 
542 |     # Define handler functions
543 |     async def handle_sse(request):
544 |         # Generate a unique session ID for this connection
545 |         session_id = str(uuid.uuid4())
546 | 
547 |         # No logging of connection details
548 | 
549 |         # Store request in session dictionary with unique ID
550 |         ACTIVE_SESSIONS[session_id] = request
551 | 
552 |         async with transport.connect_sse(
553 |             request.scope, request.receive, request._send
554 |         ) as streams:
555 |             try:
556 |                 # Store the request object for later access by tools
557 |                 mcp._current_request = request
558 | 
559 |                 await mcp._mcp_server.run(
560 |                     streams[0],
561 |                     streams[1],
562 |                     mcp._mcp_server.create_initialization_options(),
563 |                 )
564 |             finally:
565 |                 # Clear the request reference
566 |                 if hasattr(mcp, "_current_request"):
567 |                     delattr(mcp, "_current_request")
568 |                 # Remove from active sessions
569 |                 if session_id in ACTIVE_SESSIONS:
570 |                     del ACTIVE_SESSIONS[session_id]
571 |                     # No logging of session destruction
572 | 
573 |     # Create Starlette routes for SSE and message handling
574 |     routes = [
575 |         Route("/sse/", endpoint=handle_sse),
576 |         Mount("/messages/", app=transport.handle_post_message),
577 |     ]
578 | 
579 |     # Create a Starlette app
580 |     return Starlette(routes=routes)
581 | 
582 | 
583 | @app.get("/")
584 | def read_root():
585 |     """Health check endpoint"""
586 |     return {"status": "Email Client Server is running"}
587 | 
588 | 
589 | # Mount the Starlette SSE server onto the FastAPI app
590 | app.mount("/", create_sse_server(mcp))
591 | 
592 | 
593 | # Start the server
594 | if __name__ == "__main__":
595 |     # Minimal logging that doesn't reveal user information
596 |     uvicorn.run(app, host="0.0.0.0", port=7047)
597 | 
```

--------------------------------------------------------------------------------
/verifier/wasm/pkg/tlsn_wasm.js:
--------------------------------------------------------------------------------

```javascript
   1 | import { startWorkers } from './snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/workerHelpers.js';
   2 | 
   3 | let wasm;
   4 | 
   5 | const heap = new Array(128).fill(undefined);
   6 | 
   7 | heap.push(undefined, null, true, false);
   8 | 
   9 | function getObject(idx) { return heap[idx]; }
  10 | 
  11 | let heap_next = heap.length;
  12 | 
  13 | function dropObject(idx) {
  14 |     if (idx < 132) return;
  15 |     heap[idx] = heap_next;
  16 |     heap_next = idx;
  17 | }
  18 | 
  19 | function takeObject(idx) {
  20 |     const ret = getObject(idx);
  21 |     dropObject(idx);
  22 |     return ret;
  23 | }
  24 | 
  25 | function addHeapObject(obj) {
  26 |     if (heap_next === heap.length) heap.push(heap.length + 1);
  27 |     const idx = heap_next;
  28 |     heap_next = heap[idx];
  29 | 
  30 |     heap[idx] = obj;
  31 |     return idx;
  32 | }
  33 | 
  34 | let WASM_VECTOR_LEN = 0;
  35 | 
  36 | let cachedUint8ArrayMemory0 = null;
  37 | 
  38 | function getUint8ArrayMemory0() {
  39 |     if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
  40 |         cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
  41 |     }
  42 |     return cachedUint8ArrayMemory0;
  43 | }
  44 | 
  45 | const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
  46 | 
  47 | const encodeString = function (arg, view) {
  48 |     const buf = cachedTextEncoder.encode(arg);
  49 |     view.set(buf);
  50 |     return {
  51 |         read: arg.length,
  52 |         written: buf.length
  53 |     };
  54 | };
  55 | 
  56 | function passStringToWasm0(arg, malloc, realloc) {
  57 | 
  58 |     if (realloc === undefined) {
  59 |         const buf = cachedTextEncoder.encode(arg);
  60 |         const ptr = malloc(buf.length, 1) >>> 0;
  61 |         getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
  62 |         WASM_VECTOR_LEN = buf.length;
  63 |         return ptr;
  64 |     }
  65 | 
  66 |     let len = arg.length;
  67 |     let ptr = malloc(len, 1) >>> 0;
  68 | 
  69 |     const mem = getUint8ArrayMemory0();
  70 | 
  71 |     let offset = 0;
  72 | 
  73 |     for (; offset < len; offset++) {
  74 |         const code = arg.charCodeAt(offset);
  75 |         if (code > 0x7F) break;
  76 |         mem[ptr + offset] = code;
  77 |     }
  78 | 
  79 |     if (offset !== len) {
  80 |         if (offset !== 0) {
  81 |             arg = arg.slice(offset);
  82 |         }
  83 |         ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
  84 |         const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
  85 |         const ret = encodeString(arg, view);
  86 | 
  87 |         offset += ret.written;
  88 |         ptr = realloc(ptr, len, offset, 1) >>> 0;
  89 |     }
  90 | 
  91 |     WASM_VECTOR_LEN = offset;
  92 |     return ptr;
  93 | }
  94 | 
  95 | function isLikeNone(x) {
  96 |     return x === undefined || x === null;
  97 | }
  98 | 
  99 | let cachedDataViewMemory0 = null;
 100 | 
 101 | function getDataViewMemory0() {
 102 |     if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
 103 |         cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
 104 |     }
 105 |     return cachedDataViewMemory0;
 106 | }
 107 | 
 108 | const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
 109 | 
 110 | if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
 111 | 
 112 | function getStringFromWasm0(ptr, len) {
 113 |     ptr = ptr >>> 0;
 114 |     return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
 115 | }
 116 | 
 117 | function debugString(val) {
 118 |     // primitive types
 119 |     const type = typeof val;
 120 |     if (type == 'number' || type == 'boolean' || val == null) {
 121 |         return  `${val}`;
 122 |     }
 123 |     if (type == 'string') {
 124 |         return `"${val}"`;
 125 |     }
 126 |     if (type == 'symbol') {
 127 |         const description = val.description;
 128 |         if (description == null) {
 129 |             return 'Symbol';
 130 |         } else {
 131 |             return `Symbol(${description})`;
 132 |         }
 133 |     }
 134 |     if (type == 'function') {
 135 |         const name = val.name;
 136 |         if (typeof name == 'string' && name.length > 0) {
 137 |             return `Function(${name})`;
 138 |         } else {
 139 |             return 'Function';
 140 |         }
 141 |     }
 142 |     // objects
 143 |     if (Array.isArray(val)) {
 144 |         const length = val.length;
 145 |         let debug = '[';
 146 |         if (length > 0) {
 147 |             debug += debugString(val[0]);
 148 |         }
 149 |         for(let i = 1; i < length; i++) {
 150 |             debug += ', ' + debugString(val[i]);
 151 |         }
 152 |         debug += ']';
 153 |         return debug;
 154 |     }
 155 |     // Test for built-in
 156 |     const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
 157 |     let className;
 158 |     if (builtInMatches.length > 1) {
 159 |         className = builtInMatches[1];
 160 |     } else {
 161 |         // Failed to match the standard '[object ClassName]'
 162 |         return toString.call(val);
 163 |     }
 164 |     if (className == 'Object') {
 165 |         // we're a user defined class or Object
 166 |         // JSON.stringify avoids problems with cycles, and is generally much
 167 |         // easier than looping through ownProperties of `val`.
 168 |         try {
 169 |             return 'Object(' + JSON.stringify(val) + ')';
 170 |         } catch (_) {
 171 |             return 'Object';
 172 |         }
 173 |     }
 174 |     // errors
 175 |     if (val instanceof Error) {
 176 |         return `${val.name}: ${val.message}\n${val.stack}`;
 177 |     }
 178 |     // TODO we could test for more things here, like `Set`s and `Map`s.
 179 |     return className;
 180 | }
 181 | 
 182 | const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
 183 |     ? { register: () => {}, unregister: () => {} }
 184 |     : new FinalizationRegistry(state => {
 185 |     wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
 186 | });
 187 | 
 188 | function makeMutClosure(arg0, arg1, dtor, f) {
 189 |     const state = { a: arg0, b: arg1, cnt: 1, dtor };
 190 |     const real = (...args) => {
 191 |         // First up with a closure we increment the internal reference
 192 |         // count. This ensures that the Rust closure environment won't
 193 |         // be deallocated while we're invoking it.
 194 |         state.cnt++;
 195 |         const a = state.a;
 196 |         state.a = 0;
 197 |         try {
 198 |             return f(a, state.b, ...args);
 199 |         } finally {
 200 |             if (--state.cnt === 0) {
 201 |                 wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
 202 |                 CLOSURE_DTORS.unregister(state);
 203 |             } else {
 204 |                 state.a = a;
 205 |             }
 206 |         }
 207 |     };
 208 |     real.original = state;
 209 |     CLOSURE_DTORS.register(real, state, state);
 210 |     return real;
 211 | }
 212 | function __wbg_adapter_54(arg0, arg1, arg2) {
 213 |     wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2e88a253da201d98(arg0, arg1, addHeapObject(arg2));
 214 | }
 215 | 
 216 | function __wbg_adapter_57(arg0, arg1) {
 217 |     wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h33fdce4698adb901(arg0, arg1);
 218 | }
 219 | 
 220 | function __wbg_adapter_60(arg0, arg1, arg2) {
 221 |     wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5c02e8a12b71e39b(arg0, arg1, addHeapObject(arg2));
 222 | }
 223 | 
 224 | function __wbg_adapter_63(arg0, arg1, arg2) {
 225 |     wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h036d37595979be07(arg0, arg1, addHeapObject(arg2));
 226 | }
 227 | 
 228 | /**
 229 | * Initializes logging.
 230 | * @param {LoggingConfig | undefined} [config]
 231 | */
 232 | export function init_logging(config) {
 233 |     wasm.init_logging(isLikeNone(config) ? 0 : addHeapObject(config));
 234 | }
 235 | 
 236 | /**
 237 | * @param {string} attestation_document
 238 | * @param {string} nonce_expected
 239 | * @param {string} pcr_expected
 240 | * @param {bigint} timestamp
 241 | * @returns {boolean}
 242 | */
 243 | export function verify_attestation_document(attestation_document, nonce_expected, pcr_expected, timestamp) {
 244 |     const ptr0 = passStringToWasm0(attestation_document, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 245 |     const len0 = WASM_VECTOR_LEN;
 246 |     const ptr1 = passStringToWasm0(nonce_expected, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 247 |     const len1 = WASM_VECTOR_LEN;
 248 |     const ptr2 = passStringToWasm0(pcr_expected, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 249 |     const len2 = WASM_VECTOR_LEN;
 250 |     const ret = wasm.verify_attestation_document(ptr0, len0, ptr1, len1, ptr2, len2, timestamp);
 251 |     return ret !== 0;
 252 | }
 253 | 
 254 | /**
 255 | * @param {string} hex_application_data
 256 | * @param {string} hex_raw_signature
 257 | * @param {string} hex_raw_public_key
 258 | * @param {boolean} hash_appdata
 259 | * @returns {boolean}
 260 | */
 261 | export function verify_attestation_signature(hex_application_data, hex_raw_signature, hex_raw_public_key, hash_appdata) {
 262 |     const ptr0 = passStringToWasm0(hex_application_data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 263 |     const len0 = WASM_VECTOR_LEN;
 264 |     const ptr1 = passStringToWasm0(hex_raw_signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 265 |     const len1 = WASM_VECTOR_LEN;
 266 |     const ptr2 = passStringToWasm0(hex_raw_public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 267 |     const len2 = WASM_VECTOR_LEN;
 268 |     const ret = wasm.verify_attestation_signature(ptr0, len0, ptr1, len1, ptr2, len2, hash_appdata);
 269 |     return ret !== 0;
 270 | }
 271 | 
 272 | function getArrayU8FromWasm0(ptr, len) {
 273 |     ptr = ptr >>> 0;
 274 |     return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
 275 | }
 276 | 
 277 | function passArray8ToWasm0(arg, malloc) {
 278 |     const ptr = malloc(arg.length * 1, 1) >>> 0;
 279 |     getUint8ArrayMemory0().set(arg, ptr / 1);
 280 |     WASM_VECTOR_LEN = arg.length;
 281 |     return ptr;
 282 | }
 283 | 
 284 | function handleError(f, args) {
 285 |     try {
 286 |         return f.apply(this, args);
 287 |     } catch (e) {
 288 |         wasm.__wbindgen_exn_store(addHeapObject(e));
 289 |     }
 290 | }
 291 | function __wbg_adapter_230(arg0, arg1, arg2, arg3) {
 292 |     wasm.wasm_bindgen__convert__closures__invoke2_mut__h134b145bfce1dc02(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
 293 | }
 294 | 
 295 | /**
 296 | * @param {number} num_threads
 297 | * @returns {Promise<any>}
 298 | */
 299 | export function initThreadPool(num_threads) {
 300 |     const ret = wasm.initThreadPool(num_threads);
 301 |     return takeObject(ret);
 302 | }
 303 | 
 304 | /**
 305 | * @param {number} receiver
 306 | */
 307 | export function wbg_rayon_start_worker(receiver) {
 308 |     wasm.wbg_rayon_start_worker(receiver);
 309 | }
 310 | 
 311 | const ProverFinalization = (typeof FinalizationRegistry === 'undefined')
 312 |     ? { register: () => {}, unregister: () => {} }
 313 |     : new FinalizationRegistry(ptr => wasm.__wbg_prover_free(ptr >>> 0, 1));
 314 | /**
 315 | */
 316 | export class Prover {
 317 | 
 318 |     __destroy_into_raw() {
 319 |         const ptr = this.__wbg_ptr;
 320 |         this.__wbg_ptr = 0;
 321 |         ProverFinalization.unregister(this);
 322 |         return ptr;
 323 |     }
 324 | 
 325 |     free() {
 326 |         const ptr = this.__destroy_into_raw();
 327 |         wasm.__wbg_prover_free(ptr, 0);
 328 |     }
 329 |     /**
 330 |     * @param {ProverConfig} config
 331 |     */
 332 |     constructor(config) {
 333 |         const ret = wasm.prover_new(addHeapObject(config));
 334 |         this.__wbg_ptr = ret >>> 0;
 335 |         ProverFinalization.register(this, this.__wbg_ptr, this);
 336 |         return this;
 337 |     }
 338 |     /**
 339 |     * Set up the prover.
 340 |     *
 341 |     * This performs all Tee setup prior to establishing the connection to the
 342 |     * application server.
 343 |     * @param {string} verifier_url
 344 |     * @returns {Promise<void>}
 345 |     */
 346 |     setup(verifier_url) {
 347 |         const ptr0 = passStringToWasm0(verifier_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 348 |         const len0 = WASM_VECTOR_LEN;
 349 |         const ret = wasm.prover_setup(this.__wbg_ptr, ptr0, len0);
 350 |         return takeObject(ret);
 351 |     }
 352 |     /**
 353 |     * Send the HTTP request to the server.
 354 |     * @param {string} ws_proxy_url
 355 |     * @param {HttpRequest} request
 356 |     * @returns {Promise<HttpResponse>}
 357 |     */
 358 |     send_request(ws_proxy_url, request) {
 359 |         const ptr0 = passStringToWasm0(ws_proxy_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 360 |         const len0 = WASM_VECTOR_LEN;
 361 |         const ret = wasm.prover_send_request(this.__wbg_ptr, ptr0, len0, addHeapObject(request));
 362 |         return takeObject(ret);
 363 |     }
 364 |     /**
 365 |     * Runs the notarization protocol.
 366 |     * @returns {Promise<string>}
 367 |     */
 368 |     notarize() {
 369 |         const ret = wasm.prover_notarize(this.__wbg_ptr);
 370 |         return takeObject(ret);
 371 |     }
 372 | }
 373 | 
 374 | const SignedSessionFinalization = (typeof FinalizationRegistry === 'undefined')
 375 |     ? { register: () => {}, unregister: () => {} }
 376 |     : new FinalizationRegistry(ptr => wasm.__wbg_signedsession_free(ptr >>> 0, 1));
 377 | /**
 378 | */
 379 | export class SignedSession {
 380 | 
 381 |     static __wrap(ptr) {
 382 |         ptr = ptr >>> 0;
 383 |         const obj = Object.create(SignedSession.prototype);
 384 |         obj.__wbg_ptr = ptr;
 385 |         SignedSessionFinalization.register(obj, obj.__wbg_ptr, obj);
 386 |         return obj;
 387 |     }
 388 | 
 389 |     __destroy_into_raw() {
 390 |         const ptr = this.__wbg_ptr;
 391 |         this.__wbg_ptr = 0;
 392 |         SignedSessionFinalization.unregister(this);
 393 |         return ptr;
 394 |     }
 395 | 
 396 |     free() {
 397 |         const ptr = this.__destroy_into_raw();
 398 |         wasm.__wbg_signedsession_free(ptr, 0);
 399 |     }
 400 |     /**
 401 |     * Serializes to a byte array.
 402 |     * @returns {Uint8Array}
 403 |     */
 404 |     serialize() {
 405 |         try {
 406 |             const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
 407 |             wasm.signedsession_serialize(retptr, this.__wbg_ptr);
 408 |             var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
 409 |             var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
 410 |             var v1 = getArrayU8FromWasm0(r0, r1).slice();
 411 |             wasm.__wbindgen_free(r0, r1 * 1, 1);
 412 |             return v1;
 413 |         } finally {
 414 |             wasm.__wbindgen_add_to_stack_pointer(16);
 415 |         }
 416 |     }
 417 |     /**
 418 |     * Deserializes from a byte array.
 419 |     * @param {Uint8Array} bytes
 420 |     * @returns {SignedSession}
 421 |     */
 422 |     static deserialize(bytes) {
 423 |         try {
 424 |             const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
 425 |             const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
 426 |             const len0 = WASM_VECTOR_LEN;
 427 |             wasm.signedsession_deserialize(retptr, ptr0, len0);
 428 |             var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
 429 |             var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
 430 |             var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
 431 |             if (r2) {
 432 |                 throw takeObject(r1);
 433 |             }
 434 |             return SignedSession.__wrap(r0);
 435 |         } finally {
 436 |             wasm.__wbindgen_add_to_stack_pointer(16);
 437 |         }
 438 |     }
 439 | }
 440 | 
 441 | const VerifierFinalization = (typeof FinalizationRegistry === 'undefined')
 442 |     ? { register: () => {}, unregister: () => {} }
 443 |     : new FinalizationRegistry(ptr => wasm.__wbg_verifier_free(ptr >>> 0, 1));
 444 | /**
 445 | */
 446 | export class Verifier {
 447 | 
 448 |     __destroy_into_raw() {
 449 |         const ptr = this.__wbg_ptr;
 450 |         this.__wbg_ptr = 0;
 451 |         VerifierFinalization.unregister(this);
 452 |         return ptr;
 453 |     }
 454 | 
 455 |     free() {
 456 |         const ptr = this.__destroy_into_raw();
 457 |         wasm.__wbg_verifier_free(ptr, 0);
 458 |     }
 459 |     /**
 460 |     * @param {VerifierConfig} config
 461 |     */
 462 |     constructor(config) {
 463 |         const ret = wasm.verifier_new(addHeapObject(config));
 464 |         this.__wbg_ptr = ret >>> 0;
 465 |         VerifierFinalization.register(this, this.__wbg_ptr, this);
 466 |         return this;
 467 |     }
 468 |     /**
 469 |     * Connect to the prover.
 470 |     * @param {string} prover_url
 471 |     * @returns {Promise<void>}
 472 |     */
 473 |     connect(prover_url) {
 474 |         const ptr0 = passStringToWasm0(prover_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 475 |         const len0 = WASM_VECTOR_LEN;
 476 |         const ret = wasm.verifier_connect(this.__wbg_ptr, ptr0, len0);
 477 |         return takeObject(ret);
 478 |     }
 479 |     /**
 480 |     * Verifies the connection and finalizes the protocol.
 481 |     * @returns {Promise<void>}
 482 |     */
 483 |     verify() {
 484 |         const ret = wasm.verifier_verify(this.__wbg_ptr);
 485 |         return takeObject(ret);
 486 |     }
 487 | }
 488 | 
 489 | const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
 490 |     ? { register: () => {}, unregister: () => {} }
 491 |     : new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
 492 | /**
 493 | */
 494 | export class wbg_rayon_PoolBuilder {
 495 | 
 496 |     static __wrap(ptr) {
 497 |         ptr = ptr >>> 0;
 498 |         const obj = Object.create(wbg_rayon_PoolBuilder.prototype);
 499 |         obj.__wbg_ptr = ptr;
 500 |         wbg_rayon_PoolBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
 501 |         return obj;
 502 |     }
 503 | 
 504 |     __destroy_into_raw() {
 505 |         const ptr = this.__wbg_ptr;
 506 |         this.__wbg_ptr = 0;
 507 |         wbg_rayon_PoolBuilderFinalization.unregister(this);
 508 |         return ptr;
 509 |     }
 510 | 
 511 |     free() {
 512 |         const ptr = this.__destroy_into_raw();
 513 |         wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
 514 |     }
 515 |     /**
 516 |     * @returns {number}
 517 |     */
 518 |     numThreads() {
 519 |         const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
 520 |         return ret >>> 0;
 521 |     }
 522 |     /**
 523 |     * @returns {number}
 524 |     */
 525 |     receiver() {
 526 |         const ret = wasm.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr);
 527 |         return ret >>> 0;
 528 |     }
 529 |     /**
 530 |     */
 531 |     build() {
 532 |         wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
 533 |     }
 534 | }
 535 | 
 536 | async function __wbg_load(module, imports) {
 537 |     if (typeof Response === 'function' && module instanceof Response) {
 538 |         if (typeof WebAssembly.instantiateStreaming === 'function') {
 539 |             try {
 540 |                 return await WebAssembly.instantiateStreaming(module, imports);
 541 | 
 542 |             } catch (e) {
 543 |                 if (module.headers.get('Content-Type') != 'application/wasm') {
 544 |                     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);
 545 | 
 546 |                 } else {
 547 |                     throw e;
 548 |                 }
 549 |             }
 550 |         }
 551 | 
 552 |         const bytes = await module.arrayBuffer();
 553 |         return await WebAssembly.instantiate(bytes, imports);
 554 | 
 555 |     } else {
 556 |         const instance = await WebAssembly.instantiate(module, imports);
 557 | 
 558 |         if (instance instanceof WebAssembly.Instance) {
 559 |             return { instance, module };
 560 | 
 561 |         } else {
 562 |             return instance;
 563 |         }
 564 |     }
 565 | }
 566 | 
 567 | function __wbg_get_imports() {
 568 |     const imports = {};
 569 |     imports.wbg = {};
 570 |     imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
 571 |         takeObject(arg0);
 572 |     };
 573 |     imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
 574 |         const ret = getObject(arg0);
 575 |         return addHeapObject(ret);
 576 |     };
 577 |     imports.wbg.__wbindgen_cb_drop = function(arg0) {
 578 |         const obj = takeObject(arg0).original;
 579 |         if (obj.cnt-- == 1) {
 580 |             obj.a = 0;
 581 |             return true;
 582 |         }
 583 |         const ret = false;
 584 |         return ret;
 585 |     };
 586 |     imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
 587 |         const obj = getObject(arg1);
 588 |         const ret = typeof(obj) === 'string' ? obj : undefined;
 589 |         var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 590 |         var len1 = WASM_VECTOR_LEN;
 591 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 592 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 593 |     };
 594 |     imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
 595 |         const ret = new Error(getStringFromWasm0(arg0, arg1));
 596 |         return addHeapObject(ret);
 597 |     };
 598 |     imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
 599 |         const ret = getStringFromWasm0(arg0, arg1);
 600 |         return addHeapObject(ret);
 601 |     };
 602 |     imports.wbg.__wbindgen_boolean_get = function(arg0) {
 603 |         const v = getObject(arg0);
 604 |         const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
 605 |         return ret;
 606 |     };
 607 |     imports.wbg.__wbindgen_is_bigint = function(arg0) {
 608 |         const ret = typeof(getObject(arg0)) === 'bigint';
 609 |         return ret;
 610 |     };
 611 |     imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
 612 |         const obj = getObject(arg1);
 613 |         const ret = typeof(obj) === 'number' ? obj : undefined;
 614 |         getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
 615 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
 616 |     };
 617 |     imports.wbg.__wbindgen_is_object = function(arg0) {
 618 |         const val = getObject(arg0);
 619 |         const ret = typeof(val) === 'object' && val !== null;
 620 |         return ret;
 621 |     };
 622 |     imports.wbg.__wbindgen_in = function(arg0, arg1) {
 623 |         const ret = getObject(arg0) in getObject(arg1);
 624 |         return ret;
 625 |     };
 626 |     imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
 627 |         const ret = arg0;
 628 |         return addHeapObject(ret);
 629 |     };
 630 |     imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
 631 |         const ret = getObject(arg0) === getObject(arg1);
 632 |         return ret;
 633 |     };
 634 |     imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
 635 |         const ret = BigInt.asUintN(64, arg0);
 636 |         return addHeapObject(ret);
 637 |     };
 638 |     imports.wbg.__wbindgen_is_string = function(arg0) {
 639 |         const ret = typeof(getObject(arg0)) === 'string';
 640 |         return ret;
 641 |     };
 642 |     imports.wbg.__wbindgen_is_undefined = function(arg0) {
 643 |         const ret = getObject(arg0) === undefined;
 644 |         return ret;
 645 |     };
 646 |     imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
 647 |         const ret = new Error();
 648 |         return addHeapObject(ret);
 649 |     };
 650 |     imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
 651 |         const ret = getObject(arg1).stack;
 652 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 653 |         const len1 = WASM_VECTOR_LEN;
 654 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 655 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 656 |     };
 657 |     imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
 658 |         let deferred0_0;
 659 |         let deferred0_1;
 660 |         try {
 661 |             deferred0_0 = arg0;
 662 |             deferred0_1 = arg1;
 663 |             console.error(getStringFromWasm0(arg0, arg1));
 664 |         } finally {
 665 |             wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
 666 |         }
 667 |     };
 668 |     imports.wbg.__wbg_performance_a1b8bde2ee512264 = function(arg0) {
 669 |         const ret = getObject(arg0).performance;
 670 |         return addHeapObject(ret);
 671 |     };
 672 |     imports.wbg.__wbg_timeOrigin_5c8b9e35719de799 = function(arg0) {
 673 |         const ret = getObject(arg0).timeOrigin;
 674 |         return ret;
 675 |     };
 676 |     imports.wbg.__wbg_now_abd80e969af37148 = function(arg0) {
 677 |         const ret = getObject(arg0).now();
 678 |         return ret;
 679 |     };
 680 |     imports.wbg.__wbg_waitAsync_cd62c81646382b45 = function() {
 681 |         const ret = Atomics.waitAsync;
 682 |         return addHeapObject(ret);
 683 |     };
 684 |     imports.wbg.__wbg_waitAsync_3ed212d5e9450545 = function(arg0, arg1, arg2) {
 685 |         const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
 686 |         return addHeapObject(ret);
 687 |     };
 688 |     imports.wbg.__wbg_async_49a1efd7e3e4bd73 = function(arg0) {
 689 |         const ret = getObject(arg0).async;
 690 |         return ret;
 691 |     };
 692 |     imports.wbg.__wbg_value_96cb463707ad2f31 = function(arg0) {
 693 |         const ret = getObject(arg0).value;
 694 |         return addHeapObject(ret);
 695 |     };
 696 |     imports.wbg.__wbindgen_link_8b58b27602368eaa = function(arg0) {
 697 |         const val = `onmessage = function (ev) {
 698 |             let [ia, index, value] = ev.data;
 699 |             ia = new Int32Array(ia.buffer);
 700 |             let result = Atomics.wait(ia, index, value);
 701 |             postMessage(result);
 702 |         };
 703 |         `;
 704 |         const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
 705 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 706 |         const len1 = WASM_VECTOR_LEN;
 707 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 708 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 709 |     };
 710 |     imports.wbg.__wbindgen_number_new = function(arg0) {
 711 |         const ret = arg0;
 712 |         return addHeapObject(ret);
 713 |     };
 714 |     imports.wbg.__wbg_queueMicrotask_12a30234db4045d3 = function(arg0) {
 715 |         queueMicrotask(getObject(arg0));
 716 |     };
 717 |     imports.wbg.__wbg_queueMicrotask_48421b3cc9052b68 = function(arg0) {
 718 |         const ret = getObject(arg0).queueMicrotask;
 719 |         return addHeapObject(ret);
 720 |     };
 721 |     imports.wbg.__wbindgen_is_function = function(arg0) {
 722 |         const ret = typeof(getObject(arg0)) === 'function';
 723 |         return ret;
 724 |     };
 725 |     imports.wbg.__wbg_instanceof_Window_5012736c80a01584 = function(arg0) {
 726 |         let result;
 727 |         try {
 728 |             result = getObject(arg0) instanceof Window;
 729 |         } catch (_) {
 730 |             result = false;
 731 |         }
 732 |         const ret = result;
 733 |         return ret;
 734 |     };
 735 |     imports.wbg.__wbg_instanceof_Blob_a959e04f44007d16 = function(arg0) {
 736 |         let result;
 737 |         try {
 738 |             result = getObject(arg0) instanceof Blob;
 739 |         } catch (_) {
 740 |             result = false;
 741 |         }
 742 |         const ret = result;
 743 |         return ret;
 744 |     };
 745 |     imports.wbg.__wbg_setonmessage_7cee8e224acfa056 = function(arg0, arg1) {
 746 |         getObject(arg0).onmessage = getObject(arg1);
 747 |     };
 748 |     imports.wbg.__wbg_new_25d9d4e2932d816f = function() { return handleError(function (arg0, arg1) {
 749 |         const ret = new Worker(getStringFromWasm0(arg0, arg1));
 750 |         return addHeapObject(ret);
 751 |     }, arguments) };
 752 |     imports.wbg.__wbg_postMessage_37faac1bc005e5c0 = function() { return handleError(function (arg0, arg1) {
 753 |         getObject(arg0).postMessage(getObject(arg1));
 754 |     }, arguments) };
 755 |     imports.wbg.__wbg_debug_5a33c41aeac15ee6 = function(arg0) {
 756 |         console.debug(getObject(arg0));
 757 |     };
 758 |     imports.wbg.__wbg_debug_d7780810b3a93632 = function(arg0, arg1, arg2, arg3) {
 759 |         console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
 760 |     };
 761 |     imports.wbg.__wbg_error_09480e4aadca50ad = function(arg0) {
 762 |         console.error(getObject(arg0));
 763 |     };
 764 |     imports.wbg.__wbg_error_f02f3d66b42c6251 = function(arg0, arg1, arg2, arg3) {
 765 |         console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
 766 |     };
 767 |     imports.wbg.__wbg_info_c261acb2deacd903 = function(arg0) {
 768 |         console.info(getObject(arg0));
 769 |     };
 770 |     imports.wbg.__wbg_info_123d8c35ec14384a = function(arg0, arg1, arg2, arg3) {
 771 |         console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
 772 |     };
 773 |     imports.wbg.__wbg_warn_2b3adb99ce26c314 = function(arg0) {
 774 |         console.warn(getObject(arg0));
 775 |     };
 776 |     imports.wbg.__wbg_warn_60924fcf321399f0 = function(arg0, arg1, arg2, arg3) {
 777 |         console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
 778 |     };
 779 |     imports.wbg.__wbg_url_b978bb23c341ca85 = function(arg0, arg1) {
 780 |         const ret = getObject(arg1).url;
 781 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 782 |         const len1 = WASM_VECTOR_LEN;
 783 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 784 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 785 |     };
 786 |     imports.wbg.__wbg_readyState_7237e2b1adac03a6 = function(arg0) {
 787 |         const ret = getObject(arg0).readyState;
 788 |         return ret;
 789 |     };
 790 |     imports.wbg.__wbg_setonopen_7e770c87269cae90 = function(arg0, arg1) {
 791 |         getObject(arg0).onopen = getObject(arg1);
 792 |     };
 793 |     imports.wbg.__wbg_setonerror_5ec4625df3060159 = function(arg0, arg1) {
 794 |         getObject(arg0).onerror = getObject(arg1);
 795 |     };
 796 |     imports.wbg.__wbg_setonclose_40f935717ad6ffcd = function(arg0, arg1) {
 797 |         getObject(arg0).onclose = getObject(arg1);
 798 |     };
 799 |     imports.wbg.__wbg_setonmessage_b670c12ea34acd8b = function(arg0, arg1) {
 800 |         getObject(arg0).onmessage = getObject(arg1);
 801 |     };
 802 |     imports.wbg.__wbg_setbinaryType_d164a0be4c212c9c = function(arg0, arg1) {
 803 |         getObject(arg0).binaryType = ["blob","arraybuffer",][arg1];
 804 |     };
 805 |     imports.wbg.__wbg_new_0bf4a5b0632517ed = function() { return handleError(function (arg0, arg1) {
 806 |         const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
 807 |         return addHeapObject(ret);
 808 |     }, arguments) };
 809 |     imports.wbg.__wbg_newwithstrsequence_95750c7542ecfdb3 = function() { return handleError(function (arg0, arg1, arg2) {
 810 |         const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
 811 |         return addHeapObject(ret);
 812 |     }, arguments) };
 813 |     imports.wbg.__wbg_close_99bb12a22f16f79c = function() { return handleError(function (arg0) {
 814 |         getObject(arg0).close();
 815 |     }, arguments) };
 816 |     imports.wbg.__wbg_send_82b52e2f9f8946d9 = function() { return handleError(function (arg0, arg1, arg2) {
 817 |         getObject(arg0).send(getStringFromWasm0(arg1, arg2));
 818 |     }, arguments) };
 819 |     imports.wbg.__wbg_send_3ba8a16c3493b51b = function() { return handleError(function (arg0, arg1) {
 820 |         getObject(arg0).send(getObject(arg1));
 821 |     }, arguments) };
 822 |     imports.wbg.__wbg_wasClean_e83dfad67198c1c4 = function(arg0) {
 823 |         const ret = getObject(arg0).wasClean;
 824 |         return ret;
 825 |     };
 826 |     imports.wbg.__wbg_code_eae09136895f8ffa = function(arg0) {
 827 |         const ret = getObject(arg0).code;
 828 |         return ret;
 829 |     };
 830 |     imports.wbg.__wbg_reason_8a32e6ed703d6382 = function(arg0, arg1) {
 831 |         const ret = getObject(arg1).reason;
 832 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 833 |         const len1 = WASM_VECTOR_LEN;
 834 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 835 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 836 |     };
 837 |     imports.wbg.__wbg_code_4a4b2516783729c7 = function(arg0) {
 838 |         const ret = getObject(arg0).code;
 839 |         return ret;
 840 |     };
 841 |     imports.wbg.__wbg_data_5c47a6985fefc490 = function(arg0) {
 842 |         const ret = getObject(arg0).data;
 843 |         return addHeapObject(ret);
 844 |     };
 845 |     imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
 846 |         const ret = getObject(arg0).crypto;
 847 |         return addHeapObject(ret);
 848 |     };
 849 |     imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
 850 |         const ret = getObject(arg0).process;
 851 |         return addHeapObject(ret);
 852 |     };
 853 |     imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {
 854 |         const ret = getObject(arg0).versions;
 855 |         return addHeapObject(ret);
 856 |     };
 857 |     imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {
 858 |         const ret = getObject(arg0).node;
 859 |         return addHeapObject(ret);
 860 |     };
 861 |     imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {
 862 |         const ret = module.require;
 863 |         return addHeapObject(ret);
 864 |     }, arguments) };
 865 |     imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
 866 |         const ret = getObject(arg0).msCrypto;
 867 |         return addHeapObject(ret);
 868 |     };
 869 |     imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
 870 |         getObject(arg0).randomFillSync(takeObject(arg1));
 871 |     }, arguments) };
 872 |     imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
 873 |         getObject(arg0).getRandomValues(getObject(arg1));
 874 |     }, arguments) };
 875 |     imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
 876 |         const ret = getObject(arg0) == getObject(arg1);
 877 |         return ret;
 878 |     };
 879 |     imports.wbg.__wbindgen_as_number = function(arg0) {
 880 |         const ret = +getObject(arg0);
 881 |         return ret;
 882 |     };
 883 |     imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
 884 |         const ret = String(getObject(arg1));
 885 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
 886 |         const len1 = WASM_VECTOR_LEN;
 887 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
 888 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
 889 |     };
 890 |     imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
 891 |         const ret = getObject(arg0)[getObject(arg1)];
 892 |         return addHeapObject(ret);
 893 |     };
 894 |     imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
 895 |         getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
 896 |     };
 897 |     imports.wbg.__wbg_get_3baa728f9d58d3f6 = function(arg0, arg1) {
 898 |         const ret = getObject(arg0)[arg1 >>> 0];
 899 |         return addHeapObject(ret);
 900 |     };
 901 |     imports.wbg.__wbg_length_ae22078168b726f5 = function(arg0) {
 902 |         const ret = getObject(arg0).length;
 903 |         return ret;
 904 |     };
 905 |     imports.wbg.__wbg_new_a220cf903aa02ca2 = function() {
 906 |         const ret = new Array();
 907 |         return addHeapObject(ret);
 908 |     };
 909 |     imports.wbg.__wbg_newnoargs_76313bd6ff35d0f2 = function(arg0, arg1) {
 910 |         const ret = new Function(getStringFromWasm0(arg0, arg1));
 911 |         return addHeapObject(ret);
 912 |     };
 913 |     imports.wbg.__wbg_next_de3e9db4440638b2 = function(arg0) {
 914 |         const ret = getObject(arg0).next;
 915 |         return addHeapObject(ret);
 916 |     };
 917 |     imports.wbg.__wbg_next_f9cb570345655b9a = function() { return handleError(function (arg0) {
 918 |         const ret = getObject(arg0).next();
 919 |         return addHeapObject(ret);
 920 |     }, arguments) };
 921 |     imports.wbg.__wbg_done_bfda7aa8f252b39f = function(arg0) {
 922 |         const ret = getObject(arg0).done;
 923 |         return ret;
 924 |     };
 925 |     imports.wbg.__wbg_value_6d39332ab4788d86 = function(arg0) {
 926 |         const ret = getObject(arg0).value;
 927 |         return addHeapObject(ret);
 928 |     };
 929 |     imports.wbg.__wbg_iterator_888179a48810a9fe = function() {
 930 |         const ret = Symbol.iterator;
 931 |         return addHeapObject(ret);
 932 |     };
 933 |     imports.wbg.__wbg_get_224d16597dbbfd96 = function() { return handleError(function (arg0, arg1) {
 934 |         const ret = Reflect.get(getObject(arg0), getObject(arg1));
 935 |         return addHeapObject(ret);
 936 |     }, arguments) };
 937 |     imports.wbg.__wbg_call_1084a111329e68ce = function() { return handleError(function (arg0, arg1) {
 938 |         const ret = getObject(arg0).call(getObject(arg1));
 939 |         return addHeapObject(ret);
 940 |     }, arguments) };
 941 |     imports.wbg.__wbg_new_525245e2b9901204 = function() {
 942 |         const ret = new Object();
 943 |         return addHeapObject(ret);
 944 |     };
 945 |     imports.wbg.__wbg_self_3093d5d1f7bcb682 = function() { return handleError(function () {
 946 |         const ret = self.self;
 947 |         return addHeapObject(ret);
 948 |     }, arguments) };
 949 |     imports.wbg.__wbg_window_3bcfc4d31bc012f8 = function() { return handleError(function () {
 950 |         const ret = window.window;
 951 |         return addHeapObject(ret);
 952 |     }, arguments) };
 953 |     imports.wbg.__wbg_globalThis_86b222e13bdf32ed = function() { return handleError(function () {
 954 |         const ret = globalThis.globalThis;
 955 |         return addHeapObject(ret);
 956 |     }, arguments) };
 957 |     imports.wbg.__wbg_global_e5a3fe56f8be9485 = function() { return handleError(function () {
 958 |         const ret = global.global;
 959 |         return addHeapObject(ret);
 960 |     }, arguments) };
 961 |     imports.wbg.__wbg_set_673dda6c73d19609 = function(arg0, arg1, arg2) {
 962 |         getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
 963 |     };
 964 |     imports.wbg.__wbg_isArray_8364a5371e9737d8 = function(arg0) {
 965 |         const ret = Array.isArray(getObject(arg0));
 966 |         return ret;
 967 |     };
 968 |     imports.wbg.__wbg_of_61f336d7eeabfca8 = function(arg0, arg1, arg2) {
 969 |         const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));
 970 |         return addHeapObject(ret);
 971 |     };
 972 |     imports.wbg.__wbg_push_37c89022f34c01ca = function(arg0, arg1) {
 973 |         const ret = getObject(arg0).push(getObject(arg1));
 974 |         return ret;
 975 |     };
 976 |     imports.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) {
 977 |         let result;
 978 |         try {
 979 |             result = getObject(arg0) instanceof ArrayBuffer;
 980 |         } catch (_) {
 981 |             result = false;
 982 |         }
 983 |         const ret = result;
 984 |         return ret;
 985 |     };
 986 |     imports.wbg.__wbg_new_7695fb2ba274b094 = function(arg0) {
 987 |         const ret = new ArrayBuffer(arg0 >>> 0);
 988 |         return addHeapObject(ret);
 989 |     };
 990 |     imports.wbg.__wbg_call_89af060b4e1523f2 = function() { return handleError(function (arg0, arg1, arg2) {
 991 |         const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
 992 |         return addHeapObject(ret);
 993 |     }, arguments) };
 994 |     imports.wbg.__wbg_instanceof_Map_763ce0e95960d55e = function(arg0) {
 995 |         let result;
 996 |         try {
 997 |             result = getObject(arg0) instanceof Map;
 998 |         } catch (_) {
 999 |             result = false;
1000 |         }
1001 |         const ret = result;
1002 |         return ret;
1003 |     };
1004 |     imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
1005 |         const ret = Number.isSafeInteger(getObject(arg0));
1006 |         return ret;
1007 |     };
1008 |     imports.wbg.__wbg_now_b7a162010a9e75b4 = function() {
1009 |         const ret = Date.now();
1010 |         return ret;
1011 |     };
1012 |     imports.wbg.__wbg_entries_7a0e06255456ebcd = function(arg0) {
1013 |         const ret = Object.entries(getObject(arg0));
1014 |         return addHeapObject(ret);
1015 |     };
1016 |     imports.wbg.__wbg_new_b85e72ed1bfd57f9 = function(arg0, arg1) {
1017 |         try {
1018 |             var state0 = {a: arg0, b: arg1};
1019 |             var cb0 = (arg0, arg1) => {
1020 |                 const a = state0.a;
1021 |                 state0.a = 0;
1022 |                 try {
1023 |                     return __wbg_adapter_230(a, state0.b, arg0, arg1);
1024 |                 } finally {
1025 |                     state0.a = a;
1026 |                 }
1027 |             };
1028 |             const ret = new Promise(cb0);
1029 |             return addHeapObject(ret);
1030 |         } finally {
1031 |             state0.a = state0.b = 0;
1032 |         }
1033 |     };
1034 |     imports.wbg.__wbg_resolve_570458cb99d56a43 = function(arg0) {
1035 |         const ret = Promise.resolve(getObject(arg0));
1036 |         return addHeapObject(ret);
1037 |     };
1038 |     imports.wbg.__wbg_then_95e6edc0f89b73b1 = function(arg0, arg1) {
1039 |         const ret = getObject(arg0).then(getObject(arg1));
1040 |         return addHeapObject(ret);
1041 |     };
1042 |     imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
1043 |         const ret = getObject(arg0).buffer;
1044 |         return addHeapObject(ret);
1045 |     };
1046 |     imports.wbg.__wbg_new_a0719a520adfdb99 = function(arg0) {
1047 |         const ret = new Int32Array(getObject(arg0));
1048 |         return addHeapObject(ret);
1049 |     };
1050 |     imports.wbg.__wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9 = function(arg0, arg1, arg2) {
1051 |         const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1052 |         return addHeapObject(ret);
1053 |     };
1054 |     imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) {
1055 |         const ret = new Uint8Array(getObject(arg0));
1056 |         return addHeapObject(ret);
1057 |     };
1058 |     imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) {
1059 |         getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1060 |     };
1061 |     imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) {
1062 |         const ret = getObject(arg0).length;
1063 |         return ret;
1064 |     };
1065 |     imports.wbg.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) {
1066 |         let result;
1067 |         try {
1068 |             result = getObject(arg0) instanceof Uint8Array;
1069 |         } catch (_) {
1070 |             result = false;
1071 |         }
1072 |         const ret = result;
1073 |         return ret;
1074 |     };
1075 |     imports.wbg.__wbg_newwithlength_ec548f448387c968 = function(arg0) {
1076 |         const ret = new Uint8Array(arg0 >>> 0);
1077 |         return addHeapObject(ret);
1078 |     };
1079 |     imports.wbg.__wbg_subarray_7c2e3576afe181d1 = function(arg0, arg1, arg2) {
1080 |         const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1081 |         return addHeapObject(ret);
1082 |     };
1083 |     imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
1084 |         const v = getObject(arg1);
1085 |         const ret = typeof(v) === 'bigint' ? v : undefined;
1086 |         getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1087 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1088 |     };
1089 |     imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1090 |         const ret = debugString(getObject(arg1));
1091 |         const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1092 |         const len1 = WASM_VECTOR_LEN;
1093 |         getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1094 |         getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1095 |     };
1096 |     imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1097 |         throw new Error(getStringFromWasm0(arg0, arg1));
1098 |     };
1099 |     imports.wbg.__wbindgen_rethrow = function(arg0) {
1100 |         throw takeObject(arg0);
1101 |     };
1102 |     imports.wbg.__wbindgen_module = function() {
1103 |         const ret = __wbg_init.__wbindgen_wasm_module;
1104 |         return addHeapObject(ret);
1105 |     };
1106 |     imports.wbg.__wbindgen_memory = function() {
1107 |         const ret = wasm.memory;
1108 |         return addHeapObject(ret);
1109 |     };
1110 |     imports.wbg.__wbg_startWorkers_2ee336a9694dda13 = function(arg0, arg1, arg2) {
1111 |         const ret = startWorkers(takeObject(arg0), takeObject(arg1), wbg_rayon_PoolBuilder.__wrap(arg2));
1112 |         return addHeapObject(ret);
1113 |     };
1114 |     imports.wbg.__wbindgen_closure_wrapper688 = function(arg0, arg1, arg2) {
1115 |         const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_54);
1116 |         return addHeapObject(ret);
1117 |     };
1118 |     imports.wbg.__wbindgen_closure_wrapper690 = function(arg0, arg1, arg2) {
1119 |         const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_57);
1120 |         return addHeapObject(ret);
1121 |     };
1122 |     imports.wbg.__wbindgen_closure_wrapper4180 = function(arg0, arg1, arg2) {
1123 |         const ret = makeMutClosure(arg0, arg1, 2605, __wbg_adapter_60);
1124 |         return addHeapObject(ret);
1125 |     };
1126 |     imports.wbg.__wbindgen_closure_wrapper4538 = function(arg0, arg1, arg2) {
1127 |         const ret = makeMutClosure(arg0, arg1, 2773, __wbg_adapter_63);
1128 |         return addHeapObject(ret);
1129 |     };
1130 |     imports.wbg.__wbindgen_closure_wrapper4539 = function(arg0, arg1, arg2) {
1131 |         const ret = makeMutClosure(arg0, arg1, 2773, __wbg_adapter_63);
1132 |         return addHeapObject(ret);
1133 |     };
1134 | 
1135 |     return imports;
1136 | }
1137 | 
1138 | function __wbg_init_memory(imports, memory) {
1139 |     imports.wbg.memory = memory || new WebAssembly.Memory({initial:25,maximum:16384,shared:true});
1140 | }
1141 | 
1142 | function __wbg_finalize_init(instance, module, thread_stack_size) {
1143 |     wasm = instance.exports;
1144 |     __wbg_init.__wbindgen_wasm_module = module;
1145 |     cachedDataViewMemory0 = null;
1146 |     cachedUint8ArrayMemory0 = null;
1147 | 
1148 | if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) { throw 'invalid stack size' }
1149 | wasm.__wbindgen_start(thread_stack_size);
1150 | return wasm;
1151 | }
1152 | 
1153 | function initSync(module, memory) {
1154 |     if (wasm !== undefined) return wasm;
1155 | 
1156 |     let thread_stack_size
1157 |     if (typeof module !== 'undefined' && Object.getPrototypeOf(module) === Object.prototype)
1158 |     ({module, memory, thread_stack_size} = module)
1159 |     else
1160 |     console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1161 | 
1162 |     const imports = __wbg_get_imports();
1163 | 
1164 |     __wbg_init_memory(imports, memory);
1165 | 
1166 |     if (!(module instanceof WebAssembly.Module)) {
1167 |         module = new WebAssembly.Module(module);
1168 |     }
1169 | 
1170 |     const instance = new WebAssembly.Instance(module, imports);
1171 | 
1172 |     return __wbg_finalize_init(instance, module, thread_stack_size);
1173 | }
1174 | 
1175 | async function __wbg_init(module_or_path, memory) {
1176 |     if (wasm !== undefined) return wasm;
1177 | 
1178 |     let thread_stack_size
1179 |     if (typeof module_or_path !== 'undefined' && Object.getPrototypeOf(module_or_path) === Object.prototype)
1180 |     ({module_or_path, memory, thread_stack_size} = module_or_path)
1181 |     else
1182 |     console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1183 | 
1184 |     if (typeof module_or_path === 'undefined') {
1185 |         module_or_path = new URL('tlsn_wasm_bg.wasm', import.meta.url);
1186 |     }
1187 |     const imports = __wbg_get_imports();
1188 | 
1189 |     if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1190 |         module_or_path = fetch(module_or_path);
1191 |     }
1192 | 
1193 |     __wbg_init_memory(imports, memory);
1194 | 
1195 |     const { instance, module } = await __wbg_load(await module_or_path, imports);
1196 | 
1197 |     return __wbg_finalize_init(instance, module, thread_stack_size);
1198 | }
1199 | 
1200 | export { initSync };
1201 | export default __wbg_init;
1202 | 
```
Page 2/3FirstPrevNextLast