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

Implement did #309

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Implement did #309

wants to merge 29 commits into from

Conversation

SametSahin10
Copy link

@SametSahin10 SametSahin10 commented Aug 18, 2022

Proposed changes

This PR adds DID functionality by using DIDKit which is a product of Spruce.

  • When a local account is created or a wallet is restored successfully, a DID is generated for the user. For existing users, on Splash Screen, the mnemonic is checked if it exists. If the mnemonic exists and user does not have a DID, a DID is generated and stored in UserState.

  • After generating the DID, a Verifiable Credential that contains the current user's name and phone number as subject is issued, verified and saved in UserState.

  • In onInit callback in SplashPage, it's checked the if user has a did and a credential. If user has a did but not a credential, a credential is issued for the user.

  • If user has a private key generated for DID functionality, a new MenuTile is shown in the AccountScreen. This MenuTile navigates to VerifyCredentialPage on tap. VerifyCredentialPage is simply a page made up of a TextField and an ElevatedButton. A Verifiable Credential can be entered into this TextField and be verified by tapping the VerifyCredentialButton.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • Refactor or a modification (non-breaking change)
  • New feature (non-breaking change which adds functionality)

@SametSahin10
Copy link
Author

I've tried to use Redux by looking at the existing uses of it. Given that I'm a beginner on Redux, let me know if there are changes need to be made.

@SametSahin10
Copy link
Author

The PR also includes a unit test so feel free to add a testing phase into your CI/CD workflow if you have any.

…able Credential could be inserted into a TextField and it's integrity could be verified on a button tap
@SametSahin10
Copy link
Author

I've implemented the "Issuing a Verifiable Credential" feature and edited the PR description.

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.

1 participant