pub struct CatSignerClient {
pub base_url: String,
pub client: Client,
}Fields§
§base_url: String§client: ClientImplementations§
Source§impl CatSignerClient
impl CatSignerClient
Sourcepub fn from_client(client: Client, base_url: String) -> Self
pub fn from_client(client: Client, base_url: String) -> Self
Build a CatSignerClient from a custom reqwest client
Sourcepub async fn get_pubkey(&self) -> Result<XOnlyPublicKey, Error>
pub async fn get_pubkey(&self) -> Result<XOnlyPublicKey, Error>
Gets the signer’s public key
Sourcepub async fn sign_tx_input(
&self,
tx: &Transaction,
input_index: usize,
) -> Result<Transaction, Error>
pub async fn sign_tx_input( &self, tx: &Transaction, input_index: usize, ) -> Result<Transaction, Error>
Sends the transaction to the server to be signed, if it has a valid witness for the given input the server will sign the input and return the signed transaction. For the input to be valid it must be a tapscript spend with a valid control block, the control block must be valid for the wrapped script, not the unwrapped script.
Trait Implementations§
Source§impl Clone for CatSignerClient
impl Clone for CatSignerClient
Auto Trait Implementations§
impl !RefUnwindSafe for CatSignerClient
impl !UnwindSafe for CatSignerClient
impl Freeze for CatSignerClient
impl Send for CatSignerClient
impl Sync for CatSignerClient
impl Unpin for CatSignerClient
impl UnsafeUnpin for CatSignerClient
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