getAleoBlocks

Description

Returns full content of specific blocks within a range of heights from Aleo blockchain: including details and transactions.

Method Parameters

  • params - Object:

    • start - number: Start height of desired range (incuded).

    • end - number: End height of desired block (excuded).

Returns

  • result - Array<Object>: An array of block objects.

    • Block object:

      • block_hash - string: The hash of the block.

      • previous_hash - string: The hash of the previous block.

      • header - Object: The header of the block.

        • previous_state_root - string: The root hash of the previous state.

        • transactions_root - string: The root hash of the transactions.

        • finalize_root - string: The finalize root hash.

        • ratifications_root - string: The root hash of the ratifications.

        • solutions_root - string: The root hash of the solutions.

        • subdag_root - string: The root hash of the subdag.

        • metadata - Object: Metadata of the block.

          • network - number: The network identifier.

          • round - number: The round number of the block.

          • height - number: The height of the block.

          • cumulative_weight - string: The cumulative weight of the block.

          • cumulative_proof_target - string: The cumulative proof target.

          • coinbase_target - string: The target for coinbase transactions.

          • proof_target - string: The proof target.

          • last_coinbase_target - string: The target for the last coinbase transaction.

          • last_coinbase_timestamp - string: The timestamp of the last coinbase transaction.

          • timestamp - string: The timestamp of the block.

      • authority - Object: Authority details of the block.

        • type - string: Type of the authority.

        • subdag - Object: Details of the subdag.

          • subdag - Object: Details of the subdag at various rounds.

          • election_certificate_ids - Array<string>: IDs of the election certificates.

      • ratifications - Array<Object>: Ratifications in the block.

        • type - string: Type of the ratification.

        • amount - number: Amount associated with the ratification.

      • transactions - Array<Object>: Transactions in the block.

        • status - string: Status of the transaction.

        • type - string: Type of the transaction.

        • index - number: Index of the transaction.

        • transaction - Object: Details of the transaction.

          • type - string: Type of the transaction.

          • id - string: ID of the transaction.

          • execution - Object: Execution details of the transaction.

            • transitions - Array<Object>: Transitions in the execution.

            • global_state_root - string: Global state root hash.

            • proof - string: Proof of the execution.

          • fee - Object: Fee details of the transaction.

            • transition - Object: Transition details of the fee.

            • global_state_root - string: Global state root hash.

            • proof - string: Proof of the fee.

          • finalize - Array<Object>: Finalize details of the transaction.

      • aborted_transaction_ids - Array<string>: IDs of the aborted transactions.

Example

Request

Response

Last updated