GraphQL Schema

GraphQL Schema

Query

searchTransactionsForward

searchTransactionsForward(query String, lowBlockNum Int64, highBlockNum Int64, cursor String, limit Int64 = 100, irreversibleOnly Boolean) : SearchTransactionsForwardResponse!

Search the blockchain forward for transaction execution traces based on query.

When the returned cursor is empty, it means you have reached the end of the specified block range.

WARN: always consider the undo field in forward searches, which signal that the matching element was in fact REMOVED from the chain because of blocks reorganization.

See also the streaming version under Subscription

Parameters
query
required
String!     dfuse Search Query Language string
lowBlockNum
Optional
Int64     Lower block num boundary, inclusively. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
highBlockNum
Optional
Int64     Higher block num boundary, inclusively. A zero or negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
cursor
Optional
String     Opaque data piece that you can pass back to continue your search if it ever disconnected. Retrieve it from the cursor field in the responses of this call. It is safe to use the same cursor in BOTH directions (forward and backward).
limit
Optional
Int64 = 100     Limit the number of results per page of results (max 200).
irreversibleOnly
Optional
Boolean     When true, only stream back results once they pass the irreversibility boundary. Otherwise, allow fetching results up to the head block.

searchTransactionsBackward

searchTransactionsBackward(query String, lowBlockNum Int64, highBlockNum Int64, cursor String, limit Int64 = 100, irreversibleOnly Boolean) : SearchTransactionsBackwardResponse!

Search the blockchain backward for transaction execution traces based on query.

When the returned cursor is empty, it means you have reached the end of the specified block range.

See also the streaming version under Subscription

Parameters
query
required
String!     dfuse Search Query Language string
lowBlockNum
Optional
Int64     Lower block num boundary, inclusively. A value of 0 means the beginning of the chain. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
highBlockNum
Optional
Int64     Higher block num boundary, inclusively. A zero or negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
cursor
Optional
String     Opaque data piece that you can pass back to continue your search if it ever disconnected. Retrieve it from the cursor field in the responses of this call. It is safe to use the same cursor in BOTH directions (forward and backward).
limit
Optional
Int64 = 100     Limit the number of results per page of results (max 200).
irreversibleOnly
Optional
Boolean     When true, only stream back results once they pass the irreversibility boundary. Otherwise, allow fetching results up to the head block.

blockIDByTime

blockIDByTime(time Time, comparator COMPARATOR = LTE) : BlockIDResponse!
Return the block ID found around the given time, based on the comparator provided.
Parameters
time
required
Time!    
comparator
Optional
COMPARATOR = LTE    

blockIDAtAccountCreation

blockIDAtAccountCreation(account String) : BlockIDResponse!
Return the block Number where given account was created.
Parameters
account
required
String!    

Subscription

searchTransactionsForward

searchTransactionsForward(query String, lowBlockNum Int64, highBlockNum Int64, cursor String, limit Int64 = 0, irreversibleOnly Boolean, liveMarkerInterval Uint32 = 0) : SearchTransactionForwardResponse!

Search the blockchain forward for transaction execution traces based on query.

WARN: always consider the undo field in forward searches, which signal that the matching element was in fact REMOVED from the chain because of blocks reorganization.

Parameters
query
required
String!     dfuse Search Query Language string
lowBlockNum
Optional
Int64     Lower block num boundary, inclusively. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
highBlockNum
Optional
Int64     Higher block num boundary, inclusively. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly). A null value means no higher limits, therefore searching into the future of the chain.
cursor
Optional
String     Opaque data piece that you can pass back to continue your search if it ever disconnected. Retrieve it from the cursor field in the responses of this call. It is safe to use the same cursor in BOTH directions (forward and backward).
limit
Optional
Int64 = 0     Limit the number of results streamed back.
irreversibleOnly
Optional
Boolean     When true, only stream back results once they pass the irreversibility boundary. Otherwise, allow fetching results up to the head block.
liveMarkerInterval
Optional
Uint32 = 0    

If non-zero, indicates you want to mark the stream when reaching live blocks. A marker is a response with a trace equal to null, which will be sent at each liveMarkerInterval blocks. The first trace to be equal to null in a stream indicates you are now processing live blocks.

The value for liveMarkerInterval is a number of blocks.

searchTransactionsBackward

searchTransactionsBackward(query String, lowBlockNum Int64, highBlockNum Int64, cursor String, limit Int64 = 0, irreversibleOnly Boolean) : SearchTransactionBackwardResponse!

