meta: name: Did namespace: did: "https://www.w3.org/ns/did#" content: bases: - name: Did #from: https://www.w3.org/TR/did-core/ subClassOf: "did:DIDSubject" attributes: id: String alsoKnownAs: String verificationMethod: set assertionMethod: set authentication: set capabilityDelegation: set capabilityInvocation: set keyAgreement: set controller: String service: set - name: VerificationMethod subClassOf: "did:VerificationMethod" attributes: id: String controller: String type: String publicKeyJwk: String publicKeyBase58: String publicKeyMultibase: String blockchainAccountId: String publicKeyPgp: String publicKeyHex: String ethereumAddress: String - name: Service subClassOf: "did:Service" attributes: id: String type: String serviceEndpoint: String overlays: - type: OverlayValidation base: Did name: DidValidationOverlay attributes: id: cardinality: "1..1" pattern: "^did:[a-z0-9]+:[a-zA-Z0-9.:\\-_%]+$" message: "there must be one valid 'id' in a DID document" verificationMethod: #from: https://www.w3.org/TR/did-spec-registries/#verification-method-types message: "invalid 'verificationMethod'" attributes: or: - &id_jwk id: &cardinality1_pattern cardinality: "1..1" pattern: "^did:[a-z0-9]+:[a-zA-Z0-9.:\\-_%?=#]+$" type: cardinality: "1..1" valueOption: - EcdsaSecp256k1RecoveryMethod2020 - EcdsaSecp256k1VerificationKey2019 - JsonWebKey2020 - JSONWebSignature2020 - RsaVerificationKey2018 controller: &cardinality1 cardinality: "1..1" publicKeyJwk: *cardinality1 - &id_base58 id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - Bls12381G1Key2020 - Bls12381G2Key2020 - EcdsaSecp256k1RecoveryMethod2020 - EcdsaSecp256k1VerificationKey2019 - Ed25519VerificationKey2018 - VerifiableCondition2021 - X25519KeyAgreementKey2019 controller: *cardinality1 publicKeyBase58: *cardinality1 - &id_multibase id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - EcdsaSecp256k1VerificationKey2019 - Ed25519VerificationKey2020 controller: *cardinality1 publicKeyMultibase: *cardinality1 - &id_blockchain_account_id id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - EcdsaSecp256k1VerificationKey2019 controller: *cardinality1 blockchainAccountId: *cardinality1 - &id_public_key_pgp id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - PgpVerificationKey2021 controller: *cardinality1 publicKeyPgp: *cardinality1 - &id_public_key_hex id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - EcdsaSecp256k1RecoveryMethod2020 controller: *cardinality1 publicKeyHex: *cardinality1 - &id_ethereum_address id: *cardinality1_pattern type: <<: *cardinality1 valueOption: - EcdsaSecp256k1RecoveryMethod2020 controller: *cardinality1 ethereumAddress: *cardinality1 authentication: message: "invalid 'authentication'" attributes: &verification_method_attributes or: - datatype: String - *id_jwk - *id_base58 - *id_multibase - *id_blockchain_account_id - *id_public_key_pgp - *id_public_key_hex - *id_ethereum_address assertionMethod: message: "invalid 'assertionMethod'" attributes: *verification_method_attributes keyAgreement: message: "invalid 'keyAgreement'" attributes: *verification_method_attributes capabilityInvocation: message: "invalid 'capabilityInvocation'" attributes: *verification_method_attributes capabilityDelegation: message: "invalid 'capabilityDelegation'" attributes: *verification_method_attributes or: - verificationMethod: &verification_method_id cardinality: "1..n" attributes: id: *cardinality1_pattern - authentication: *verification_method_id - assertionMethod: *verification_method_id - keyAgreement: *verification_method_id - capabilityInvocation: *verification_method_id - capabilityDelegation: *verification_method_id service: attributes: id: cardinality: "1..1" message: "there must be one 'id' in 'service'" type: cardinality: "1..1" message: "there must be one 'type' in 'service'" serviceEndpoint: cardinality: "1..1" message: "there must be one 'serviceEndpoint' in 'service'" - type: OverlayDidContextValidation base: Did name: DidContextValidationOverlay constraints: - id: "*" context: "https://www.w3.org/ns/did/v1" - type: JsonWebKey2020 context: "https://w3id.org/security/suites/jws-2020/v1" - type: EcdsaSecp256k1VerificationKey2019 context: "https://w3id.org/security/suites/secp256k1-2019" - type: Ed25519VerificationKey2018 context: "https://w3id.org/security/suites/ed25519-2018/v1" - type: Ed25519VerificationKey2020 context: "https://w3id.org/security/suites/ed25519-2020/v1" - type: Bls12381G1Key2020 context: "https://w3id.org/security/suites/bls12381-2020/v1" - type: Bls12381G2Key2020 context: "https://w3id.org/security/suites/bls12381-2020/v1" - type: PgpVerificationKey2021 context: "https://w3id.org/security/suites/pgp-2021/v1" - type: RsaVerificationKey2018 context: "https://www.w3.org/2018/credentials/v1" - type: X25519KeyAgreementKey2019 context: "http://w3id.org/security/suites/x25519-2019/v1" - type: EcdsaSecp256k1RecoveryMethod2020 context: "https://w3id.org/security/suites/secp256k1recovery-2020" - type: VerifiableCondition2021 context: "https://w3c-ccg.github.io/verifiable-conditions/contexts/verifiable-conditions-2021-v1.json"