Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enveloping proof #207

Merged
merged 28 commits into from
Sep 13, 2024
Merged

feat: enveloping proof #207

merged 28 commits into from
Sep 13, 2024

Conversation

ldhyen99
Copy link
Contributor

@ldhyen99 ldhyen99 commented Jul 30, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

Note:

  • The DID Documents when configured JsonWebKey will contain two types: JsonWebKey and JsonWebKey2020. The JsonWebKey2020 for purposing issue Bit String Status
  • Many Veramo libraries need to be re-installed using our custom Veramo because these libraries install each other.
  • Only support DID web and Bit String Status list

Setup:

  • Please run pnpm build-clean before start
  • In postinstall of package.json file, change to git pull --depth=1 origin feat/enveloping_proof
  • Run pnpm install & pnpm run build & pnpm vckit config

Step for testing Enveloping proof:

  • Config in VCKit:
  1. In agent.yml, change DID Documents:
- - $require: '@vckit/remote-server?t=function#WebDidDocRouter'
        $args:
          - keyMapping:
              Ed25519: JsonWebKey
  • In api-docs
  1. Creates and returns a new identifier
  2. Create the bit string status, example payload:
 {
  "statusPurpose": "revocation",
  "bitStringLength": 10,
  "bitstringStatusIssuer": "did:web:example",
  "statusSize": 10,
} 
  1. Issue a credential with the status and the issuer created, for example payload:
{
  "credential": {
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
    "https://www.w3.org/ns/credentials/examples/v2"
  ],
  "id": "http://university.example/credentials/1872",
  "type": [
    "VerifiableCredential",
    "ExampleAlumniCredential"
  ],
  "issuer": "did:web:new_identifier",
  "validFrom": "2010-01-01T19:23:24Z",
  "credentialSchema": {
    "id": "https://example.org/examples/degree.json",
    "type": "JsonSchema"
  },
  "credentialSubject": {
    "id": "did:example:123",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science and Arts"
    }
  },
"credentialStatus": [{
    "id": "http://localhost:3332/credentials/status/bitstring-status-list/5#0",
    "type": "BitstringStatusListEntry",
    "statusPurpose": "revocation",
    "statusListIndex": "10",
    "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/5"
  }]
},
  "options": {
    "created": "string",
    "challenge": "string",
    "domain": "string",
    "credentialStatus": {
      "type": "string"
    },
"proofFormat":"EnvelopingProofJose"

  }
}
  1. Verify this Enveloping Proof VC
  2. Revoke credential status and test again to make sure VC is revoked

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ vc-kit doc site
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link
Contributor

@namhoang1604 namhoang1604 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ldhyen99 please review your code again. That must use the JsonWebKey not JsonWebKey2020

packages/bitstringStatusList/package.json Outdated Show resolved Hide resolved
packages/cli/default/agent.template.yml Outdated Show resolved Hide resolved
packages/cli/package.json Show resolved Hide resolved
packages/cli/package.json Show resolved Hide resolved
namhoang1604
namhoang1604 previously approved these changes Sep 13, 2024
@namhoang1604 namhoang1604 merged commit 998356b into next Sep 13, 2024
1 check failed
@namhoang1604 namhoang1604 deleted the feat/enveloping_proof branch September 13, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants