-
Notifications
You must be signed in to change notification settings - Fork 461
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(iam): EIP712 signed verifiable credentials #1662
Conversation
hash: `${VERSION}:${hash}`, | ||
}, | ||
}); | ||
// https://www.w3.org/TR/vc-status-list/#statuslist2021entry |
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.
From my understanding this can be added later and should only be included if we would like to a add a revocation status.
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.
Yes, that is right, we should however consider it in the schema definition for compose-db.
identity/src/credentials.ts
Outdated
metaPointer: | ||
"https://github.com/gitcoinco/passport-scorer/blob/main/api/scorer/settings/gitcoin_passport_weights.py", |
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.
This metapointer should be another record variable, we should not hardcode it.
The general idea is that the metapointer points to a page with information about that specific provider.
So we can set the metapointer in the record returned by the verify
method, and pass it down to the credential.
For now setting undefined is fine, but we should be able to change this (meaning update the provider to return a valid metapointer).
types/src/index.d.ts
Outdated
@@ -59,6 +67,7 @@ export type RequestPayload = { | |||
jsonRpcSigner?: JsonRpcSigner; | |||
challenge?: string; | |||
issuer?: string; | |||
signatureType?: string; |
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.
Let's define a type for this.
identity/src/credentials.ts
Outdated
|
||
const credential = await DIDKit.issueCredential( | ||
JSON.stringify(credentialInput, undefined, 2), | ||
JSON.stringify(signingDocument, undefined, 2), |
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.
No need to indent the JSON object here. Removing the undefined, 2
should work.
export const challengeSignatureDocument: ChallengeSignatureDocument<DocumentType> = { | ||
type: "EthereumEip712Signature2021", | ||
eip712Domain: { | ||
domain: { name: "Passport" }, |
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.
add verification method
fixes: #1540
To switch over to the new signature type update the env variables in
app
andiam
to match the example values in this pr