@@ -18,11 +18,10 @@ use crate::indexed_db::IndexedDbStorage;
1818use crate :: models:: * ;
1919use bip39:: Mnemonic ;
2020use bitcoin:: bip32:: ExtendedPrivKey ;
21- use bitcoin:: consensus:: deserialize;
2221use bitcoin:: hashes:: hex:: FromHex ;
2322use bitcoin:: hashes:: sha256;
2423use bitcoin:: secp256k1:: PublicKey ;
25- use bitcoin:: { Address , Network , OutPoint , Transaction , Txid } ;
24+ use bitcoin:: { Address , Network , OutPoint , Txid } ;
2625use fedimint_core:: { api:: InviteCode , config:: FederationId } ;
2726use futures:: lock:: Mutex ;
2827use gloo_utils:: format:: JsValueSerdeExt ;
@@ -423,17 +422,6 @@ impl MutinyWallet {
423422 Ok ( self . inner . node_manager . stop ( ) . await ?)
424423 }
425424
426- /// Broadcast a transaction to the network.
427- /// The transaction is broadcast through the configured esplora server.
428- #[ wasm_bindgen]
429- pub async fn broadcast_transaction ( & self , str : String ) -> Result < ( ) , MutinyJsError > {
430- let tx_bytes =
431- Vec :: from_hex ( str. as_str ( ) ) . map_err ( |_| MutinyJsError :: WalletOperationFailed ) ?;
432- let tx: Transaction =
433- deserialize ( & tx_bytes) . map_err ( |_| MutinyJsError :: WalletOperationFailed ) ?;
434- Ok ( self . inner . node_manager . broadcast_transaction ( tx) . await ?)
435- }
436-
437425 /// Returns the mnemonic seed phrase for the wallet.
438426 #[ wasm_bindgen]
439427 pub fn show_seed ( & self ) -> String {
@@ -509,12 +497,6 @@ impl MutinyWallet {
509497 } )
510498 }
511499
512- /// Gets the current balance of the on-chain wallet.
513- #[ wasm_bindgen]
514- pub fn get_wallet_balance ( & self ) -> Result < u64 , MutinyJsError > {
515- Ok ( self . inner . node_manager . get_wallet_balance ( ) ?)
516- }
517-
518500 /// Creates a BIP 21 invoice. This creates a new address and a lightning invoice.
519501 /// The lightning invoice may return errors related to the LSP. Check the error and
520502 /// fallback to `get_new_address` and warn the user that Lightning is not available.
@@ -711,15 +693,6 @@ impl MutinyWallet {
711693 ) ?)
712694 }
713695
714- /// Lists all the on-chain transactions in the wallet.
715- /// These are sorted by confirmation time.
716- #[ wasm_bindgen]
717- pub fn list_onchain ( & self ) -> Result < JsValue /* Vec<TransactionDetails> */ , MutinyJsError > {
718- Ok ( JsValue :: from_serde (
719- & self . inner . node_manager . list_onchain ( ) ?,
720- ) ?)
721- }
722-
723696 /// Gets the details of a specific on-chain transaction.
724697 #[ wasm_bindgen]
725698 pub fn get_transaction (
0 commit comments