Examples

Token Optional

Protocol File

Unary Methods

Unary commands return a single response. They are similar to standard JSON-RPC methods, but you can send an arbitrary number of messages over a persistent, bi-direction connection.

OldFaithful.OldFaithful/GetVersion

grpcurl \
  -proto old-faithful.proto \
  -d '' \
  -H 'x-token: <redacted-token>' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetVersion

OldFaithful.OldFaithful/GetBlockTime

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlockTime

OldFaithful.OldFaithful/GetBlock

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlock

OldFaithful.OldFaithful/GetTransaction

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg=="}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetTransaction

Streaming Methods

Streaming methods will stream the response to the client. These methods allow you to retrieve data in large contiguous chunks, scoped by a start_slot and end_slot parameter.

Streaming commands also support a filter that will reduce the messages you receive.

OldFaithful.OldFaithful/StreamBlocks

The following filters are available for StreamBlocks:

  • account_include: Array of base58 strings

No Filters

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks

Filtered

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"account_include": ["Vote111111111111111111111111111111111111111"]}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks

OldFaithful.OldFaithful/StreamTransactions

The following filters are available for StreamTransactions:

  • vote: boolean

  • failed : boolean

  • account_include: Array of base58 strings

  • account_exclude: Array of base58 strings

  • account_required: Array of base58 strings

No Filters

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions

Filtered

grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"vote": false, "failed": true}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions

Last updated