pub type AuthenticatedTransaction<P> = Transaction<P>;

Aliased Type§

struct AuthenticatedTransaction<P> {
    pub(super) data: Box<[u8], Global>,
    pub(super) tstruct: TransactionStruct,
    pub(super) phantom: PhantomData<P>,
}

Fields§

§data: Box<[u8], Global>§tstruct: TransactionStruct§phantom: PhantomData<P>

Implementations§

source§

impl<P> Transaction<P>

source

pub fn as_slice(&self) -> TransactionSlice<'_, P>

source

pub fn hash(&self) -> TransactionSignDataHash

source

pub fn nb_inputs(&self) -> u8

source

pub fn block0_payload(payload: &P, payload_auth: &P::Auth) -> Transaction<P>where P: Payload,

Create a specific block0 payload transaction

source

pub fn block0_payload_builder(payload: &P) -> TxBuilderState<SetAuthData<P>>where P: Payload,

source

pub fn nb_witnesses(&self) -> u8

source

pub fn nb_outputs(&self) -> u8

source

pub fn total_input(&self) -> Result<Value, ValueError>

source

pub fn total_output(&self) -> Result<Value, ValueError>

source

pub fn balance(&self, fee: Value) -> Result<Balance, ValueError>

source

pub fn verify_strictly_balanced(&self, fee: Value) -> Result<(), BalanceError>

source

pub fn verify_possibly_balanced(&self) -> Result<(), BalanceError>

Trait Implementations§

source§

impl<Extra: Arbitrary + Payload> Arbitrary for Transaction<Extra>where Extra::Auth: Arbitrary,

source§

fn arbitrary<G: Gen>(g: &mut G) -> Self

§

fn shrink(&self) -> Box<dyn Iterator<Item = Self>, Global>

source§

impl<P> AsRef<[u8]> for Transaction<P>

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<P> Clone for Transaction<P>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<P> Debug for Transaction<P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Extra: Payload> Deserialize for Transaction<Extra>

source§

fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>

§

fn deserialize_validate<R>(codec: &mut Codec<R>) -> Result<(), ReadError>where R: Read,

source§

impl<P> PartialEq<Transaction<P>> for Transaction<P>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Extra: Payload> Serialize for Transaction<Extra>

source§

fn serialized_size(&self) -> usize

Default implementation, not efficient, not recommended to use it
source§

fn serialize<W: Write>(&self, codec: &mut Codec<W>) -> Result<(), WriteError>

§

fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>

Convenience method to serialize into a byte vector.
source§

impl<P> Eq for Transaction<P>