{"id":16199602,"url":"https://github.com/or13/did-jwk","last_synced_at":"2025-03-19T05:30:50.448Z","repository":{"id":58824620,"uuid":"533366279","full_name":"OR13/did-jwk","owner":"OR13","description":"did:jwk sdk \u0026 cli","archived":false,"fork":false,"pushed_at":"2022-12-07T15:18:32.000Z","size":160,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-12T05:32:11.902Z","etag":null,"topics":["cli","did","jose"],"latest_commit_sha":null,"homepage":"https://github.com/OR13/did-jwk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OR13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-06T14:37:01.000Z","updated_at":"2023-03-03T03:08:38.000Z","dependencies_parsed_at":"2023-01-23T18:30:19.314Z","dependency_job_id":null,"html_url":"https://github.com/OR13/did-jwk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdid-jwk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdid-jwk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdid-jwk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdid-jwk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OR13","download_url":"https://codeload.github.com/OR13/did-jwk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971189,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","did","jose"],"created_at":"2024-10-10T09:26:29.884Z","updated_at":"2025-03-19T05:30:50.180Z","avatar_url":"https://github.com/OR13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# did-jwk\n\n- [method spec](https://github.com/quartzjer/did-jwk)\n\n```bash\nnpm i @or13/did-jwk --save\n\n# install cli globally\nnpm i -g @or13/did-jwk\n```\n\n## Use\n\n### CLI\n\n### Generate Key\n\n```\ndid-jwk generate-key EdDSA\n```\n\n### Generate For Purpose\n\n```\ndid-jwk generate-for authenticity\ndid-jwk generate-for privacy\n```\n\n### Sign \u0026 Verify\n\n```\ndid-jwk generate-for authenticity \u003e k0.json\necho '{\"message\": \"hello\"}' \u003e m0.json\ndid-jwk sign ./k0.json ./m0.json \u003e m0.signed.json\ndid-jwk verify ./m0.signed.json --decode\n```\n\n### Encrypt \u0026 Decrypt\n\n```\ndid-jwk generate-for privacy \u003e k1.json\necho '{\"message\": \"hello\"}' \u003e m0.json\ndid-jwk create ./k1.json \u003e recipient_id.json\ndid-jwk encrypt `cat  ./recipient_id.json | jq '.id'` ./m0.json \u003e m0.encrypted.json\ndid-jwk decrypt ./k1.json ./m0.encrypted.json  --decode\n```\n\n## Development\n\n```bash\nnpm i\nnpm t\n\n# to test the cli.\nnpm i -g .\n```\n\n### CLI\n\n### Generate Key\n\nCreate a private key\n\n```\nnpm run did-jwk generate-key EdDSA --silent \u003e ./src/cli-examples/key.json\n```\n\n### Generate Key For Operation\n\nCreate a private key\n\n```\nnpm run did-jwk generate-for authenticity --silent \u003e ./src/cli-examples/key.authenticity.json\nnpm run did-jwk generate-for privacy --silent \u003e ./src/cli-examples/key.privacy.json\n```\n\n### Create DID\n\nCreate a DID.\n\n```\nnpm run did-jwk create ./src/cli-examples/key.json --silent \u003e ./src/cli-examples/id.json\nnpm run did-jwk create ./src/cli-examples/key.privacy.json --silent \u003e ./src/cli-examples/id.encrypt.json\n```\n\n### Resolve DID\n\nResolve a DID\n\n```\nnpm run did-jwk resolve `cat  ./src/cli-examples/id.json | jq '.id'` --silent \u003e ./src/cli-examples/resolution.json\n```\n\n### Dereference DID\n\nDereference a DID.\n\n```\nnpm run did-jwk dereference `cat  ./src/cli-examples/id.json | jq '.id'`#0 --silent \u003e ./src/cli-examples/dereference.json\n```\n\n### Sign\n\nSign as a DID\n\n```\nnpm run did-jwk sign ./src/cli-examples/key.json ./src/cli-examples/message.json --silent \u003e ./src/cli-examples/message.signed.json\n```\n\n### Verify\n\nVerify with a DID\n\n```\nnpm run did-jwk verify ./src/cli-examples/message.signed.json --silent \u003e ./src/cli-examples/message.verified.json\n```\n\nVerify and decode\n\n```\nnpm run did-jwk verify ./src/cli-examples/message.signed.json  -- --decode\n```\n\n### Encrypt to a DID\n\nEncrypt to a DID\n\n```\nnpm run did-jwk encrypt `cat  ./src/cli-examples/id.encrypt.json | jq '.id'` ./src/cli-examples/message.json --silent \u003e ./src/cli-examples/message.encrypted.json\n```\n\n### Encrypt with a Private Key\n\nDecrypt with a private key\n\n```\nnpm run did-jwk decrypt ./src/cli-examples/key.privacy.json ./src/cli-examples/message.encrypted.json --silent \u003e ./src/cli-examples/message.decrypted.json\n```\n\nDecrypt and decode as text\n\n```\nnpm run did-jwk decrypt ./src/cli-examples/key.privacy.json ./src/cli-examples/message.encrypted.json -- --decode\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fdid-jwk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2For13%2Fdid-jwk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fdid-jwk/lists"}