Crate wallet[][src]

Re-exports

pub use blockchain::MinedTransaction;
pub use blockchain::TimeHeight;
pub use blockchain::Utxo;
pub use blockchain::BITCOIN_GENESIS_BLOCKHASH;

Modules

bip32
blockchain

Blockchain-specific data types useful for wallets

descriptor

General workflow for working with ScriptPubkey* types:

features
psbt

PSBT extensions, including implementation of different [crate::bp::resolvers] and enhancements related to key management

resolvers

Resolvers are traits allow accessing or computing information from a bitcoin transaction graph (from blockchain, state channel, index, PSBT etc).

script

Structs

AddressCompat

See also bitcoin::Address as a non-copy alternative supporting future witness program versions

HashLock

HTLC payment hash

HashPreimage

HTLC payment preimage

LockScript

Script whose knowledge is required for spending some specific transaction output. This is the deepest nested version of Bitcoin script containing no hashes of other scripts, including P2SH redeemScript hashes or witnessProgram (hash or witness script), or public key hashes

Psbt

A Partially Signed Transaction.

PubkeyScript

A content of scriptPubkey from a transaction output

RedeemScript

redeemScript as part of the witness or sigScript structure; it is hashed for P2(W)SH output

SECP256K1

Global Secp256k1 context object

SECP256K1_PUBKEY_DUMB
ScriptSet

Scripting data for both transaction output and spending transaction input parts that can be generated from some complete bitcoin Script (LockScript) or public key using particular [ConversionStrategy]

SigScript

A content of sigScript from a transaction input

Slice32

Wrapper type for all slice-based 256-bit types implementing many important traits, so types based on it can simply derive their implementations

TapScript

Any valid branch of Tapscript (BIP-342)

Witness

A content of the witness field from a transaction input according to BIP-141

WitnessProgram
WitnessScript

A content of the script from witness structure; en equivalent of redeemScript for witness-based transaction inputs. However, unlike RedeemScript, WitnessScript produce SHA256-based hashes of WScriptHash type

Enums

AddressFormat
AddressNetwork
AddressParseError
AddressPayload

See also [descriptor::Compact] as a non-copy alternative supporting bare/custom scripts

PubkeyParseError

Errors that may happen during LockScript parsing process

WitnessVersion

Version of the WitnessProgram: first byte of scriptPubkey in transaction output for transactions starting with opcodes ranging from 0 to 16 (inclusive).

WitnessVersionError

A error covering only one possible failure in WitnessVersion creation: when the provided version > 16

Traits

IntoPk
LexOrder
ToLockScript

Conversion to LockScript, which later may be used for creating different end-point scripts, like PubkeyScript, SigScript, Witness etc.

ToP2pkh
ToPubkeyScript

Conversion for data types (public keys, different types of script) into a pubkeyScript (using PubkeyScript type) using particular conversion [Strategy]

ToScripts

Script set generation from public keys or a given LockScript (with TapScript support planned for the future).