-
Notifications
You must be signed in to change notification settings - Fork 114
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
SametSahin10
wants to merge
29
commits into
fuseio:master
Choose a base branch
from
SametSahin10:implement-did
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement did #309
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Android on Debian based GNU/Linux distros
…nic and the generateDID method that generates DID from private key
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. |
The PR also includes a unit test so feel free to add a testing phase into your CI/CD workflow if you have any. |
…ation from did so that the did field is taken into account in toJson and fromJson methods
…he DIDKit version
…d getting it from the UserState instance to prevent bugs related to asynchronousity
…able Credential could be inserted into a TextField and it's integrity could be verified on a button tap
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inSplashPage
, 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 theAccountScreen
. ThisMenuTile
navigates toVerifyCredentialPage
on tap. VerifyCredentialPage is simply a page made up of aTextField
and anElevatedButton
. A Verifiable Credential can be entered into this TextField and be verified by tapping theVerifyCredentialButton
.Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply