-
Notifications
You must be signed in to change notification settings - Fork 9
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: add VC and VP functionality #494
Conversation
e83d7bd
to
9c45618
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Some thoughts/questions
@@ -33,3 +36,5 @@ export type AccountInfo = { | |||
|
|||
export const PUBLIC_KEY = 'PublicKey'; | |||
export const IS_ETH_SIGNER = 'isEthSigner'; | |||
|
|||
export type SignerT = Signer & TypedDataSigner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the relationship between Signer
and TypedDataSigner
? Could we just use TypedDateSigner
?
What is the T
meant to mean in SignerT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a good name for this type, so for now I left it as SignerT
. Here is the code of the TypedDataSigner
export interface TypedDataSigner {
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
}
And here is a comment for it in ethers lib
// @TODO: This is a temporary measure to preserse backwards compatibility
// In v6, the method on TypedDataSigner will be added to Signer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we can call it just Signer
@Harasz What would it take for this PR to be mergeable in your view? |
@jrhender More tests. I am still checking it against Metamask and walletconnect. The next thing is to make it work on both Node and browser. |
73dadcb
to
48db7c5
Compare
Here is the first working draft for VC |
23f448a
to
1ce8c83
Compare
src/modules/verifiableCredentials/verifiableCredentials.types.ts
Outdated
Show resolved
Hide resolved
1ce8c83
to
2a94d12
Compare
83c8924
to
a97b006
Compare
src/modules/verifiableCredentials/verifiableCredentialsBase.service.ts
Outdated
Show resolved
Hide resolved
ad04894
to
29d8a36
Compare
@jrhender @JGiter @nichonien Final work of the VP/VC features are ready for review |
@@ -33,3 +36,5 @@ export type AccountInfo = { | |||
|
|||
export const PUBLIC_KEY = 'PublicKey'; | |||
export const IS_ETH_SIGNER = 'isEthSigner'; | |||
|
|||
export type SignerT = Signer & TypedDataSigner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we can call it just Signer
src/modules/verifiable-credentials/verifiable-credentials-base.service.ts
Outdated
Show resolved
Hide resolved
src/modules/verifiable-credentials/verifiable-credentials.types.ts
Outdated
Show resolved
Hide resolved
@Harasz Can we remove the "DO NOT MERGE" label from your perspective? Or is that label still appropriate? |
It will be ready to merge after applying review feedback and sync with develop. Will take care today |
56ed14a
to
8d83253
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some further suggestions but I think it looks great and we can make further incremental improvements as we go along 😄
src/modules/verifiable-credentials/verifiable-credentials-base.service.ts
Outdated
Show resolved
Hide resolved
src/modules/verifiable-credentials/verifiable-credentials.types.ts
Outdated
Show resolved
Hide resolved
src/modules/verifiable-credentials/verifiable-credentials.types.ts
Outdated
Show resolved
Hide resolved
src/modules/verifiable-credentials/verifiable-credentials.types.ts
Outdated
Show resolved
Hide resolved
src/modules/verifiable-credentials/verifiable-credentials-base.service.ts
Outdated
Show resolved
Hide resolved
e04f795
to
95bffec
Compare
95bffec
to
a4732e3
Compare
src/modules/verifiable-credentials/verifiable-credentials-node.service.ts
Show resolved
Hide resolved
🎉 This PR is included in version 5.1.0-alpha.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.