Bitcoin Forum

Bitcoin => Electrum => Topic started by: hugeblack on May 28, 2020, 01:02:59 PM



Title: connect your Electrum wallet directly to your Bitcoin full node
Post by: hugeblack on May 28, 2020, 01:02:59 PM
The plugin is still under development, it can be buggy. Not recommended for newbies. It is better to keep it away from your private keys. use it with test-net version.

Features over electrum personal server:

 - more modern HTTP REST API ----> https://github.com/shesek/bwt#http-api
 - supporting RPC protocol
 - integrated Electrum server (no need for external Electrum server)

If you do not have enough storage space you can use it with prune mode but with a few features such as:

 - no history before importing the addresses
 - You may be able to view some history in future releases*.

Download & instructions ---> https://github.com/shesek/bwt#electrum-plugin

Read more and source ----> https://www.reddit.com/r/Bitcoin/comments/grlpbm/you_can_now_connect_your_electrum_wallet_directly/


*
Quote
In a future release, showing some partial history (only of transactions that still have unspent outputs) could be possible with scantxoutset. See this ticket on the EPS tracker for more details:


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: Husna QA on May 29, 2020, 06:20:53 PM
At the moment, I don't want to use this plugin entirely, just wondering how it works. I got a message like this when I started:
ERROR bwt>> no available authentication for bitcoind rpc, please specify credentials or cookie file.
How to fix it?

https://talkimg.com/images/2023/05/17/blob937ae2e8e5d98770.png



Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: TryNinja on May 29, 2020, 06:24:58 PM
At the moment, I don't want to use this plugin entirely, just wondering how it works. I got a message like this when I started:
ERROR bwt>> no available authentication for bitcoind rpc, please specify credentials or cookie file.
How to fix it?
Did you enable the RPC server in the bitcoin.conf file (server=1)? It should be in your Bitcoin Core directory (or Settings -> Options -> Open Configuration File).


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: Husna QA on May 29, 2020, 07:37:37 PM
Did you enable the RPC server in the bitcoin.conf file (server=1)?
Where is the bitcoin.conf file located on Electrum? Or how to edit it on Electrum? Was it made through the console?

It should be in your Bitcoin Core directory (or Settings -> Options -> Open Configuration File).
Yes, the bitcoin.conf file in the Bitcoin core, server = 1


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: TryNinja on May 29, 2020, 07:52:09 PM
Where is the bitcoin.conf file located on Electrum? Or how to edit it on Electrum? Was it made through the console?
This is Bitcoin Core's config file, it has nothing to do with Electrum.

Yes, the bitcoin.conf file in the Bitcoin core, server = 1
Did you restart Core? I just enabled it for a different software and it created a .cookie file in my Core directory. See if you find this file there. If you do, maybe you are not using the right path on bwt?

