Bitcoin Forum
May 08, 2024, 05:40:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SPV wallet for accepting BTC on a website  (Read 300 times)
bjones1 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 5


View Profile
October 17, 2018, 09:34:58 PM
Merited by ABCbits (1)
 #1

So, I'm building a website, but I don't want to use full bitcoin core. Is there any SPV wallet with RPC interface, so I can accept payments using it?
Through use of the RPC I must be able to generate new addresses, and monitor the balance of funds received at each address.

The following wallets are not acceptable:
  • bitcoind - downloads the full block chain which is not acceptable in a testing/development environment
  • electrum - does not have a working rpc, all rpc calls result in "Method xyz not available"
  • https://github.com/coinspark/sparkbit - mvn install reports that its dependencies no longer exist
  • https://github.com/bcoin-org/bcoin - after compiling, nodejs reports a syntax error when first starting bcoin
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715190039
Hero Member
*
Offline Offline

Posts: 1715190039

View Profile Personal Message (Offline)

Ignore
1715190039
Reply with quote  #2

1715190039
Report to moderator
1715190039
Hero Member
*
Offline Offline

Posts: 1715190039

View Profile Personal Message (Offline)

Ignore
1715190039
Reply with quote  #2

1715190039
Report to moderator
1715190039
Hero Member
*
Offline Offline

Posts: 1715190039

View Profile Personal Message (Offline)

Ignore
1715190039
Reply with quote  #2

1715190039
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
October 17, 2018, 10:02:01 PM
 #2

