[][src]Struct ckb_jsonrpc_types::CellOutputWithOutPoint

pub struct CellOutputWithOutPoint {
    pub out_point: OutPoint,
    pub block_hash: H256,
    pub capacity: Capacity,
    pub lock: Script,
    pub type_: Option<Script>,
    pub output_data_len: Uint64,
    pub cellbase: bool,
}

This is used as return value of get_cells_by_lock_hash RPC.

It contains both OutPoint data used for referencing a cell, as well as the cell's properties such as lock and capacity.

Examples

# serde_json::from_str::<ckb_jsonrpc_types::CellOutputWithOutPoint>(r#"
{
  "block_hash": "0xf293d02ce5e101b160912aaf15b1b87517b7a6d572c13af9ae4101c1143b22ad",
  "capacity": "0x2ca86f2642",
  "cellbase": true,
  "lock": {
    "args": "0x",
    "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",
    "hash_type": "data"
  },
  "out_point": {
    "index": "0x0",
    "tx_hash": "0xa510932a80fda15a774203404453c5f9c0e8582f11c40f8ce5396f2460f8ccbf"
  },
  "output_data_len": "0x0",
  "type": null
}
# "#).unwrap();

Fields

out_point: OutPoint

Reference to a cell via transaction hash and output index.

block_hash: H256

The block hash of the block which committed the transaction.

capacity: Capacity

The cell capacity.

The capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage.

lock: Script

The lock script.

type_: Option<Script>

The optional type script.

The JSON field name is "type".

output_data_len: Uint64

The bytes count of the cell data.

cellbase: bool

Whether this is a cellbase transaction output.

The cellbase transaction is the first transaction in a block which issues rewards and fees to miners.

The cellbase transaction has a maturity period of 4 epochs. Its output cells can only be used as inputs after 4 epochs.

Trait Implementations

impl Debug for CellOutputWithOutPoint[src]

impl<'de> Deserialize<'de> for CellOutputWithOutPoint[src]

impl Serialize for CellOutputWithOutPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,