Skip to content

Commit

Permalink
feat: add type definitions for ConditionalProof2022 (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
theblockstalk committed Mar 8, 2023
1 parent 54f04eb commit c4f62d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
},
"author": "Pelle Braendgaard",
"contributors": [
"Mircea Nistor <mircea.nistor@mesh.xyz>"
"Mircea Nistor <mircea.nistor@mesh.xyz>",
"Jack Tanner <jack+public@tonomy.foundation>",
"Rebal Alhaqash <rebal@tonomy.foundation>"
],
"license": "Apache-2.0",
"scripts": {
Expand Down
16 changes: 16 additions & 0 deletions src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@ export interface VerificationMethod {
publicKeyMultibase?: string
blockchainAccountId?: string
ethereumAddress?: string

// ConditionalProof2022 subtypes
conditionOr?: VerificationMethod[]
conditionAnd?: VerificationMethod[]
threshold?: number
conditionThreshold?: VerificationMethod[]
conditionWeightedThreshold?: ConditionWeightedThreshold[]
conditionDelegated?: string
relationshipParent?: string[]
relationshipChild?: string[]
relationshipSibling?: string[]
}

export interface ConditionWeightedThreshold {
condition: VerificationMethod
weight: number
}

/**
Expand Down

0 comments on commit c4f62d3

Please sign in to comment.