-
Notifications
You must be signed in to change notification settings - Fork 0
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
added new method addVerificationMethod and some changes related to ke… #100
Conversation
src/did/did.ts
Outdated
this.context = [constant['DID_' + keyType].DID_BASE_CONTEXT]; | ||
this.context = [ | ||
constant['DID_' + keyType].DID_BASE_CONTEXT, | ||
constant['DID_' + keyType].DID_KEYAGREEMENT_CONTEXT, |
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.
You should not take DID_KEYAGREEMENT_CONTEXT context here since you ar enot allowing keyagreement verrelationship
src/did/did.ts
Outdated
this.context = [constant['DID_' + keyType].DID_BASE_CONTEXT]; | ||
this.context = [ | ||
constant['DID_' + keyType].DID_BASE_CONTEXT, | ||
constant['DID_' + keyType].DID_KEYAGREEMENT_CONTEXT, |
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.
You should not take DID_KEYAGREEMENT_CONTEXT context here since you ar enot allowing keyagreement verrelationship
src/did/IDID.ts
Outdated
@@ -31,6 +31,10 @@ export enum IClientSpec { | |||
'cosmos-ADR036' = 'cosmos-ADR036', | |||
} | |||
|
|||
export enum IKeyAgreementKeyType { |
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.
Do not use a new variable, keep it in IKeyType itself
src/did/did.ts
Outdated
public async addVerificationMethod(params: { | ||
did?: string; | ||
didDocument?: Did; | ||
type: IKeyType | IKeyAgreementKeyType; |
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.
use onlyIKeyType
src/did/did.ts
Outdated
) { | ||
throw new Error('HID-SSI-SDK:: Error: params.publicKeyMultibase is required to addVerificationMethod'); | ||
} | ||
const verificationMethod = {}; |
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.
use VerificationMethod type
import { VerificationMethod } from '../../libs/generated/ssi/did';
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.
Request change
some small changes
…yAgreement type