iotaledger / iotaledger/identity
Refactor `identity_did`'s `DID` trait
- Dominant language
- Rust
- Stars
- 346
- Forks
- 100
- Avg merge
- 13h 41m
- Merged PRs (30d)
- 2
Description
## Description
Refactor trait `DID` and `CoreDID`, removing the need for DID types (e.g. `IotaDID`, `DIDJwk`, `DIDKey`) to implement `AsRef`.
## Motivation
The `DID: AsRef` 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:
```rust
pub struct DidJwk(Jwk);
```
instead of:
```rust
pub struct DidJwk {
did: CoreDID,
jwk: Jwk,
}
```
Contributor guide
Research direction
Start by reading the definitions and usages of the DID and CoreDID traits, then inspect the IotaDID, DIDJwk, and DIDKey implementations. Done means those types no longer need to implement AsRef and the simpler DidJwk(Jwk) layout described in the issue is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100