get_live_cell - Nervos

Returns the status of a cell. The RPC returns extra information if it is a live cell.

Parameters

  • out_point - Reference to the cell by transaction hash and output index.
  • with_data - Whether the RPC should return cell data. Cell data can be huge, if the client does not need the data, it should set this to false to save bandwidth.

Returns

This RPC tells whether a cell is live or not.

If the cell is live, the RPC will return details about the cell. Otherwise, the field cell is null in the result.

If the cell is live and with_data is set to false, the field cell. Data is null in the result.

Example

Request

curl --location --request POST 'https://ckb-mirana.unifra.io/v1/4fb36720a57340d39aee4cf68511064a' \
--header 'Content-Type: application/json' \
--data-raw '{
  "id": 42,
  "jsonrpc": "2.0",
  "method": "get_live_cell",
  "params": [
    {
      "index": "0x0",
      "tx_hash": "0x037dafd7f9c6f742e8c9f225191b441b0b5c4e8b3c1e87c29a2f2ec2fbbf6934"
    },
    true
  ]
}'

Result

{
    "jsonrpc": "2.0",
    "result": {
        "cell": {
            "data": {
                "content": "0x",
                "hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
            },
            "output": {
                "capacity": "0x2647c0b2a7",
                "lock": {
                    "args": "0x217b919129ac2b238ee7ab467e1416ec2d09fc19",
                    "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                    "hash_type": "type"
                },
                "type": null
            }
        },
        "status": "live"
    },
    "id": 42
}

🚧

The below parameter inputs do not work, please reference the section above instead.

Language
Click Try It! to start a request and see the response here!