⚡ Dedicated Nodes for ETH, BSC, MATIC & other Blockchains at a Reduced Price!

ckb

Nevros (CKB)

Method: POST submit_block

dropdown
POST

submit_block

Method not allowed

Submit new block to the network.

Parameters

work_id - string

The same work ID returned from get_block_template.

block - block object

The assembled block from the block template and which PoW puzzle has been resolved.

Format: - header - (json object) the block header in format: - version - (32-bit unsigned integer type encoded as the 0x-prefixed hex string) the block version. It must equal to 0 now and is reserved for future upgrades. - comract_target - (uint32) The block difficulty target. It can be converted to a 256-bit target. Miners must ensure the Eaglesong of the header is within the target. - timestamp - (timestamp) The block timestamp. It is a Unix timestamp in milliseconds (1 second = 1000 milliseconds). Miners should put the time when the block is created in the header, however, the precision is not guaranteed. A block with a higher block number may even have a smaller timestamp. - number - (64-bit unsigned integer type encoded as the 0x-prefixed hex string) The consecutive block number starting from 0. - epoch - (64-bit unsigned integer type encoded as the 0x-prefixed hex string) The epoch information of this block. It shows which epoch the block is in, and the elapsed epoch fraction after adding this block. - parent_hash - (h256) The header hash of the parent block. - transactions_root - (h256) The commitment to all the transactions in the block. It is a hash on two Merkle Tree roots: - The root of a CKB Merkle Tree, which items are the transaction hashes of all the transactions in the block. - The root of a CKB Merkle Tree, but the items are the transaction witness hashes of all the transactions in the block. - proposals_hash - (h256) The hash on proposals in the block body. It is all zeros when proposals is empty, or the hash on all the bytes concatenated together. - extra_hash - (h256) The hash on uncles and extension in the block body. - uncles - array of UncleBlock objects in format: - header - the uncle block header - proposals - array of proposalShortID, Proposal IDs in the uncle block body. - transactions - array of transaction objects in format: - version - (32-bit unsigned integer) Reserved for future usage. It must equal 0 in current version. - cell_deps - array of cell deps in format: - out_point - Reference to the cell in format: - tx_hash - (h256) Transaction hash in which the cell is an output. - index - (uint32) The output index of the cell in the transaction specified by tx_hash. - dep_type - Dependency type in format, either "code" or "dep_group". - header_deps - (array of h256) An array of header deps. - inputs - array of input cells in format: - since - (uint64) Restrict when the transaction can be committed into the chain. - previous_output - (OutPoint) Reference to the input cell. - outputs - array of output cells in format: - capacity - (64-bit unsigned integer) the cell capacity - lock - the lock script - type_ - the optional type script - outputs_data - (array of jsonBytes) outout cells data - witnesses - (array of jsonBytes) - an array of variable-length binaries. - proposals - The proposal IDs in the block body in format of 10-byte fixed-length binary encoded as a 0x-prefixed hex string.

Request

curl --location --request POST 'https://ckb.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "submit_block",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}