openapi: 3.0.0 info: title: Access API version: 1.0.0 externalDocs: description: Find out more about the Access API url: https://docs.onflow.org/access-api/ servers: - url: https://rest-testnet.onflow.org/v1 description: Flow Testnet - url: https://rest-mainnet.onflow.org/v1 description: Flow Mainnet paths: /blocks: get: tags: - Blocks summary: Gets Blocks by Height description: Get block data by the provided height range or list of heights. parameters: - name: height in: query description: A comma-separated list of block heights to get. This parameter is incompatible with `start_height` and `end_height`. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/BlockHeight" - name: start_height in: query description: The start height of the block range to get. Must be used together with `end_height`. This parameter is incompatible with `height`. required: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: end_height in: query description: The ending height of the block range to get. Must be used together with `start_height`. This parameter is incompatible with `height`. required: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Block" x-content-type: application/json "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /blocks/{id}: get: tags: - Blocks summary: Get Blocks by ID. description: Get a block data or list of blocks by the provided ID or list of IDs. parameters: - name: id in: path description: A block ID or comma-separated list of block IDs. required: true style: simple explode: true schema: maxItems: 50 minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Identifier" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Block" x-content-type: application/json "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /blocks/{id}/payload: get: tags: - Blocks summary: Get Block Payload by Block ID. description: Get a block payload data by the provided block ID. parameters: - name: id in: path description: A block ID. required: true style: simple explode: true schema: $ref: "#/components/schemas/Identifier" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BlockPayload" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /transactions/{id}: get: tags: - Transactions summary: Get a Transaction by ID. description: Get a transaction data by the provided transaction ID. parameters: - name: id in: path description: The ID of the transaction to get. required: true style: simple explode: false schema: $ref: "#/components/schemas/Identifier" - name: block_id in: query description: A block ID optional parameter required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: collection_id in: query description: A collection ID optional parameter. required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Transaction" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /transaction_results/{transaction_id}: get: tags: - Transactions summary: Get a Transaction Result by ID. description: Get transaction result by the transaction result ID. parameters: - name: transaction_id in: path description: The transaction ID of the transaction result. required: true style: simple explode: false schema: $ref: "#/components/schemas/Identifier" - name: block_id in: query description: A block ID optional parameter required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: collection_id in: query description: A collection ID optional parameter. required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/TransactionResult" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /transactions: post: tags: - Transactions summary: Submit a Transaction description: "Send a new signed transaction payload to the network with [required\ \ transaction fields](https://docs.onflow.org/flow-go-sdk/#transactions)." requestBody: description: The transaction to submit. content: application/json: schema: $ref: "#/components/schemas/transactions_body" required: true responses: "201": description: Created headers: Location: description: The URI to the newly submitted transaction. style: simple explode: false schema: type: string format: uri content: application/json: schema: $ref: "#/components/schemas/Transaction" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /collections/{id}: get: tags: - Collections summary: Gets a Collection by ID description: Get a collection by provided collection ID. parameters: - name: id in: path description: The collection ID. required: true style: simple explode: false schema: $ref: "#/components/schemas/Identifier" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Collection" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /execution_results: get: tags: - Execution Results summary: Get Execution Results by Block ID description: Get execution result by provided block ID or multiple block IDs provided as comma-seperated list. parameters: - name: block_id in: query description: Single ID or comma-separated list of block IDs. required: true style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Identifier" - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ExecutionResult" x-content-type: application/json "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /execution_results/{id}: get: tags: - Execution Results summary: Get Execution Result by ID description: Get execution result by provided execution result ID. parameters: - name: id in: path description: The ID of the execution result. required: true style: simple explode: false schema: $ref: "#/components/schemas/Identifier" - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ExecutionResult" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /accounts/{address}: get: tags: - Accounts summary: Get an Account By Address description: Get an account data by provided address in latest "sealed" block or by provided block height. parameters: - name: address in: path description: The address of the account. required: true style: simple explode: false schema: $ref: "#/components/schemas/Address" - name: block_height in: query description: The block height to query for the account details at the "sealed" is used by default. required: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Account" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /accounts/{address}/keys/{index}: get: tags: - Accounts summary: Get an individual Account Key By Address and Index description: Get an account data by provided address in latest "sealed" block or by provided block height. parameters: - name: address in: path description: The address of the account. required: true style: simple explode: false schema: $ref: "#/components/schemas/Address" - name: index in: path description: The index of the account key. required: true style: simple explode: false schema: type: string description: Index of the public key. format: uint64 - name: block_height in: query description: The block height to query for the account details at the "sealed" is used by default. required: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountPublicKey" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /scripts: post: tags: - Scripts summary: Execute a Cadence Script description: "Executes a read-only Cadence script against the execution state\ \ at the given block height or ID. If block height or ID is not specified,\ \ then the script is executed at the latest sealed block height." parameters: - name: block_id in: query description: "The ID of the block to execute the script against. For a specific\ \ block height, use `block_height` instead." required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: block_height in: query description: The height of the block to execute the script against. This parameter is incompatible with `block_id`. required: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" requestBody: description: The script to execute. content: application/json: schema: $ref: "#/components/schemas/scripts_body" required: true responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/inline_response_200" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /events: get: tags: - Events summary: Get Events description: Query on-chain events by their name in the specified blocks heights or block IDs. parameters: - name: type in: query description: "The event type is [identifier of the event as defined here](https://docs.onflow.org/core-contracts/flow-token/#events)." required: true deprecated: false allowEmptyValue: false style: form explode: true schema: $ref: "#/components/schemas/EventType" - name: start_height in: query description: The start height of the block range for events. Must be used together with `end_height`. This parameter is incompatible with `block_ids`. required: false allowEmptyValue: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: end_height in: query description: The end height of the block range for events. Must be used together with `start_height`. This parameter is incompatible with `block_ids`. required: false allowEmptyValue: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: block_ids in: query description: List of block IDs. Either provide this parameter or both height parameters. This parameter is incompatible with heights parameters. required: false allowEmptyValue: false style: form explode: false schema: maxItems: 50 minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Identifier" - name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BlockEvents" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /network/parameters: get: tags: - Network summary: Get Network Parameters description: Get network-wide parameters of the blockchain responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/NetworkParameters" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /node_version_info: get: tags: - NodeVersionInfo summary: Get Node Version Information description: "Get node version information, such as semver, commit, sporkID\ \ and protocol version." responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/NodeVersionInfo" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" /subscribe_events: get: tags: - Subscribe events summary: Subscribe events description: | IMPORTANT NOTE: This is a WebSocket connection, so the `ws://` or `wss://` schema should be used to subscribe to this endpoint. This endpoint streams on-chain events for all blocks starting at the requested start block, up until the latest available block. Once the latest block is reached, the stream will remain open, and responses will be sent for each new block as it becomes available. parameters: - name: start_height in: query description: The block height of the events being streamed. Either provide this parameter or `start_block_id` parameter. This parameter is incompatible with `start_block_id` parameter. required: false allowEmptyValue: false style: form explode: true schema: $ref: "#/components/schemas/BlockHeight" - name: start_block_id in: query description: The block id of the events being streamed. Either provide this parameter or `start_height` parameter. This parameter is incompatible with `start_height` parameter. required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" - name: heartbeat_interval in: query description: Interval in block heights at which the server should return a heartbeat message to the client. required: false allowEmptyValue: false style: form explode: true schema: type: string format: uint64 - name: event_types in: query description: A comma-separated list of events type to include. required: false allowEmptyValue: false style: form explode: true schema: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/EventType" - name: addresses in: query description: A comma-separated list of addresses who's events should be included. required: false allowEmptyValue: false style: form explode: true schema: minItems: 1 uniqueItems: true type: array items: type: string - name: contracts in: query description: A comma-separated list of contracts who's events should be included. required: false allowEmptyValue: false style: form explode: true schema: minItems: 1 uniqueItems: true type: array items: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SubscribeEvents" "400": description: | Bad Request As OpenAPI does not support WebSocket description, the error code (1003) is actually returned in a close message instead of (400). content: application/json: schema: $ref: "#/components/schemas/Error" "408": description: | Server Timeout As OpenAPI does not support WebSocket description, this error code (1001) is actually returned in a close message instead of (408). content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: | Internal Server Error As OpenAPI does not support WebSocket description, this error code (1011) is actually returned in a close message instead of (500). content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: | Service Unavailable As OpenAPI does not support WebSocket description, this error code (1013) is actually returned in a close message instead of (503). content: application/json: schema: $ref: "#/components/schemas/Error" components: schemas: Account: required: - _expandable - address - balance type: object properties: address: $ref: "#/components/schemas/Address" balance: type: string description: Flow balance of the account. format: uint64 keys: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/AccountPublicKey" contracts: type: object additionalProperties: type: string format: byte _expandable: $ref: "#/components/schemas/Account__expandable" _links: $ref: "#/components/schemas/Links" example: address: address balance: balance _links: _self: _self keys: - public_key: public_key sequence_number: sequence_number index: index weight: weight signing_algorithm: BLSBLS12381 revoked: true hashing_algorithm: SHA2_256 - public_key: public_key sequence_number: sequence_number index: index weight: weight signing_algorithm: BLSBLS12381 revoked: true hashing_algorithm: SHA2_256 contracts: key: "" _expandable: keys: keys contracts: contracts AccountPublicKey: required: - hashing_algorithm - index - public_key - revoked - sequence_number - signing_algorithm - weight type: object properties: index: type: string description: Index of the public key. format: uint64 public_key: type: string description: Hex encoded public key. format: hex signing_algorithm: $ref: "#/components/schemas/SigningAlgorithm" hashing_algorithm: $ref: "#/components/schemas/HashingAlgorithm" sequence_number: type: string description: Current account sequence number. format: uint64 weight: type: string description: Weight of the key. format: uint64 revoked: type: boolean description: Flag indicating whether the key is active or not. example: public_key: public_key sequence_number: sequence_number index: index weight: weight signing_algorithm: BLSBLS12381 revoked: true hashing_algorithm: SHA2_256 SigningAlgorithm: type: string enum: - BLSBLS12381 - ECDSAP256 - ECDSASecp256k1 HashingAlgorithm: type: string enum: - SHA2_256 - SHA2_384 - SHA3_256 - SHA3_384 - KMAC128 Collection: required: - _expandable - id type: object properties: id: $ref: "#/components/schemas/Identifier" transactions: type: array items: $ref: "#/components/schemas/Transaction" _expandable: $ref: "#/components/schemas/Collection__expandable" _links: $ref: "#/components/schemas/Links" example: _links: _self: _self id: id transactions: - _links: null reference_block_id: null payer: payer script: script result: collection_id: null error_message: error_message execution: Pending status_code: 0 _links: _self: _self block_id: null computation_used: computation_used events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index status: Pending envelope_signatures: - null - null gas_limit: gas_limit payload_signatures: - address: null signature: "" key_index: key_index - address: null signature: "" key_index: key_index arguments: - "" - "" id: id authorizers: - null - null _expandable: result: http://example.com/aeiou proposal_key: sequence_number: sequence_number address: null key_index: key_index - _links: null reference_block_id: null payer: payer script: script result: collection_id: null error_message: error_message execution: Pending status_code: 0 _links: _self: _self block_id: null computation_used: computation_used events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index status: Pending envelope_signatures: - null - null gas_limit: gas_limit payload_signatures: - address: null signature: "" key_index: key_index - address: null signature: "" key_index: key_index arguments: - "" - "" id: id authorizers: - null - null _expandable: result: http://example.com/aeiou proposal_key: sequence_number: sequence_number address: null key_index: key_index _expandable: transactions: - http://example.com/aeiou - http://example.com/aeiou Transaction: required: - _expandable - arguments - authorizers - envelope_signatures - gas_limit - id - payer - payload_signatures - proposal_key - reference_block_id - script type: object properties: id: $ref: "#/components/schemas/Identifier" script: type: string description: Base64 encoded Cadence script. format: base64 arguments: type: array description: "Array of Base64 encoded arguments with in [JSON-Cadence interchange\ \ format](https://docs.onflow.org/cadence/json-cadence-spec/)." items: type: string format: byte reference_block_id: $ref: "#/components/schemas/Identifier" gas_limit: type: string description: The limit on the amount of computation a transaction is allowed to preform. format: uint64 payer: $ref: "#/components/schemas/Address" proposal_key: $ref: "#/components/schemas/ProposalKey" authorizers: type: array items: $ref: "#/components/schemas/Address" payload_signatures: type: array items: $ref: "#/components/schemas/TransactionSignature" envelope_signatures: type: array items: $ref: "#/components/schemas/TransactionSignature" result: $ref: "#/components/schemas/TransactionResult" _expandable: $ref: "#/components/schemas/Transaction__expandable" _links: $ref: "#/components/schemas/Links" example: _links: null reference_block_id: null payer: payer script: script result: collection_id: null error_message: error_message execution: Pending status_code: 0 _links: _self: _self block_id: null computation_used: computation_used events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index status: Pending envelope_signatures: - null - null gas_limit: gas_limit payload_signatures: - address: null signature: "" key_index: key_index - address: null signature: "" key_index: key_index arguments: - "" - "" id: id authorizers: - null - null _expandable: result: http://example.com/aeiou proposal_key: sequence_number: sequence_number address: null key_index: key_index ProposalKey: required: - address - key_index - sequence_number type: object properties: address: $ref: "#/components/schemas/Address" key_index: type: string format: uint64 sequence_number: type: string format: uint64 example: sequence_number: sequence_number address: null key_index: key_index TransactionSignature: required: - address - key_index - signature type: object properties: address: $ref: "#/components/schemas/Address" key_index: type: string format: uint64 signature: $ref: "#/components/schemas/Signature" description: Base64 encoded signature. example: address: null signature: "" key_index: key_index TransactionResult: required: - block_id - collection_id - computation_used - error_message - events - status - status_code type: object properties: block_id: $ref: "#/components/schemas/Identifier" collection_id: $ref: "#/components/schemas/Identifier" execution: $ref: "#/components/schemas/TransactionExecution" status: $ref: "#/components/schemas/TransactionStatus" status_code: type: integer error_message: type: string description: Provided transaction error in case the transaction wasn't successful. computation_used: type: string format: uint64 events: type: array items: $ref: "#/components/schemas/Event" _links: $ref: "#/components/schemas/Links" example: collection_id: null error_message: error_message execution: Pending status_code: 0 _links: _self: _self block_id: null computation_used: computation_used events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index status: Pending TransactionExecution: type: string description: "This value indicates whether the transaction execution succeded\ \ or not, this value should be checked when determining transaction success." enum: - Pending - Success - Failure TransactionStatus: type: string description: This value indicates the state of the transaction execution. Only sealed and expired are final and immutable states. enum: - Pending - Finalized - Executed - Sealed - Expired BlockStatus: type: string description: This value indicates the status of a block. enum: - BLOCK_UNKNOWN - BLOCK_FINALIZED - BLOCK_SEALED Block: required: - block_status - header type: object properties: header: $ref: "#/components/schemas/BlockHeader" payload: $ref: "#/components/schemas/BlockPayload" execution_result: $ref: "#/components/schemas/ExecutionResult" _expandable: $ref: "#/components/schemas/Block__expandable" _links: $ref: "#/components/schemas/Links" block_status: $ref: "#/components/schemas/BlockStatus" example: block_status: BLOCK_UNKNOWN payload: collection_guarantees: - collection_id: null signer_ids: - null - null signature: null reference_block_id: null cluster_chain_id: "{}" - collection_id: null signer_ids: - null - null signature: null reference_block_id: null cluster_chain_id: "{}" block_seals: - result_id: null final_state: final_state aggregated_approval_signatures: - verifier_signatures: - null - null signer_ids: - null - null - verifier_signatures: - null - null signer_ids: - null - null block_id: null - result_id: null final_state: final_state aggregated_approval_signatures: - verifier_signatures: - null - null signer_ids: - null - null - verifier_signatures: - null - null signer_ids: - null - null block_id: null _links: null header: parent_id: null id: id parent_voter_signature: "" height: height timestamp: 2000-01-23T04:56:07.000+00:00 execution_result: _links: _self: _self chunks: - start_state: "" index: index number_of_transactions: number_of_transactions collection_index: collection_index end_state: "" event_collection: "" block_id: null total_computation_used: total_computation_used - start_state: "" index: index number_of_transactions: number_of_transactions collection_index: collection_index end_state: "" event_collection: "" block_id: null total_computation_used: total_computation_used id: null previous_result_id: null block_id: null events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index _expandable: payload: payload execution_result: http://example.com/aeiou BlockHeader: required: - height - id - parent_id - parent_voter_signature - timestamp type: object properties: id: $ref: "#/components/schemas/Identifier" parent_id: $ref: "#/components/schemas/Identifier" height: type: string format: uint64 timestamp: type: string format: date-time parent_voter_signature: $ref: "#/components/schemas/Signature" example: parent_id: null id: id parent_voter_signature: "" height: height timestamp: 2000-01-23T04:56:07.000+00:00 BlockPayload: required: - block_seals - collection_guarantees type: object properties: collection_guarantees: uniqueItems: true type: array items: $ref: "#/components/schemas/CollectionGuarantee" block_seals: uniqueItems: true type: array items: $ref: "#/components/schemas/BlockSeal" example: collection_guarantees: - collection_id: null signer_ids: - null - null signature: null reference_block_id: null cluster_chain_id: "{}" - collection_id: null signer_ids: - null - null signature: null reference_block_id: null cluster_chain_id: "{}" block_seals: - result_id: null final_state: final_state aggregated_approval_signatures: - verifier_signatures: - null - null signer_ids: - null - null - verifier_signatures: - null - null signer_ids: - null - null block_id: null - result_id: null final_state: final_state aggregated_approval_signatures: - verifier_signatures: - null - null signer_ids: - null - null - verifier_signatures: - null - null signer_ids: - null - null block_id: null CollectionGuarantee: required: - cluster_chain_id - collection_id - reference_block_id - signature - signer_ids type: object properties: collection_id: $ref: "#/components/schemas/Identifier" signer_ids: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Identifier" signature: $ref: "#/components/schemas/Signature" reference_block_id: $ref: "#/components/schemas/Identifier" cluster_chain_id: $ref: "#/components/schemas/string" example: collection_id: null signer_ids: - null - null signature: null reference_block_id: null cluster_chain_id: "{}" BlockSeal: required: - aggregated_approval_signatures - block_id - final_state - result_id type: object properties: block_id: $ref: "#/components/schemas/Identifier" result_id: $ref: "#/components/schemas/Identifier" final_state: $ref: "#/components/schemas/StateCommitment" aggregated_approval_signatures: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/AggregatedSignature" example: result_id: null final_state: final_state aggregated_approval_signatures: - verifier_signatures: - null - null signer_ids: - null - null - verifier_signatures: - null - null signer_ids: - null - null block_id: null StateCommitment: pattern: "[a-fA-F0-9]{64}" type: string description: The root hash of the state tree. format: hexadecimal AggregatedSignature: required: - signer_ids - verifier_signatures type: object properties: verifier_signatures: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Signature" signer_ids: minItems: 1 uniqueItems: true type: array items: $ref: "#/components/schemas/Identifier" example: verifier_signatures: - null - null signer_ids: - null - null ExecutionResult: required: - block_id - events - id - previous_result_id type: object properties: id: $ref: "#/components/schemas/Identifier" block_id: $ref: "#/components/schemas/Identifier" events: type: array items: $ref: "#/components/schemas/Event" chunks: type: array items: $ref: "#/components/schemas/Chunk" previous_result_id: $ref: "#/components/schemas/Identifier" _links: $ref: "#/components/schemas/Links" example: _links: _self: _self chunks: - start_state: "" index: index number_of_transactions: number_of_transactions collection_index: collection_index end_state: "" event_collection: "" block_id: null total_computation_used: total_computation_used - start_state: "" index: index number_of_transactions: number_of_transactions collection_index: collection_index end_state: "" event_collection: "" block_id: null total_computation_used: total_computation_used id: null previous_result_id: null block_id: null events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index BlockEvents: type: object properties: block_id: $ref: "#/components/schemas/Identifier" block_height: type: string block_timestamp: type: string format: date-time events: type: array items: $ref: "#/components/schemas/Event" _links: $ref: "#/components/schemas/Links" example: _links: _self: _self block_timestamp: 2000-01-23T04:56:07.000+00:00 block_height: block_height block_id: block_id events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index Event: required: - event_index - payload - transaction_id - transaction_index - type type: object properties: type: $ref: "#/components/schemas/EventType" transaction_id: $ref: "#/components/schemas/Identifier" transaction_index: type: string format: uint64 event_index: type: string format: uint64 payload: type: string format: byte example: transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index BlockHeight: oneOf: - type: string format: uint64 - type: string enum: - final - sealed EventType: type: string description: The qualified event type. Address: pattern: "[a-fA-F0-9]{16}" type: string description: The 8-byte address of an account. format: hexadecimal Identifier: pattern: "[a-fA-F0-9]{64}" type: string description: A 32-byte unique identifier for an entity. format: hexadecimal Signature: type: string description: A variable length signature. format: byte Error: type: object properties: code: type: integer message: type: string Chunk: required: - block_id - collection_index - end_state - event_collection - index - number_of_transactions - start_state - total_computation_used type: object properties: block_id: $ref: "#/components/schemas/Identifier" collection_index: type: string format: uint64 start_state: type: string format: byte end_state: type: string format: byte event_collection: type: string format: byte index: type: string format: uint64 number_of_transactions: type: string format: uint64 total_computation_used: type: string format: uint64 example: start_state: "" index: index number_of_transactions: number_of_transactions collection_index: collection_index end_state: "" event_collection: "" block_id: null total_computation_used: total_computation_used Links: type: object properties: _self: type: string example: _self: _self NetworkParameters: required: - chain_id type: object properties: chain_id: type: string example: chain_id: chain_id CompatibleRange: required: - end_height - start_height type: object properties: start_height: type: string end_height: type: string description: A compatible version range. example: end_height: end_height start_height: start_height NodeVersionInfo: required: - commit - node_root_block_height - protocol_state_version - protocol_version - semver - spork_id - spork_root_block_height type: object properties: semver: type: string commit: type: string spork_id: $ref: "#/components/schemas/Identifier" protocol_version: type: string format: uint64 deprecated: true protocol_state_version: type: string format: uint64 spork_root_block_height: type: string format: uint64 node_root_block_height: type: string format: uint64 compatible_range: $ref: "#/components/schemas/CompatibleRange" example: protocol_version: protocol_version semver: semver compatible_range: end_height: end_height start_height: start_height commit: commit node_root_block_height: node_root_block_height spork_id: spork_id spork_root_block_height: spork_root_block_height protocol_state_version: protocol_state_version SubscribeEvents: type: object properties: BlockId: $ref: "#/components/schemas/Identifier" Height: type: string Events: type: array items: $ref: "#/components/schemas/Event" example: Events: - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index - transaction_id: null payload: "" transaction_index: transaction_index type: type event_index: event_index BlockId: BlockId Height: Height transactions_body: required: - arguments - authorizers - envelope_signatures - gas_limit - payer - payload_signatures - proposal_key - reference_block_id - script type: object properties: script: type: string description: Base64 encoded content of the Cadence script. format: base64 arguments: type: array description: "A list of arguments each encoded as Base64 passed in the [JSON-Cadence\ \ interchange format](https://docs.onflow.org/cadence/json-cadence-spec/)." items: type: string format: base64 reference_block_id: $ref: "#/components/schemas/Identifier" gas_limit: type: string description: The limit on the amount of computation a transaction is allowed to preform. format: uint64 payer: $ref: "#/components/schemas/Address" proposal_key: $ref: "#/components/schemas/ProposalKey" authorizers: type: array items: $ref: "#/components/schemas/Address" payload_signatures: type: array description: A list of Base64 encoded signatures. items: $ref: "#/components/schemas/TransactionSignature" envelope_signatures: type: array description: A list of Base64 encoded signatures. items: $ref: "#/components/schemas/TransactionSignature" scripts_body: type: object properties: script: type: string description: Base64 encoded content of the Cadence script. format: base64 arguments: type: array description: "An list of arguments each encoded as Base64 passed in the\ \ [JSON-Cadence interchange format](https://docs.onflow.org/cadence/json-cadence-spec/)." items: type: string format: byte inline_response_200: type: object properties: value: type: string format: byte example: value: "" Account__expandable: type: object properties: keys: type: string contracts: type: string example: keys: keys contracts: contracts Collection__expandable: type: object properties: transactions: type: array items: type: string format: uri example: transactions: - http://example.com/aeiou - http://example.com/aeiou Transaction__expandable: type: object properties: result: type: string format: uri example: result: http://example.com/aeiou Block__expandable: type: object properties: payload: type: string execution_result: type: string format: uri example: payload: payload execution_result: http://example.com/aeiou responses: "400BadRequest": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "404NotFound": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "408ServerTimeout": description: Server Timeout content: application/json: schema: $ref: "#/components/schemas/Error" "500InternalServerError": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503ServiceUnavailable": description: Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" "400BadRequestWS": description: | Bad Request As OpenAPI does not support WebSocket description, the error code (1003) is actually returned in a close message instead of (400). content: application/json: schema: $ref: "#/components/schemas/Error" "408ServerTimeoutWS": description: | Server Timeout As OpenAPI does not support WebSocket description, this error code (1001) is actually returned in a close message instead of (408). content: application/json: schema: $ref: "#/components/schemas/Error" "500InternalServerErrorWS": description: | Internal Server Error As OpenAPI does not support WebSocket description, this error code (1011) is actually returned in a close message instead of (500). content: application/json: schema: $ref: "#/components/schemas/Error" "503ServiceUnavailableWS": description: | Service Unavailable As OpenAPI does not support WebSocket description, this error code (1013) is actually returned in a close message instead of (503). content: application/json: schema: $ref: "#/components/schemas/Error" parameters: expandParam: name: expand in: query description: A comma-separated list indicating which properties of the content to expand. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string selectParam: name: select in: query description: A comma-separated list indicating which properties of the content to return. required: false style: form explode: false schema: minItems: 1 uniqueItems: true type: array items: type: string blockIdParam: name: block_id in: query description: A block ID optional parameter required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier" collectionIdParam: name: collection_id in: query description: A collection ID optional parameter. required: false style: form explode: true schema: $ref: "#/components/schemas/Identifier"