pub struct CreateDIDConfig<A: Signer = Secret, W: Signer = Secret> {
pub address: String,
pub authorization_keys: Vec<A>,
pub did_document: Value,
pub parameters: Parameters,
pub witness_secrets: HashMap<String, W>,
pub also_known_as_web: bool,
pub also_known_as_scid: bool,
pub version_time: Option<DateTime<FixedOffset>>,
}Expand description
Configuration for creating a new DID.
Generic over A (authorization key signer) and W (witness signer).
Both default to Secret for backward compatibility.
Fields§
§address: StringAddress: URL (e.g. https://example.com/) or DID (e.g. did:webvh:{SCID}:example.com)
At least one signer for signing the log entry
did_document: ValueThe DID Document (JSON Value). Must contain id matching the DID.
parameters: ParametersParameters (update_keys, portable, witnesses, watchers, ttl, etc.)
witness_secrets: HashMap<String, W>Witness signers keyed by witness DID — required if witnesses configured
also_known_as_web: boolAdd did:web to alsoKnownAs
also_known_as_scid: boolAdd did:scid:vh to alsoKnownAs
version_time: Option<DateTime<FixedOffset>>Explicit versionTime for the genesis log entry. None (default) stamps
now. Set this to control the entry timestamp — e.g. to backdate it so a
rapid create-then-update sequence stays strictly increasing and not in the
future (versionTime serializes at second granularity).
Implementations§
Source§impl CreateDIDConfig
impl CreateDIDConfig
Sourcepub fn builder() -> CreateDIDConfigBuilder
pub fn builder() -> CreateDIDConfigBuilder
Create a new builder for CreateDIDConfig using default signer types (Secret).
For custom signer types, use Self::builder_generic().
Source§impl<A: Signer, W: Signer> CreateDIDConfig<A, W>
impl<A: Signer, W: Signer> CreateDIDConfig<A, W>
Sourcepub fn builder_generic() -> CreateDIDConfigBuilder<A, W>
pub fn builder_generic() -> CreateDIDConfigBuilder<A, W>
Create a new builder for CreateDIDConfig with custom signer types.