Author

Topic: Possible to write C offline wallet? (Read 179 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
December 17, 2017, 11:22:31 AM
#3
The bitcoin consensus rules are language agnostic. You can use whatever language you want, it doesn't have to be C++ (which is what Bitcoin Core, the reference client, uses).

It is certainly possible to write a bitcoin wallet in C. As for how, you will need to figure that out yourself. Keep in mind that if you can't figure it out or are unsure about anything, you probably shouldn't be making a wallet as the code that you make without understanding everything may be more insecure than the code written in an open source project that has been reviewed and audited by many people.
legendary
Activity: 1624
Merit: 2481
December 17, 2017, 04:33:31 AM
#2
So before I move on with my idea I'd like to find out if it is possible to write a bitcoin wallet, at least the private key generating part, in C.

Of course. There is no reason why this shouldn't be doable in C. I guess you are planning to use libaries instead of doing this from scratch.
You can use LIBBTC (https://github.com/libbtc/libbtc). But make sure how generation is exactly handled and how entropy is gathered.
And if you want to store larger amounts on your selfwritten wallet, make sure to catch any exceptions and create a testing environment to make sure it works properly in every case.
fk1
full member
Activity: 216
Merit: 100
December 17, 2017, 03:51:08 AM
#1
Hey guys,

I just had a nice idea for an offline hardware wallet but I am not sure if this is possible to do so. I googled some time today but I cant answer my own questions. so lets see:

I need to write my code with old C language. afaik bitcoin is written in c++. I cant find good tutorials except one for how to write an own bitcoin wallet. this tutorial is made with c#.

So before I move on with my idea I'd like to find out if it is possible to write a bitcoin wallet, at least the private key generating part, in C.

anybody?
Jump to: