import { GenMessage, GenService, GenFile } from '@bufbuild/protobuf/codegenv2'; import { P as Pubkey, S as Signature, g as AccountPage, e as AccountMeta, j as AccountView, A as Account, C as ConsensusStatus } from './account_pb-nVy1q-D5.cjs'; import { Timestamp, Duration } from '@bufbuild/protobuf/wkt'; import { T as Filter, C as BlockView, s as Block, bn as NodeRecord, bW as Transaction, bZ as TransactionExecutionResult } from './query_service_pb-Ci7T_0DF.cjs'; import { Message } from '@bufbuild/protobuf'; /** * Describes the file thru/services/v1/streaming_service.proto. */ declare const file_thru_services_v1_streaming_service: GenFile; /** * StreamBlocksRequest subscribes to real-time block updates. * * Filter expressions support the following params: * * - params.slot (int64): Slot number for comparison * Example: block.block.header.slot == params.slot * * - params.min_slot (int64): Minimum slot for range filtering * Example: block.block.header.slot >= params.min_slot * * - params.start_slot (int64): Starting slot for filtering * Example: block.block.header.slot >= params.start_slot * * - params.u64 (int64): Generic 64-bit value for numeric comparisons * Examples: * block.block.header.max_compute_units > params.u64 * block.block.header.bond_amount_lock_up >= params.u64 * * - params.producer (bytes|Pubkey): Producer pubkey for filtering * Examples: * block.block.header.producer.value == params.producer * has(block.block.header.producer) && block.block.header.producer.value == params.producer * * Available block header fields: * block.block.header.slot, block.block.header.version, * block.block.header.start_slot, block.block.header.expiry_after, * block.block.header.max_block_size, block.block.header.max_compute_units, * block.block.header.max_state_units, block.block.header.bond_amount_lock_up, * block.block.header.producer, block.block.header.producer.value * * Available block footer fields (populated on the live stream): * block.block.footer.signature, block.block.footer.attestor_payment * * NOT populated on this stream — do not filter on these here: * block.block.footer.status is ALWAYS EXECUTION_STATUS_PENDING; * block.block.footer.consumed_compute_units and * block.block.footer.consumed_state_units are ALWAYS 0, because * StreamBlocks emits blocks at observation time, before execution * completes. The CEL engine accepts these paths, but filters on them * never match meaningfully. For live per-block consumed units use * StreamSlotMetrics; for the fully-populated, filterable footer use * QueryService.GetBlock / ListBlocks. * * Available consensus status field: * block.block.consensus_status * * Filter expression examples: * * 1. Filter by specific slot: * Expression: "block.block.header.slot == params.slot" * Params: {"slot": 12345} * * 2. Filter by slot range: * Expression: "block.block.header.slot >= params.min_slot" * Params: {"min_slot": 1000} * * 3. Filter by block version: * Expression: "block.block.header.version >= uint(0)" * * 4. Filter by specific producer: * Expression: "has(block.block.header.producer) && block.block.header.producer.value == params.producer" * Params: {"producer": <32-byte pubkey>} * * 5. Filter by max compute units: * Expression: "block.block.header.max_compute_units > uint(0)" * * 6. Filter by max state units: * Expression: "block.block.header.max_state_units > uint(0)" * * 7. Filter by bond amount lock-up: * Expression: "block.block.header.bond_amount_lock_up >= uint(0)" * * 8. Footer status is PENDING-only on this stream: * block.block.footer.status is ALWAYS EXECUTION_STATUS_PENDING here, so a * status filter can never select executed blocks. To filter on executed * status use QueryService.GetBlock / ListBlocks instead. * Note: EXECUTION_STATUS_PENDING = 1, EXECUTION_STATUS_EXECUTED = 2 * * 9. Filter by consensus status: * Expression: "block.block.consensus_status == int(2)" * Note: CONSENSUS_STATUS_UNSPECIFIED = 0, CONSENSUS_STATUS_OBSERVED = 1, * CONSENSUS_STATUS_INCLUDED = 2 * * 10. Check for optional fields presence: * Expression: "has(block.block.header) && has(block.block.footer)" * * 11. Combined filters (multiple conditions): * Expression: "block.block.header.slot >= params.min_slot && has(block.block.footer) && block.block.footer.attestor_payment > uint(0)" * Params: {"min_slot": 1000} * * 12. Numeric comparison with params: * Expression: "block.block.header.max_compute_units > params.u64" * Params: {"u64": 1000000} * * @generated from message thru.services.v1.StreamBlocksRequest */ type StreamBlocksRequest = Message<"thru.services.v1.StreamBlocksRequest"> & { /** * @generated from field: optional uint64 start_slot = 1; */ startSlot?: bigint | undefined; /** * @generated from field: optional thru.common.v1.Filter filter = 2; */ filter?: Filter | undefined; /** * @generated from field: optional thru.core.v1.BlockView view = 3; */ view?: BlockView | undefined; /** * @generated from field: optional thru.common.v1.ConsensusStatus min_consensus = 4; */ minConsensus?: ConsensusStatus | undefined; }; /** * Describes the message thru.services.v1.StreamBlocksRequest. * Use `create(StreamBlocksRequestSchema)` to create a new message. */ declare const StreamBlocksRequestSchema: GenMessage; /** * StreamBlocksResponse delivers block updates. * * @generated from message thru.services.v1.StreamBlocksResponse */ type StreamBlocksResponse = Message<"thru.services.v1.StreamBlocksResponse"> & { /** * @generated from field: thru.core.v1.Block block = 1; */ block?: Block | undefined; }; /** * Describes the message thru.services.v1.StreamBlocksResponse. * Use `create(StreamBlocksResponseSchema)` to create a new message. */ declare const StreamBlocksResponseSchema: GenMessage; /** * StreamAccountUpdatesRequest subscribes to account delta events. * * Filter expressions support the following params: * * - params.min_slot (uint64): Minimum slot for filtering updates * Example: account_update.slot >= params.min_slot * * - params.min_balance (uint64): Minimum balance for filtering * Example: snapshot.meta.balance >= params.min_balance * * - params.owner (bytes|Pubkey): Owner pubkey for filtering * Examples: * snapshot.meta.owner.value == params.owner * account_update.meta.owner.value == params.owner * * - params.address (bytes|Pubkey): Account address for filtering * Example: account_address.value == params.address * Note: Use account_address for unified filtering across both snapshot and update messages * * - params.addresses (BytesList): List of addresses for multi-account filtering * Example: account_address.value in params.addresses * Note: Use the 'in' operator to filter by multiple addresses in a single subscription * * - params.min_nonce (uint64): Minimum nonce for filtering * Example: snapshot.meta.nonce >= params.min_nonce * * - params.min_seq (uint64): Minimum sequence number for filtering * Example: snapshot.meta.seq >= params.min_seq * Note: for account_update messages, prefer the top-level * account_update.seq -- it is present under every view, including * DATA_ONLY and PUBKEY_ONLY where account_update.meta is stripped. * * - params.min_data_size (uint32): Minimum data size for filtering * Example: snapshot.meta.data_size >= params.min_data_size * * Available snapshot fields (thru.core.v1.Account): * snapshot.address, snapshot.address.value (bytes), * snapshot.meta.balance (uint64), snapshot.meta.seq (uint64), * snapshot.meta.nonce (uint64), snapshot.meta.data_size (uint32), * snapshot.meta.version (uint32), snapshot.meta.flags (AccountFlags), * snapshot.meta.flags.is_program (bool), snapshot.meta.flags.is_privileged (bool), * snapshot.meta.flags.is_uncompressable (bool), snapshot.meta.flags.is_ephemeral (bool), * snapshot.meta.flags.is_deleted (bool), snapshot.meta.flags.is_new (bool), * snapshot.meta.flags.is_compressed (bool), * snapshot.meta.owner, snapshot.meta.owner.value (bytes) * * Available account_update fields (AccountUpdate): * account_update.slot (uint64), account_update.delete (bool), * account_update.seq (uint64) - present under every view, unlike meta.seq, * account_update.meta.balance (uint64), account_update.meta.seq (uint64), * account_update.meta.nonce (uint64), account_update.meta.data_size (uint32), * account_update.meta.version (uint32), account_update.meta.flags (AccountFlags), * account_update.meta.flags.is_program (bool), account_update.meta.flags.is_privileged (bool), * account_update.meta.flags.is_uncompressable (bool), account_update.meta.flags.is_ephemeral (bool), * account_update.meta.flags.is_deleted (bool), account_update.meta.flags.is_new (bool), * account_update.meta.flags.is_compressed (bool), * account_update.meta.owner, account_update.meta.owner.value (bytes) * * Available unified fields (work for both snapshot and update messages): * account_address, account_address.value (bytes) - extracted from whichever message type is present * * Filter expression examples: * * 1. Filter by minimum balance (snapshot or update): * Expression: "(has(snapshot.meta) && snapshot.meta.balance >= uint(1000000)) || (has(account_update.meta) && account_update.meta.balance >= uint(1000000))" * * 2. Filter by account owner using params: * Expression: "(has(snapshot.meta) && has(snapshot.meta.owner) && snapshot.meta.owner.value == params.owner) || (has(account_update.meta) && has(account_update.meta.owner) && account_update.meta.owner.value == params.owner)" * Params: {"owner": <32-byte pubkey>} * * 3. Filter by specific account address (works for both snapshot and update messages): * Expression: "account_address.value == params.address" * Params: {"address": <32-byte pubkey>} * * 4. Filter by minimum slot for updates: * Expression: "has(account_update.meta) && account_update.slot >= params.min_slot" * Params: {"min_slot": 1000} * * 5. Filter by nonce greater than value: * Expression: "(has(snapshot.meta) && snapshot.meta.nonce >= uint(5)) || (has(account_update.meta) && account_update.meta.nonce >= uint(5))" * * 6. Filter by sequence number: * Expression: "(has(snapshot.meta) && snapshot.meta.seq >= uint(100)) || (has(account_update.meta) && account_update.meta.seq >= uint(100))" * Note: for account_update alone, the top-level field also works and * survives every view: "account_update.seq >= uint(100)" * * 7. Filter by data size: * Expression: "(has(snapshot.meta) && snapshot.meta.data_size >= uint(1024)) || (has(account_update.meta) && account_update.meta.data_size >= uint(1024))" * * 8. Filter by account version: * Expression: "(has(snapshot.meta) && snapshot.meta.version >= uint(1)) || (has(account_update.meta) && account_update.meta.version >= uint(1))" * * 9. Filter by account flags (check if account is a program): * Expression: "(has(snapshot.meta) && has(snapshot.meta.flags) && snapshot.meta.flags.is_program) || (has(account_update.meta) && has(account_update.meta.flags) && account_update.meta.flags.is_program)" * * 10. Filter by privileged flag: * Expression: "(has(snapshot.meta) && has(snapshot.meta.flags) && snapshot.meta.flags.is_privileged) || (has(account_update.meta) && has(account_update.meta.flags) && account_update.meta.flags.is_privileged)" * * 11. Filter non-delete updates: * Expression: "has(snapshot.meta) || (has(account_update.meta) && (!has(account_update.delete) || !account_update.delete))" * * 12. Check for snapshot or update presence: * Expression: "has(snapshot.meta) || has(account_update.meta)" * * 13. Combined filters (multiple conditions): * Expression: "has(snapshot.meta) || (has(account_update.meta) && account_update.slot >= params.min_slot && account_update.meta.balance >= params.min_balance)" * Params: {"min_slot": 1000, "min_balance": 1000000} * * 14. Filter by minimum balance using params: * Expression: "(has(snapshot.meta) && snapshot.meta.balance >= params.min_balance) || (has(account_update.meta) && account_update.meta.balance >= params.min_balance)" * Params: {"min_balance": 5000000000} * * Note: The response contains either a snapshot (initial state), an update (delta), * or a BlockFinished message. Filters should handle both snapshot and update cases * using OR logic to match either message type. * * To filter by specific account address (recommended - works for both message types): * Expression: "account_address.value == params.address" * Params: {"address": <32-byte pubkey>} * * To filter by owner (program): * Expression: "(has(snapshot.meta.owner) && snapshot.meta.owner.value == params.owner) || (has(account_update.meta.owner) && account_update.meta.owner.value == params.owner)" * Params: {"owner": <32-byte program pubkey>} * * To filter by multiple account addresses (recommended for multi-account subscriptions): * Expression: "account_address.value in params.addresses" * Params: {"addresses": BytesList{values: [, , ...]}} * Note: Use BytesList parameter type with the 'in' operator for efficient multi-address filtering * * @generated from message thru.services.v1.StreamAccountUpdatesRequest */ type StreamAccountUpdatesRequest = Message<"thru.services.v1.StreamAccountUpdatesRequest"> & { /** * Projects delivered snapshots and updates to the requested fields. The * server strips fields the view excludes before sending: META_ONLY omits * Account.data and AccountUpdate.page; DATA_ONLY omits the meta; PUBKEY_ONLY * delivers only the address. On AccountUpdate deltas the slot, the * top-level seq, and the AccountUpdate.delete flag are always preserved * regardless of view, so every view can detect account deletion and read * the per-account sequence number even when meta is stripped; without * delete a deletion would be indistinguishable from a page-less update. * ACCOUNT_VIEW_UNSPECIFIED defaults to ACCOUNT_VIEW_FULL, matching the unary * GetAccount RPC. * * @generated from field: optional thru.core.v1.AccountView view = 2; */ view?: AccountView | undefined; /** * @generated from field: optional thru.common.v1.Filter filter = 4; */ filter?: Filter | undefined; }; /** * Describes the message thru.services.v1.StreamAccountUpdatesRequest. * Use `create(StreamAccountUpdatesRequestSchema)` to create a new message. */ declare const StreamAccountUpdatesRequestSchema: GenMessage; /** * AccountUpdate describes a delta for an account. * * @generated from message thru.services.v1.AccountUpdate */ type AccountUpdate = Message<"thru.services.v1.AccountUpdate"> & { /** * @generated from field: uint64 slot = 1; */ slot: bigint; /** * @generated from field: optional thru.core.v1.AccountPage page = 2; */ page?: AccountPage | undefined; /** * @generated from field: optional thru.core.v1.AccountMeta meta = 3; */ meta?: AccountMeta | undefined; /** * @generated from field: optional bool delete = 4; */ delete?: boolean | undefined; /** * Account address for identifying the account in multi-account streams. * * @generated from field: thru.common.v1.Pubkey address = 5; */ address?: Pubkey | undefined; /** * Per-account sequence number of this update. Unlike meta.seq, this * top-level field is present under every view, including DATA_ONLY and * PUBKEY_ONLY where meta is stripped. * * @generated from field: uint64 seq = 6; */ seq: bigint; }; /** * Describes the message thru.services.v1.AccountUpdate. * Use `create(AccountUpdateSchema)` to create a new message. */ declare const AccountUpdateSchema: GenMessage; /** * BlockFinished is sent when block's execution is complete. * Contains block accumulator metrics finalized after execution. * * @generated from message thru.services.v1.BlockFinished */ type BlockFinished = Message<"thru.services.v1.BlockFinished"> & { /** * @generated from field: uint64 slot = 1; */ slot: bigint; /** * Global counter tracking total activated state across all accounts. * Increments when accounts are created or modified. * * @generated from field: uint64 global_activated_state_counter = 2; */ globalActivatedStateCounter: bigint; /** * Global counter tracking total deactivated state across all accounts. * Increments when accounts are deleted or compressed. * * @generated from field: uint64 global_deactivated_state_counter = 3; */ globalDeactivatedStateCounter: bigint; /** * Fees credited to the absent-block-producer fee receiver this block * because the block producer account was not live (UNTO-1293). Field * number unchanged (4). * * @generated from field: uint64 absent_block_producer_fees = 4; */ absentBlockProducerFees: bigint; /** * Fees credited to a live block-producer account this block. Disjoint from * absent_block_producer_fees by destination; total block fees = * absent_block_producer_fees + claimed_fees. * * @generated from field: uint64 claimed_fees = 5; */ claimedFees: bigint; }; /** * Describes the message thru.services.v1.BlockFinished. * Use `create(BlockFinishedSchema)` to create a new message. */ declare const BlockFinishedSchema: GenMessage; /** * StreamAccountUpdatesResponse contains either an initial snapshot or a delta. * * @generated from message thru.services.v1.StreamAccountUpdatesResponse */ type StreamAccountUpdatesResponse = Message<"thru.services.v1.StreamAccountUpdatesResponse"> & { /** * @generated from oneof thru.services.v1.StreamAccountUpdatesResponse.message */ message: { /** * @generated from field: thru.core.v1.Account snapshot = 1; */ value: Account; case: "snapshot"; } | { /** * @generated from field: thru.services.v1.AccountUpdate update = 2; */ value: AccountUpdate; case: "update"; } | { /** * @generated from field: thru.services.v1.BlockFinished finished = 3; */ value: BlockFinished; case: "finished"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message thru.services.v1.StreamAccountUpdatesResponse. * Use `create(StreamAccountUpdatesResponseSchema)` to create a new message. */ declare const StreamAccountUpdatesResponseSchema: GenMessage; /** * StreamTransactionsRequest subscribes to transaction confirmations. * * Filter expressions support the following params: * * - params.min_slot (uint64): Minimum slot for filtering transactions * Example: transaction.slot >= params.min_slot * * - params.max_slot (uint64): Maximum slot for filtering transactions * Example: transaction.slot <= params.max_slot * * - params.slot (uint64): Specific slot for exact match filtering * Example: transaction.slot == params.slot * * - params.min_fee (uint64): Minimum fee for filtering transactions * Example: transaction.header.fee >= params.min_fee * * - params.fee_payer (bytes|Pubkey): Fee payer pubkey for filtering * Example: transaction.header.fee_payer_pubkey.value == params.fee_payer * * - params.signature (bytes|Signature): Transaction signature for filtering * Example: transaction.signature.value == params.signature * * Available transaction fields (thru.core.v1.Transaction): * transaction.signature, transaction.signature.value (bytes), * transaction.slot (uint64), transaction.block_offset (uint32), * transaction.header, transaction.header.version (uint32), * transaction.header.fee (uint64), * transaction.header.fee_payer_pubkey, transaction.header.fee_payer_pubkey.value (bytes), * transaction.execution_result, transaction.execution_result.user_error_code (uint32), * transaction.execution_result.vm_error (int32) * * Available consensus_status field: * consensus_status (int32) - Current consensus status of the transaction * Values: CONSENSUS_STATUS_UNSPECIFIED = 0, CONSENSUS_STATUS_OBSERVED = 1, * CONSENSUS_STATUS_INCLUDED = 2 * * Filter expression examples: * * 1. Filter by minimum slot: * Expression: "has(transaction.slot) && transaction.slot >= params.min_slot" * Params: {"min_slot": 1000} * * 2. Filter by slot range: * Expression: "has(transaction.slot) && transaction.slot >= params.min_slot && transaction.slot <= params.max_slot" * Params: {"min_slot": 1000, "max_slot": 2000} * * 3. Filter by specific slot: * Expression: "has(transaction.slot) && transaction.slot == params.slot" * Params: {"slot": 12345} * * 4. Filter by minimum fee: * Expression: "has(transaction.header) && transaction.header.fee >= params.min_fee" * Params: {"min_fee": 5000} * * 5. Filter by fee payer: * Expression: "has(transaction.header.fee_payer_pubkey) && transaction.header.fee_payer_pubkey.value == params.fee_payer" * Params: {"fee_payer": <32-byte pubkey>} * * 6. Filter by transaction signature: * Expression: "has(transaction.signature) && transaction.signature.value == params.signature" * Params: {"signature": <64-byte signature>} * * 7. Filter by header version: * Expression: "has(transaction.header) && transaction.header.version >= uint(0)" * * 8. Filter by successful execution: * Expression: "has(transaction.execution_result) && transaction.execution_result.vm_error == int(0)" * * 9. Filter by user error code: * Expression: "has(transaction.execution_result) && transaction.execution_result.user_error_code == uint(0)" * * 10. Filter by consensus status: * Expression: "consensus_status >= int(2)" * Note: Use >= int(2) for CONSENSUS_STATUS_INCLUDED and above * * 11. Check for execution result presence: * Expression: "has(transaction.execution_result)" * * 12. Filter by transaction with header and slot: * Expression: "has(transaction.slot) && transaction.slot >= uint(0) && has(transaction.header)" * * 13. Combined filters (slot, fee, and status): * Expression: "has(transaction.slot) && transaction.slot >= params.min_slot && has(transaction.header) && transaction.header.fee >= params.min_fee && consensus_status >= int(2)" * Params: {"min_slot": 1000, "min_fee": 5000} * * 14. Filter successful transactions with minimum fee: * Expression: "has(transaction.execution_result) && transaction.execution_result.vm_error == int(0) && has(transaction.header) && transaction.header.fee >= params.min_fee" * Params: {"min_fee": 10000} * * Note: The min_consensus field in the request provides built-in consensus filtering * without requiring a CEL expression. Use it in combination with filter expressions * for more complex filtering logic. * * @generated from message thru.services.v1.StreamTransactionsRequest */ type StreamTransactionsRequest = Message<"thru.services.v1.StreamTransactionsRequest"> & { /** * @generated from field: optional thru.common.v1.Filter filter = 1; */ filter?: Filter | undefined; /** * @generated from field: optional thru.common.v1.ConsensusStatus min_consensus = 2; */ minConsensus?: ConsensusStatus | undefined; }; /** * Describes the message thru.services.v1.StreamTransactionsRequest. * Use `create(StreamTransactionsRequestSchema)` to create a new message. */ declare const StreamTransactionsRequestSchema: GenMessage; /** * StreamTransactionsResponse delivers transaction events. * * @generated from message thru.services.v1.StreamTransactionsResponse */ type StreamTransactionsResponse = Message<"thru.services.v1.StreamTransactionsResponse"> & { /** * @generated from field: thru.core.v1.Transaction transaction = 1; */ transaction?: Transaction | undefined; }; /** * Describes the message thru.services.v1.StreamTransactionsResponse. * Use `create(StreamTransactionsResponseSchema)` to create a new message. */ declare const StreamTransactionsResponseSchema: GenMessage; /** * StreamEventsRequest subscribes to chain events. * * Filter expressions support the following params: * * - params.prefix (bytes): Byte prefix for payload filtering * Example: bytesPrefix(event.payload, params.prefix) * * - params.slot (int64): Slot number for comparison * Example: event.slot >= params.slot * * - params.u64 (int64): Generic 64-bit value for payload extraction * Examples: * first8Bytes(event.payload) == params.u64 * first4Bytes(event.payload) == params.u64 * first1Byte(event.payload) == params.u64 * * - params.signature (bytes|Signature|TsSignature): Signature for comparison * Examples: * event.signature.value == params.signature // bytes type * bytesPrefix(event.signature.value, params.signature) * Note: Signature and TsSignature types are auto-converted to bytes * * - params.address (bytes|Pubkey|TaPubkey): Address/pubkey for comparison * Examples: * event.program.value == params.address // bytes type * bytesPrefix(event.program.value, params.address) * Note: Pubkey and TaPubkey types are auto-converted to bytes * * - params.timestamp (int64): Timestamp in seconds for comparison * Example: int(event.timestamp) > params.timestamp * * Available event fields: * event.event_id (string), event.slot (uint64), event.payload (bytes), * event.call_idx (uint32), event.signature (Signature), * event.signature.value (bytes), event.program (Pubkey), * event.program.value (bytes), event.timestamp (Timestamp), * event.program_idx (uint32), event.block_offset (uint32), * event.fee_payer (Pubkey), event.fee_payer.value (bytes), * event.block_timestamp (Timestamp) * * Note: Unlike ListEventsRequest in QueryService, StreamEventsRequest does NOT support: * event.payload_size, event.transaction_signature * * Available filter functions: * - has(field): Check if optional field exists * Example: has(event.program) && has(event.signature) * * - startsWith(string, prefix): Check if string starts with prefix * Example: event.event_id.startsWith("ts") * * - bytesPrefix(bytes, prefix): Check if bytes start with prefix * Examples: * bytesPrefix(event.payload, b"\x01\x00\x00\x00\x00\x00\x00\x00") * bytesPrefix(event.payload, params.prefix) * bytesPrefix(event.program.value, params.address) * bytesPrefix(event.signature.value, params.signature) * * - first1Byte(bytes): Extract first byte as uint * Example: first1Byte(event.payload) == uint(1) * * - first4Bytes(bytes): Extract first 4 bytes as little-endian uint32 * Example: first4Bytes(event.payload) == uint(2) * * - first8Bytes(bytes): Extract first 8 bytes as little-endian uint64 * Example: first8Bytes(event.payload) == uint(6) * * - uint(value): Convert value to uint for comparison * - int(value): Convert value to int (used for timestamps) * * Filter expression examples: * * 1. Filter by payload type using first1Byte (MESSAGE event type = 1): * Expression: "first1Byte(event.payload) == uint(1)" * * 2. Filter by payload type using first4Bytes (COUNTER event type = 2): * Expression: "first4Bytes(event.payload) == uint(2)" * * 3. Filter by payload type using first8Bytes (PATTERN event type = 6): * Expression: "first8Bytes(event.payload) == uint(6)" * * 4. Filter by payload prefix with params: * Expression: "bytesPrefix(event.payload, params.prefix)" * Params: {"prefix": } * * 5. Filter by slot using params: * Expression: "event.slot >= params.slot" * Params: {"slot": 1000} * * 6. Filter by program address (exact match): * Expression: "event.program.value == params.address" * Params: {"address": <32-byte pubkey as bytes, Pubkey, or TaPubkey>} * * 7. Filter by program address (prefix match): * Expression: "bytesPrefix(event.program.value, params.address)" * Params: {"address": } * * 8. Filter by transaction signature (exact match): * Expression: "event.signature.value == params.signature" * Params: {"signature": <64-byte signature as bytes, Signature, or TsSignature>} * * 9. Filter by transaction signature (prefix match): * Expression: "bytesPrefix(event.signature.value, params.signature)" * Params: {"signature": } * * 10. Filter by call_idx (0 = main program, 1+ = CPI calls): * Expression: "event.call_idx == uint(0)" * Expression: "event.call_idx == uint(1)" * * 11. Filter by event_id prefix: * Expression: "event.event_id.startsWith(\"ts\")" * * 12. Filter by timestamp (events in last hour): * Expression: "has(event.timestamp) && int(event.timestamp) > int(1700000000)" * * 13. Filter by timestamp using params: * Expression: "has(event.timestamp) && int(event.timestamp) > params.timestamp" * Params: {"timestamp": 1700000000} * * 14. Check field existence: * Expression: "has(event.program) && has(event.signature)" * * 15. Filter using params.u64 with first8Bytes: * Expression: "first8Bytes(event.payload) == params.u64" * Params: {"u64": 6} * * 16. Filter using params.u64 with first4Bytes: * Expression: "first4Bytes(event.payload) == params.u64" * Params: {"u64": 2} * * 17. Filter using params.u64 with first1Byte: * Expression: "first1Byte(event.payload) == params.u64" * Params: {"u64": 1} * * 18. Combined filter (slot + payload type + call_idx): * Expression: "event.slot > uint(1000) && first1Byte(event.payload) == uint(1) && event.call_idx == uint(0)" * * 19. Combined filter (call_idx + program address): * Expression: "event.call_idx == uint(1) && event.program.value == params.address" * Params: {"address": <32-byte CPI target program pubkey>} * * 20. Timestamp range filter: * Expression: "has(event.timestamp) && int(event.timestamp) > int(1700000000) && int(event.timestamp) < int(1700100000)" * * @generated from message thru.services.v1.StreamEventsRequest */ type StreamEventsRequest = Message<"thru.services.v1.StreamEventsRequest"> & { /** * @generated from field: optional thru.common.v1.Filter filter = 1; */ filter?: Filter | undefined; }; /** * Describes the message thru.services.v1.StreamEventsRequest. * Use `create(StreamEventsRequestSchema)` to create a new message. */ declare const StreamEventsRequestSchema: GenMessage; /** * StreamEventsResponse delivers event payloads. * * program_idx, block_offset, fee_payer and block_timestamp carry the same * values ListEvents and GetEvent return for the event. program_idx and * block_offset come from the event itself and are always set. program and * fee_payer need the emitting transaction's context, and block_timestamp the * event's block; when the node cannot resolve those at publish time they are * absent, and a client needing them should look the event up. * * @generated from message thru.services.v1.StreamEventsResponse */ type StreamEventsResponse = Message<"thru.services.v1.StreamEventsResponse"> & { /** * @generated from field: string event_id = 1; */ eventId: string; /** * @generated from field: optional bytes payload = 2; */ payload?: Uint8Array | undefined; /** * When the node published the event, not when its block was produced; see * block_timestamp. * * @generated from field: optional google.protobuf.Timestamp timestamp = 3; */ timestamp?: Timestamp | undefined; /** * @generated from field: thru.common.v1.Pubkey program = 4; */ program?: Pubkey | undefined; /** * @generated from field: uint32 call_idx = 5; */ callIdx: number; /** * @generated from field: thru.common.v1.Signature signature = 6; */ signature?: Signature | undefined; /** * @generated from field: uint64 slot = 7; */ slot: bigint; /** * Index of the emitting program in the transaction's account list. * * @generated from field: optional uint32 program_idx = 8; */ programIdx?: number | undefined; /** * Byte offset of the emitting transaction within its block. * * @generated from field: optional uint32 block_offset = 9; */ blockOffset?: number | undefined; /** * Fee payer of the emitting transaction. * * @generated from field: optional thru.common.v1.Pubkey fee_payer = 10; */ feePayer?: Pubkey | undefined; /** * Block production time of the event's block: the timestamp ListEvents * and GetEvent return. * * @generated from field: optional google.protobuf.Timestamp block_timestamp = 11; */ blockTimestamp?: Timestamp | undefined; }; /** * Describes the message thru.services.v1.StreamEventsResponse. * Use `create(StreamEventsResponseSchema)` to create a new message. */ declare const StreamEventsResponseSchema: GenMessage; /** * TrackTransactionRequest subscribes to status updates for a transaction. * * @generated from message thru.services.v1.TrackTransactionRequest */ type TrackTransactionRequest = Message<"thru.services.v1.TrackTransactionRequest"> & { /** * @generated from field: thru.common.v1.Signature signature = 1; */ signature?: Signature | undefined; /** * @generated from field: optional google.protobuf.Duration timeout = 2; */ timeout?: Duration | undefined; }; /** * Describes the message thru.services.v1.TrackTransactionRequest. * Use `create(TrackTransactionRequestSchema)` to create a new message. */ declare const TrackTransactionRequestSchema: GenMessage; /** * TrackTransactionResponse reports status transitions for a transaction. * * @generated from message thru.services.v1.TrackTransactionResponse */ type TrackTransactionResponse = Message<"thru.services.v1.TrackTransactionResponse"> & { /** * @generated from field: thru.common.v1.Signature signature = 1; */ signature?: Signature | undefined; /** * @generated from field: thru.common.v1.ConsensusStatus consensus_status = 2; */ consensusStatus: ConsensusStatus; /** * @generated from field: thru.core.v1.TransactionExecutionResult execution_result = 3; */ executionResult?: TransactionExecutionResult | undefined; /** * Slot in which this transaction landed. Zero until the producing block * has been observed by the ingestor; consumers waiting to anchor downstream * ClickHouse reads (e.g. GetTransaction) should ignore zero slots and wait * for the next response. * * @generated from field: uint64 slot = 4; */ slot: bigint; }; /** * Describes the message thru.services.v1.TrackTransactionResponse. * Use `create(TrackTransactionResponseSchema)` to create a new message. */ declare const TrackTransactionResponseSchema: GenMessage; /** * StreamSlotMetricsRequest subscribes to per-slot metrics updates. * * One message is published per slot terminator. That is normally an executed * block, but a persistence consumer connecting without a durable marker also * receives an account-bootstrap terminator, which reports no execution state: * its counters are zero and it carries no state commitments. * * @generated from message thru.services.v1.StreamSlotMetricsRequest */ type StreamSlotMetricsRequest = Message<"thru.services.v1.StreamSlotMetricsRequest"> & { /** * Optional lower bound on the slots delivered. This is a FILTER on live * publications, not a replay: the server holds no history and will not * backfill slots that are already in the past. Slots below this value are * skipped; if not specified, delivery starts from the next terminator. * To read past slots use QueryService.GetSlotMetrics / ListSlotMetrics -- * but note those carry the counters and timestamp only, NOT the state * commitments below. For the commitments the corresponding queries are * QueryService.GetStateRoots and QueryService.GetActiveStateHashes, and they * answer only for slots whose rows were actually persisted -- a slot the * indexer never committed, or one whose terminator carried no commitment, has * nothing to return, so a gap is not guaranteed to be fillable. * * @generated from field: optional uint64 start_slot = 1; */ startSlot?: bigint | undefined; /** * Opt in to compressed_state_root on the response. Off by default: the * commitment costs ~34 bytes per slot and most consumers do not read it. * * @generated from field: bool include_compressed_state_root = 2; */ includeCompressedStateRoot: boolean; /** * Opt in to active_state_hash on the response. Off by default, same * reasoning as include_compressed_state_root. * * @generated from field: bool include_active_state_hash = 3; */ includeActiveStateHash: boolean; }; /** * Describes the message thru.services.v1.StreamSlotMetricsRequest. * Use `create(StreamSlotMetricsRequestSchema)` to create a new message. */ declare const StreamSlotMetricsRequestSchema: GenMessage; /** * StreamSlotMetricsResponse delivers slot metrics at slot-terminator time. * * This is a best-effort, live-only feed. One message is published per slot * TERMINATOR, which is normally an executed block but is also an * account-bootstrap marker carrying zeroed counters and no state commitments. * Publication happens AHEAD of the indexer having persisted the slot: a state * proof for that slot may not be servable yet, and * neither StreamHeight nor GetStateRoots is a durability signal. A subscriber * that cannot keep up is disconnected with RESOURCE_EXHAUSTED rather than * silently skipped, and there is no replay -- a client that reconnects has a * gap and must backfill through QueryService. * * @generated from message thru.services.v1.StreamSlotMetricsResponse */ type StreamSlotMetricsResponse = Message<"thru.services.v1.StreamSlotMetricsResponse"> & { /** * Block slot number. * * @generated from field: uint64 slot = 1; */ slot: bigint; /** * Global counter tracking total activated state across all accounts. * * @generated from field: uint64 global_activated_state_counter = 2; */ globalActivatedStateCounter: bigint; /** * Global counter tracking total deactivated state across all accounts. * * @generated from field: uint64 global_deactivated_state_counter = 3; */ globalDeactivatedStateCounter: bigint; /** * Fees credited to the absent-block-producer fee receiver this block * because the block producer account was not live (UNTO-1293). Field * number unchanged (4). * * @generated from field: uint64 absent_block_producer_fees = 4; */ absentBlockProducerFees: bigint; /** * Block timestamp. * * @generated from field: google.protobuf.Timestamp block_timestamp = 5; */ blockTimestamp?: Timestamp | undefined; /** * Total compute units consumed across all transactions in this block. * * @generated from field: uint64 consumed_compute_units = 6; */ consumedComputeUnits: bigint; /** * Total state units consumed across all transactions in this block. * * @generated from field: uint32 consumed_state_units = 7; */ consumedStateUnits: number; /** * Fees credited to a live block-producer account this block. Disjoint from * absent_block_producer_fees by destination; total block fees = * absent_block_producer_fees + claimed_fees. * * @generated from field: uint64 claimed_fees = 8; */ claimedFees: bigint; /** * The compressed-state trie root as of this slot: exactly 32 bytes, the * commitment that account state proofs are verified against. * * Sent only when the request set include_compressed_state_root. * * An all-zero VALUE is legitimate and is not the same as an absent field. * The trie is empty until compression warms up, and a slot in which nothing * was compressed carries the previous root unchanged, so a repeated or zero * root means "nothing merged", never "unknown". * * Absence has five causes, and they are not all distinguishable from the * client: * 1. the field was not requested; * 2. it was requested, and the node reported no execution state for this * slot (an account-bootstrap terminator); * 3. this server predates the field and ignores the request flag; * 4. this server supports the field, but the NODE behind it is older than * the wire flag that marks a terminator as post-execution, so the server * withholds the commitments rather than guess; * 5. the node's terminator was truncated or malformed, so the server could * not read a commitment out of it at all. * QueryService.GetVersion separates case 3 from the rest by reporting the * server build. Cases 2, 4 and 5 are indistinguishable on the wire -- all of * them mean "the server declined to state a commitment for this slot", and * none of them is safe to read as a value. * * @generated from field: optional bytes compressed_state_root = 9; */ compressedStateRoot?: Uint8Array | undefined; /** * The active-state hash as of this slot: exactly 32 bytes, computed over the * live (uncompressed) account set together with this slot's block context. * * Sent only when the request set include_active_state_hash. The same five * causes of absence as compressed_state_root apply. * * Note that this hash covers the block context, which itself contains the * compressed-state root -- so it transitively commits to the value in * compressed_state_root. Agreement between the two fields is therefore NOT * an independent cross-check of either one. * * @generated from field: optional bytes active_state_hash = 10; */ activeStateHash?: Uint8Array | undefined; }; /** * Describes the message thru.services.v1.StreamSlotMetricsResponse. * Use `create(StreamSlotMetricsResponseSchema)` to create a new message. */ declare const StreamSlotMetricsResponseSchema: GenMessage; /** * StreamHeightRequest subscribes to real-time height updates. * * @generated from message thru.services.v1.StreamHeightRequest */ type StreamHeightRequest = Message<"thru.services.v1.StreamHeightRequest"> & {}; /** * Describes the message thru.services.v1.StreamHeightRequest. * Use `create(StreamHeightRequestSchema)` to create a new message. */ declare const StreamHeightRequestSchema: GenMessage; /** * StreamHeightResponse delivers height update events. * * @generated from message thru.services.v1.StreamHeightResponse */ type StreamHeightResponse = Message<"thru.services.v1.StreamHeightResponse"> & { /** * @generated from field: uint64 finalized = 1; */ finalized: bigint; /** * @generated from field: uint64 locally_executed = 2; */ locallyExecuted: bigint; /** * @generated from field: uint64 cluster_executed = 3; */ clusterExecuted: bigint; }; /** * Describes the message thru.services.v1.StreamHeightResponse. * Use `create(StreamHeightResponseSchema)` to create a new message. */ declare const StreamHeightResponseSchema: GenMessage; /** * StreamNodeRecordsRequest subscribes to node record updates from the gossip network. * * @generated from message thru.services.v1.StreamNodeRecordsRequest */ type StreamNodeRecordsRequest = Message<"thru.services.v1.StreamNodeRecordsRequest"> & {}; /** * Describes the message thru.services.v1.StreamNodeRecordsRequest. * Use `create(StreamNodeRecordsRequestSchema)` to create a new message. */ declare const StreamNodeRecordsRequestSchema: GenMessage; /** * StreamNodeRecordsResponse delivers node record updates. * * @generated from message thru.services.v1.StreamNodeRecordsResponse */ type StreamNodeRecordsResponse = Message<"thru.services.v1.StreamNodeRecordsResponse"> & { /** * @generated from oneof thru.services.v1.StreamNodeRecordsResponse.message */ message: { /** * A node record (initial snapshot or update). * * @generated from field: thru.core.v1.NodeRecord record = 1; */ value: NodeRecord; case: "record"; } | { /** * Signals the initial batch of records is complete. * * @generated from field: bool finished = 2; */ value: boolean; case: "finished"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message thru.services.v1.StreamNodeRecordsResponse. * Use `create(StreamNodeRecordsResponseSchema)` to create a new message. */ declare const StreamNodeRecordsResponseSchema: GenMessage; /** * StreamingService serves server-streaming gRPC APIs for real-time data. * * @generated from service thru.services.v1.StreamingService */ declare const StreamingService: GenService<{ /** * @generated from rpc thru.services.v1.StreamingService.StreamBlocks */ streamBlocks: { methodKind: "server_streaming"; input: typeof StreamBlocksRequestSchema; output: typeof StreamBlocksResponseSchema; }; /** * @generated from rpc thru.services.v1.StreamingService.StreamAccountUpdates */ streamAccountUpdates: { methodKind: "server_streaming"; input: typeof StreamAccountUpdatesRequestSchema; output: typeof StreamAccountUpdatesResponseSchema; }; /** * @generated from rpc thru.services.v1.StreamingService.StreamTransactions */ streamTransactions: { methodKind: "server_streaming"; input: typeof StreamTransactionsRequestSchema; output: typeof StreamTransactionsResponseSchema; }; /** * @generated from rpc thru.services.v1.StreamingService.StreamEvents */ streamEvents: { methodKind: "server_streaming"; input: typeof StreamEventsRequestSchema; output: typeof StreamEventsResponseSchema; }; /** * @generated from rpc thru.services.v1.StreamingService.TrackTransaction */ trackTransaction: { methodKind: "server_streaming"; input: typeof TrackTransactionRequestSchema; output: typeof TrackTransactionResponseSchema; }; /** * @generated from rpc thru.services.v1.StreamingService.StreamHeight */ streamHeight: { methodKind: "server_streaming"; input: typeof StreamHeightRequestSchema; output: typeof StreamHeightResponseSchema; }; /** * Stream per-slot metrics including state counters, distributed fees * (absent-block-producer + claimed) and -- on request -- the slot's state * commitments. One message per slot terminator; see * StreamSlotMetricsResponse for the delivery contract. * * @generated from rpc thru.services.v1.StreamingService.StreamSlotMetrics */ streamSlotMetrics: { methodKind: "server_streaming"; input: typeof StreamSlotMetricsRequestSchema; output: typeof StreamSlotMetricsResponseSchema; }; /** * Stream node records from the gossip network. * Returns an initial snapshot of all known records, followed by live updates. * * @generated from rpc thru.services.v1.StreamingService.StreamNodeRecords */ streamNodeRecords: { methodKind: "server_streaming"; input: typeof StreamNodeRecordsRequestSchema; output: typeof StreamNodeRecordsResponseSchema; }; }>; export { type AccountUpdate as A, type BlockFinished as B, StreamTransactionsRequestSchema as C, type StreamTransactionsResponse as D, StreamTransactionsResponseSchema as E, StreamingService as F, TrackTransactionRequestSchema as G, type TrackTransactionResponse as H, TrackTransactionResponseSchema as I, file_thru_services_v1_streaming_service as J, type StreamAccountUpdatesRequest as S, type TrackTransactionRequest as T, AccountUpdateSchema as a, BlockFinishedSchema as b, StreamAccountUpdatesRequestSchema as c, type StreamAccountUpdatesResponse as d, StreamAccountUpdatesResponseSchema as e, type StreamBlocksRequest as f, StreamBlocksRequestSchema as g, type StreamBlocksResponse as h, StreamBlocksResponseSchema as i, type StreamEventsRequest as j, StreamEventsRequestSchema as k, type StreamEventsResponse as l, StreamEventsResponseSchema as m, type StreamHeightRequest as n, StreamHeightRequestSchema as o, type StreamHeightResponse as p, StreamHeightResponseSchema as q, type StreamNodeRecordsRequest as r, StreamNodeRecordsRequestSchema as s, type StreamNodeRecordsResponse as t, StreamNodeRecordsResponseSchema as u, type StreamSlotMetricsRequest as v, StreamSlotMetricsRequestSchema as w, type StreamSlotMetricsResponse as x, StreamSlotMetricsResponseSchema as y, type StreamTransactionsRequest as z };