Trait rgbstd::contract::TxoSeal

pub trait TxoSeal: From<Outpoint> {
    // Required methods
    fn method(&self) -> CloseMethod;
    fn txid(&self) -> Option<Txid>;
    fn vout(&self) -> Vout;
    fn outpoint(&self) -> Option<Outpoint>;
    fn txid_or(&self, default_txid: Txid) -> Txid;
    fn outpoint_or(&self, default_txid: Txid) -> Outpoint;
}
Expand description

Methods common for all transaction-output based seal types.

Required Methods§

fn method(&self) -> CloseMethod

Returns method which must be used for seal closing.

fn txid(&self) -> Option<Txid>

Returns Txid part of the seal definition, if known.

fn vout(&self) -> Vout

Returns transaction output number containing the defined seal.

fn outpoint(&self) -> Option<Outpoint>

Returns Outpoint defining the seal, if txid is known.

fn txid_or(&self, default_txid: Txid) -> Txid

Returns Txid part of the seal definition, if known, or the provided default_txid.

fn outpoint_or(&self, default_txid: Txid) -> Outpoint

Returns Outpoint defining the seal, if txid is known, or constructs one using the provided default_txid.

Implementors§

§

impl<Id> TxoSeal for BlindSeal<Id>where Id: SealTxid,

§

impl<Id> TxoSeal for ExplicitSeal<Id>where Id: SealTxid,