pub struct SigningAuditEntry {
pub timestamp: i64,
pub request_type: SigningRequestType,
pub decision: SigningDecision,
pub was_automatic: bool,
pub caller: String,
pub caller_name: Option<String>,
pub event_kind: Option<u32>,
pub reason: Option<String>,
pub prev_hash: [u8; 32],
pub hash: [u8; 32],
}Expand description
A single signing audit log entry with hash chain linkage.
Fields§
§timestamp: i64Unix timestamp.
request_type: SigningRequestTypeRequest type.
decision: SigningDecisionDecision (approved/denied).
was_automatic: boolWhether decided by policy (true) or user (false).
caller: StringHex public key of the requesting app.
caller_name: Option<String>Human-readable caller name.
event_kind: Option<u32>Nostr event kind.
reason: Option<String>Reason for the decision.
prev_hash: [u8; 32]Previous entry hash.
hash: [u8; 32]This entry’s hash.
Implementations§
Source§impl SigningAuditEntry
impl SigningAuditEntry
Sourcepub fn new(
request_type: SigningRequestType,
decision: SigningDecision,
was_automatic: bool,
caller: String,
prev_hash: [u8; 32],
) -> Self
pub fn new( request_type: SigningRequestType, decision: SigningDecision, was_automatic: bool, caller: String, prev_hash: [u8; 32], ) -> Self
Create a new signing audit entry.
Sourcepub fn with_caller_name(self, name: impl Into<String>) -> Self
pub fn with_caller_name(self, name: impl Into<String>) -> Self
Set the caller name.
Sourcepub fn with_event_kind(self, kind: u32) -> Self
pub fn with_event_kind(self, kind: u32) -> Self
Set the event kind.
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Set the reason.
Trait Implementations§
Source§impl Clone for SigningAuditEntry
impl Clone for SigningAuditEntry
Source§impl Debug for SigningAuditEntry
impl Debug for SigningAuditEntry
Source§impl<'de> Deserialize<'de> for SigningAuditEntry
impl<'de> Deserialize<'de> for SigningAuditEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for SigningAuditEntry
impl Freeze for SigningAuditEntry
impl Move for SigningAuditEntry
impl RefUnwindSafe for SigningAuditEntry
impl Send for SigningAuditEntry
impl Sync for SigningAuditEntry
impl Unpin for SigningAuditEntry
impl UnsafeUnpin for SigningAuditEntry
impl UnwindSafe for SigningAuditEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more