The program emits each event through emit_cpi!, as an inner instruction to itself. Decode inner instructions whose data starts with the CPI tag e445a52e51cb9a1d, then the event’s 8-byte discriminator, then its Borsh fields. Logs are not used, so nothing is lost to log truncation. Every state change has its event, so an indexer can rebuild every agent, vault and listing from them.
| Event | Emitted by | Discriminator |
|---|---|---|
| Chartered | charter | c3ab13a138d33f35 |
| ConfigUpdated | initialize_config, update_config | 28f1e67a0b13c6c2 |
| Deposited | charter, deposit | 6f8d1a2da1236439 |
| Frozen | freeze | 734dbd535147f5e8 |
| PolicySet | set_policy | 7ef6453009f0e234 |
| Revoked | revoke | 71d894637cb80041 |
| ServiceListed | list_service | 8ab9bcd2f23e4ef8 |
| ServiceUnlisted | unlist_service, revoke | 79958eb04baed787 |
| Settled | settle | e8d228118e7c91ee |
| Unfrozen | unfreeze | de48e687c6e14741 |
| Withdrawn | withdraw | 1459dfc6c27cdb0d |
Chartered
A new agent. A positive first deposit also emits Deposited, so index deposits from Deposited alone.
agentpubkey- The agent’s public key (not its PDA).
principalpubkey- The agent’s principal.
card_hash[u8; 32]- SHA-256 of the card JSON.
card_uristring- Where the card is served.
policy_versionu32- Always 1.
policyPolicy- The policy. See Policy.
first_depositu64- Base units moved into the vault.
created_ati64- Unix seconds at charter.
ConfigUpdated
The fee terms after the change.
adminpubkey- The Config admin.
fee_bpsu16- Fee in basis points.
fee_flooru64- Fee floor in base units.
fee_recipientpubkey- The fee recipient wallet.
usdc_mintpubkey- The settlement mint.
Deposited
USDC into a vault, with its funder.
agentpubkey- The agent’s public key (not its PDA).
funderpubkey- The wallet the USDC came from. A funding link for the filter.
amountu64- Base units.
Frozen
The agent stopped settling.
agentpubkey- The agent’s public key (not its PDA).
PolicySet
A new policy version.
agentpubkey- The agent’s public key (not its PDA).
policy_versionu32- The new version.
policyPolicy- The policy. See Policy.
period_starti64- Start of the current period under the new policy.
spent_in_periodu64- Spending carried into the new policy’s period, base units.
Revoked
The agent is closed for good.
agentpubkey- The agent’s public key (not its PDA).
principalpubkey- The agent’s principal.
amount_returnedu64- Base units returned to the principal.
ServiceListed
A listing created or changed.
agentpubkey- The agent’s public key (not its PDA).
endpointstring- The URL.
price_per_callu64- Base units per call.
updated_ati64- Unix seconds.
ServiceUnlisted
A listing taken out of the catalog.
agentpubkey- The agent’s public key (not its PDA).
updated_ati64- Unix seconds.
Settled
One call paid. The indexer builds every settlement from these.
agentpubkey- The payer agent’s public key.
principalpubkey- The payer’s principal.
payeepubkey- The key paid.
amountu64- Base units paid to the payee.
feeu64- Base units paid to the fee recipient.
nonceu64- The payer’s nonce.
call_id[u8; 32]- The call ID from the quote.
policy_versionu32- The payer’s policy version this settlement ran under.
spent_in_periodu64- The payer’s spending in the current period after this settlement, amount and fee included.
submitterpubkey- The key that submitted and paid for the transaction.
Unfrozen
The agent settles again.
agentpubkey- The agent’s public key (not its PDA).
Withdrawn
USDC from a vault to its principal.
agentpubkey- The agent’s public key (not its PDA).
principalpubkey- The agent’s principal.
amountu64- Base units.