{"id":17343938,"url":"https://github.com/berendsliedrecht/sd-jwt-ts","last_synced_at":"2025-04-14T20:12:05.081Z","repository":{"id":177026049,"uuid":"657294696","full_name":"berendsliedrecht/sd-jwt-ts","owner":"berendsliedrecht","description":"Selective Disclosure JWT (SD-JWT) Draft 06 \u0026 Selective Disclosure JWT VC (sd-jwt-vc) Draft 01 implementation","archived":false,"fork":false,"pushed_at":"2024-07-30T11:20:16.000Z","size":623,"stargazers_count":16,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T20:11:43.086Z","etag":null,"topics":["decentralized-idenitity","jwt","jwt-sd","oauth","oauth2","openid","openid-connect","sd-jwt","sd-jwt-vc","ssi","vc"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@sd-jwt/core","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berendsliedrecht.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-22T18:41:31.000Z","updated_at":"2024-07-30T11:20:19.000Z","dependencies_parsed_at":"2023-10-25T12:54:16.511Z","dependency_job_id":"17586b7c-6573-43a8-85fa-172784de7723","html_url":"https://github.com/berendsliedrecht/sd-jwt-ts","commit_stats":null,"previous_names":["blu3beri/jwt-sd","blu3beri/sd-jwt-ts","berendsliedrecht/sd-jwt-ts"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berendsliedrecht%2Fsd-jwt-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berendsliedrecht%2Fsd-jwt-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berendsliedrecht%2Fsd-jwt-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berendsliedrecht%2Fsd-jwt-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berendsliedrecht","download_url":"https://codeload.github.com/berendsliedrecht/sd-jwt-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248952350,"owners_count":21188426,"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":["decentralized-idenitity","jwt","jwt-sd","oauth","oauth2","openid","openid-connect","sd-jwt","sd-jwt-vc","ssi","vc"],"created_at":"2024-10-15T16:10:41.324Z","updated_at":"2025-04-14T20:12:05.059Z","avatar_url":"https://github.com/berendsliedrecht.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e This repository is deprecated. Please use [OWF Labs: sd-jwt-ts](https://github.com/openwallet-foundation-labs/sd-jwt-js)\n\n# Selective Disclosure JWT (SD-JWT) Draft 06 \u0026 Selective Disclosure JWT VC 01\n\n## Compliant with\n\n-   [sd-jwt\n    06](https://datatracker.ietf.org/doc/draft-ietf-oauth-selective-disclosure-jwt/06/)\n-   [sd-jwt-vc\n    01](https://datatracker.ietf.org/doc/draft-ietf-oauth-sd-jwt-vc/01/)\n\n## Design decisions\n\n### Bring your own crypto\n\nThis library does not provide any of the cryptographic primitives required for\nencryption, decryption, signing, verification and hashing. It is expected that\nthe user of this library provides this. The main reason for this is that most\nlibraries have their own library and KMS. Providing private keys to this\nlibrary adds another layer of insecurity which should be avoided. Hashing has\nnot been added for platform compatibility between node,js, browser and React\nNative. In the future a platform-independent sha2-256 may be provided.\n\n### Specification backwards compatibility\n\nSince these specifications are in early drafts, no time will be spend in\nsupporting earlier versions of the specifications. This library may work for\nolder versions, e.g. the addition of selectively disclosable items in an array\ndoes not break previous implementations. Once a non-draft specification is\nreleased it will stay up-to-date with that version.\n\n### Dependencies\n\nThis library only has one dependency on `buffer` which makes sure this library\nworks in Node.js, the browser and React Native. Buffer is used internally for\n`base64-url-no-pad` encoding.\n\n### Usage\n\nI'd highly recommend to check out the [examples folder](examples) to see how\nthis library can be leveraged.\n\n### Issuance API\n\nThe issuance API takes an object called a `disclosureFrame`. This\n`disclosureFrame` is a Boolean Map of the payload which allows you to specify\nwhich attributes of the payload may be selectively disclosed. If an attribute is not provided in the `disclosureFrame`, it will be included in the clear-text payload. For example:\n\n```jsonc\n// The payload\n{\n    \"iss\": \"https://example.org/issuer\",\n    \"is_age_over_21\": true,\n    \"is_age_over_24\": true,\n    \"is_age_over_65\": false,\n    \"date_of_birth\": \"1990-01-01\",\n    \"address\": {\n        \"street\": \"some street\",\n        \"house_number\": 200,\n        \"zipcode\": \"2344GH\"\n    }\n}\n```\n\n```jsonc\n// The disclosure frame\n{\n    \"is_age_over_21\": true,\n    \"is_age_over_24\": true,\n    \"is_age_over_65\": true,\n    \"date_of_birth\": true,\n    \"address\": {\n        \"street\": true,\n        \"house_number\": true,\n        \"zipcode\": true\n    }\n}\n\n// or to only disclose the address as a group\n{\n    \"is_age_over_21\": true,\n    \"is_age_over_24\": true,\n    \"is_age_over_65\": true,\n    \"date_of_birth\": true,\n    \"address\": true\n}\n```\n\n### Presentation and verification API\n\nSince there is officially standardized way to request and present a\npresentation, [High Assurance Interoperability\nProfile](https://vcstuff.github.io/oid4vc-haip-sd-jwt-vc/draft-oid4vc-haip-sd-jwt-vc.html)\nmay be used, the API is defined in a way which works in a primitive manner for\nnow. For example, to present you can provide a list of indices of the\ndisclosures which will be included. Examples of this can be found in the\n[examples folder](examples). For verification a list of keys or required\nclaims can be provided. It does not matter whether these are selectively\ndisclosable claims, or if they are included inside the payload.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberendsliedrecht%2Fsd-jwt-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberendsliedrecht%2Fsd-jwt-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberendsliedrecht%2Fsd-jwt-ts/lists"}