{"_id":"@atcute/oauth-keyset","_rev":"4-455a5e1f397fa3c2757a31f955ca1c39","name":"@atcute/oauth-keyset","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@atcute/oauth-keyset","version":"0.1.0","license":"0BSD","_id":"@atcute/oauth-keyset@0.1.0","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"homepage":"https://github.com/mary-ext/atcute#readme","bugs":{"url":"https://github.com/mary-ext/atcute/issues"},"dist":{"shasum":"76adc3bd30e2dd519d4283e1777b934c51f73df5","tarball":"https://registry.npmjs.org/@atcute/oauth-keyset/-/oauth-keyset-0.1.0.tgz","fileCount":18,"integrity":"sha512-+wqT/+I5Lg9VzKnKY3g88+N45xbq+wsdT6bHDGqCVa2u57gRvolFF4dY+weMfc/OX641BIZO6/o+zFtKBsMQnQ==","signatures":[{"sig":"MEUCIQCy5MFPWGYrobJd+H5thf0TVXHIhQTOB+B4dKIts6gj4gIgASvMgMV54MSlL+R59uwPYhGUPyOoWDM8sIBVb1si7NY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18184},"type":"module","_from":"file:atcute-oauth-keyset-0.1.0.tgz","exports":{".":"./dist/index.js"},"scripts":{"test":"vitest","build":"tsgo --project tsconfig.build.json","prepublish":"rm -rf dist; pnpm run build"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"_resolved":"/tmp/915ebe77a7c9b5525343c806b6a315f3/atcute-oauth-keyset-0.1.0.tgz","_integrity":"sha512-+wqT/+I5Lg9VzKnKY3g88+N45xbq+wsdT6bHDGqCVa2u57gRvolFF4dY+weMfc/OX641BIZO6/o+zFtKBsMQnQ==","repository":{"url":"git+https://github.com/mary-ext/atcute.git","directory":"packages/oauth/keyset"},"_npmVersion":"10.9.4","description":"keyset management for AT Protocol OAuth","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@atcute/oauth-crypto":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.16"},"_npmOperationalInternal":{"tmp":"tmp/oauth-keyset_0.1.0_1769744699958_0.3599289829838985","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@atcute/oauth-keyset","version":"0.1.1","license":"0BSD","_id":"@atcute/oauth-keyset@0.1.1","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"dist":{"shasum":"c7aeaa741edff81ae11e4837a0d87d4c7e3c4e95","tarball":"https://registry.npmjs.org/@atcute/oauth-keyset/-/oauth-keyset-0.1.1.tgz","fileCount":18,"integrity":"sha512-BpaaXSuMawxILhWTOR0YIpKzFSA0MQC1W5Hn0HGE+giTqYFAKcdf0oA+2RZG9ZLVIzfO2txBsTeMpxB5qL6lEQ==","signatures":[{"sig":"MEUCIQDeGzv2RD1vN9PuVLcDORduHfeDtciGA7MDm+IiXPyzLwIgKyZxMH8HrtCUF/Hvv86l1f6vpin0dpYiWZv2pxqXimw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18043},"type":"module","exports":{".":"./dist/index.js"},"scripts":{"build":"tsgo","prepublish":"rm -rf dist; pnpm run build"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"repository":{"url":"https://github.com/mary-ext/atcute","directory":"packages/oauth/keyset"},"description":"keyset management for AT Protocol OAuth","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@atcute/oauth-crypto":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/oauth-keyset_0.1.1_1778312751890_0.07080031288912081","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@atcute/oauth-keyset","version":"0.1.2","license":"0BSD","_id":"@atcute/oauth-keyset@0.1.2","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"dist":{"shasum":"bd67ed4441aeae8ef1764df04e0e60ef5c74b7d4","tarball":"https://registry.npmjs.org/@atcute/oauth-keyset/-/oauth-keyset-0.1.2.tgz","fileCount":9,"integrity":"sha512-2CUazWBWRjSEoYZDaLS4zEPgCOcr9LgnMhPr1pzr9I+DytRnoXmrdbRs4xBVg4iUdXtdzU48DsMaGi6bHXaFcg==","signatures":[{"sig":"MEUCIQDNmCZjCVM0wYYmYOKs3R7VMe5KPRRPVpyEpVa6AI2R5AIgEMsLhVIJ+xw743Tc8XOu2nx4Wn8UODSYpkgw22+0bfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8928},"type":"module","exports":{".":"./dist/index.js"},"scripts":{"build":"tsgo","prepublish":"rm -rf dist; pnpm run build"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"repository":{"url":"https://github.com/mary-ext/atcute","directory":"packages/oauth/keyset"},"description":"keyset management for AT Protocol OAuth","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@atcute/oauth-crypto":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/oauth-keyset_0.1.2_1782736407799_0.30300798883486113","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@atcute/oauth-keyset","version":"0.1.3","description":"keyset management for AT Protocol OAuth","license":"0BSD","repository":{"url":"https://tangled.org/did:plc:pljn5qch4tgadongtc7i6qij","directory":"packages/oauth/keyset"},"type":"module","sideEffects":false,"exports":{".":"./dist/index.js"},"publishConfig":{"access":"public"},"dependencies":{"@atcute/oauth-crypto":"^1.0.1"},"scripts":{"build":"tsc","prepublish":"rm -rf dist; pnpm run build"},"_nodeVersion":"26.0.0","_id":"@atcute/oauth-keyset@0.1.3","dist":{"integrity":"sha512-VSNUb2TLUTyntgzfn58kwNL4kp4TD+M868tyyrFWlCaDVy0pDnVFfUXa1z1W+DBWLL9ICy2qTdPitRokAZKivw==","shasum":"92cf9da7320513716cae93abc3bfb684abd975ac","tarball":"https://registry.npmjs.org/@atcute/oauth-keyset/-/oauth-keyset-0.1.3.tgz","fileCount":9,"unpackedSize":9134,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID/pO/KA9lVqUjGSoTdVCYBMaHJb3VsYJgzdiHSWoWnmAiEAqbvhUGxwc75Brd5nAtgtuHX/ujT0RpCD6LdNb/rk3qo="}]},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"directories":{},"maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oauth-keyset_0.1.3_1785667760241_0.26166271588587486"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-30T03:44:59.860Z","modified":"2026-08-02T10:49:20.612Z","0.1.0":"2026-01-30T03:45:00.120Z","0.1.1":"2026-05-09T07:45:52.027Z","0.1.2":"2026-06-29T12:33:27.926Z","0.1.3":"2026-08-02T10:49:20.400Z"},"license":"0BSD","repository":{"url":"https://tangled.org/did:plc:pljn5qch4tgadongtc7i6qij","directory":"packages/oauth/keyset"},"description":"keyset management for AT Protocol OAuth","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"readme":"# @atcute/oauth-keyset\n\nkeyset management for AT Protocol OAuth.\n\n```sh\nnpm install @atcute/oauth-keyset\n```\n\n## usage\n\n### generating keys\n\n```ts\nimport { generateClientAssertionKey } from '@atcute/oauth-crypto';\nimport { Keyset } from '@atcute/oauth-keyset';\n\n// generate a new ES256 key\nconst key = await generateClientAssertionKey('my-key-id');\n\n// create a keyset with the key\nconst keyset = new Keyset([key]);\n```\n\n### using JWKs directly\n\n```ts\nimport type { ClientAssertionPrivateJwk } from '@atcute/oauth-crypto';\nimport { Keyset } from '@atcute/oauth-keyset';\n\n// JWKs can be used directly - no import step needed\nconst jwk: ClientAssertionPrivateJwk = {\n\tkty: 'EC',\n\tcrv: 'P-256',\n\tkid: 'my-key',\n\talg: 'ES256',\n\t// ... private key parameters (x, y, d)\n};\n\nconst keyset = new Keyset([jwk]);\n```\n\n### importing from PKCS#8\n\n```ts\nimport { importClientAssertionPkcs8 } from '@atcute/oauth-crypto';\nimport { Keyset } from '@atcute/oauth-keyset';\n\n// import from PKCS#8 PEM - returns a JWK\nconst jwk = await importClientAssertionPkcs8(pemString, {\n\tkid: 'my-key',\n\talg: 'ES256',\n});\n\nconst keyset = new Keyset([jwk]);\n```\n\n### using the keyset\n\n```ts\n// get public JWKS (for serving at jwks_uri)\nconst jwks = keyset.publicJwks;\n\n// find a key by criteria\nconst key = keyset.find({ kid: 'my-key' });\nconst key = keyset.find({ alg: 'ES256' });\n\n// find a key for signing with server negotiation\nconst { key, alg } = keyset.findForSigning(['ES256', 'ES384']);\n```\n","readmeFilename":""}