{"_id":"@atlaschain/webcrypto-ed25519-polyfill","name":"@atlaschain/webcrypto-ed25519-polyfill","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@atlaschain/webcrypto-ed25519-polyfill","version":"3.0.0","description":"A polyfill that adds Ed25519 key manipulation capabilities to `SubtleCrypto` in environments where it is not yet supported","exports":{"edge-light":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"workerd":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"browser":{"import":"./dist/index.browser.mjs","require":"./dist/index.browser.cjs"},"node":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"react-native":"./dist/index.native.mjs","types":"./dist/types/index.d.ts"},"browser":{"./dist/index.node.cjs":"./dist/index.browser.cjs","./dist/index.node.mjs":"./dist/index.browser.mjs"},"main":"./dist/index.node.cjs","module":"./dist/index.node.mjs","react-native":"./dist/index.native.mjs","types":"./dist/types/index.d.ts","type":"commonjs","sideEffects":true,"keywords":["blockchain","atlas","web3"],"author":{"name":"Atlas Chain Foundation"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anza-xyz/kit.git"},"bugs":{"url":"https://github.com/anza-xyz/kit/issues"},"browserslist":["supports bigint and not dead","maintained node versions"],"dependencies":{"@noble/ed25519":"^3.0.0"},"peerDependencies":{"typescript":">=5.3.3"},"engines":{"node":">=20.18.0"},"scripts":{"compile:docs":"typedoc","compile:js":"tsup --config build-scripts/tsup.config.package.ts","compile:typedefs":"tsc -p ./tsconfig.declarations.json","dev":"jest -c ../../node_modules/@atlaschain/test-config/jest-dev.config.ts --rootDir . --watch","publish-impl":"npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || (pnpm publish --tag ${PUBLISH_TAG:-canary} --access public --no-git-checks && (([ -n \"${GITHUB_OUTPUT:-}\" ] && echo 'published=true' >> \"$GITHUB_OUTPUT\") || true) && (([ \"$PUBLISH_TAG\" != \"canary\" ] && ../build-scripts/maybe-tag-latest.ts $npm_package_name@$npm_package_version) || true))","publish-packages":"pnpm prepublishOnly && pnpm publish-impl","style:fix":"pnpm eslint --fix src && pnpm prettier --log-level warn --ignore-unknown --write ./*","test:lint":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/test-config/jest-lint.config.ts --rootDir . --silent","test:prettier":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/test-config/jest-prettier.config.ts --rootDir . --silent","test:typecheck":"tsc --noEmit","test:unit:browser":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/test-config/jest-unit.config.browser.ts --rootDir . --silent","test:unit:node":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/test-config/jest-unit.config.node.ts --rootDir . --silent"},"_id":"@atlaschain/webcrypto-ed25519-polyfill@3.0.0","homepage":"https://github.com/anza-xyz/kit#readme","_integrity":"sha512-d6uCzNgzAIJm+26a+OAqfMtJTILa60N6KjIwZTiKZVhLxTAbGbtO/OgBYxt7iYmw/o9dOwdivR9QhVBEIIqoEg==","_resolved":"/private/var/folders/q8/nr55p0wd491c6fjmbky17kd00000gn/T/b2888931f88b55fd69a99791eec336c1/atlaschain-webcrypto-ed25519-polyfill-3.0.0.tgz","_from":"file:atlaschain-webcrypto-ed25519-polyfill-3.0.0.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-d6uCzNgzAIJm+26a+OAqfMtJTILa60N6KjIwZTiKZVhLxTAbGbtO/OgBYxt7iYmw/o9dOwdivR9QhVBEIIqoEg==","shasum":"e62cb8ddb68a58dbb4f659f87fffa9b600731621","tarball":"https://registry.npmjs.org/@atlaschain/webcrypto-ed25519-polyfill/-/webcrypto-ed25519-polyfill-3.0.0.tgz","fileCount":5,"unpackedSize":10274,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCxFYa3i7K1HiYdL1T3E+tPBCh6hFJA164c5fVPb4N4IAIgEwn8aKDzAVv0rpcgE2gbqcjLWP51O2grtbpw2kuOUqI="}]},"_npmUser":{"name":"atlaschain","email":"jq@atlaschain.org"},"directories":{},"maintainers":[{"name":"atlaschain","email":"jq@atlaschain.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webcrypto-ed25519-polyfill_3.0.0_1764611555063_0.12681149987707419"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-01T17:52:34.970Z","3.0.0":"2025-12-01T17:52:35.246Z","modified":"2025-12-01T17:52:35.559Z"},"maintainers":[{"name":"atlaschain","email":"jq@atlaschain.org"}],"description":"A polyfill that adds Ed25519 key manipulation capabilities to `SubtleCrypto` in environments where it is not yet supported","homepage":"https://github.com/anza-xyz/kit#readme","keywords":["blockchain","atlas","web3"],"repository":{"type":"git","url":"git+https://github.com/anza-xyz/kit.git"},"author":{"name":"Atlas Chain Foundation"},"bugs":{"url":"https://github.com/anza-xyz/kit/issues"},"license":"MIT","readme":"[![npm][npm-image]][npm-url]\n[![npm-downloads][npm-downloads-image]][npm-url]\n<br />\n[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]\n\n[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\n[code-style-prettier-url]: https://github.com/prettier/prettier\n[npm-downloads-image]: https://img.shields.io/npm/dm/@atlas/webcrypto-ed25519-polyfill?style=flat\n[npm-image]: https://img.shields.io/npm/v/@atlas/webcrypto-ed25519-polyfill?style=flat\n[npm-url]: https://www.npmjs.com/package/@atlas/webcrypto-ed25519-polyfill\n\n# @atlas/webcrypto-ed25519-polyfill\n\nThis package contains a polyfill that enables Ed25519 key manipulation in environments where it is not yet implemented. It does so by proxying calls to `SubtleCrypto` instance methods to an Ed25519 implementation in userspace.\n\n> [!WARNING]\n> Because this package's implementation of Ed25519 key generation exists in userspace, it can't guarantee that the keys you generate with it are non-exportable. Untrusted code running in your JavaScript context may still be able to gain access to and/or exfiltrate secret key material.\n\n> [!NOTE]\n> Native `CryptoKeys` can be stored in IndexedDB but the keys created by this polyfill can not. This is because, unlike native `CryptoKeys`, our polyfilled key objects can not implement the [structured clone algorithm](https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface-clone).\n\n## Usage\n\nEnvironments that support Ed25519 (see https://github.com/WICG/webcrypto-secure-curves/issues/20) do not require this polyfill.\n\nFor all others, simply import this polyfill before use.\n\n```ts\nimport { install } from '@atlas/webcrypto-ed25519-polyfill';\n\n// Calling this will shim methods on `SubtleCrypto`, adding Ed25519 support.\ninstall();\n\n// Now you can do this, in environments that do not otherwise support Ed25519.\nconst keyPair = await crypto.subtle.generateKey({ name: 'Ed25519' }, false, ['sign']);\nconst publicKeyBytes = await crypto.subtle.exportKey('raw', keyPair.publicKey);\nconst data = new Uint8Array([1, 2, 3]);\nconst signature = await crypto.subtle.sign({ name: 'Ed25519' }, keyPair.privateKey, data);\nif (await crypto.subtle.verify({ name: 'Ed25519' }, keyPair.publicKey, signature, data)) {\n    console.log('Data was signed using the private key associated with this public key');\n} else {\n    throw new Error('Signature verification error');\n}\n```\n","readmeFilename":"README.md","_rev":"1-951ef3231d0b7c2160d825c7daa32146"}