pub struct Signer { /* private fields */ }Implementations§
Source§impl Signer
impl Signer
pub fn new( mnemonic: &str, provider: Box<dyn ProviderTrait>, ) -> Result<Signer, SignerError>
pub fn send( &self, to: Script, amount: u64, ) -> Result<(Transaction, u64), SignerError>
pub fn finalize( &self, tx: &FinalTransaction, ) -> Result<(Transaction, u64), SignerError>
pub fn finalize_strict( &self, tx: &FinalTransaction, target_blocks: u32, ) -> Result<(Transaction, u64), SignerError>
pub fn get_provider(&self) -> &dyn ProviderTrait
pub fn get_wpkh_address(&self) -> Result<Address, SignerError>
pub fn get_wpkh_utxos(&self) -> Result<Vec<(OutPoint, TxOut)>, SignerError>
pub fn get_wpkh_utxos_asset( &self, asset: AssetId, ) -> Result<Vec<(OutPoint, TxOut)>, SignerError>
pub fn get_wpkh_utxos_txid( &self, txid: Txid, ) -> Result<Vec<(OutPoint, TxOut)>, SignerError>
pub fn get_wpkh_utxos_filter<F>( &self, filter: F, ) -> Result<Vec<(OutPoint, TxOut)>, SignerError>
pub fn get_schnorr_public_key(&self) -> Result<XOnlyPublicKey, SignerError>
pub fn get_ecdsa_public_key(&self) -> Result<PublicKey, SignerError>
pub fn get_private_key(&self) -> Result<PrivateKey, SignerError>
Trait Implementations§
Source§impl SignerTrait for Signer
impl SignerTrait for Signer
fn sign_program( &self, pst: &PartiallySignedTransaction, program: &dyn ProgramTrait, input_index: usize, network: &SimplicityNetwork, ) -> Result<Signature, SignerError>
fn sign_input( &self, pst: &PartiallySignedTransaction, input_index: usize, ) -> Result<(PublicKey, Signature), SignerError>
Auto Trait Implementations§
impl Freeze for Signer
impl !RefUnwindSafe for Signer
impl !Send for Signer
impl !Sync for Signer
impl Unpin for Signer
impl UnsafeUnpin for Signer
impl !UnwindSafe for Signer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more