Skip to content

Refactor identity_did's DID trait #1724

@UMR1352

Description

@UMR1352

Description

Refactor trait DID and CoreDID, removing the need for DID types (e.g. IotaDID, DIDJwk, DIDKey) to implement AsRef<CoreDID>.

Motivation

The DID: AsRef<CoreDID> constraint forces implementing types to encapsulate a CoreDID, making the type's layout more complex. If this wasn't the case a did-jwk would be represented simply as:

pub struct DidJwk(Jwk);

instead of:

pub struct DidJwk {
  did: CoreDID,
  jwk: Jwk,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking changeA change to the API that requires a major release. Part of "Changed" section in changelog

    Type

    Projects

    Status

    Product Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions