Struct exonum_btc_anchoring::api::Payload [] [src]

pub struct Payload {
    pub block_height: Height,
    pub block_hash: Hash,
    pub prev_tx_chain: Option<TxId>,
}

Anchoring transaction payload.

Data layout in OP_RETURN script for Payload v.1:

| Position in bytes | Description | |------------------- |---------------------------------------------- | | 0..6 | ASCII-encoded prefix EXONUM | | 6 | Version byte, currently is 1 | | 7 | Payload kind: (0 is regular, 1 is recover) | | 8..16 | Block height | | 16..48 | Block hash | | 48..80 (Optionally) | Txid of previous tx chain (only for recover kind) |

In this way the length of regular payload is 48, and for recover is 80.

Fields

Anchored block height

Anchored block hash

Txid of previous transactions chain if it has been lost.

Methods

impl Payload
[src]

[src]

Tries to extract payload from given Script

Trait Implementations

impl Debug for Payload
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Payload
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Payload
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl Send for Payload

impl Sync for Payload