{"_id":"@0xpolygonid/aws-nitro-enclaves-nsm-node","name":"@0xpolygonid/aws-nitro-enclaves-nsm-node","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@0xpolygonid/aws-nitro-enclaves-nsm-node","version":"0.0.1","description":"A Node.js addon for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability.","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node.git"},"publishConfig":{"access":"public"},"keywords":["AWS Nitro Enclave","Nitro Secure Module","Attestation Document","NSM","node-addon"],"napi":{"name":"aws-nitro-enclaves-nsm-node","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl"]}},"license":"MIT","scripts":{"artifacts":"napi artifacts","build":"napi build --platform --release --pipe \"prettier -w\"","build:debug":"napi build --platform --pipe \"prettier -w\"","prepublishOnly":"napi prepublish -t npm","test":"ava","universal":"napi universal","version":"napi version"},"devDependencies":{"@napi-rs/cli":"^2.18.4","@types/node":"^22.15.2","ava":"^5.1.1","prettier":"^2.8.8"},"ava":{"timeout":"3m"},"engines":{"node":">= 20"},"_id":"@0xpolygonid/aws-nitro-enclaves-nsm-node@0.0.1","gitHead":"456c6cad7bb6d2972cd910384a80b8858b6c668c","bugs":{"url":"https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node/issues"},"homepage":"https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node#readme","_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-dLPXjsVfYKv4qjFU6UzqgtGVYwPTBkGQLgf39g/tCMx/oLzfsQ9E9m1Dy3hTRPpZiOkXZU4bECdHVwEBOfekdA==","shasum":"b4fdda3c8ae86f8af77b151c21fedac0dc43952d","tarball":"https://registry.npmjs.org/@0xpolygonid/aws-nitro-enclaves-nsm-node/-/aws-nitro-enclaves-nsm-node-0.0.1.tgz","fileCount":7,"unpackedSize":1472572,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0oDM5+kgGf6DLyRWFC2ZyKfaZv1TS5OFTZSdUNuUU6AIhAIPcR0RNb1p5axReF/XcMj79ac0y7mEcL72/tIVVePdc"}]},"_npmUser":{"name":"obrezhniev","email":"oleksandr.brezhniev@gmail.com"},"directories":{},"maintainers":[{"name":"obrezhniev","email":"oleksandr.brezhniev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aws-nitro-enclaves-nsm-node_0.0.1_1746022806637_0.3460856885028858"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-30T14:20:06.564Z","0.0.1":"2025-04-30T14:20:06.870Z","modified":"2025-04-30T14:20:07.154Z"},"maintainers":[{"name":"obrezhniev","email":"oleksandr.brezhniev@gmail.com"}],"description":"A Node.js addon for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability.","homepage":"https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node#readme","keywords":["AWS Nitro Enclave","Nitro Secure Module","Attestation Document","NSM","node-addon"],"repository":{"type":"git","url":"git+https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node.git"},"bugs":{"url":"https://github.com/0xpolygonid/aws-nitro-enclaves-nsm-node/issues"},"license":"MIT","readme":"# `AWS Nitro Enclaves NSM for Node.js`\n\n![https://github.com/wei-rong-1/aws-nitro-enclaves-nsm-node/actions](https://github.com/wei-rong-1/aws-nitro-enclaves-nsm-node/workflows/CI/badge.svg)\n\n> A Node.js addon for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability. [napi-rs](https://napi.rs/) based, only for Linux.\n\n## Features\n\n* PCR query and manipulation\n* Attestation\n* Entropy\n\nPlease refer to [aws/aws-nitro-enclaves-nsm-api](https://github.com/aws/aws-nitro-enclaves-nsm-api).\n\nFor Attestation Document details, check the following document: [Nitro Enclaves Attestation Process](https://github.com/aws/aws-nitro-enclaves-nsm-api/blob/main/docs/attestation_process.md)\n\n## Install this package\n\n```\nnpm install --save aws-nitro-enclaves-nsm-node\n\nyarn add aws-nitro-enclaves-nsm-node\n```\n\n## Support OS\n\n|                  | node14 | node16 | node18 |\n| ---------------- | ------ | ------ | ------ |\n| Linux x64 gnu    | ✓      | ✓      | ✓      |\n| Linux x64 musl   | ✓      | ✓      | ✓      |\n\n\n## Methods\n\n**open**, alias `init`, Initialization function.\n\n**close**, alias `exit`, Exit function.\n\n**extendPcr**, NSM `ExtendPCR` operation.\n\n**getPcrDescription**, NSM `DescribePCR` operation.\n\n**lockPcr**, NSM `LockPCR` operation.\n\n**lockPcrs**, NSM `LockPCRs` operation.\n\n**getDescription**, NSM `Describe` operation.\n\n**getAttestationDoc**, NSM `GetAttestationDoc` operation.\n\n**getRandom**, NSM `GetRandom` operation. Returns up to 256 bytes of random data.\n\n## Examples\n\n````\nimport {\n  open,\n  close,\n  extendPcr,\n  getPcrDescription,\n  lockPcr,\n  lockPcrs,\n  getDescription,\n  getAttestationDoc,\n  getRandom\n} from \"aws-nitro-enclaves-nsm-node\"\n\nconst fd = open()\n\n// extendPcr\n// getPcrDescription\n// lockPcr\n// lockPcrs\n// getDescription\n// getRandom\n\nconst attestationDoc = getAttestationDoc(\n  fd,\n  Buffer.from(\"hello world\"),   // user data\n  null,                         // nonce\n  Buffer.from(\"my public key\"), // public key\n)\n\nconsole.log(attestationDoc)\n\n\nclose(fd)\n````\n\n## Develop requirements\n\n- Install the latest `Rust`\n- Install `Node.js@12+` which fully supported `Node-API v4`\n- Install `yarn@1.x`\n\n## How to build\n\n- yarn\n- yarn build\n\n## Lisence\n\nMIT\n","readmeFilename":"README.md","_rev":"1-e9ba3e69e6da5a346c6b314195bcd681"}