{"name":"@napi-rs/keyring","version":"1.1.7","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","node-addon-api"],"license":"MIT","_id":"@napi-rs/keyring@1.1.7","maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"},{"name":"forehalo","email":"forehalo@gmail.com"}],"homepage":"https://github.com/Brooooooklyn/keyring-node#readme","bugs":{"url":"https://github.com/Brooooooklyn/keyring-node/issues"},"ava":{"timeout":"2m","extensions":{"ts":"module"},"nodeArguments":["--import","@oxc-node/core/register"],"workerThreads":false,"environmentVariables":{"TS_NODE_PROJECT":"./tsconfig.json"}},"dist":{"shasum":"904bf4506ebbc590b9ec1ccdbc0c8a05f17303bf","tarball":"http://registry-npm.ywwl.com/@napi-rs/keyring/download/@napi-rs/keyring-1.1.7.tgz","fileCount":7,"integrity":"sha512-L0XMJUjmqqJdgHcGmJI8VAcYTwQf1puGtztNofqaUJOLakm9QBfEdeJ3t1oyFykgwBlwsUDdgaT15hASJjMe0g==","signatures":[{"sig":"MEUCIEylXqUcm6IUrPATKKIPUyfMGI7wfmiaBWY3/aWxoLeaAiEA+LvkEzeA5llN5yLzW01S0t/qxVbXycTbO9rkHDVrKQE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@napi-rs%2fkeyring@1.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21573,"size":4965,"noattachment":false,"key":"/@napi-rs/keyring/-/@napi-rs/keyring-1.1.7.tgz"},"main":"index.js","napi":{"targets":["aarch64-apple-darwin","aarch64-unknown-linux-gnu","aarch64-unknown-linux-musl","aarch64-pc-windows-msvc","x86_64-apple-darwin","x86_64-pc-windows-msvc","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","x86_64-unknown-freebsd","i686-pc-windows-msvc","armv7-unknown-linux-gnueabihf","riscv64gc-unknown-linux-gnu"],"binaryName":"keyring"},"types":"./index.d.ts","engines":{"node":">= 10"},"funding":{"url":"https://github.com/sponsors/Brooooooklyn","type":"github"},"gitHead":"8ace5efae69d0248f28ddcb2268c3a3114549d8b","scripts":{"lint":"oxlint","test":"ava -s","build":"napi build --platform --release","format":"run-p format:prettier format:rs format:toml","version":"napi version","artifacts":"napi artifacts","format:rs":"cargo fmt","build:debug":"napi build --platform","format:toml":"taplo format","prepublishOnly":"napi prepublish -t npm","format:prettier":"prettier . -w"},"_npmUser":{"name":"broooooklyn","email":"lynweklm@gmail.com"},"prettier":{"semi":false,"printWidth":120,"arrowParens":"always","singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+https://github.com/Brooooooklyn/keyring-node.git","type":"git"},"_npmVersion":"10.9.2","description":"https://github.com/hwchen/keyring-rs Node.js binding via https://napi.rs","directories":{},"lint-staged":{"*.toml":["taplo format"],"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"]},"_nodeVersion":"22.15.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.1","devDependencies":{"ava":"^6.3.0","chalk":"^5.4.1","husky":"^9.1.7","oxlint":"^0.16.9","prettier":"^3.5.3","@taplo/cli":"^0.7.0","typescript":"^5.8.3","@types/node":"^22.15.3","lint-staged":"^15.5.1","@napi-rs/cli":"^3.0.0-alpha.78","npm-run-all2":"^8.0.1","@oxc-node/core":"^0.0.27"},"optionalDependencies":{"@napi-rs/keyring-darwin-x64":"1.1.7","@napi-rs/keyring-freebsd-x64":"1.1.7","@napi-rs/keyring-darwin-arm64":"1.1.7","@napi-rs/keyring-linux-x64-gnu":"1.1.7","@napi-rs/keyring-linux-x64-musl":"1.1.7","@napi-rs/keyring-win32-x64-msvc":"1.1.7","@napi-rs/keyring-linux-arm64-gnu":"1.1.7","@napi-rs/keyring-win32-ia32-msvc":"1.1.7","@napi-rs/keyring-linux-arm64-musl":"1.1.7","@napi-rs/keyring-win32-arm64-msvc":"1.1.7","@napi-rs/keyring-linux-riscv64-gnu":"1.1.7","@napi-rs/keyring-linux-arm-gnueabihf":"1.1.7"},"_npmOperationalInternal":{"tmp":"tmp/keyring_1.1.7_1746340905516_0.7304502610658463","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@napi-rs/keyring`\n\n![https://github.com/Brooooooklyn/keyring-node/actions](https://github.com/Brooooooklyn/keyring-node/workflows/CI/badge.svg)\n[![Downloads](https://img.shields.io/npm/dm/@napi-rs/keyring.svg?sanitize=true)](https://npmcharts.com/compare/@napi-rs/keyring?minimal=true)\n\n> https://github.com/hwchen/keyring-rs Node.js binding via https://napi.rs\n\n# Usage\n\n```js\nimport { Entry } from '@napi-rs/keyring'\n\nconst entry = new Entry('my_service', 'my_name')\nentry.setPassword('topS3cr3tP4$$w0rd')\nconst password = entry.getPassword()\nconsole.log('My password is ', password)\nentry.deletePassword()\n```\n\n# Linux backend selection\n\nOn Linux, `Entry` and `AsyncEntry` pick a credential store automatically: the\n[Secret Service](https://crates.io/crates/dbus-secret-service-keyring-store) (gnome-keyring, KWallet,\nkeepassxc, ...) is tried first, and the binding silently falls back to the\n[kernel keyutils keyring](https://crates.io/crates/linux-keyutils-keyring-store) when no Secret Service\nis available.\n\nYou can pin an entry to one specific store by passing the options bag as the last argument (the\noption is accepted on every platform but only meaningful on Linux):\n\n```js\nnew Entry('my_service', 'my_name', { linux: { store: 'secret-service' } }) // require Secret Service\nnew Entry('my_service', 'my_name', { linux: { store: 'keyutils' } }) // require the kernel keyring\nEntry.withTarget('target', 'my_service', 'my_name', { linux: { store: 'keyutils' } })\n```\n\nWhen a store is required, the constructor throws if that store is unavailable — there is no silent\nfallback. When `withTarget` is combined with the keyutils store, the target is used as the kernel key\ndescription, so distinct targets keep distinct credentials.\n\n> **Note:** the keyutils store keeps credentials in kernel memory: per the\n> [linux-keyutils-keyring-store](https://crates.io/crates/linux-keyutils-keyring-store) docs, the key\n> management facility \"is completely in-memory and will not persist across reboots\". Prefer\n> `secret-service` for credentials that must survive a restart.\n","publish_time":1746340905692,"_cnpm_publish_time":1746340905692,"dist-tags":{"latest":"2.1.2"}}