{"_id":"@dfinity/standalone-sig-verifier-web","_rev":"18-e6004af620c6543ce5264abe30da37d1","name":"@dfinity/standalone-sig-verifier-web","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dfinity/standalone-sig-verifier-web","version":"1.0.0","license":"SEE LICENSE IN LICENSE","_id":"@dfinity/standalone-sig-verifier-web@1.0.0","maintainers":[{"name":"dfx-json","email":"jason.ibrahim@dfinity.org"},{"name":"dfn_wndlng","email":"jan.wendling@dfinity.org"},{"name":"nathan.mcgrath.dfinity","email":"nathan.mcgrath@dfinity.org"},{"name":"frederikrothenberger","email":"frederik.rothenberger@dfinity.org"},{"name":"bitdivine","email":"bitdivine69@gmail.com"},{"name":"ielashi","email":"diner-rodding@ic8.org"},{"name":"liadrit","email":"lia.bajraliu@dfinity.org"},{"name":"dayyildiz","email":"dominik.ayyildiz@dfinity.org"},{"name":"eric-swanson-dfinity","email":"eric.swanson@dfinity.org"},{"name":"krpeacock","email":"kylpeacock@gmail.com"},{"name":"npm-dfinity-org","email":"npm@dfinity.org"}],"homepage":"https://github.com/dfinity/standalone-sig-verifier-web#readme","bugs":{"url":"https://github.com/dfinity/standalone-sig-verifier-web/issues"},"dist":{"shasum":"af2a5ab1ba5a5d7603db24ff0fd31d915f1c5d8c","tarball":"https://registry.npmjs.org/@dfinity/standalone-sig-verifier-web/-/standalone-sig-verifier-web-1.0.0.tgz","fileCount":6,"integrity":"sha512-DxtSjxIk/TUWSisFJigdF50UR2YSH2oxNcFgArc3gfeqyv7lgEhzAsJdt1vKT8ci0TpUgGggOQAvMb5PE2ISYQ==","signatures":[{"sig":"MEYCIQDGV/NvayHyo1HBOKXdu2f5jlhvV1ajE0R4Iv4r8sOr+gIhAPGz0ryi2rPnCO647T+Pqzeye718L7zkzq0/djfNFPV8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1308228},"types":"standalone_sig_verifier_web.d.ts","module":"standalone_sig_verifier_web.js","gitHead":"e00da75439a914bd077a55fcd52e66b0d038be86","_npmUser":{"name":"bitdivine","email":"bitdivine69@gmail.com"},"repository":{"url":"git+https://github.com/dfinity/standalone-sig-verifier-web.git","type":"git"},"_npmVersion":"9.8.1","description":"Standalone crypto library to verify cryptographic signatures for the Internet Computer","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/standalone-sig-verifier-web_1.0.0_1697209856724_0.2903641777466981","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-13T15:10:56.645Z","modified":"2026-08-18T10:49:34.915Z","1.0.0":"2023-10-13T15:10:56.991Z"},"bugs":{"url":"https://github.com/dfinity/standalone-sig-verifier-web/issues"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/dfinity/standalone-sig-verifier-web#readme","repository":{"url":"git+https://github.com/dfinity/standalone-sig-verifier-web.git","type":"git"},"description":"Standalone crypto library to verify cryptographic signatures for the Internet Computer","maintainers":[{"email":"dominik.ayyildiz@dfinity.org","name":"dayyildiz"},{"email":"antonio.ventilii@dfinity.org","name":"antonioventilii-dfinity"},{"email":"npm@dfinity.org","name":"npm-dfinity-org"},{"email":"jan.wendling@dfinity.org","name":"dfn_wndlng"},{"email":"islam@elashi.me","name":"ielashi"},{"email":"itowner@dfinity.org","name":"dfn-it-owner"}],"readme":"# standalone-sig-verifier-web\nJS/TS Wrapper for the `ic-standalone-sig-verifier` rust crate ([code](https://github.com/dfinity/ic/tree/master/rs/crypto/standalone-sig-verifier)) to publish it as a browser / node compatible library to npm.\n\n> _**Warning:**_ There are some caveats to using this library:\n> 1. **Verifying signatures in the front-end is generally unsafe!** Malicious users could modify the front-end code and bypass the signature verification. This library is intended for use in demos, prototypes, backends and other situations where the code either cannot be tampered with _or_ the tampering does not pose a security risk.\n> 2. This library is built from the `master` branch of the `ic` repo rather than a proper release of the underlying library. This means that the API may change at any time.\n> 3. The resulting wasm module is _heavy_, around 400 kb gzipped. Do not use this library if you are concerned about the size of your bundle.\n\n\n## Prerequisites\n\n- [rust](https://www.rust-lang.org)\n- [wasm-pack](https://github.com/rustwasm/wasm-pack)\n\n## Building\nRun the following command\n```bash\nwasm-pack build --target web --out-dir dist --release --scope dfinity\n```\n## Usage Example\n\n```js\nimport initSigVerifier, {verifyIcSignature} from '@dfinity/standalone-sig-verifier-web';\n\nasync function example(dataRaw, signatureRaw, derPublicKey, root_key) {\n    // load wasm module\n    await initSigVerifier(); \n    try {\n        // call the signature verification wasm function\n        verifyIcSignature(dataRaw, signatureRaw, derPublicKey, root_key);\n        console.log('signature verified successfully')\n    } catch (error) {\n        // the library throws an error if the signature is invalid\n        console.error('signature verifcation failed', error)\n    }\n}\n```","readmeFilename":"README.md"}