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

added new method addVerificationMethod and some changes related to ke… #100

Merged
merged 4 commits into from
Jul 26, 2023

Conversation

varsha766
Copy link
Contributor

…yAgreement type

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,
Copy link
Contributor

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,
Copy link
Contributor

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 {
Copy link
Contributor

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;
Copy link
Contributor

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 = {};
Copy link
Contributor

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';

Copy link
Contributor

@Vishwas1 Vishwas1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request change

@Vishwas1 Vishwas1 merged commit a1e61be into develop Jul 26, 2023
1 check failed
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.

2 participants