Skip to main content

ResQ.Blockchain.BlockchainEvent

BlockchainEvent(string, string, string, string, DateTimeOffset) Constructor

Represents an event to be recorded on the blockchain for immutable logging.
public BlockchainEvent(string EventId, string EventType, string Payload, string? IpfsCid, System.DateTimeOffset Timestamp);

Parameters

EventId System.String Unique identifier for this event. EventType System.String The type/category of the event. Payload System.String JSON payload containing event-specific data. IpfsCid System.String Optional IPFS Content Identifier for associated evidence. Timestamp System.DateTimeOffset UTC timestamp when the event occurred.

Example

var evt = new BlockchainEvent(
    EventId: "evt-001",
    EventType: "IncidentDetected",
    Payload: "{\"incidentId\":\"inc-001\",\"severity\":\"High\"}",
    IpfsCid: "Qmabc123...",
    Timestamp: DateTimeOffset.UtcNow
);

var result = await neoClient.RecordEventAsync(evt);

Remarks

Blockchain events provide an immutable audit trail of critical system activities. Each event is assigned a unique ID and can optionally reference IPFS content for additional evidence storage.