### Intro `forge_did` implement by `Rust`. [Forge_wallet](https://crates.io/crates/forge_wallet) core implementation. Generate `forge did` from pk, or sk, or pk hash. `forge did` example `did:abt:zNYm1gM23ZGHNYDYyBwSaywzTqLKoj4WuTeC`. Prefix `did` means the string is a `DID`, `abt` means the did is `forge did`. `zNYm1gM23ZGHNYDYyBwSaywzTqLKoj4WuTeC` is address. ### API - `get_did_by_sk(sk: &[u8], did_type: &Option) -> Result` - `get_did_by_pk(pk: &[u8], did_type: &Option) -> Result` - `get_did_by_pk_hash(pk_hash: &[u8], did_type: &Option) -> Result` ### Usage ```rust // generate key pair let (sk, pk) = forge_signer::get_key_pair(Some(forge_signer::SignType::Ed25519)); let did_type = create_did::DidType{ role_type: Some(RoleType::Account), key_type: Some(KeyType::Ed25519), hash_type: Some(HashType::Sha3), } let did_by_sk = forge_did::get_did_by_sk(&sk, &Some(w_type.to_owned()))?; let did_by_pk = forge_did::get_did_by_pk(&pk, &Some(w_type.to_owned()))?; // did_by_pk example: "did:abt:zNYm1gM23ZGHNYDYyBwSaywzTqLKoj4WuTeC"; assert_eq!(did_by_sk, did_by_pk); ```