pub struct Signer { /* private fields */ }Implementations§
Source§impl Signer
impl Signer
pub fn new(mnemonic: &str, provider: Box<dyn ProviderTrait>) -> Signer
pub fn send(&self, to: Script, amount: u64) -> Result<Txid, SignerError>
pub fn broadcast(&self, tx: &FinalTransaction) -> Result<Txid, 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_confidential_address(&self) -> Address
pub fn get_address(&self) -> Address
pub fn get_utxos(&self) -> Result<Vec<UTXO>, SignerError>
pub fn get_utxos_asset(&self, asset: AssetId) -> Result<Vec<UTXO>, SignerError>
pub fn get_utxos_txid(&self, txid: Txid) -> Result<Vec<UTXO>, SignerError>
pub fn get_utxos_filter( &self, explicit_filter: &dyn Fn(&UTXO) -> bool, confidential_filter: &dyn Fn(&UTXO) -> bool, ) -> Result<Vec<UTXO>, SignerError>
pub fn get_schnorr_public_key(&self) -> XOnlyPublicKey
pub fn get_ecdsa_public_key(&self) -> PublicKey
pub fn get_blinding_public_key(&self) -> PublicKey
pub fn get_private_key(&self) -> PrivateKey
pub fn get_blinding_private_key(&self) -> PrivateKey
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