feat: implement did:dht creation and resolution via Mainline DHT
DHT-02: did:dht creation - network/did_dht.rs: z-base-32 encoding, DNS packet encoding, BEP-44 mutable item publication via mainline crate - identity.create-dht-did RPC endpoint - dht_did field added to IdentityRecord - get_signing_key() exposed on IdentityManager DHT-03: did:dht resolution - did_dht::resolve() queries DHT, parses DNS → DID Document - DhtDidCache with 1-hour TTL - identity.resolve-dht-did, identity.refresh-dht-did, identity.dht-status New dependencies: mainline 2, zbase32 0.1, simple-dns 0.7 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1f11926d2d
commit
66eba4a46d
@@ -210,6 +210,11 @@ impl IdentityManager {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get the Ed25519 signing key for an identity (for DHT publication).
|
||||
pub async fn get_signing_key(&self, id: &str) -> Result<SigningKey> {
|
||||
self.load_signing_key(id).await
|
||||
}
|
||||
|
||||
/// Sign data with a specific identity.
|
||||
pub async fn sign(&self, id: &str, data: &[u8]) -> Result<String> {
|
||||
let signing_key = self.load_signing_key(id).await?;
|
||||
|
||||
Reference in New Issue
Block a user