use std::time::Duration;
use didwebvh_rs::witness::Witnesses;
use serde::{Deserialize, Serialize};
use serde_json::Value;
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct UpdateDidWebvhOptions {
#[serde(default)]
pub document: Option<Value>,
#[serde(default)]
pub pre_rotation_count: Option<u32>,
#[serde(default)]
pub witnesses: Option<Witnesses>,
#[serde(default)]
pub watchers: Option<Vec<String>>,
#[serde(default)]
pub ttl: Option<u32>,
#[serde(default)]
pub label: Option<String>,
#[serde(default)]
pub expected_version_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UpdateDidWebvhResult {
pub did: String,
pub new_version_id: String,
pub new_scid: String,
pub new_log_entry: String,
pub update_keys_count: u32,
pub pre_rotation_key_count: u32,
pub serverless: bool,
}
pub(in crate::operations::did_webvh) struct DerivedWebvhKey {
pub public_key: String,
pub hash: String,
pub derivation_path: String,
pub seed_id: u32,
}
pub(in crate::operations::did_webvh) const WITNESS_RESOLVE_TIMEOUT: Duration =
Duration::from_secs(5);
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct RotateDidWebvhKeysOptions {
#[serde(default)]
pub pre_rotation_count: Option<u32>,
#[serde(default)]
pub label: Option<String>,
}