@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / TransactionActivity

Type Alias: TransactionActivity

TransactionActivity = object

Defined in: packages/sdk/src/activity.ts:354

Everything the protocol did in ONE transaction.

The transaction-scoped counterpart of SomniaMarketsClient.getMarketActivity: same event union, same row ids, but selected by transaction rather than by market. A transaction that touched nothing the indexer follows comes back with empty collections and a null blockNumber — that is "not a protocol transaction", not a failure.

Properties

txHash

txHash: string

Defined in: packages/sdk/src/activity.ts:356

The transaction hash, LOWER-CASED — not necessarily as the caller spelled it.


blockNumber

blockNumber: string | null

Defined in: packages/sdk/src/activity.ts:362

Block the transaction landed in; null when the indexer has nothing for this hash. Read off the events, so it is the indexer's view of the block rather than the chain's.


timestamp

timestamp: string | null

Defined in: packages/sdk/src/activity.ts:364

Block timestamp (unix seconds); null on the same terms as blockNumber.


events

events: MarketActivity[]

Defined in: packages/sdk/src/activity.ts:370

What the transaction did, in LOG ORDER — earliest first, the order the chain executed it in. The opposite of SomniaMarketsClient.getMarketActivity, which is a feed and reads newest-first.


ordersPlaced

ordersPlaced: TransactionOrder[]

Defined in: packages/sdk/src/activity.ts:376

Orders PLACED in this transaction. A taker order that filled immediately appears here AND as the taker of a TRADE event; a maker order that only rested appears here alone.


protocolFees

protocolFees: ProtocolFeeRecord[]

Defined in: packages/sdk/src/activity.ts:378

Protocol fees charged in this transaction. BINARY only.


builderFees

builderFees: BuilderFeeRecord[]

Defined in: packages/sdk/src/activity.ts:380

Builder fees charged in this transaction. BINARY only.


markets

markets: Record<string, Market>

Defined in: packages/sdk/src/activity.ts:385

The markets these events touched, keyed by lowercased market id — so a caller can NAME each row without a lookup per row.