From b6bd3db94f3676c6f29b54efc82e20909c5b6c17 Mon Sep 17 00:00:00 2001 From: Jack Tanner Date: Wed, 16 Nov 2022 13:08:16 +0100 Subject: [PATCH] added full ConditionalProof2022 VerificationMethod type --- src/resolver.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 41cac08..2f5d13d 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -145,6 +145,7 @@ export interface JsonWebKey extends Extensible { y?: string } + /** * Represents the properties of a Verification Method listed in a DID document. * @@ -165,20 +166,24 @@ export interface VerificationMethod { publicKeyMultibase?: string blockchainAccountId?: string ethereumAddress?: string - conditionWeightedThreshold?: ConditionWeightedThreshold[] + + // ConditionalProof2022 subtypes + conditionOr: VerificationMethod[] + conditionAnd: VerificationMethod[] threshold?: number - // TODO add other properties of VerifiableConditions: threshold, conditionThreshold, conditionAnd, conditionOr + conditionThreshold: VerificationMethod[] + conditionWeightedThreshold?: ConditionWeightedThreshold[] + conditionDelegated?: string + relationshipParent: string[] + relationshipChild: string[] + relationshipSibling: string[] } export interface ConditionWeightedThreshold { - condition: { - id: string - controller: string - type: string - publicKeyJwk: JsonWebKey - } + condition: VerificationMethod weight: number } + /** * URI params resulting from parsing a DID URI */