Struct bitcoins::nets::Bitcoin[][src]

pub struct Bitcoin<T: AddressEncoder>(_);
Expand description

A newtype for Bitcoin networks, parameterized by an encoder. We change the encoder to differentiate between main, test, and signet.

Trait Implementations

An associated witness transaction type.

Formats the value using the given formatter. Read more

A type handling the network’s address semantics. This will typically represent some predicate on the transaction. It is used by both the Encoder and the Builder. Read more

An error type that will be used by the Encoder, and returned by the passthrough encode_address and decode_address functions Read more

A type representing the in-protocol recipient. This is usually different from the Address type. Read more

An Encoder that uses the Address and Error types above. This Encoder must implement AddressEncoder. It handles translating the Address type to the networks RecipientIdentifier type. Read more

A transaction Input type. This type is used within the Transaction and specificies UTXOs being spent by the transaction. Read more

A transaction Output type. This type is used within the Transaction and specificies UTXOs being consumed by the transaction. Read more

A Transaction type that uses the TxIn and TxOut.

A transaction Builder that uses the Encoder and Transaction types defined earlier. The builder is returned by Network::tx_builder(), and provides a convenient interface for transaction construction. Read more

Returns a new instance of the associated transaction builder.

Instantiate a builder from a tx object

Instantiate a builder from a tx object

Instantiate a builder from a hex-serialized transaction

Encode an address using the network’s Address semantics

Decode an address using the network’s Address semantics

Attempt to convert a string into an Address.

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.

Should always be Self

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.