Search the blockchain backward for transaction execution traces based on query.

NOTE: The undo field is not used in backwards search.

Parameters
query
required
String!     dfuse Search Query Language string
lowBlockNum
Optional
Int64     Lower block num boundary, inclusively. The absence of a value, or a value of 0 means the beginning of the chain. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly).
highBlockNum
Optional
Int64     Higher block num boundary, inclusively. A negative value means a block relative to the head or last irreversible block (depending on irreversibleOnly), -1 being the head block.
cursor
Optional
String     Opaque data piece that you can pass back to continue your search if it ever disconnected. Retrieve it from the cursor field in the responses of this call. It is safe to use the same cursor in BOTH directions (forward and backward).
limit
Optional
Int64 = 0     Limit the number of results streamed back.
irreversibleOnly
Optional
Boolean     When true, only stream back results that have passed the irreversibility boundary. Otherwise, allow fetching results up to the head block.

DecodedObject

object

object : JSON

error

error : String

SearchTransactionsForwardResponse

cursor

cursor : String
This is a chain-wide cursor, indicating the progress of a search. You can pass it back to the different search methods to continue fetching more results, in either directions (even in the reverse direction). A null cursor means the end of range has been reached.

results

SearchTransactionsBackwardResponse

cursor

cursor : String!

results

SearchTransactionForwardResponse

A single transaction trace response, matching a forward search query.

WARNING: do NOT forget to include the undo field to determine if the message is actually a REVERSAL of the transaction.

NOTE: always check the value of trace.status to make sure it is executed if you want to make sure a transaction made it to the chain.

undo

undo : Boolean!

Whether this response is an UNDO operation of a previously sent response.

In a forward search, make sure you catch this and always verify its value.. as to not double or triple count transactions.

cursor

cursor : String!
Chain-wide cursor, allowing you to continue querying when connection is interrupted

isIrreversible

isIrreversible : Boolean!
Whether the block represented here is irreversible

irreversibleBlockNum

irreversibleBlockNum : Uint32!
The last known irreversible block when processing this transaction. This number can be equal to the current block num (under trace.block.num), in which case, isIrreversible is true. In the reversible segment of the chain, this number will be drifting away by the number of blocks separating head block and LIB.

block

block : BlockHeader!

trace

Traces of execution of the transaction containing matching actions.

Check matchingActions below to limit the response to only actions matching your search query. Although, all actions from the transactions are available (see executedActions).

SearchTransactionBackwardResponse

A single transaction trace response, matching a backward search query.

NOTE: always check the value of trace.status to make sure it is executed if you want to make sure a transaction made it to the chain.

cursor

cursor : String!
Chain-wide cursor, allowing you to continue querying when connection is interrupted

isIrreversible

isIrreversible : Boolean!
Whether the block represented here is irreversible

irreversibleBlockNum

irreversibleBlockNum : Uint32!
The last known irreversible block when processing this transaction. This number can be equal to the current block num (under trace.block.num), in which case, isIrreversible is true. In the reversible segment of the chain, this number will be drifting away by the number of blocks separating head block and LIB.

block

block : BlockHeader!

trace

Traces of execution of the transaction containing matching actions.

Check matchingActions below to limit the response to only actions matching your search query. Although, all actions from the transactions are available (see executedActions).

TransactionTrace

Traces of the execution of a given transaction. This means the transaction was executed on the chain. You also get context about the block in which it was executed, and the status of the execution.

WARN: Make sure to always check the status (in the receipt) to make sure you’re not considering a failed transaction as if it was successful.

id

id : String!

block

block : BlockHeader!
Block in which this transaction trace occurred

status

This is a short-hand for receipt.status.

receipt

elapsed

elapsed : Int64!

netUsage

