Bitcoin Forum
May 09, 2024, 02:09:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Developing a Simple Bitcoin Wallet  (Read 201 times)
karlosicolombia (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
September 05, 2020, 09:03:38 AM
 #1

Hey guys!

I didn't find anything on this during my search through the forums (Please refer me to the thread if there is one on the subject) but I'm planning to develop a (simple) Bitcoin Wallet for my final project of year 3 on my Engineering studies. My background as a programmer is Python, JS and basic Java as well as some SQL. I've been into the Bitcoin space for about 4 years now and I want to work in the field after my studies, therefore I want to start doing a bit heavier projects directing me into the Bitcoin workspace. As there still is quite some time until this project would start I would like to give myself a good start and a lot of time for preliminary research as it probably will be at the top of my current skill-level.

My starting view of the building of the wallet is that simplified a Bitcoin Wallet is "only" an interface that contains various functions to manage addresses, private keys and fetching information for the interface through a node.

Where would you start? If there is someone who has built a Bitcoin Wallet themselves I would greatly appreciate a discussion.

I'm grateful for anything that would help,

Karlos
1715220591
Hero Member
*
Offline Offline

Posts: 1715220591

View Profile Personal Message (Offline)

Ignore
1715220591
Reply with quote  #2

1715220591
Report to moderator
1715220591
Hero Member
*
Offline Offline

Posts: 1715220591

View Profile Personal Message (Offline)

Ignore
1715220591
Reply with quote  #2

1715220591
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715220591
Hero Member
*
Offline Offline

Posts: 1715220591

View Profile Personal Message (Offline)

Ignore
1715220591
Reply with quote  #2

1715220591
Report to moderator
1715220591
Hero Member
*
Offline Offline

Posts: 1715220591

View Profile Personal Message (Offline)

Ignore
1715220591
Reply with quote  #2

1715220591
Report to moderator
1715220591
Hero Member
*
Offline Offline

Posts: 1715220591

View Profile Personal Message (Offline)

Ignore
1715220591
Reply with quote  #2

1715220591
Report to moderator
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
September 05, 2020, 10:04:53 AM
 #2

It's hard to say mainly since a bitcoin wallet is security sensitive since it deals with users funds.
I think the easiest way is to decide the type of client you want to create then start going through the source code of similar projects and check their different parts to get the idea. Then start your own work.
You could check out bitcoin.org to get a list of wallets categorized based on their type and features they offer with all their links.
But I like to categorize them this way:

1. A full node.
This would be something like Armory for instance where you build your wallet which could be additional functionality and more advanced UI on top of bitcoin core. A lot of the basic functionalities are already accessible though core's JSON RPC including signing transactions, handling keys, scripts,...
This would probably be easiest to create (less work and knowledge of protocol required) but has only niche usages since it is a full node.
Armory (link found on bitcoin.org).
Bitcoin core. There are lots of good information including RPC commands on [https://developer.bitcoin.org/index.html]developers documentation[/url]

2. SPV client
This requires more knowledge of Bitcoin protocol and the amount of code to write will be a lot more compared to #1 because you'll have to handle everything from key generation and transaction signing to a communication protocol that the wallet has to use.
You'll also have to be familiar with the attack vectors against SPV clients since they do less verification compared to a full node.
I categorize them into two sub groups:
2.A. SPV using bloom filters
This is a bit more decentralized and provides better privacy compared to the other type but it takes more effort and bad implementation of it could lead to privacy leaks.
BitcoinJ library (written in Java) and some of the SPV wallets that use it are using this method.
2.B. SPV using Electrum protocol
This provides less privacy but it is probably easier to work with and is slightly faster. Basically the client connects to an Electrum node that has an indexed blockchain and looks up its history and also opens a socket listening for new incoming blocks or transactions for the addresses it subscribes to.
Electrum (written in Python) is the implementation.


PS. Platform could also be a determining factor, for instance you'll have more restrictions working on a phone compared to PC.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
September 06, 2020, 05:06:10 AM
 #3

It depends on how simple you want to make it. The simplest wallet just holds private keys and displays their addresses.

You might want to extend the functionality, but each step will take increasingly more effort.

1. Make it an HD wallet.
2. Give it the ability to sign transactions.
3. Connect it to the Bitcoin network so that it can monitor balances and publish transactions.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7490


Crypto Swap Exchange


View Profile
September 06, 2020, 11:01:18 AM
Merited by Coding Enthusiast (2)
 #4

2.A. SPV using bloom filters
This is a bit more decentralized and provides better privacy compared to the other type but it takes more effort and bad implementation of it could lead to privacy leaks.
BitcoinJ library (written in Java) and some of the SPV wallets that use it are using this method.

Bloom filter is practically useless to protect privacy, using Electrum protocol (if privacy isn't the main target) or using Neutrino (BIP 157) are better option.
Few LN wallet uses Neutrino, but the only non-LN wallet using Neutrino that i know is Wasabi Wallet

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
September 08, 2020, 06:23:28 AM
 #5

Bloom filter is practically useless to protect privacy, using Electrum protocol (if privacy isn't the main target) or using Neutrino (BIP 157) are better option.
Few LN wallet uses Neutrino, but the only non-LN wallet using Neutrino that i know is Wasabi Wallet

Good point, although when I'm talking about bloom filters I have general meaning in mind (the space-efficient probabilistic data structure used to tell if an element is present in a set in a rapid and memory-efficient way)  rather than the BIP-37.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
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!