Skip to main content

Cell

Structure

A Cell is the smallest and fundamental unit in Nervos CKB, used for storing states.

Cell: {
capacity: HexString;
lock: Script;
type: Script;
data: HexString;
}

Fields & Description

NameTypeDescription
capacityUint64Size of the Cell in shannon. 1 CKB = 100,000,000 shannons. 
lockScriptA Script that enforces access and ownership of a Cell.
typeScriptA Script that enforces the rules that must be followed in a transaction for a Cell to be consumed as an input or for a Cell to be created as an output
dataBytesUsed for storing states.

Example

{
"capacity": "0x19995d0ccf",
"lock": {
"code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"args": "0x0a486fb8f6fe60f76f001d6372da41be91172259",
"hash_type": "type"
},
"type": null
}