Expand description
A crate containing common code used in multiple other crate in the workspace, such as:
- Utils to inspect a PSET: get the net effect of a PSET on a given wallet
pset_balance()
, or get how many signatures are missing , and which signers should provide thempset_signatures()
. Signer
trait: contains the methods to be implemented by a signer such as signing a pset or returning an xpub
To avoid circular dependencies this crate must not depend on other crate of the workspace
Re-exports§
pub use crate::precision::Precision;
Modules§
- electrum_
ssl - The sockets of the Blockstream Liquid Electrum servers.
- precision
- Module to handle the formattings of amount of assets given its precision.
Structs§
- Address
- A wrapper around
elements::Address
that checks the network and provides a more user-friendly parse errors - Amp0
Signer Data - Signer information necessary for full login to AMP0
- Balance
- Wallet balance wrapper
- Invalid
BipVariant - The error type returned by Bip::from_str
- Invalid
Blinding KeyVariant - The error type returned by
DescriptorBlindingKey::from_str
- Invalid
KeyOrigin Xpub - The error type returned by keyorigin_xpub_from_str
- Invalid
Multisig Variant - The variant of the multisig descriptor
- Invalid
Singlesig Variant - The error type returned by Singlesig::from_str
- Issuance
- The details of an issuance or reissuance
- Pset
Balance - The details regarding balance and amounts in a PSET
- Pset
Details - The details of a Partially Signed Elements Transaction:
- Pset
Signatures - The details of the signatures in a PSET
- Recipient
- The recipient (an output not belonging to the wallet) in a PSET
- Signed
Balance - A signed balance of assets, to represent a balance with negative values such as the results of a transactions from the perspective of a wallet.
Enums§
- Address
Parse Error - The error type returned by
Address::parse
- Bip
- The variant of the descriptor like specified in the bips
- Descriptor
Blinding Key - Some descriptor blinding keys variant
- Error
- Multisig
- The variant of the multisig descriptor
- Network
- The network of the elements blockchain.
- QrError
- Singlesig
- The variant of the singlesig descriptor
Traits§
- Amp0
Signer - AMP0 signer methods
- Signer
- A trait defining methods of signers, providing blanket implementations for some methods.
- Stream
- A trait for async read/write operations used by hardware wallet connections
Functions§
- address_
to_ text_ qr - Convert the given address in a string representing a QR code to be consumed from a terminal
- address_
to_ uri_ qr - Convert the given elements address to an image uri
- burn_
script - Create the same burn script that Elements Core wallet creates
- derive_
blinding_ key - Derive the blinding secret key from a confidential descriptor and a script pubkey.
- derive_
script_ pubkey - Derive the script pubkey from a confidential descriptor and an index.
- is_
provably_ segwit - Whether a script pubkey is provably segwit
- keyorigin_
xpub_ from_ str - Parse a keyorigin xpub from a string
- multisig_
desc - Generate a multisig descriptor with the given parameters
- pset_
balance - Return the net balance of a PSET from the perspective of the given
descriptor
. It returns also the fee and the recipients (external receivers) of the PSET. - pset_
debug - Create a debug string of a PSET, but remove new lines on number arrays.
- pset_
issuances - Return the issuances of a PSET, for each input return an Issuance but the struct must be checked with
Issuance::is_issuance
if it’s a real issuance or reissuance. - pset_
signatures - Return the signatures of a PSET, for each input return a
PsetSignatures
which includes a list of signatures that are available and a list of signatures that are missing. - singlesig_
desc - Generate a singlesig descriptor with the given parameters