scalar Address scalar AssetId type Balance { owner: Address! amount: U64! assetId: AssetId! } type BalanceConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [BalanceEdge!]! """ A list of nodes. """ nodes: [Balance!]! } """ An edge in a connection. """ type BalanceEdge { """ The item at the end of the edge """ node: Balance! """ A cursor for use in pagination """ cursor: String! } input BalanceFilterInput { """ Filter coins based on the `owner` field """ owner: Address! } type Blob { id: BlobId! bytecode: HexString! } scalar BlobId type Block { version: BlockVersion! id: BlockId! height: U32! header: Header! consensus: Consensus! transactionIds: [TransactionId!]! transactions: [Transaction!]! } type BlockConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [BlockEdge!]! """ A list of nodes. """ nodes: [Block!]! } """ An edge in a connection. """ type BlockEdge { """ The item at the end of the edge """ node: Block! """ A cursor for use in pagination """ cursor: String! } scalar BlockId enum BlockVersion { V1 } """ Breakpoint, defined as a tuple of contract ID and relative PC offset inside it """ input Breakpoint { contract: ContractId! pc: U64! } scalar Bytes32 type ChainInfo { name: String! latestBlock: Block! daHeight: U64! consensusParameters: ConsensusParameters! gasCosts: GasCosts! } type ChangeOutput { to: Address! amount: U64! assetId: AssetId! } type Coin { utxoId: UtxoId! owner: Address! amount: U64! assetId: AssetId! """ TxPointer - the height of the block this coin was created in """ blockCreated: U32! """ TxPointer - the index of the transaction that created this coin """ txCreatedIdx: U16! } type CoinConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [CoinEdge!]! """ A list of nodes. """ nodes: [Coin!]! } """ An edge in a connection. """ type CoinEdge { """ The item at the end of the edge """ node: Coin! """ A cursor for use in pagination """ cursor: String! } input CoinFilterInput { """ Returns coins owned by the `owner`. """ owner: Address! """ Returns coins only with `asset_id`. """ assetId: AssetId } type CoinOutput { to: Address! amount: U64! assetId: AssetId! } """ The schema analog of the [`coins::CoinType`]. """ union CoinType = Coin | MessageCoin union Consensus = Genesis | PoAConsensus type ConsensusParameters { version: ConsensusParametersVersion! txParams: TxParameters! predicateParams: PredicateParameters! scriptParams: ScriptParameters! contractParams: ContractParameters! feeParams: FeeParameters! baseAssetId: AssetId! blockGasLimit: U64! blockTransactionSizeLimit: U64! chainId: U64! gasCosts: GasCosts! privilegedAddress: Address! } type ConsensusParametersPurpose { witnessIndex: U16! checksum: Bytes32! } enum ConsensusParametersVersion { V1 } type Contract { id: ContractId! bytecode: HexString! salt: Salt! } type ContractBalance { contract: ContractId! amount: U64! assetId: AssetId! } type ContractBalanceConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [ContractBalanceEdge!]! """ A list of nodes. """ nodes: [ContractBalance!]! } """ An edge in a connection. """ type ContractBalanceEdge { """ The item at the end of the edge """ node: ContractBalance! """ A cursor for use in pagination """ cursor: String! } input ContractBalanceFilterInput { """ Filter assets based on the `contractId` field """ contract: ContractId! } type ContractCreated { contract: ContractId! stateRoot: Bytes32! } scalar ContractId type ContractOutput { inputIndex: U16! balanceRoot: Bytes32! stateRoot: Bytes32! } type ContractParameters { version: ContractParametersVersion! contractMaxSize: U64! maxStorageSlots: U64! } enum ContractParametersVersion { V1 } type DaCompressedBlock { bytes: HexString! } union DependentCost = LightOperation | HeavyOperation type DryRunFailureStatus { programState: ProgramState reason: String! receipts: [Receipt!]! totalGas: U64! totalFee: U64! } type DryRunSuccessStatus { programState: ProgramState receipts: [Receipt!]! totalGas: U64! totalFee: U64! } type DryRunTransactionExecutionStatus { id: TransactionId! status: DryRunTransactionStatus! receipts: [Receipt!]! } union DryRunTransactionStatus = DryRunSuccessStatus | DryRunFailureStatus type EstimateGasPrice { gasPrice: U64! } input ExcludeInput { """ Utxos to exclude from the selection. """ utxos: [UtxoId!]! """ Messages to exclude from the selection. """ messages: [Nonce!]! } type FailureStatus { transactionId: TransactionId! blockHeight: U32! block: Block! transaction: Transaction! time: Tai64Timestamp! reason: String! programState: ProgramState receipts: [Receipt!]! totalGas: U64! totalFee: U64! } type FeeParameters { version: FeeParametersVersion! gasPriceFactor: U64! gasPerByte: U64! } enum FeeParametersVersion { V1 } type GasCosts { version: GasCostsVersion! add: U64! addi: U64! aloc: U64! and: U64! andi: U64! bal: U64! bhei: U64! bhsh: U64! burn: U64! cb: U64! cfei: U64! cfsi: U64! div: U64! divi: U64! ecr1: U64! eck1: U64! ed19: U64! eq: U64! exp: U64! expi: U64! flag: U64! gm: U64! gt: U64! gtf: U64! ji: U64! jmp: U64! jne: U64! jnei: U64! jnzi: U64! jmpf: U64! jmpb: U64! jnzf: U64! jnzb: U64! jnef: U64! jneb: U64! lb: U64! log: U64! lt: U64! lw: U64! mint: U64! mlog: U64! modOp: U64! modi: U64! moveOp: U64! movi: U64! mroo: U64! mul: U64! muli: U64! mldv: U64! noop: U64! not: U64! or: U64! ori: U64! poph: U64! popl: U64! pshh: U64! pshl: U64! ret: U64! rvrt: U64! sb: U64! sll: U64! slli: U64! srl: U64! srli: U64! srw: U64! sub: U64! subi: U64! sw: U64! sww: U64! time: U64! tr: U64! tro: U64! wdcm: U64! wqcm: U64! wdop: U64! wqop: U64! wdml: U64! wqml: U64! wddv: U64! wqdv: U64! wdmd: U64! wqmd: U64! wdam: U64! wqam: U64! wdmm: U64! wqmm: U64! xor: U64! xori: U64! alocDependentCost: DependentCost! bldd: DependentCost bsiz: DependentCost cfe: DependentCost! cfeiDependentCost: DependentCost! call: DependentCost! ccp: DependentCost! croo: DependentCost! csiz: DependentCost! ed19DependentCost: DependentCost! k256: DependentCost! ldc: DependentCost! logd: DependentCost! mcl: DependentCost! mcli: DependentCost! mcp: DependentCost! mcpi: DependentCost! meq: DependentCost! retd: DependentCost! s256: DependentCost! scwq: DependentCost! smo: DependentCost! srwq: DependentCost! swwq: DependentCost! contractRoot: DependentCost! stateRoot: DependentCost! vmInitialization: DependentCost! newStoragePerByte: U64! } enum GasCostsVersion { V1 } type Genesis { """ The chain configs define what consensus type to use, what settlement layer to use, rules of block validity, etc. """ chainConfigHash: Bytes32! """ The Binary Merkle Tree root of all genesis coins. """ coinsRoot: Bytes32! """ The Binary Merkle Tree root of state, balances, contracts code hash of each contract. """ contractsRoot: Bytes32! """ The Binary Merkle Tree root of all genesis messages. """ messagesRoot: Bytes32! """ The Binary Merkle Tree root of all processed transaction ids. """ transactionsRoot: Bytes32! } type Header { """ Version of the header """ version: HeaderVersion! """ Hash of the header """ id: BlockId! """ The layer 1 height of messages and events to include since the last layer 1 block number. """ daHeight: U64! """ The version of the consensus parameters used to create this block. """ consensusParametersVersion: U32! """ The version of the state transition bytecode used to create this block. """ stateTransitionBytecodeVersion: U32! """ Number of transactions in this block. """ transactionsCount: U16! """ Number of message receipts in this block. """ messageReceiptCount: U32! """ Merkle root of transactions. """ transactionsRoot: Bytes32! """ Merkle root of message receipts in this block. """ messageOutboxRoot: Bytes32! """ Merkle root of inbox events in this block. """ eventInboxRoot: Bytes32! """ Fuel block height. """ height: U32! """ Merkle root of all previous block header hashes. """ prevRoot: Bytes32! """ The block producer time. """ time: Tai64Timestamp! """ Hash of the application header. """ applicationHash: Bytes32! } enum HeaderVersion { V1 } type HeavyOperation { base: U64! gasPerUnit: U64! } scalar HexString union Input = InputCoin | InputContract | InputMessage type InputCoin { utxoId: UtxoId! owner: Address! amount: U64! assetId: AssetId! txPointer: TxPointer! witnessIndex: Int! predicateGasUsed: U64! predicate: HexString! predicateData: HexString! } type InputContract { utxoId: UtxoId! balanceRoot: Bytes32! stateRoot: Bytes32! txPointer: TxPointer! contractId: ContractId! } type InputMessage { sender: Address! recipient: Address! amount: U64! nonce: Nonce! witnessIndex: U16! predicateGasUsed: U64! data: HexString! predicate: HexString! predicateData: HexString! } type LatestGasPrice { gasPrice: U64! blockHeight: U32! } type LightOperation { base: U64! unitsPerGas: U64! } type MerkleProof { proofSet: [Bytes32!]! proofIndex: U64! } type Message { amount: U64! sender: Address! recipient: Address! nonce: Nonce! data: HexString! daHeight: U64! } type MessageCoin { sender: Address! recipient: Address! nonce: Nonce! amount: U64! assetId: AssetId! daHeight: U64! } type MessageConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [MessageEdge!]! """ A list of nodes. """ nodes: [Message!]! } """ An edge in a connection. """ type MessageEdge { """ The item at the end of the edge """ node: Message! """ A cursor for use in pagination """ cursor: String! } type MessageProof { messageProof: MerkleProof! blockProof: MerkleProof! messageBlockHeader: Header! commitBlockHeader: Header! sender: Address! recipient: Address! nonce: Nonce! amount: U64! data: HexString! } enum MessageState { UNSPENT SPENT NOT_FOUND } type MessageStatus { state: MessageState! } type Mutation { """ Initialize a new debugger session, returning its ID. A new VM instance is spawned for each session. The session is run in a separate database transaction, on top of the most recent node state. """ startSession: ID! """ End debugger session. """ endSession(id: ID!): Boolean! """ Reset the VM instance to the initial state. """ reset(id: ID!): Boolean! """ Execute a single fuel-asm instruction. """ execute(id: ID!, op: String!): Boolean! """ Set single-stepping mode for the VM instance. """ setSingleStepping(id: ID!, enable: Boolean!): Boolean! """ Set a breakpoint for a VM instance. """ setBreakpoint(id: ID!, breakpoint: Breakpoint!): Boolean! """ Run a single transaction in given session until it hits a breakpoint or completes. """ startTx(id: ID!, txJson: String!): RunResult! """ Resume execution of the VM instance after a breakpoint. Runs until the next breakpoint or until the transaction completes. """ continueTx(id: ID!): RunResult! """ Execute a dry-run of multiple transactions using a fork of current state, no changes are committed. """ dryRun(txs: [HexString!]!, utxoValidation: Boolean, gasPrice: U64): [DryRunTransactionExecutionStatus!]! """ Submits transaction to the `TxPool`. Returns submitted transaction if the transaction is included in the `TxPool` without problems. """ submit(tx: HexString!): Transaction! """ Sequentially produces `blocks_to_produce` blocks. The first block starts with `start_timestamp`. If the block production in the [`crate::service::Config`] is `Trigger::Interval { block_time }`, produces blocks with `block_time ` intervals between them. The `start_timestamp` is the timestamp in seconds. """ produceBlocks(startTimestamp: Tai64Timestamp, blocksToProduce: U32!): U32! } type NodeInfo { utxoValidation: Boolean! vmBacktrace: Boolean! maxTx: U64! maxDepth: U64! nodeVersion: String! peers: [PeerInfo!]! } scalar Nonce union Output = CoinOutput | ContractOutput | ChangeOutput | VariableOutput | ContractCreated """ A separate `Breakpoint` type to be used as an output, as a single type cannot act as both input and output type in async-graphql """ type OutputBreakpoint { contract: ContractId! pc: U64! } """ Information about pagination in a connection """ type PageInfo { """ When paginating backwards, are there more items? """ hasPreviousPage: Boolean! """ When paginating forwards, are there more items? """ hasNextPage: Boolean! """ When paginating backwards, the cursor to continue. """ startCursor: String """ When paginating forwards, the cursor to continue. """ endCursor: String } type PeerInfo { """ The libp2p peer id """ id: String! """ The advertised multi-addrs that can be used to connect to this peer """ addresses: [String!]! """ The self-reported version of the client the peer is using """ clientVersion: String """ The last reported height of the peer """ blockHeight: U32 """ The last heartbeat from this peer in unix epoch time ms """ lastHeartbeatMs: U64! """ The internal fuel p2p reputation of this peer """ appScore: Float! } type PoAConsensus { """ Gets the signature of the block produced by `PoA` consensus. """ signature: Signature! } type Policies { tip: U64 witnessLimit: U64 maturity: U32 maxFee: U64 } type PredicateParameters { version: PredicateParametersVersion! maxPredicateLength: U64! maxPredicateDataLength: U64! maxGasPerPredicate: U64! maxMessageDataLength: U64! } enum PredicateParametersVersion { V1 } type ProgramState { returnType: ReturnType! data: HexString! } type Query { """ Read register value by index. """ register(id: ID!, register: U32!): U64! """ Read read a range of memory bytes. """ memory(id: ID!, start: U32!, size: U32!): String! balance( """ address of the owner """ owner: Address!, """ asset_id of the coin """ assetId: AssetId! ): Balance! balances(filter: BalanceFilterInput!, first: Int, after: String, last: Int, before: String): BalanceConnection! blob( """ ID of the Blob """ id: BlobId! ): Blob block( """ ID of the block """ id: BlockId, """ Height of the block """ height: U32 ): Block blocks(first: Int, after: String, last: Int, before: String): BlockConnection! chain: ChainInfo! transaction( """ The ID of the transaction """ id: TransactionId! ): Transaction transactions(first: Int, after: String, last: Int, before: String): TransactionConnection! transactionsByOwner(owner: Address!, first: Int, after: String, last: Int, before: String): TransactionConnection! """ Estimate the predicate gas for the provided transaction """ estimatePredicates(tx: HexString!): Transaction! """ Returns all possible receipts for test purposes. """ allReceipts: [Receipt!]! """ Returns true when the GraphQL API is serving requests. """ health: Boolean! """ Gets the coin by `utxo_id`. """ coin( """ The ID of the coin """ utxoId: UtxoId! ): Coin """ Gets all unspent coins of some `owner` maybe filtered with by `asset_id` per page. """ coins(filter: CoinFilterInput!, first: Int, after: String, last: Int, before: String): CoinConnection! """ For each `query_per_asset`, get some spendable coins(of asset specified by the query) owned by `owner` that add up at least the query amount. The returned coins can be spent. The number of coins is optimized to prevent dust accumulation. The query supports excluding and maximum the number of coins. Returns: The list of spendable coins per asset from the query. The length of the result is the same as the length of `query_per_asset`. The ordering of assets and `query_per_asset` is the same. """ coinsToSpend( """ The `Address` of the coins owner. """ owner: Address!, """ The list of requested assets` coins with asset ids, `target` amount the user wants to reach, and the `max` number of coins in the selection. Several entries with the same asset id are not allowed. The result can't contain more coins than `max_inputs`. """ queryPerAsset: [SpendQueryElementInput!]!, """ The excluded coins from the selection. """ excludedIds: ExcludeInput ): [[CoinType!]!]! daCompressedBlock( """ Height of the block """ height: U32! ): DaCompressedBlock contract( """ ID of the Contract """ id: ContractId! ): Contract contractBalance(contract: ContractId!, asset: AssetId!): ContractBalance! contractBalances(filter: ContractBalanceFilterInput!, first: Int, after: String, last: Int, before: String): ContractBalanceConnection! nodeInfo: NodeInfo! latestGasPrice: LatestGasPrice! estimateGasPrice( """ Number of blocks into the future to estimate the gas price for """ blockHorizon: U32 ): EstimateGasPrice! message( """ The Nonce of the message """ nonce: Nonce! ): Message messages( """ address of the owner """ owner: Address, first: Int, after: String, last: Int, before: String ): MessageConnection! messageProof(transactionId: TransactionId!, nonce: Nonce!, commitBlockId: BlockId, commitBlockHeight: U32): MessageProof messageStatus(nonce: Nonce!): MessageStatus! relayedTransactionStatus( """ The id of the relayed tx """ id: RelayedTransactionId! ): RelayedTransactionStatus consensusParameters(version: Int!): ConsensusParameters! stateTransitionBytecodeByVersion(version: Int!): StateTransitionBytecode stateTransitionBytecodeByRoot(root: HexString!): StateTransitionBytecode! } type Receipt { id: ContractId pc: U64 is: U64 to: ContractId toAddress: Address amount: U64 assetId: AssetId gas: U64 param1: U64 param2: U64 val: U64 ptr: U64 digest: Bytes32 reason: U64 ra: U64 rb: U64 rc: U64 rd: U64 len: U64 receiptType: ReceiptType! result: U64 gasUsed: U64 data: HexString sender: Address recipient: Address nonce: Nonce """ Set in the case of a Panic receipt to indicate a missing contract input id """ contractId: ContractId subId: Bytes32 } enum ReceiptType { CALL RETURN RETURN_DATA PANIC REVERT LOG LOG_DATA TRANSFER TRANSFER_OUT SCRIPT_RESULT MESSAGE_OUT MINT BURN } type RelayedTransactionFailed { blockHeight: U32! failure: String! } scalar RelayedTransactionId union RelayedTransactionStatus = RelayedTransactionFailed enum ReturnType { RETURN RETURN_DATA REVERT } type RunResult { state: RunState! breakpoint: OutputBreakpoint jsonReceipts: [String!]! } enum RunState { """ All breakpoints have been processed, and the program has terminated """ COMPLETED """ Stopped on a breakpoint """ BREAKPOINT } scalar Salt type ScriptParameters { version: ScriptParametersVersion! maxScriptLength: U64! maxScriptDataLength: U64! } enum ScriptParametersVersion { V1 } scalar Signature input SpendQueryElementInput { """ Identifier of the asset to spend. """ assetId: AssetId! """ Target amount for the query. """ amount: U64! """ The maximum number of currencies for selection. """ max: U32 } type SqueezedOutStatus { reason: String! } type StateTransitionBytecode { root: HexString! bytecode: UploadedBytecode! } type StateTransitionPurpose { root: Bytes32! } type SubmittedStatus { time: Tai64Timestamp! } type Subscription { """ Returns a stream of status updates for the given transaction id. If the current status is [`TransactionStatus::Success`], [`TransactionStatus::SqueezedOut`] or [`TransactionStatus::Failed`] the stream will return that and end immediately. If the current status is [`TransactionStatus::Submitted`] this will be returned and the stream will wait for a future update. This stream will wait forever so it's advised to use within a timeout. It is possible for the stream to miss an update if it is polled slower then the updates arrive. In such a case the stream will close without a status. If this occurs the stream can simply be restarted to return the latest status. """ statusChange( """ The ID of the transaction """ id: TransactionId! ): TransactionStatus! """ Submits transaction to the `TxPool` and await either confirmation or failure. """ submitAndAwait(tx: HexString!): TransactionStatus! """ Submits the transaction to the `TxPool` and returns a stream of events. Compared to the `submitAndAwait`, the stream also contains ` SubmittedStatus` as an intermediate state. """ submitAndAwaitStatus(tx: HexString!): TransactionStatus! } type SuccessStatus { transactionId: TransactionId! blockHeight: U32! block: Block! transaction: Transaction! time: Tai64Timestamp! programState: ProgramState receipts: [Receipt!]! totalGas: U64! totalFee: U64! } scalar Tai64Timestamp type Transaction { id: TransactionId! inputAssetIds: [AssetId!] inputContracts: [ContractId!] inputContract: InputContract policies: Policies scriptGasLimit: U64 maturity: U32 mintAmount: U64 mintAssetId: AssetId mintGasPrice: U64 txPointer: TxPointer isScript: Boolean! isCreate: Boolean! isMint: Boolean! isUpgrade: Boolean! isUpload: Boolean! isBlob: Boolean! inputs: [Input!] outputs: [Output!]! outputContract: ContractOutput witnesses: [HexString!] receiptsRoot: Bytes32 status: TransactionStatus script: HexString scriptData: HexString bytecodeWitnessIndex: U16 blobId: BlobId salt: Salt storageSlots: [HexString!] bytecodeRoot: Bytes32 subsectionIndex: U16 subsectionsNumber: U16 proofSet: [Bytes32!] upgradePurpose: UpgradePurpose """ Return the transaction bytes using canonical encoding """ rawPayload: HexString! } type TransactionConnection { """ Information to aid in pagination. """ pageInfo: PageInfo! """ A list of edges. """ edges: [TransactionEdge!]! """ A list of nodes. """ nodes: [Transaction!]! } """ An edge in a connection. """ type TransactionEdge { """ The item at the end of the edge """ node: Transaction! """ A cursor for use in pagination """ cursor: String! } scalar TransactionId union TransactionStatus = SubmittedStatus | SuccessStatus | SqueezedOutStatus | FailureStatus type TxParameters { version: TxParametersVersion! maxInputs: U16! maxOutputs: U16! maxWitnesses: U32! maxGasPerTx: U64! maxSize: U64! maxBytecodeSubsections: U16! } enum TxParametersVersion { V1 } scalar TxPointer scalar U16 scalar U32 scalar U64 union UpgradePurpose = ConsensusParametersPurpose | StateTransitionPurpose type UploadedBytecode { """ Combined bytecode of all uploaded subsections. """ bytecode: HexString! """ Number of uploaded subsections (if incomplete). """ uploadedSubsectionsNumber: Int """ Indicates if the bytecode upload is complete. """ completed: Boolean! } scalar UtxoId type VariableOutput { to: Address! amount: U64! assetId: AssetId! } directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT schema { query: Query mutation: Mutation subscription: Subscription }