{"_id":"@brightchain/brightchain-identity","_rev":"2-3828dc806c82f467bd86e5097954e206","name":"@brightchain/brightchain-identity","dist-tags":{"latest":"0.32.1"},"versions":{"0.31.0":{"name":"@brightchain/brightchain-identity","version":"0.31.0","keywords":["brightchain","identity","ecies","mnemonic","secp256k1","member"],"author":{"name":"Digital Defiance"},"license":"MIT","_id":"@brightchain/brightchain-identity@0.31.0","maintainers":[{"name":"jessica-mulein","email":"jessica@mulein.com"}],"homepage":"https://github.com/Digital-Defiance/BrightChain#readme","bugs":{"url":"https://github.com/Digital-Defiance/BrightChain/issues"},"dist":{"shasum":"746bc1bb00230ffc01b19db09ed3cbb88f647f2c","tarball":"https://registry.npmjs.org/@brightchain/brightchain-identity/-/brightchain-identity-0.31.0.tgz","fileCount":18,"integrity":"sha512-xcy2iAsdLcffKLHQu7e3vhwxYWQvn0i5BKT8RwilHMJORZAjhn1xN+PlQT4JSMv3Na1+hHxkUD2qr8BF0YCJvA==","signatures":[{"sig":"MEQCIC2QzPrwjtRzNZacmb5xLyYmqSK9O7TQVcBUUHiAe7LEAiAdDZseePDCACIn5g203KfgH4tKKkxxtyIHKOlympgISg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17166},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","import":"./src/index.js","default":"./src/index.js"},"./*":{"types":"./src/*.d.ts","import":"./src/*.js","default":"./src/*.js"}},"gitHead":"96e479427cb59853e7170c050139f67d2ddd8907","scripts":{"lint":"npx nx lint brightchain-identity","test":"npx nx test brightchain-identity","build":"npx nx build brightchain-identity","build:dev":"npx nx build brightchain-identity --configuration=development","build:prod":"npx nx build brightchain-identity --configuration=production"},"_npmUser":{"name":"jessica-mulein","email":"jessica@mulein.com"},"repository":{"url":"git+https://github.com/Digital-Defiance/BrightChain.git","type":"git","directory":"brightchain-identity"},"_npmVersion":"10.9.7","description":"BrightChain identity library - mnemonic-based Member factories and identity descriptors","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@digitaldefiance/i18n-lib":"4.7.4","@digitaldefiance/ecies-lib":"5.1.6","@digitaldefiance/node-ecies-lib":"5.1.6"},"_hasShrinkwrap":false,"peerDependencies":{"@brightchain/brightchain-lib":"^0.31.0"},"_npmOperationalInternal":{"tmp":"tmp/brightchain-identity_0.31.0_1778083531520_0.24528849342647474","host":"s3://npm-registry-packages-npm-production"}},"0.32.1":{"name":"@brightchain/brightchain-identity","version":"0.32.1","description":"BrightChain identity library - mnemonic-based Member factories and identity descriptors","main":"src/index.js","types":"src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","import":"./src/index.js","default":"./src/index.js"},"./*":{"types":"./src/*.d.ts","import":"./src/*.js","default":"./src/*.js"}},"repository":{"type":"git","url":"git+https://github.com/Digital-Defiance/BrightChain.git","directory":"brightchain-identity"},"homepage":"https://github.com/Digital-Defiance/BrightChain#readme","bugs":{"url":"https://github.com/Digital-Defiance/BrightChain/issues"},"keywords":["brightchain","identity","ecies","mnemonic","secp256k1","member"],"author":{"name":"Digital Defiance"},"license":"MIT","peerDependencies":{"@brightchain/brightchain-lib":"^0.32.1"},"dependencies":{"@digitaldefiance/ecies-lib":"5.2.2","@digitaldefiance/i18n-lib":"4.7.5","@digitaldefiance/node-ecies-lib":"5.2.2"},"scripts":{"build":"npx nx build brightchain-identity","test":"npx nx test brightchain-identity","lint":"npx nx lint brightchain-identity","build:dev":"npx nx build brightchain-identity --configuration=development","build:prod":"npx nx build brightchain-identity --configuration=production"},"type":"commonjs","_id":"@brightchain/brightchain-identity@0.32.1","gitHead":"035ccce670f246015c1b02d86408fcf580188e2e","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-cp+Pf/tUR8dA0zveMyu8ClGf3ZNBraU/F6zpnq6yzz3vPTbHp38zyTVjGHgArRxtfWaat0Bgm4TDi70dRhWhag==","shasum":"ccbdd179bfea3537bf972d2be34d1344176724be","tarball":"https://registry.npmjs.org/@brightchain/brightchain-identity/-/brightchain-identity-0.32.1.tgz","fileCount":18,"unpackedSize":17166,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBwsh3YfXKtCcWdWrtmBxHI/5xYJosQYtkd10/rO0oMcAiEA91LqUfft8/bGXr2NbrqOGha7KLEudfkLoI6Gd1v26OU="}]},"_npmUser":{"name":"jessica-mulein","email":"jessica@mulein.com"},"directories":{},"maintainers":[{"name":"jessica-mulein","email":"jessica@mulein.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/brightchain-identity_0.32.1_1782231567771_0.8026947720492805"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-06T16:05:31.381Z","modified":"2026-06-23T16:19:28.026Z","0.31.0":"2026-05-06T16:05:31.656Z","0.32.1":"2026-06-23T16:19:27.899Z"},"bugs":{"url":"https://github.com/Digital-Defiance/BrightChain/issues"},"author":{"name":"Digital Defiance"},"license":"MIT","homepage":"https://github.com/Digital-Defiance/BrightChain#readme","keywords":["brightchain","identity","ecies","mnemonic","secp256k1","member"],"repository":{"type":"git","url":"git+https://github.com/Digital-Defiance/BrightChain.git","directory":"brightchain-identity"},"description":"BrightChain identity library - mnemonic-based Member factories and identity descriptors","maintainers":[{"name":"jessica-mulein","email":"jessica@mulein.com"}],"readme":"# @brightchain/brightchain-identity\n\nThin server-side identity layer for BrightChain. Wraps the lower-level\n`Member` factories from\n[`@digitaldefiance/node-ecies-lib`](https://www.npmjs.com/package/@digitaldefiance/node-ecies-lib)\nand pairs every unlocked member with an `IBrightChainIdentity` descriptor that\nis safe to ship to clients.\n\n## Why this package exists\n\n`Member.fromMnemonic` / `Member.newMember` are the canonical way to materialise\na BrightChain identity, but they require:\n\n- a configured `ECIESService`,\n- an `EmailString` value object,\n- an explicit `MemberType`, and\n- careful disposal of the resulting private-key material.\n\n`brightchain-identity` lifts that boilerplate into a small static facade so\nevery consumer (API, CLI, desktop, agents) talks to the same surface and\nemits the same JSON-safe descriptor.\n\n## Usage\n\n```ts\nimport { BrightChainIdentity } from '@brightchain/brightchain-identity';\nimport { SecureString } from '@digitaldefiance/ecies-lib';\n\n// 1. Bootstrap a brand-new identity (e.g. signup flow)\nconst created = BrightChainIdentity.create('Ada Lovelace', 'ada@example.com');\nconsole.log(created.identity); // safe to send to client\nconsole.log(created.mnemonic.toString()); // show ONCE then discard\ncreated.member.dispose();\n\n// 2. Re-unlock an existing identity (e.g. login flow)\nconst bundle = BrightChainIdentity.fromMnemonic(\n  new SecureString('twelve word mnemonic ...'),\n  'Ada Lovelace',\n  'ada@example.com',\n);\n// Hand bundle.member to a CryptoSessionStore so subsequent requests do not\n// need the mnemonic.\n```\n\n## Pairing with crypto sessions\n\nThis library is the producer half of the equation; the consumer is\n`@brightchain/brightchain-node-express-suite`'s `CryptoSessionStore` and the\n`useSessionEstablish` / `useSessionUnlock` middlewares. Together they\nimplement the architecture described in\n[`docs/papers/brightchain-crypto-sessions.md`](../docs/papers/brightchain-crypto-sessions.md).\n\n## Public surface\n\n- `BrightChainIdentity.create(name, email, options?)` &mdash; mint a new\n  identity plus mnemonic.\n- `BrightChainIdentity.fromMnemonic(mnemonic, name, email, options?)` &mdash;\n  re-derive an identity.\n- `BrightChainIdentity.describe(member)` &mdash; project an unlocked `Member`\n  into the JSON-safe descriptor.\n- `IBrightChainIdentity`, `IBrightChainIdentityBundle` &mdash; types.\n- `BrightChainIdentityError` &mdash; the only error type the public surface\n  throws.\n\n## License\n\nMIT &copy; Digital Defiance\n","readmeFilename":"README.md"}