Skip to content

Commit

Permalink
fix(did-registry): optional encoding and algo of public key
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Aug 5, 2022
1 parent b5e063f commit 26a239f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/did-registry/did-registry.validation.ts
Expand Up @@ -4,7 +4,7 @@ import {
PubKeyType,
} from '@ew-did-registry/did-resolver-interface';
import { KeyType } from '@ew-did-registry/keys';
import { createCheckers, iface, enumtype } from 'ts-interface-checker';
import { createCheckers, iface, enumtype, opt } from 'ts-interface-checker';

const IS_REQ_STRING = 'string';
export const { UpdateServicePoint, UpdateDelegate, UpdatePublicKey } =
Expand Down Expand Up @@ -41,8 +41,8 @@ export const { UpdateServicePoint, UpdateDelegate, UpdatePublicKey } =
didAttribute: enumtype({ PublicKey: DIDAttribute.PublicKey }),
data: iface([], {
type: enumtype(PubKeyType),
algo: enumtype(KeyType),
encoding: enumtype(Encoding),
algo: opt(enumtype(KeyType)),
encoding: opt(enumtype(Encoding)),
value: iface([], {
publicKey: IS_REQ_STRING,
tag: IS_REQ_STRING,
Expand Down

0 comments on commit 26a239f

Please sign in to comment.