Checking if a wallet is a Bitcoin wallet
You can use theisBitcoinWallet helper method to check if a wallet is a Bitcoin wallet. That way, TypeScript will know which methods are available to you.
Bitcoin Wallet
| Method | Description |
|---|---|
| sendRawTransaction(rawTransactionHex: string): Promise<string | undefined> | This method submits a raw transaction to the bitcoin blockchain and returns the transaction ID as the response |
| sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined> | A method to send an amount of satoshis to a recipient bitcoin address |
| signMessage(messageToSign: string, { addressType: WalletAddressType, protocol: BitcoinSignProtocol }): Promise<string\ | undefined> | Signs a message with a specific bitcoin address type (‘ordinals’ or ‘payment’) and/or protocol (‘ecdsa’ or ‘bip322-simple’) |
| signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined> | Signs a PSBT and returns an object with the signed PSBT |
| signPsbts(request: BitcoinSignPsbtRequest[]): Promise<string[] | undefined> | Signs a list of PSBTs and returns an array of signed PSBTs in base64 |