AURA

Events

Decode AURA program events from transaction logs.

The events namespace decodes the program's 4 events from transaction logs and exposes their 8-byte discriminators for low-level matching.

EventEmitted when
treasuryAuditEventAny audited state change on a treasury.
proposalLifecycleEventA proposal is created, approved, or resolved.
executionLifecycleEventA proposal moves through signing/finalization.
policyReceiptWrittenEventA policy receipt is committed.

parseAuraEvents

Decodes all AURA events from a list of program logs (e.g. from getTransaction(...).meta.logMessages).

import { parseAuraEvents } from "@aura-protocol/sdk-ts";

const tx = await client.connection.getTransaction(signature, {
  maxSupportedTransactionVersion: 0,
});
const events = parseAuraEvents(client, tx?.meta?.logMessages ?? []);

for (const event of events) {
  console.log(event.name, event.data);
}

Returns [] when there are no AURA events in the logs.

Discriminators

EventDiscriminator (also exported as EVENT_DISCRIMINATORS) maps each event name to its 8-byte Buffer. Use matchesEventDiscriminator to test a raw buffer's prefix — useful when scanning CPI event data directly.

import {
  EventDiscriminator,
  matchesEventDiscriminator,
} from "@aura-protocol/sdk-ts";

const isAudit = matchesEventDiscriminator(
  data,
  EventDiscriminator.treasuryAuditEvent,
);

Event log parsing uses the Anchor EventParser. It expects well-formed program-log sequences; pass the raw logMessages array straight through.

On this page