Proxy service for Yellowstone Geyser gRPC plugin, that exposes transactions and blocks via JSON-RPC Websocket subscription with advanced filtering capabilities.
- Subsquid portal-like queries for data filtering
- Subsquid portal-like data format for data messages
- Multiple geyser endpoints can be configured for reliable and fast data delivery
Only a single subscription kind is available.
spraySubscribe- subscription method, accepts data filter as a single parametersprayNotification- data messagesprayUnsubscribe- subscription cancellation
Data filter follows Subsquid portal Solana data query format
except that block range selection parameters (fromBlock, toBlock, parentBlockHash)
are not available and forbidden.
There are two kinds of data messages - block notification and transaction notification.
interface TransactionNotification {
type: 'transaction'
slot: number
transactionIndex: number
// Data items matched by the data filter
transaction?: SubquidPortalSolanaTransaction
instructions?: SubquidPortalSolanaInstruction[]
balances?: SubquidPortalSolanaBalance[]
tokenBalances?: SubquidPortalSolanaTokenBalance[]
}
interface BlockNotification {
type: 'block'
slot: number
// Solana block info defined by `query.fields.block`
header?: SolanaPortalBlockHeader
}Block notifications are pushed to the client in the following circumstances
- Transaction notification belonging to the given block was pushed before
- Every fifth slot since the last pushed block or subscription start
- Every block if
query.includeAllBlocksistrue.
- Slot numbers are non-decreasing
- Block notification marks the end of a slot (no notifications for the given slot will be received in the future)
- Delivery of all data messages is not guaranteed
Usage: sqd-spray <config>
Arguments:
<config> Config file
Where config file has the following format (yaml)
port: 3000 # port to listen on (optional, default is 3000)
# data sources
sources:
getblock: # data source name
url: https://go.getblock.io/
x_access_token: xxx # add `X-Access-Token` header to gRPC request
shyft:
url: https://xxx
x_token: xxx # add `X-Token` header to every gRPC request