⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
/

Nervos Network (CKB)

ckb

Nervos Network (CKB)

Method: POST send_transaction

dropdown
POST

send_transaction

Method not allowed

Submits a new transaction into the transaction pool. If the transaction is already in the pool, rebroadcast it to peers.

Parameters

transaction - Transaction

The transaction 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.

outputs_validator - string | null

Validates the transaction outputs before entering the tx-pool. (Optional, default is “well_known_scripts_only”).

OutputsValidator is equivalent to "passthrough" | "well_known_scripts_only".

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": "send_transaction",
"params": [null, null],
"id": "getblock.io"}'


Response

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