I installed Core in a different drive than my OS and those files could be found in the AppData related to that drive, which in my case is different from the OS' default (E:\Users\username\AppData\Roaming\Bitcoin VS C:\Users\username\AppData\Roaming\Bitcoin), so make sure you are looking at the right place.


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: Husna QA on May 29, 2020, 08:33:54 PM
Did you restart Core? I just enabled it for a different software and it created a .cookie file in my Core directory.
How to create a .cookie file on Bitcoin Core?
I place the bitcoin blockchain file on a separate drive that can be accessed via the Bitcoin core on macOS and Windows OS (virtual machines). If it's already created, the .cookie file should be in that directory, correct?


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: TryNinja on May 29, 2020, 08:39:13 PM
How to create a .cookie file on Bitcoin Core?
I place the bitcoin blockchain file on a separate drive that can be accessed via the Bitcoin core on macOS and Windows OS (virtual machines). If it's already created, the .cookie file should be in that directory, correct?
When you enable RPC (without a password), it creates the file automatically. You need to open Core, Settings -> Options -> Open configuration file. It will open your bitcoin.conf, which Core is using. See in which directory this .conf file is. In the same directory, you will see the .cookie file if you already enabled RPC and restarted Core. Get that same directory and use it on the "Directory" field on bwt.


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: Husna QA on May 30, 2020, 05:42:57 AM
You need to open Core, Settings -> Options -> Open configuration file. It will open your bitcoin.conf, which Core is using.
I already know the location of the bitcoin.conf file. I once edited the file when I tried to create a legacy address (P2PKH) on Bitcoin Core
(https://bitcointalk.org/index.php?topic=5196950.msg53531187%20#post_point8 (https://bitcointalk.org/index.php?topic=5196950.msg53531187%20#post_point8))
But at that time I had never seen a .cookie file in the same directory as the bitcoin.conf file.

When you enable RPC (without a password), it creates the file automatically. -snip-
In the same directory, you will see the .cookie file if you already enabled RPC and restarted Core.
I tried removing the password on RPC and restarted Bitcoin Core. I saw the .cookie file created automatically in that folder.
The .cookie file disappears when Bitcoin Core is closed. It's like a temporary file.

https://talkimg.com/images/2023/05/17/blob0ca53ba5dcfa2bb5.png

Get that same directory and use it on the "Directory" field on bwt.
I have changed the directory and get the following error message when running Electrum (bwt) with Bitcoin Core at the same time.

https://talkimg.com/images/2023/05/17/blob0078498561e44f04.png



Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: ABCbits on May 30, 2020, 06:36:23 AM
When you enable RPC (without a password), it creates the file automatically. -snip-
In the same directory, you will see the .cookie file if you already enabled RPC and restarted Core.
I tried removing the password on RPC and restarted Bitcoin Core. I saw the .cookie file created automatically in that folder.
The .cookie file disappears when Bitcoin Core is closed. It's like a temporary file.

https://i.imgur.com/9GnOFjT.png

Get that same directory and use it on the "Directory" field on bwt.
I have changed the directory and get the following error message when running Electrum (bwt) with Bitcoin Core at the same time.

https://i.imgur.com/RcpyK2e.png

Default RPC port is 8332 (mainnet) or 18332 (testnet), you either must :
1. Edit bitcoin.conf to use port 18843

Quote
rpcport=18843

2. Change RPC url (on Electrum) to use default RPC port


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: shesek on May 30, 2020, 07:41:55 AM
I have changed the directory and get the following error message when running Electrum (bwt) with Bitcoin Core at the same time.

https://i.imgur.com/RcpyK2e.png

18443 is the default rpc port for regtest, are you on regtest?

Are you able to access the RPC port by other means? You can try opening http://localhost:18443/ in your browser. If this works, you should see `JSONRPC server handles only POST requests`.


Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: Husna QA on June 01, 2020, 05:34:26 AM
-snip-
Thank you, it works.
I add the RPC port to the bitcoin.conf file

Code:
server=1
rpcuser=Husna QA
rpcpassword=
rpcport=8332

and changed the RPC URL on Electrum (http://localhost:8332/)

https://talkimg.com/images/2023/05/17/blobf6ce5c3f1e93235c.png

-snip-
The first time I used the BWT plugin, the port was there automatically. I didn't know this was for Regtest.



Title: Re: connect your Electrum wallet directly to your Bitcoin full node
Post by: shesek on June 05, 2020, 11:50:06 AM
The first time I used the BWT plugin, the port was there automatically. I didn't know this was for Regtest.

That's strange, it should've used the appropriate port according to the network reported by Electrum.

But glad to hear you managed to get it working!


Title: No watch-only hd wallets found.
Post by: Geremia on February 25, 2021, 05:47:26 PM
When clicking the "Connect to bitcoind" button, I get:
Code:
No watch-only hd wallets found. Note that bwt cannot currently be used with hot wallets. See the README for more details.
I ran
Code:
createwallet "watch_only" true true
in Bitcoin Core terminal.