The contract emits one audit event after a successful transact execution. This event is the boundary consumed by the off-chain scanner.

Event shape

#[contractevent(topics = ["audit", "encoded_digest"], data_format = "single-value")]
pub struct AuditEncodedDigest {
    #[topic]
    message_name: String,
    digest: Bytes,
}
FieldMeaning
Topic auditScanner-level event category
Topic encoded_digestEvent shape marker
message_nameCurrently transact
digestEncrypted audit payload passed to transact as encoded

Event handoff

Scanner mapping

For the current Stellar privacy-pool contract:
Contract event topicStored raw event type
audittransact
The scanner stores:
audit columnSource
contract_idRegistered contracts.id
tx_idStellar transaction hash
soroban_event_idStellar event id
event_typetransact
cyphertextAuditEncodedDigest.digest
public_signals_jsonParsed from event payload or transact calldata when available
signer_accountResolved from invocation metadata when available
See Indexing and Interpretation for the off-chain processing path.