Class AuditLedgerRecord
Represents a persistence-ready audit ledger record captured from AsiBackbone decision receipt.
public sealed class AuditLedgerRecord : IDecisionReceipt
- Inheritance
-
AuditLedgerRecord
- Implements
- Inherited Members
Properties
AcknowledgmentId
Gets the handshake acknowledgment identifier linked to this record, when supplied.
public string? AcknowledgmentId { get; }
Property Value
ActorDisplayName
Gets the optional display name or label associated with the actor.
public string? ActorDisplayName { get; }
Property Value
ActorId
Gets the stable actor identifier associated with the event.
public string ActorId { get; }
Property Value
ActorType
Gets the actor type associated with the event.
public GovernanceActorType ActorType { get; }
Property Value
CapabilityTokenId
Gets the capability token or grant identifier linked to this record, when supplied.
public string? CapabilityTokenId { get; }
Property Value
ConstraintCount
Gets the non-negative number of constraints evaluated for the decision, when supplied by the host.
public int? ConstraintCount { get; }
Property Value
- int?
ConstraintSetHash
Gets the hash of the evaluated constraint set, when supplied by the host.
public string? ConstraintSetHash { get; }
Property Value
CorrelationId
Gets the correlation identifier associated with the event, when supplied by the host.
public string? CorrelationId { get; }
Property Value
DecisionLatencyMs
Gets the non-negative decision latency in milliseconds, when supplied by the host.
public long? DecisionLatencyMs { get; }
Property Value
- long?
DecisionReceiptId
Gets the decision receipt identifier copied from the source receipt.
public string DecisionReceiptId { get; }
Property Value
Remarks
Falls back to EventId when the source receipt does not supply a distinct identifier, so this value is never null.
DecisionStage
Gets the provider-neutral decision stage associated with the event, when supplied by the host.
public string? DecisionStage { get; }
Property Value
EmitterProvider
Gets the provider-neutral emitter provider name, when supplied by the host or outbox provider.
public string? EmitterProvider { get; }
Property Value
EmitterStatus
Gets the provider-neutral emitter status, when supplied by the host or outbox provider.
public string? EmitterStatus { get; }
Property Value
EventId
Gets the stable audit event identifier copied from the source decision receipt.
public string EventId { get; }
Property Value
GatewayExecutionId
Gets the gateway execution identifier associated with the event, when supplied by the host or gateway provider.
public string? GatewayExecutionId { get; }
Property Value
HandshakeId
Gets the liability handshake identifier linked to this record, when supplied.
public string? HandshakeId { get; }
Property Value
HasMetadata
Gets a value indicating whether the record carries at least one metadata entry.
public bool HasMetadata { get; }
Property Value
HasReasonCodes
Gets a value indicating whether the record carries at least one reason code.
public bool HasReasonCodes { get; }
Property Value
Metadata
Gets the framework-neutral audit metadata, merged from the source receipt and any additional metadata supplied when the record was created.
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
OccurredUtc
Gets the UTC timestamp when the audited event occurred.
public DateTimeOffset OccurredUtc { get; }
Property Value
OperationName
Gets the operation name associated with the audited event.
public string OperationName { get; }
Property Value
OrganizationHash
Gets the privacy-preserving organization hash associated with the decision, when supplied by the host.
public string? OrganizationHash { get; }
Property Value
OutboxSequence
Gets the non-negative outbox sequence associated with the event, when supplied by the host or outbox provider.
public long? OutboxSequence { get; }
Property Value
- long?
Outcome
Gets the governance, constraint, or host-defined outcome associated with the event.
public string Outcome { get; }
Property Value
ParentSpanId
Gets the parent span identifier associated with the event, when supplied by the host or observability adapter.
public string? ParentSpanId { get; }
Property Value
PolicyHash
Gets the policy hash associated with the event, when supplied by the host.
public string? PolicyHash { get; }
Property Value
PolicyScope
Gets the policy scope associated with the decision, when supplied by the host.
public string? PolicyScope { get; }
Property Value
PolicyVersion
Gets the policy version associated with the event, when supplied by the host.
public string? PolicyVersion { get; }
Property Value
PreviousRecordHash
Gets the hash of the preceding ledger record, when the host chains records for tamper evidence.
public string? PreviousRecordHash { get; }
Property Value
ReasonCodes
Gets the trimmed, non-empty machine-readable reason codes associated with the event.
public IReadOnlyList<string> ReasonCodes { get; }
Property Value
RecordHash
Gets the hash of this ledger record, when computed by the host or ledger store.
public string? RecordHash { get; }
Property Value
RecordId
Gets the unique identifier of this ledger record.
public string RecordId { get; }
Property Value
Remarks
A new identifier is generated when none is supplied to FromDecisionReceipt(IDecisionReceipt, string?, DateTimeOffset?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, DateTimeOffset?, IReadOnlyDictionary<string, string>?, string?).
RecordedUtc
Gets the UTC timestamp when this record was captured for the ledger.
public DateTimeOffset RecordedUtc { get; }
Property Value
RiskScore
Gets the finite, non-negative host-defined risk score associated with the decision, when supplied by the host.
public double? RiskScore { get; }
Property Value
SchemaVersion
Gets the normalized serialized schema version for the record shape.
public string SchemaVersion { get; }
Property Value
SignatureAlgorithm
Gets the signature algorithm used to sign the record, when signed.
public string? SignatureAlgorithm { get; }
Property Value
SignatureKeyId
Gets the identifier of the key used to sign the record, when signed.
public string? SignatureKeyId { get; }
Property Value
SignatureKeyVersion
Gets the version of the key used to sign the record, when supplied.
public string? SignatureKeyVersion { get; }
Property Value
SignatureProvider
Gets the name of the signing provider that produced the signature, when supplied.
public string? SignatureProvider { get; }
Property Value
SignatureValue
Gets the encoded signature value for the record, when signed.
public string? SignatureValue { get; }
Property Value
SignedUtc
Gets the UTC timestamp when the record was signed, when supplied.
public DateTimeOffset? SignedUtc { get; }
Property Value
SigningHash
Gets the hash that was signed or is intended to be signed, when supplied by the host or signing provider.
public string? SigningHash { get; }
Property Value
SigningMetadata
Gets the provider-neutral signing metadata assembled from the individual signature properties on this record.
public SigningMetadata SigningMetadata { get; }
Property Value
SpanId
Gets the span identifier associated with the event, when supplied by the host or observability adapter.
public string? SpanId { get; }
Property Value
TenantHash
Gets the privacy-preserving tenant hash associated with the decision, when supplied by the host.
public string? TenantHash { get; }
Property Value
TraceId
Gets the trace identifier associated with the event, when supplied by the host.
public string? TraceId { get; }
Property Value
Methods
FromDecisionReceipt(IDecisionReceipt, string?, DateTimeOffset?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, DateTimeOffset?, IReadOnlyDictionary<string, string>?, string?)
Creates a persistence-ready ledger record from a decision receipt, attaching optional handshake, capability, hash-chain, and signature references.
public static AuditLedgerRecord FromDecisionReceipt(IDecisionReceipt receipt, string? recordId = null, DateTimeOffset? recordedUtc = null, string? handshakeId = null, string? acknowledgmentId = null, string? capabilityTokenId = null, string? previousRecordHash = null, string? recordHash = null, string? signatureKeyId = null, string? signatureAlgorithm = null, string? signatureValue = null, string? signingHash = null, string? signatureKeyVersion = null, string? signatureProvider = null, DateTimeOffset? signedUtc = null, IReadOnlyDictionary<string, string>? metadata = null, string? schemaVersion = null)
Parameters
receiptIDecisionReceiptThe decision receipt to capture.
recordIdstringThe ledger record identifier; a new identifier is generated when omitted or blank.
recordedUtcDateTimeOffset?The capture timestamp; defaults to the current UTC time.
handshakeIdstringThe optional liability handshake identifier to link.
acknowledgmentIdstringThe optional handshake acknowledgment identifier to link.
capabilityTokenIdstringThe optional capability token or grant identifier to link. When omitted or blank, the receipt's CapabilityGrantId is used.
previousRecordHashstringThe optional hash of the preceding ledger record.
recordHashstringThe optional hash of this ledger record.
signatureKeyIdstringThe optional identifier of the signing key.
signatureAlgorithmstringThe optional signature algorithm.
signatureValuestringThe optional encoded signature value.
signingHashstringThe optional hash that was signed.
signatureKeyVersionstringThe optional version of the signing key.
signatureProviderstringThe optional name of the signing provider.
signedUtcDateTimeOffset?The optional UTC timestamp when the record was signed.
metadataIReadOnlyDictionary<string, string>Optional metadata merged over the receipt metadata; entries with the same key win.
schemaVersionstringThe schema version; defaults to the receipt schema version.
Returns
- AuditLedgerRecord
A normalized ledger record with optional values trimmed and blank values treated as absent.
Exceptions
- ArgumentNullException
receiptis null.- ArgumentException
A required receipt value, such as the event, actor, operation, or outcome, is blank.
- ArgumentOutOfRangeException
A receipt latency, constraint count, outbox sequence, or risk score is negative or not finite.