Struct ckb_jsonrpc_types::Transaction [−][src]
pub struct Transaction {
pub version: Version,
pub cell_deps: Vec<CellDep>,
pub header_deps: Vec<H256>,
pub inputs: Vec<CellInput>,
pub outputs: Vec<CellOutput>,
pub outputs_data: Vec<JsonBytes>,
pub witnesses: Vec<JsonBytes>,
}
Expand description
The transaction.
Refer to RFC CKB Transaction Structure.
Fields
version: Version
Reserved for future usage. It must equal 0 in current version.
cell_deps: Vec<CellDep>
An array of cell deps.
CKB locates lock script and type script code via cell deps. The script also can uses syscalls to read the cells here.
Unlike inputs, the live cells can be used as cell deps in multiple transactions.
header_deps: Vec<H256>
An array of header deps.
The block must already be in the canonical chain.
Lock script and type script can read the header information of blocks listed here.
inputs: Vec<CellInput>
An array of input cells.
In the canonical chain, any cell can only appear as an input once.
outputs: Vec<CellOutput>
An array of output cells.
outputs_data: Vec<JsonBytes>
Output cells data.
This is a parallel array of outputs. The cell capacity, lock, and type of the output i is
outputs[i]
and its data is outputs_data[i]
.
witnesses: Vec<JsonBytes>
An array of variable-length binaries.
Lock script and type script can read data here to verify the transaction.
For example, the bundled secp256k1 lock script requires storing the signature in
witnesses
.
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
Mutably borrows from an owned value. Read more