pub struct Wallet {
pub signer: Box<dyn BtcTxSigner>,
/* private fields */
}
Expand description
An Ordinal-aware Bitcoin wallet.
Fields§
§signer: Box<dyn BtcTxSigner>
Implementations§
Source§impl Wallet
impl Wallet
pub fn new_with_signer(signer: impl BtcTxSigner + 'static) -> Self
pub async fn sign_commit_transaction( &mut self, own_pubkey: &PublicKey, inputs: &[Utxo], transaction: Transaction, txin_script: &ScriptBuf, derivation_path: &DerivationPath, ) -> OrdResult<Transaction>
pub async fn sign_reveal_transaction_ecdsa( &mut self, own_pubkey: &PublicKey, input: &Utxo, transaction: Transaction, redeem_script: &ScriptBuf, ) -> OrdResult<Transaction>
pub async fn sign_reveal_transaction_schnorr( &mut self, own_pubkey: &PublicKey, taproot: &TaprootPayload, redeem_script: &ScriptBuf, transaction: Transaction, derivation_path: &DerivationPath, ) -> OrdResult<Transaction>
Sourcepub async fn sign_transaction(
&self,
transaction: &Transaction,
prev_outs: &[TxInputInfo],
) -> OrdResult<Transaction>
pub async fn sign_transaction( &self, transaction: &Transaction, prev_outs: &[TxInputInfo], ) -> OrdResult<Transaction>
Sign a generic transaction.
The given transaction must have the same inputs as the ones given in the prev_outs
argument.
The signature is checked against the given own_pubkey
public key before being accepted
as valid and returned.
Auto Trait Implementations§
impl Freeze for Wallet
impl !RefUnwindSafe for Wallet
impl !Send for Wallet
impl !Sync for Wallet
impl Unpin for Wallet
impl !UnwindSafe for Wallet
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