Haha, all electrum versions between 2.8.x and 3.0.5 have a working rpc (don't use them though) Grin.

Why can't you use the client's machine to run calls to a block explorer and leave your public key on the server with your addresses generated with it (you can then move these funds on a separate server to a cold storage wallet or leave them there if the private keys won't touch the internet)...

As far as I know, most people don't actually use the rpc calls on their wallets directly and instead use watching only clients and block explorers (or bitcoin core with a limit to the size of the blockchain that's downloaded however I have forgotton the name of them)....
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10555



View Profile
October 18, 2018, 03:51:53 AM
 #3

Why can't you use the client's machine to run calls to a block explorer ~

using a block explorer is not as safe as using an SPV wallet and it is nowhere near as safe as using a full node. you lose a lot of security as you move away from a full node to an SPV node and then you lose it all when you rely on a third party centralized website called a block explorer.

an example problem that you can face is the recent vulnerability that was found in bitcoin core. if you run a full node you will be aware of it and will act accordingly, if you use an SPV node you still can connect to nodes that have the  correct version and avoid the old vulnerable ones and be safer but when you use a block explorer you can not do anything. in this case you can obviously see that blockchain.info, blockcypher, and a lot of others are still vulnerable as they have not yet upgraded their system and the exploit was tested on the testnet which they accepted as valid!!!

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 18, 2018, 07:10:53 AM
 #4

The following wallets are not acceptable:
  • bitcoind - downloads the full block chain which is not acceptable in a testing/development environment
  • electrum - does not have a working rpc, all rpc calls result in "Method xyz not available"
  • ...

Both, core/bitcoind and electrum are the best solutions to accept BTC on your website.

Core needs less than 200GB. In the current times where storage is cheap as hell, this shouldn't be any problem at all.
Even if you don't have this spare storage, you still have the ability to use a pruned node. This will limit the size according to your requirements (e.g. 1 GB).

Electrum should perfectly work too if you build a bit around it. If you see 'method xyz not available', you entered something invalid. Check the documentation.


Since you seem to exclude the best options, why not simply going for a 3rd party service provider ?
There are multiple available which handle everything for your (addresses, payment requests, your BTC, ... ).

bjones1 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 5


View Profile
October 29, 2018, 05:56:29 PM
 #5

Yeah it turns out that I had to use daemon mode on electrum and that would only work on linux, but even then the API is not compatible with bitcoind.  It sucks for me having to download the full testnet blockchain, but those who use my software will be the ones to truly suffer a bad bandwidth bill, assuming a bitcoind compatible lite client is not developed by then.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 30, 2018, 09:09:58 AM
 #6

Yeah it turns out that I had to use daemon mode on electrum and that would only work on linux, but even then the API is not compatible with bitcoind. 

Of course the API is not 'compatible'.

You are talking about 2 completely different softwares. Electrum has a completely different set of methods available (which can be checked in their documentation).



It sucks for me having to download the full testnet blockchain, but those who use my software will be the ones to truly suffer a bad bandwidth bill, assuming a bitcoind compatible lite client is not developed by then.

The testnet blockchain is at about 14 GB currently. That's about 1 hour downloading with moderate internet speed. Should definitely be doable if you want to develop something..

Most countries don't have any 'bandwith bills' anymore. At least in my country (and all surrounding ones), you get as much download volume as you want with a moderate speed for a few dollar per month.

Also, why should your customer need to use a lot of bandwith to use your service? This doesn't make sense.


You can be sure that there won't be any 'bitcoind compatible' lightweight client 'by then'. Noone needs that. It is not being developed currently.

tarball
Jr. Member
*
Offline Offline

Activity: 98
Merit: 5


View Profile
November 02, 2018, 02:27:49 AM
 #7

The following wallets are not acceptable:
  • bitcoind - downloads the full block chain which is not acceptable in a testing/development environment
  • electrum - does not have a working rpc, all rpc calls result in "Method xyz not available"
  • ...

Both, core/bitcoind and electrum are the best solutions to accept BTC on your website.

Core needs less than 200GB. In the current times where storage is cheap as hell, this shouldn't be any problem at all.
Even if you don't have this spare storage, you still have the ability to use a pruned node. This will limit the size according to your requirements (e.g. 1 GB).

Sorry to break it to you, but bitcoin core requires more than 200GB (221,39GB at the time of writing according to https://bitinfocharts.com/bitcoin/).
But agreed. Storage is currently very cheap so an extra 20GB will not matter at all.

Thanks for reading my post.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10555



View Profile
November 02, 2018, 04:22:08 AM
 #8

The following wallets are not acceptable:
  • bitcoind - downloads the full block chain which is not acceptable in a testing/development environment
  • electrum - does not have a working rpc, all rpc calls result in "Method xyz not available"
  • ...

Both, core/bitcoind and electrum are the best solutions to accept BTC on your website.

Core needs less than 200GB. In the current times where storage is cheap as hell, this shouldn't be any problem at all.
Even if you don't have this spare storage, you still have the ability to use a pruned node. This will limit the size according to your requirements (e.g. 1 GB).

Sorry to break it to you, but bitcoin core requires more than 200GB (221,39GB at the time of writing according to https://bitinfocharts.com/bitcoin/).
But agreed. Storage is currently very cheap so an extra 20GB will not matter at all.

when talking about this you should not only consider one aspect (storage) you should consider all the factors. for instance in this case it is not about storage alone, it is about the benefits of running a full node. as it was mentioned earlier this benefit is about security and the fact that you won't rely on anybody else (a third party) to be honest and give you good information.
for instance an exchange service can not rely on a third party! there is too much money at stake and there will be a lot of attack vectors that way.

so the first thing to consider is how much security is important to you based on how much money you are receiving. for example if the site OP creates is selling items that are worth less than $10 and does not have that many customers per day then using a third party or running an SPV node is fine.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
tarball
Jr. Member
*
Offline Offline

Activity: 98
Merit: 5


View Profile
November 02, 2018, 05:30:28 AM
 #9

The following wallets are not acceptable:
  • bitcoind - downloads the full block chain which is not acceptable in a testing/development environment
  • electrum - does not have a working rpc, all rpc calls result in "Method xyz not available"
  • ...

Both, core/bitcoind and electrum are the best solutions to accept BTC on your website.

Core needs less than 200GB. In the current times where storage is cheap as hell, this shouldn't be any problem at all.
Even if you don't have this spare storage, you still have the ability to use a pruned node. This will limit the size according to your requirements (e.g. 1 GB).

Sorry to break it to you, but bitcoin core requires more than 200GB (221,39GB at the time of writing according to https://bitinfocharts.com/bitcoin/).
But agreed. Storage is currently very cheap so an extra 20GB will not matter at all.

when talking about this you should not only consider one aspect (storage) you should consider all the factors. for instance in this case it is not about storage alone, it is about the benefits of running a full node. as it was mentioned earlier this benefit is about security and the fact that you won't rely on anybody else (a third party) to be honest and give you good information.
for instance an exchange service can not rely on a third party! there is too much money at stake and there will be a lot of attack vectors that way.

so the first thing to consider is how much security is important to you based on how much money you are receiving. for example if the site OP creates is selling items that are worth less than $10 and does not have that many customers per day then using a third party or running an SPV node is fine.

Yeah, it's not like you'd want to trust a third party to figure whether the few hundred dollar payments have gone through or not. But for small payments it's fine to do so.

Thanks for reading my post.
bjones1 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 5


View Profile
June 10, 2021, 11:13:10 PM
Merited by LoyceV (4)
 #10

Yeah it turns out that I had to use daemon mode on electrum and that would only work on linux, but even then the API is not compatible with bitcoind. 

Of course the API is not 'compatible'.

You are talking about 2 completely different softwares. Electrum has a completely different set of methods available (which can be checked in their documentation).

That they have a completely different set of methods available through the external API is the whole problem, why would I assume that a software developer would CHOOSE to implement a new API instead of using the pre-existing API?



It sucks for me having to download the full testnet blockchain, but those who use my software will be the ones to truly suffer a bad bandwidth bill, assuming a bitcoind compatible lite client is not developed by then.

The testnet blockchain is at about 14 GB currently. That's about 1 hour downloading with moderate internet speed. Should definitely be doable if you want to develop something..

Most countries don't have any 'bandwith bills' anymore. At least in my country (and all surrounding ones), you get as much download volume as you want with a moderate speed for a few dollar per month.

I live in the USA, free internet is unheard of in my area, with the exception of low bandwidth library/cafe hotspots.  I can not possibly get internet access without a limit of a "few" gigabytes per month.  Since bitcoind currently requires about 130GB per month, for me bitcoind would currently cost 26 USD/month on internet bandwidth, in addition to electricity and air conditioning bills spent on block chain mining.

26 USD per month is far from "free".

Also, why should your customer need to use a lot of bandwith to use your service? This doesn't make sense.

It is not an online "service" it is "software" which integrates with the bitcoind API for transaction automation.



You can be sure that there won't be any 'bitcoind compatible' lightweight client 'by then'. Noone needs that. It is not being developed currently.

Why not?

Anyone who needs to automate bitcoin transactions MUST use the bitcoind API or redevelop bitcoind from scratch... your assertions are implausible.

I ended up just wasting my time implementing both APIs, and have not worked on it since.  Good riddance.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7358


Farewell, Leo


View Profile
June 11, 2021, 02:35:51 PM
 #11

There are two ways of accessing the block chain.
  • Verifying the blocks from your computer.
  • Trusting others from verifying the blocks from their computer.

There isn't any other choice obviously; the first one provides you better security and privacy while the second one is much cheaper. May I ask why you don't run a pruned node?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6730


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 11, 2021, 06:22:05 PM
 #12

You can always install BTCPay server from scratch (without using the Docker container since that'll just run bitcoind locally), but then pass command-line arguments to the NBXplorer software that comes with it that to tell it to connect to someone else's full node:
--btcnodeendpoint=123.45.67.89:12345.

You can get a list of bitcoin nodes sorted by uptime from BitNodes. Just choose the one that's been up for at least several weeks.

This is not going to send your received funds to the other node's wallet though, because BTCPay uses an xpub that you provide to generate all its receiving addresses. The xpub can come from anywhere, including your own cold storage.

Suddenly, you don't have to pay for hosting a bitcoind node anymore or worry about bandwidth problems.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10555



View Profile
June 12, 2021, 04:29:32 AM
 #13

There are two ways of accessing the block chain.
  • Verifying the blocks from your computer.
  • Trusting others from verifying the blocks from their computer.
This is too simplified to the point that it is ignoring all the things in between.
For example if you use a custodial wallet/payment processor or even a web wallet like blockchain.info you are trusting another node to verify everything, when you use Electrum you are also doing the same thing but the difference is massive! There are also server dependent wallets that run on your own computer and are in full control of the keys but they can only connect to a single centralized server and nothing else.

You see not running a full node doesn't mean there isn't anything to verify, that is why SPV stands for "simplified verification".
For example in SPV design you can verify proof of work, connect to multiple nodes to check for chain splits/stale blocks, ask for bloom filters to make sure a certain transaction is found in that block, validate scripts and signatures of transactions that you want,...

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16620


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
June 12, 2021, 09:52:43 AM
 #14

Since bitcoind currently requires about 130GB per month
If you don't allow incoming connections, it's closer to 1 GB per week (after the initial 400 GB download).

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!