Bitcoin Forum
April 25, 2024, 05:17:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [Help] Programming Bitcoin Wallets in PHP /ASP.NET  (Read 3159 times)
metacodes (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 16, 2015, 08:58:09 AM
 #1

Hi and good day.

Today I just found that the source code for Bitcoin is open source, and I think the same too for making a wallet, as I saw somewhere on stack overflow where someone wanted to make his /her own wallet.

I am a developer in PHP / ASP.NET Hence I decided to ask how can I come about developing something like blockchains.info and coinbase where customers can log into my site and buy Bitcoin and the balance reflects immediately inside the customers account.

Since am a bit new to this, I decided to ask questions so as to know what I am really up against.

Kindly let me know.
1714065478
Hero Member
*
Offline Offline

Posts: 1714065478

View Profile Personal Message (Offline)

Ignore
1714065478
Reply with quote  #2

1714065478
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1862
Merit: 1308

Get your game girl


View Profile
October 16, 2015, 09:01:25 AM
 #2

One of the way I know is by downloading blockchain's bitcoin API which supports JSON for the incoming and ougoing transactions.However there are other ways too. For now check this : https://blockchain.info/api/blockchain_wallet_api
metacodes (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
October 16, 2015, 09:10:57 AM
 #3

Oh wait...

Without JSON? What if in the process where I would like to design software for some clients / Agents who Buy and sell Bitcoin. So that they can use my software in exchanging. You know, using SQL statements? Is this possible too?
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1862
Merit: 1308

Get your game girl


View Profile
October 16, 2015, 11:00:51 AM
 #4

https://bitcoin.org/en/developer-documentation There you go,This documentation has almost everything you need to know before starting .
Nicolas Dorier
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 17, 2015, 12:26:01 PM
 #5

Exactly what you need, I wrote it, along with the C# library :
Quote

Without throwing flower at myself, this is both the best lib and the best book you can get about bitcoin programming.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
October 17, 2015, 12:30:10 PM
 #6

Here, try this as a starting point:

http://synala.com/   -- or --  https://github.com/peterscott78/synala/

It's PHP based, and contains everything you need for a proper, secured BIP32 wallet.  Address generation, tx creation and signing, etc.  It also integrates with the offline signer which you can find at:

http://envrin.com/offline_signer  -- or --  https://github.com/peterscott78/offline_signer

Hope that helps!


madmadmax
Hero Member
*****
Offline Offline

Activity: 740
Merit: 501



View Profile
October 17, 2015, 01:20:09 PM
 #7

Exactly what you need, I wrote it, along with the C# library :
Quote

Without throwing flower at myself, this is both the best lib and the best book you can get about bitcoin programming.

People have been developing C# bitcoin libraries for a while now, the real question is why would you use C#? You would probably want to employ encrypted storage of wallets and use Javascript on the client side to manage his funds.

Perhaps you want to have a balance on your website and have customers being able to deposit, which would be a whole other issue.








       ▄▄▄▄▄               ▄▄▄▄▄
   ▄▄█▀▀▀▀▀▀██▄        ▄▄█▀▀▀▀▀▀▀█▄
 ▄██▀        ▀██▄    ▄██▀         ▀█▄
██▀            ▀██▄  ▀▀             ██
██               ▀██        ▄▄▄▄▄▄▄▄██
██                ▀██▄      ▀▀▀▀▀▀▀▀▀▀
 ██▄          ▄██   ▀██▄          ▄▄▄
  ▀██▄      ▄██▀      ▀██▄▄     ▄██▀
    ▀▀██████▀▀          ▀▀██████▀▀


Unchained Smart Contracts
Decentralized Oracle
Infinitly Scalable
Blockchain Technology
Turing-Complete
State-Channels



                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀

             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
f


Nicolas Dorier
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 17, 2015, 02:28:45 PM
 #8

Exactly what you need, I wrote it, along with the C# library :
Quote

Without throwing flower at myself, this is both the best lib and the best book you can get about bitcoin programming.

People have been developing C# bitcoin libraries for a while now, the real question is why would you use C#? You would probably want to employ encrypted storage of wallets and use Javascript on the client side to manage his funds.

Perhaps you want to have a balance on your website and have customers being able to deposit, which would be a whole other issue.

Because not everybody is developing client side wallet. The tip of the iceberg that the user see is less than 15% of the code which make any service run.
And NBitcoin is the only real library for Bitcoin the rest, BitcoinJ included are much less complete and tested.

But I would argue that C# is a good candidate for client wallet as well though, the code run on all plateform, without browser incompatibilities lurking around.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
October 17, 2015, 06:37:39 PM
 #9

But I would argue that C# is a good candidate for client wallet as well though, the code run on all plateform, without browser incompatibilities lurking around.

C# and LINUX don't get along very well.  That's why the core devs use Qt for Bitcoin Core client, because it is truly cross platform.
Nicolas Dorier
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 18, 2015, 03:31:23 AM
 #10

But I would argue that C# is a good candidate for client wallet as well though, the code run on all plateform, without browser incompatibilities lurking around.

C# and LINUX don't get along very well.  That's why the core devs use Qt for Bitcoin Core client, because it is truly cross platform.

C# and Linux works fine together (Mono), and getting better specially those days. (NETCore)
You can use NBitcoin on Linux, Mac, IOS, Android, Windows Phone, Windows and WinRT with the nuget package manager.

It is a fact though that people on Linux are not familiar with C#, which by itself is a good reason for them to stick to C++.
But if you know C#, then you can do cross plateform development easily and learning another language to do so does not make any economical sense.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
lontivero
Full Member
***
Offline Offline

Activity: 164
Merit: 126

Amazing times are coming


View Profile
October 18, 2015, 06:51:38 AM
 #11

But I would argue that C# is a good candidate for client wallet as well though, the code run on all plateform, without browser incompatibilities lurking around.

C# and LINUX don't get along very well.  That's why the core devs use Qt for Bitcoin Core client, because it is truly cross platform.


C# is a programming language like any other and that means you could write a compiler for it and generate java bytecode, machine code or assembler if you want. It is a language and has nothing to do with windows, linux or whatever. And yes, the .NET framework includes a c# compiler but in Linux you can use the c# compiler provided by Mono. In fact, every single time i finish a piece of code and test it in Linux it just works. Thats once more has nothing to do with c#, it is thanks the Mono team did an excellent work.
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
October 18, 2015, 09:07:52 AM
 #12


We're getting into semantics here.  C# is a Windows based language developed by Microsoft.  Yes, you can run C# code via Mono or Wine, but I'm not sure if running code via an emulator counts as cross-platform, since your average non-technical end user is going to have difficulty running that C# code on LINUX.

Languages such as Qt and Python on the other hand are truly cross platform, because you can compile it into binaries on each different OS from source, and it simply works straight out of the box regardless of OS.  Just download the archive for your OS, unpack, and run the executable.  No additional software or configuration needed.


Nicolas Dorier
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 18, 2015, 12:03:31 PM
 #13


We're getting into semantics here.  C# is a Windows based language developed by Microsoft.  Yes, you can run C# code via Mono or Wine, but I'm not sure if running code via an emulator counts as cross-platform, since your average non-technical end user is going to have difficulty running that C# code on LINUX.

Languages such as Qt and Python on the other hand are truly cross platform, because you can compile it into binaries on each different OS from source, and it simply works straight out of the box regardless of OS.  Just download the archive for your OS, unpack, and run the executable.  No additional software or configuration needed.

Actually this is not different to how java work. Even better ! With .NETCore microsoft will ship .NET CLR with the app, so no install is required. (.NETCORE is competitor of mono developed by Microsoft)

Quote
Languages such as Qt and Python on the other hand are truly cross platform, because you can compile it into binaries on each different OS from source, and it simply works straight out of the box regardless of OS.  Just download the archive for your OS, unpack, and run the executable.  No additional software or configuration needed.

Really ? you don't need to install Python nor QT runtime libs ?
And as I said, .NETCore will also work without install, this is hot stuff in the .NET world these days, the .NET community is very bullish. (was not like that 2 or 3 years ago)

Even better than that, with .NETCore open sourced, you'll see soon more micro controller .NET enabled. (was already the case with gadgeteer and netduino, but these were house-made VM)

Well, I guess there is no interest to learn about .NET if you already know well how to use another hammer, but .NET works on lots of nail so you are not required either to change it for another plateform.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
October 18, 2015, 01:05:27 PM
 #14

Really ? you don't need to install Python nor QT runtime libs ?

Nope.  What happens in you setup VMs with each desired OS, then compile it from source on each OS.  For both, Python and Qt it will generate an executable binary, with all necessary dependencies / libraries for that OS.  There's absolutely no additional software / configuration / dependencies required, and it will work straight out of the box.  Once compiled, I can setup another VM with a fresh install of whatever OS with no development tools / libs on it, and it'll work perfectly.

Anyway, I'm not here to argue.  If you like C#, then great, stick with it. Smiley  If you want to distribute a desktop app and want it truly cross platform, there are better options than C#.
Nicolas Dorier
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 18, 2015, 01:32:02 PM
 #15

Really ? you don't need to install Python nor QT runtime libs ?

Nope.  What happens in you setup VMs with each desired OS, then compile it from source on each OS.  For both, Python and Qt it will generate an executable binary, with all necessary dependencies / libraries for that OS.  There's absolutely no additional software / configuration / dependencies required, and it will work straight out of the box.  Once compiled, I can setup another VM with a fresh install of whatever OS with no development tools / libs on it, and it'll work perfectly.

Anyway, I'm not here to argue.  If you like C#, then great, stick with it. Smiley  If you want to distribute a desktop app and want it truly cross platform, there are better options than C#.

So you mean the python VM is inside the exec ? Not just an installer which has python shipped inside ?

We should have that in .NET too very soon though piloted by MS. (already out, but not production ready)

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
October 18, 2015, 03:31:07 PM
 #16

No, other way around.  The executable / binary is inside the VM.  For example, my offline signer is a Python app at:

https://github.com/peterscott78/offline_signer/

Go into the /bin/ directory, and there's binaries available for Windows and LINUX 32/64 bit.  Just download it to any computer without Python, OpenSSL or anything else installed, and it will still work just fine.  All you need is that archive.

Same goes for Qt, as I have a development IDE developed in it.  Or for another example, Bitcoin Core is developed in Qt, and works great on any OS right out of the box.
tzpardi
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
October 25, 2015, 04:55:10 PM
 #17

I agree with the suggestion of using the NBitcoin library. Their Github repo is very active and well maintained. NBitcoin implements pretty much all functionalities of what you need.
Misiak4
Member
**
Offline Offline

Activity: 183
Merit: 12

ImmVRse | Disrupting the VR industry


View Profile
October 26, 2015, 02:15:41 AM
 #18

Few days ago I found blocktrail.com API has a lot of "samples" on GITHUB.

Ready to go webwallet: https://github.com/blocktrail/blocktrail-webwallet

Mobile wallet: https://github.com/blocktrail/blocktrail-wallet

And as you can see in their github account there are a lot of other examples...

Hope it helps.

jakelyson
Legendary
*
Offline Offline

Activity: 2170
Merit: 1069


View Profile
October 27, 2015, 04:46:00 AM
 #19

This is a good thread and excellent replies. I am also a trying hard programmer who wants to learn more about bitcoin development. I saw some good documentations from the replies in this thread. I will try to learn thru those. Thanks for starting this.
tommorisonwebdesign
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
October 30, 2015, 12:54:40 AM
 #20

This is a good thread and excellent replies. I am also a trying hard programmer who wants to learn more about bitcoin development. I saw some good documentations from the replies in this thread. I will try to learn thru those. Thanks for starting this.

I agree I am learning a lot more every day the more I spend here. I appreciate the knowledge I get here and while I can not always comment on what's being discussed, I still learn. I am hoping to be able to one day in a few years land myself a job at a software development company without having to go to school and the posted guides are excellent resources.

Signatures? How about learning a skill... I don't care either way. Everybody has to make a living somehow.
Pages: [1] 2 »  All
  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!