Indexed Events
IndexedEvents is the set of on-chain events the indexer decodes and hands to a
storage adapter. Each chain client maps its raw logs onto this shared union, so
the rest of the SDK stays chain-agnostic. The types live in @overcast-xyz/core.
Every event is wrapped in the same envelope:
type Indexed<Name, Payload> = {
name: Name;
event: Payload;
checkpoint: Checkpoint; // ledger position and timestamp
idx: number; // the event's position within the checkpoint
tx?: TxDetails; // the raw chain transaction, when the client attaches it
};
The snippets below show each Payload. Native token amounts are bigint in the
smallest unit, timestamps are number (unix), and every address or id is a
base58 Id string.
Event names in this document are the chain-agnostic SDK names — the ones that matter for the cross-chain spec. Today Solana is the only implementation, and its on-chain event names occasionally differ on purpose (noted inline where that happens), since the Anchor program predates and shaped the SDK's event set.
Vault
Deposited
Emitted when funds move into an escrow vault.
{
accountHolder: Id; // vault owner credited
funder: Id; // account that provided the funds
asset: Id; // token deposited
amount: bigint; // amount deposited
}
Withdrawn
Emitted when funds move out of an escrow vault.
{
accountHolder: Id; // vault owner debited
asset: Id; // token withdrawn
amount: bigint; // amount withdrawn
}
Authorized keys and operations
Keys an account authorizes to sign on its behalf, and the delegated operations they produce (the ed25519 operator flow).
AuthorizedKeySet
Emitted when an owner registers a signing key.
{
owner: Id; // account that owns the key
authorizedKey: Id; // ed25519 key allowed to authorize operations
permissions: number; // bitmap of allowed actions (bit index = ACTIONS value); decode with parsePermissions
}
AuthorizedKeyRemoved
Emitted when an owner revokes a signing key.
{
owner: Id; // account that owns the key
authorizedKey: Id; // the revoked key
}
OperationConsumed
Emitted when a signed delegated operation is executed and its replay-protection record is created.
{
owner: Id; // account the operation acts for
authorizedKey: Id; // key that signed the operation
action: number; // the operation kind
salt: Id; // 32-byte salt, base58-encoded
expiry: number; // operation expiry (unix)
replayProtectionKey: Id; // the on-chain record created to prevent replay (e.g. an account on Solana, a mapping index on EVM)
}
OperationReplayProtectionKeyCleared
Emitted when an operation's replay-protection record is closed, freeing up
space once it's no longer needed for replay protection (e.g. after expiry).
On Solana this decodes from the on-chain OperationClosed event — renamed in
the SDK because "closed" is a Solana-account concept (rent reclaimed), while
the chain-agnostic meaning is that the replay-protection key itself was
cleared.
{
replayProtectionKey: Id; // the replay-protection record that was cleared
}
Offers and options
OfferCreated carries the full, content-addressed domain object (Offer), so
its fields use the domain camelCase naming. The same event and shape cover
both collateral offers (side: "MAKER") and settlement offers
(side: "TAKER").
OfferCreated
Emitted when a maker or taker posts an offer.
{
id: Id; // the offer's content-address id
creator: Id; // offer creator — the maker (collateral side) or taker (settlement side)
expiry: number; // offer expiry (unix)
salt: Id; // uniqueness salt
side: "TAKER" | "MAKER"; // which side of the option this offer fills
details: OptionDetails; // the option terms
}
OfferCancelled
Emitted when an offer is cancelled and its deposit refunded.
{
offer: Id; // the cancelled offer's id
creator: Id; // offer creator
depositAsset: Id; // asset returned (the offer's collateral or premium)
refundedAmount: bigint; // amount returned to the creator
}
MarketOptionCreated
Emitted when a collateral and settlement offer are matched into an option.
{
option: Id; // id of the matched option
collateralOffer: Id; // id of the matched collateral offer
settlementOffer: Id; // id of the matched settlement offer
maker: Id; // collateral side
taker: Id; // settlement side
exerciseClaim: Id; // mint of the claim the taker uses to exercise
redeemClaim: Id; // mint of the claim the maker uses to redeem
premiumToMaker: bigint; // premium paid to the maker on match
details: OptionDetails; // the agreed option terms
}
Option interactions
OptionExercised
Emitted when a taker exercises, depositing settlement and receiving collateral.
{
option: Id; // the exercised option's id
taker: Id; // account that exercised
claimsBurned: bigint; // exercise claims burned in this call
settlementAsset: Id; // asset deposited as settlement
settlementDeposited: bigint; // settlement amount deposited
collateralAsset: Id; // collateral asset released
collateralToTaker: bigint; // collateral sent to the taker
totalBurnedClaims: bigint; // cumulative claims burned for the option
}
OptionRedeemed
Emitted when a maker redeems after expiry, reclaiming collateral and settlement.
{
option: Id; // the redeemed option's id
maker: Id; // account that redeemed
claimsBurned: bigint; // return claims burned in this call
collateralAsset: Id; // collateral asset returned
collateralPayout: bigint; // collateral returned to the maker
settlementAsset: Id; // settlement asset paid out
settlementPayout: bigint; // settlement paid to the maker
totalBurnedClaims: bigint; // cumulative claims burned for the option
}
OptionBorrowed
Emitted when a taker borrows against the option's collateral.
{
option: Id; // the option borrowed against
taker: Id; // account borrowing
asset: Id; // borrowed asset
amount: bigint; // amount borrowed in this call
outstandingBorrow: bigint; // total outstanding after this borrow
}
OptionRepaid
Emitted when borrowed collateral is repaid.
{
option: Id; // the option being repaid
repayer: Id; // account repaying — the taker or any third party
asset: Id; // repaid asset
amount: bigint; // amount repaid in this call
outstandingBorrow: bigint; // total outstanding after repayment
}
Protocol lifecycle
The config on these events is the ProtocolConfig, flattened into the columns
below:
| Column | Type | Meaning |
|---|---|---|
authority | Id | account allowed to update the protocol config |
pauseAuthority | Id | hot wallet allowed to trip the emergency pause |
optionCreationHook | Id | null | hook run on option creation, or null if unset |
pausedActions | number | bitmask of actions currently paused |
pauseAuthorityMask | number | bitmask of actions pauseAuthority is allowed to pause/unpause |
ProtocolInitialized
Emitted once when the protocol is set up. Carries the initial config plus the
chain domain id.
{
config: ProtocolConfig; // the initial protocol configuration (see columns above)
domain: number; // the chain domain id
}
ProtocolConfigUpdated
Emitted when an authority changes the protocol config.
{
updatedBy: Id; // authority that made the change
config: ProtocolConfig; // the new configuration (see columns above)
}
ProtocolPaused
Emitted when the pause authority pauses one or more instructions.
{
pausedBy: Id; // authority that paused the protocol
pauseMask: number; // the bits newly OR'd into pausedActions by this call
pausedActions: number; // the current value of ProtocolConfig.pausedActions after this call
}
Fees
FeePaid
Emitted when a fee is paid through the option-creation hook.
{
hookProgram: Id; // the hook program that charged the fee
hookConfig: Id; // the hook config account
option: Id; // option the fee relates to
payer: Id; // account that paid the fee — the option taker
asset: Id; // fee asset
amount: bigint; // fee amount
}