{"_id":"@cproto/did-plc-lib","_rev":"4-20f3b90eabf2ce78a513f44046848105","name":"@cproto/did-plc-lib","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.5":{"name":"@cproto/did-plc-lib","version":"0.0.5","keywords":["did-plc","did","atproto","cproto"],"license":"MIT","_id":"@cproto/did-plc-lib@0.0.5","maintainers":[{"name":"aeroxander","email":"alexander@creaton.io"}],"homepage":"https://web.plc.directory/","dist":{"shasum":"97e7f0da9cf08e08ca45fef919acae6c93e434ed","tarball":"https://registry.npmjs.org/@cproto/did-plc-lib/-/did-plc-lib-0.0.5.tgz","fileCount":32,"integrity":"sha512-fjRa/ald5RdeEdQeKpVB7drwZtxdyd9hvC4iQVfE57UNzm8lPO4YMyOr3ojMONyNhvshK3oszt6j/Zaj8Oqq9w==","signatures":[{"sig":"MEYCIQCgdAZTka0pzXwIrm0rSMh9b9IHkq9NX42yozoCOH40NgIhAOg7UeYeiDnK6WfFKjWc0B/xFCMfKsYXlnieKB6J3kFD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4269279},"main":"dist/index.js","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"jest","build":"node ./build.js","verify":"run-p prettier lint","lint:fix":"yarn lint --fix","prettier":"prettier --check src/","postbuild":"tsc --build tsconfig.build.json","prepublish":"npm run update-main-to-dist","verify:fix":"yarn prettier:fix && yarn lint:fix","postpublish":"npm run update-main-to-src","prettier:fix":"prettier --write src/","update-main-to-src":"node ./update-pkg.js --update-main-to-src","update-main-to-dist":"node ./update-pkg.js --update-main-to-dist"},"_npmUser":{"name":"aeroxander","email":"alexander@creaton.io"},"repository":{"url":"https://github.com/did-method-plc/did-method-plc","type":"git","directory":"packages/lib"},"description":"DID PLC Typescript Client Library, modified for Creaton","directories":{},"dependencies":{"zod":"^3.21.4","axios":"^1.3.4","uint8arrays":"3.0.0","multiformats":"^9.6.4","@ipld/dag-cbor":"^7.0.3","@atproto/common":"0.3.0","@atproto/crypto":"0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint-plugin-prettier":"^4.2.1"},"_npmOperationalInternal":{"tmp":"tmp/did-plc-lib_0.0.5_1726832230909_0.07890022020123766","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@cproto/did-plc-lib","version":"0.0.6","keywords":["did-plc","did","atproto","cproto"],"license":"MIT","_id":"@cproto/did-plc-lib@0.0.6","maintainers":[{"name":"aeroxander","email":"alexander@creaton.io"}],"homepage":"https://web.plc.directory/","dist":{"shasum":"3fb7c863c418b2e7e3377a2a0384ea83ddbdef74","tarball":"https://registry.npmjs.org/@cproto/did-plc-lib/-/did-plc-lib-0.0.6.tgz","fileCount":32,"integrity":"sha512-MnlOIJ/ZQxcFrrADNTIngQtsiM0gXhISut0pRWjRxbSVRM/xow92SS6NN440xVdQIp1Lb/fZXWbFomvYkSOrBA==","signatures":[{"sig":"MEQCIB8BJS3pD6lus444O8+MYXZ3zZahwg5JpFALQsGGiAzuAiBGNMhFxgTSSLHJ6ZYrzIHw+3/6MAEmNwBdgPteqyCtRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4269342},"main":"dist/index.js","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"jest","build":"node ./build.js","verify":"run-p prettier lint","lint:fix":"yarn lint --fix","prettier":"prettier --check src/","postbuild":"tsc --build tsconfig.build.json","prepublish":"npm run update-main-to-dist","verify:fix":"yarn prettier:fix && yarn lint:fix","postpublish":"npm run update-main-to-src","prettier:fix":"prettier --write src/","update-main-to-src":"node ./update-pkg.js --update-main-to-src","update-main-to-dist":"node ./update-pkg.js --update-main-to-dist"},"_npmUser":{"name":"aeroxander","email":"alexander@creaton.io"},"repository":{"url":"https://github.com/did-method-plc/did-method-plc","type":"git","directory":"packages/lib"},"description":"DID PLC Typescript Client Library, modified for Creaton","directories":{},"dependencies":{"zod":"^3.21.4","axios":"^1.3.4","uint8arrays":"3.0.0","multiformats":"^9.6.4","@ipld/dag-cbor":"^7.0.3","@atproto/common":"0.3.0","@atproto/crypto":"0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint-plugin-prettier":"^4.2.1"},"_npmOperationalInternal":{"tmp":"tmp/did-plc-lib_0.0.6_1726847889923_0.7428043297738662","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"@cproto/did-plc-lib","version":"0.0.7","keywords":["did-plc","did","atproto","cproto"],"license":"MIT","_id":"@cproto/did-plc-lib@0.0.7","maintainers":[{"name":"aeroxander","email":"alexander@creaton.io"}],"homepage":"https://web.plc.directory/","dist":{"shasum":"2084a5375b2e73f8cecef00de565ad63076ba81b","tarball":"https://registry.npmjs.org/@cproto/did-plc-lib/-/did-plc-lib-0.0.7.tgz","fileCount":21,"integrity":"sha512-ELSycQuUIhh/775WZedk49rSktIWfLxrI06QSTUW8fjgd4WfynbXNFeVcFdoO/EDPC3Ozyg1B5ynNjGpv83qxw==","signatures":[{"sig":"MEUCIQCX6FObPsACVEsRiwKE3toWspI2zCPDJFnWfV3kRBKTiwIgHYesNiKm4S51VUd0Egplktqz9UDGR1FIpK+pvpFSWQU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45609},"main":"dist/index.js","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"jest","build":"node ./build.js","verify":"run-p prettier lint","lint:fix":"yarn lint --fix","prettier":"prettier --check src/","postbuild":"tsc --build tsconfig.build.json","prepublish":"npm run update-main-to-dist","verify:fix":"yarn prettier:fix && yarn lint:fix","postpublish":"npm run update-main-to-src","prettier:fix":"prettier --write src/","update-main-to-src":"node ./update-pkg.js --update-main-to-src","update-main-to-dist":"node ./update-pkg.js --update-main-to-dist"},"_npmUser":{"name":"aeroxander","email":"alexander@creaton.io"},"repository":{"url":"https://github.com/did-method-plc/did-method-plc","type":"git","directory":"packages/lib"},"description":"DID PLC Typescript Client Library, modified for Creaton","directories":{},"dependencies":{"zod":"^3.21.4","axios":"^1.3.4","uint8arrays":"3.0.0","multiformats":"^9.6.4","@ipld/dag-cbor":"^7.0.3","@atproto/common":"0.3.0","@atproto/crypto":"0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint-plugin-prettier":"^4.2.1"},"_npmOperationalInternal":{"tmp":"tmp/did-plc-lib_0.0.7_1749509878045_0.6523058087943341","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@cproto/did-plc-lib","version":"0.0.8","license":"MIT","description":"DID PLC Typescript Client Library, modified for Creaton","keywords":["did-plc","did","atproto","cproto"],"homepage":"https://web.plc.directory","repository":{"type":"git","url":"git+https://github.com/did-method-plc/did-method-plc.git","directory":"packages/lib"},"main":"dist/index.js","scripts":{"test":"jest","prettier":"prettier --check src/","prettier:fix":"prettier --write src/","lint":"eslint . --ext .ts,.tsx","lint:fix":"yarn lint --fix","verify":"run-p prettier lint","verify:fix":"yarn prettier:fix && yarn lint:fix","build":"node ./build.js","postbuild":"tsc --build tsconfig.build.json","update-main-to-dist":"node ./update-pkg.js --update-main-to-dist","update-main-to-src":"node ./update-pkg.js --update-main-to-src","prepublish":"npm run update-main-to-dist","postpublish":"npm run update-main-to-src"},"dependencies":{"@atproto/common":"0.3.0","@atproto/crypto":"0.4.3","@ipld/dag-cbor":"^7.0.3","axios":"^1.3.4","multiformats":"^9.6.4","uint8arrays":"3.0.0","zod":"^3.21.4"},"devDependencies":{"eslint-plugin-prettier":"^4.2.1"},"_id":"@cproto/did-plc-lib@0.0.8","gitHead":"41b4259cd53cddc6d8a073ba731f4b86f91e38d6","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/did-method-plc/did-method-plc/issues"},"_nodeVersion":"18.20.7","_npmVersion":"10.8.2","dist":{"integrity":"sha512-OjPJgO0OyL1gHl+ddTOYyGIm9ejIndEq+1jjwicYicqL2YxtMQPomTOmSEEwImfSDJ9JR95G6ZqAKFlOemFYeA==","shasum":"68149f8842fa5368356ebe1c40565b448ba805e5","tarball":"https://registry.npmjs.org/@cproto/did-plc-lib/-/did-plc-lib-0.0.8.tgz","fileCount":27,"unpackedSize":4332055,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCPS9jFIm526TSckW3atuOy6itYjNt3aNH6vitncHljRAIhAOZJJiOt/GR/m5g4e8wBCVTlP+F1LWnLgZGL/GuFX8rB"}]},"_npmUser":{"name":"aeroxander","email":"alexander@creaton.io"},"directories":{},"maintainers":[{"name":"aeroxander","email":"alexander@creaton.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/did-plc-lib_0.0.8_1749952315580_0.5514609290948385"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-20T11:37:10.814Z","modified":"2025-06-15T01:51:56.019Z","0.0.5":"2024-09-20T11:37:11.098Z","0.0.6":"2024-09-20T15:58:10.307Z","0.0.7":"2025-06-09T22:57:58.212Z","0.0.8":"2025-06-15T01:51:55.805Z"},"license":"MIT","homepage":"https://web.plc.directory","keywords":["did-plc","did","atproto","cproto"],"repository":{"type":"git","url":"git+https://github.com/did-method-plc/did-method-plc.git","directory":"packages/lib"},"description":"DID PLC Typescript Client Library, modified for Creaton","maintainers":[{"name":"aeroxander","email":"alexander@creaton.io"}],"readme":"\n@did-plc/lib - DID PLC Typescript Client Library\n================================================\n\n[![NPM](https://img.shields.io/npm/v/@did-plc/lib)](https://www.npmjs.com/package/@did-plc/lib)\n[![Github CI Status](https://github.com/did-method-plc/did-method-plc/actions/workflows/repo.yaml/badge.svg)](https://github.com/did-method-plc/did-method-plc/actions/workflows/repo.yaml)\n\nThis library provides both a simple client for the PLC directory, and an implementation of the PLC method itself (using a cryptographically signed operation log).\n\n## Client Usage\n\nFetching account data from directory:\n\n```typescript\nimport * as plc from '@did-plc/lib'\n\nclient = new plc.Client('https://plc.directory')\n\nlet exampleDid = 'did:plc:yk4dd2qkboz2yv6tpubpc6co'\n\n// current account data, in terse object format\nconst data = await client.getDocumentData(exampleDid)\n\n// or, the full DID Document\nconst didDoc = await client.getDocument(exampleDid)\n```\n\nRegistering a new DID PLC:\n\n```typescript\nimport { Secp256k1Keypair } from '@atproto/crypto'\nimport * as plc from '@did-plc/lib'\n\n// please test against a sandbox or local development server\nclient = new plc.Client('http://localhost:2582')\n\nlet signingKey = await Secp256k1Keypair.create()\nlet rotationKey = await Secp256k1Keypair.create()\n\ndid = await client.createDid({\n    signingKey: signingKey.did(),\n    handle: 'handle.example.com',\n    pds: 'https://pds.example.com',\n    rotationKeys: [rotationKey.did()],\n    signer: rotationKey,\n})\n```\n\n## License\n\nMIT / Apache 2.0 dual-licensed.\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/did-method-plc/did-method-plc/issues"}}