Skip to content

Commit

Permalink
feat: add multikey vm
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Oct 29, 2023
1 parent 513d317 commit 33f2b42
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pydid/verification_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ class EcdsaSecp256k1RecoveryMethod2020(VerificationMethod):
)


class Multikey(VerificationMethod):
"""Multikey VerificationMethod."""

type: Literal["VerificationMethod"]
public_key_multibase: str


class UnsupportedVerificationMethod(VerificationMethod):
"""Model representing unsupported verification methods."""

Expand All @@ -280,4 +287,5 @@ class UnknownVerificationMethod(VerificationMethod):
X25519KeyAgreementKey2020,
SchnorrSecp256k1VerificationKey2019,
EcdsaSecp256k1RecoveryMethod2020,
Multikey,
]
6 changes: 6 additions & 0 deletions tests/test_verification_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"controller": "did:example:123",
"publicKeyMultibase": "z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM",
}
VMETHOD6 = {
"id": "did:example:123#keys-1",
"type": "Multikey",
"controller": "did:example:123",
"publicKeyMultibase": "z6LSeRSE5Em5oJpwdk3NBaLVERBS332ULC7EQq5EtMsmXhsM",
}


VMETHODS = [VMETHOD0, VMETHOD1, VMETHOD2, VMETHOD3, VMETHOD4, VMETHOD5]
Expand Down

0 comments on commit 33f2b42

Please sign in to comment.