Struct elements::TxOut[][src]

pub struct TxOut {
    pub asset: Asset,
    pub value: Value,
    pub nonce: Nonce,
    pub script_pubkey: Script,
    pub witness: TxOutWitness,
}
Expand description

Transaction output

Fields

asset: Asset

Committed asset

value: Value

Committed amount

nonce: Nonce

Nonce (ECDH key passed to recipient)

script_pubkey: Script

Scriptpubkey

witness: TxOutWitness

Witness data - not deserialized/serialized as part of a TxIn object (rather as part of its containing transaction, if any) but is logically part of the txin.

Implementations

Create a new fee output.

Whether this data represents nulldata (OP_RETURN followed by pushes, not necessarily minimal)

Whether this output is a pegout, which is a subset of nulldata with the following extra rules: (a) there must be at least 2 pushes, the first of which must be 32 bytes and the second of which must be nonempty; (b) all pushes must use a push opcode rather than a numeric or reserved opcode

If this output is a pegout, returns the destination genesis block, the destination script pubkey, and any additional data

Whether or not this output is a fee output

Extracts the minimum value from the rangeproof, if there is one, or returns 0.

Creates a new confidential output that is not the last one in the transaction. Provide input secret information by creating TxOutSecrets type. The inputs secrets must be consistent with the target_asset confidential Asset It is not necessary to supply [TxOutSecrets] for explicit assets

Convert a explicit TxOut into a Confidential TxOut. The blinding key is provided by the blinder paramter. The initial value of nonce is ignored and is set to the ECDH pubkey sampled by the sender.

Creates a new confidential output that IS the last one in the transaction. Provide input Asset information by creating [TxInputAsset] type.

Unblinds a transaction output, if it is confidential.

It returns the secret elements of the value and asset Pedersen commitments.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Decode an object with a well-defined format

Returns the “default value” for a type. Read more

Deserialize a value from raw data.

Encode an object with a well-defined format, should only ever error if the underlying Write errors. Returns the number of bytes written on success Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Serialize a value as raw data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.