netUsage : Uint64!
Amount of network bandwidth consumed (for the sake of the rate limiting engine) by this whole transaction, in bytes (short-hand for receipt.net_usage_words * 8.

scheduled

scheduled : Boolean!
Whether this transaction was originally a scheduled transaction.

executedActions

executedActions : [ActionTrace!]!
Lists all action traces, flattened and ordered by execution time.

matchingActions

matchingActions : [ActionTrace!]!
Returns a flattened list of action traces, in execution order, of only the matching transactions (from a search, or other filtering).

topLevelActions

topLevelActions : [ActionTrace]!
Traces of actions at depth=0, those part of the original Transaction. In nodeos version 1.7.0 and below, this corresponds to the action_traces field.

exceptJSON

exceptJSON : JSON

BlockHeader

BlockHeader is the header of a block, excluding the transactions in that block.

id

id : String!
ID of the block

num

num : Uint32!
Block number in the chain

timestamp

timestamp : Time!

producer

producer : String!

confirmed

confirmed : Uint32!

previous

previous : String!

transactionMRoot

transactionMRoot : String!

actionMRoot

actionMRoot : String!

scheduleVersion

scheduleVersion : Uint32!

newProducers

newProducers : ProducerSchedule

ProducerSchedule

version

version : Uint32!

producers

producers : [ProducerKey!]!

ProducerKey

producerName

producerName : String!

blockSigningKey

blockSigningKey : String!

TransactionReceiptHeader

status

cpuUsageMicroSeconds

cpuUsageMicroSeconds : Uint32!

netUsageWords

netUsageWords : Uint32!

ActionTrace

ActionTrace holds the traces of execution of a single action within a transaction.

seq

seq : Uint64!
Global sequence ID for this action in this chain (shorthand for receipt.global_sequence). NOTE: if this is a failed action, seq will be 0.

executionIndex

executionIndex : Uint32!
Zero-based index of this action within the transaction, in execution order.

receipt

receipt : ActionReceipt

Action receipt (which differs from the Transaction receipt).

The receipt will be null when failures occur. Verify the status field on the TransactionTrace object.

receiver

receiver : String!

Account which code was executed to produce this execution trace.

Shorthand for receipt.receiver

account

account : String!

Target method’s account name. This does not correspond to the contract code being executed, that is what receiver means. This value namespaces your actions.

Shorthand for act.account in nodeos traces

name

name : String!

Target method’s action name. This value, combined with the account, determines which code path will be executed in the receiver contract code.

Shorthand for act.name in nodeos traces.

authorization

authorization : [PermissionLevel!]!

Signatories required to execute this action.

Shorthand for act.authorization in nodeos traces.

data

data : JSON

Data payload. Might be a string or a JSON object, depending on whether it was possible to unpack it using an ABI.

Shorthand for act.data in nodeos traces.

json

json : JSON

JSON Object representing the action parameters, decoded through the ABI. Will be null if it wasn’t possible to decode it.

Shorthand for action.json

hexData

hexData : String!

Hex-encoded string representing the raw data for the action.

Shorthand for act.hex_data in nodeos traces.

ramOps

ramOps : [RAMOp!]!

A list of RAM mutation operations, produced by this transaction.

NOTE: the RAM ops on an action never include operations that are mutations of the transaction itself (like creation of a deferred, or removal of a deferred from RAM). For this, check ramOps on the TransactionTrace object.

dtrxOps

dtrxOps : [DTrxOp!]!
A list of all operations affecting deferred transactions, like creation, deletion, modification, produced by this action.

tableOps

tableOps : [TableOp!]!
A list of table mutation operations (creation or deletion of a table, not a row).

dbOps

dbOps(code String, table String) : [DBOp!]!
A list of database operations produced by this action. Insertions, modifications and deletions of any table rows in the scope of this action’s receiver.
Parameters
code
Optional
String    
table
Optional
String    

console

console : String!
Output of the action’s print() statements from within the smart contract.

contextFree

contextFree : Boolean!
Whether this action is a context-free action.

elapsed

elapsed : Int64!
Elapsed time between the beginning of the execution of this action, relative to the time the whole transaction started to be processed

exceptJSON

exceptJSON : JSON
If non-null, this action failed. The stack and reasons will be found within the raw JSON payload provided.

isNotify

isNotify : Boolean!
Whether this action is a notification, meaning that it was triggered as a side effect rom another contract, and copied the exact same payload from the original transaction. This happens when you call the require_notify method from the EOSIO intrinsics (from within a smart-contract).

isMatchingQuery

isMatchingQuery : Boolean!
Whether or not this action matched the dfuse search query

createdActions

createdActions(sort ACTION_SORT_ORDER = EXECUTION) : [ActionTrace]!
Traces of actions created by this action. WARN: this doesn’t infer that the operations were written to the blockchain in this order, only that it was created by this action. To obtain execution order, see executedActions on the TransactionTrace object.
Parameters
sort
Optional
ACTION_SORT_ORDER = EXECUTION    

creatorAction

creatorAction : ActionTrace
Trace of the action that created this one, the one which created this action. WARN: it is not necessarily the parent in execution order, but will reflect which smart contract did the creation of either the notification, action or context_free_action.

closestUnnotifiedAncestorAction

closestUnnotifiedAncestorAction : ActionTrace

Use this to rebuild the execution tree, using the nodeos dispatch algorithm of notifications, actions and context-free actions.

This is similar to what you would have gotten in nodeos prior to version 1.8.0.

RAMOp

Represents a change in consumption of RAM for a given account

operation

operation : RAM_OPERATION!
What happened to justify this change in RAM.

payer

payer : String!
The account being debited or credited RAM

delta

delta : Int64!
Number of bytes that were either consumed (positive) or released (negative)

usage

usage : Uint64!

Number of bytes now used by the payer account, after applying this RAM operation.

To have a precise view of the RAM left on an account after this transaction was applied, go through all actions in execution order (TransactionTrace.executedActions) and use the last RAMOp for the given account.

DTrxOp

A change in deferred transactions in the chain’s memory.

operation

operation : DTRX_OPERATION!
The source or cause of creation/modification/deletion of a deferred transaction

sender

sender : String

senderID

senderID : String

payer

payer : String
The account being debited or credited to store this deferred transaction

publishedAt

publishedAt : Time
The time this deferred was published at

delayUntil

delayUntil : Time
The time at which Block Producers will start attempting to execute this transaction

expirationAt

expirationAt : Time
The time at which Block Producers will evict this transaction from memory if it fails execution.

trxID

trxID : String
The transaction ID of the transaction

transaction

transaction : Transaction
The deferred transaction payload itself.

TableOp

Creation or deletion of a table

operation

operation : TABLE_OPERATION!

table

table : TableOpKey!

DBOp

Represents the mutation of a row, in a contract table.

operation

operation : DB_OPERATION!

oldPayer

oldPayer : String
Previous paying account. This is null in the case of an insertion.

newPayer

newPayer : String
New paying account. This is null in the case of a deletion.

key

key : DBOpKey!
Primary key of the row in the table.

oldData

oldData : String
Contents (hex data) of the row before a REM or UPD operation.

newData

newData : String
Contents (hex data) of the row after an INS or UPD operation.

oldJSON

oldJSON : DecodedObject!
Decoded version of oldData

newJSON

newJSON : DecodedObject!
Decoded version of newData

DBOpKey

code

code : String!

table

table : String!

scope

scope(encoding UINT64_ENCODING = NAME) : String!
Parameters
encoding
Optional
UINT64_ENCODING = NAME    

key

key(encoding UINT64_ENCODING = NAME) : String!
Parameters
encoding
Optional
UINT64_ENCODING = NAME    

TableOpKey

code

code : String!

table

table : String!

scope

scope(encoding UINT64_ENCODING = NAME) : String!
Parameters
encoding
Optional
UINT64_ENCODING = NAME    

ActionReceipt

Execution receipt for a given ActionTrace.

The nodeos field auth_sequence is not yet present. Contact us if you need it.

receiver

receiver : String!
Account for which code is being triggered. Beware that this might not be the same value as account, or the target account of the action, in the case of notifications. See documentation for require_notify in EOSIO contracts

digest

digest : String!
Hash of the action payload. Also known as act_digest from nodeos

globalSequence

globalSequence : Uint64!

Globally unique sequence number in all actions from the longest chain. This will never be reused, and is guaranteed to monotonically increment with each action.

This property can be relied on to keep track of forks in your database, at the action level.

WARNING: when micro-forks happens, global sequences from the different forks will be reused, but will be associated with other actions. This is why it’s important to navigate forks properly.

codeSequence

codeSequence : Uint64!

abiSequence

abiSequence : Uint64!

Transaction

expiration

expiration : Time!

refBlockNum

refBlockNum : Uint32!

TaPoS reference block num.

This value holds only 16 bits of the blockNum (instead of 32). The other 16 bits are in the current blockNum (unless overflown).

refBlockPrefix

refBlockPrefix : Uint32!
TaPoS block prefix (bytes 8-16 of the block ID), in order to identify the correct fork for a given block number.

maxNetUsageWords

maxNetUsageWords : Uint32!

maxCPUUsageMS

maxCPUUsageMS : Uint32!

delaySec

delaySec : Uint32!

contextFreeActions

contextFreeActions : [Action!]!

actions

actions : [Action!]!

Action

account

account : String!

name

name : String!

authorization

authorization : [PermissionLevel]!

json

json : JSON

data

data : JSON

hexData

hexData : String!

PermissionLevel

actor

actor : String!

permission

permission : String!

AuthSequence

account

account : String

sequence

sequence : Uint64!

BlockIDResponse

time

time : Time!
“true” if a block id was found

num

num : Uint32!

id

id : String!