Bitcoin Forum
May 07, 2024, 08:41:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Blockchain.info like self-hosted API written in PHP+Codeigniter  (Read 3297 times)
skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
July 01, 2014, 08:50:07 AM
Last edit: September 16, 2014, 08:25:04 AM by skyzer
 #1

Hey, we at easybitz.com have released API as opensource made in PHP + Codeigniter.

The code for the API server is here https://github.com/goethewins/EzBitcoin-Api-Wallet

It is running on bitcoind, you can find documentation on github.
It has mysql/postgresql database on backend for storing all created addresses, transactions and balances.
We used same URI paths as blockchain.info's blockchain wallet api. so if you r dependent now on blockchain.info's then all you have to do is install our API and change the domain name and the API calls will be working straight away.

Also we did the invoicing system for receiving payments like blockchain's receive payment api.
I'm happy to answer all your questions, also I have already answered couple of them if you read this topic.
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715071273
Hero Member
*
Offline Offline

Posts: 1715071273

View Profile Personal Message (Offline)

Ignore
1715071273
Reply with quote  #2

1715071273
Report to moderator
1715071273
Hero Member
*
Offline Offline

Posts: 1715071273

View Profile Personal Message (Offline)

Ignore
1715071273
Reply with quote  #2

1715071273
Report to moderator
rarkenin
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500



View Profile
July 01, 2014, 12:15:12 PM
 #2

Which blockchain API? The receive payments one? Wallet API? Wallet JSON-RPC API? Data API? Simple query API? Websocket? Stock tickers?
skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
July 01, 2014, 12:52:31 PM
 #3

I meant Receive Payments and Blockchain Wallet API
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 01, 2014, 05:56:18 PM
 #4


Did u try installing https://github.com/blockchain/ ? AFAIK this is the source code of BlockChain.info Smiley

btc_enigma
Hero Member
*****
Offline Offline

Activity: 688
Merit: 565


View Profile
July 18, 2014, 01:43:22 PM
 #5

Where is your wallet ? Do you plan to use the wallet provided by bitcoind ? Is there something that bitcoind RPC is missing  that you require

skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
September 05, 2014, 02:32:04 AM
 #6

Hey, we have released it as opensource made in PHP + codeigniter. We are finishing our payment processor + POS and going to release that service soon
The code for the API server is here https://github.com/goethewins/EzBitcoin-Api-Wallet
It is running on bitcoind, you can find documentation on github.
It has mysql/postgresql database on backend for storing all created addresses, transactions and balances.
We used same URI paths as blockchain.info's blockchain wallet api. so if you r dependent now on blockchain.info's then all you have to do is install our API and change the domain name and the API calls will be working straight away.
Also we did the invoicing system for receiving payments like blockchain's receive payment api
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
September 13, 2014, 10:33:43 PM
 #7

Hey, we have released it as opensource made in PHP + codeigniter. We are finishing our payment processor + POS and going to release that service soon
The code for the API server is here https://github.com/goethewins/EzBitcoin-Api-Wallet
It is running on bitcoind, you can find documentation on github.
It has mysql/postgresql database on backend for storing all created addresses, transactions and balances.
We used same URI paths as blockchain.info's blockchain wallet api. so if you r dependent now on blockchain.info's then all you have to do is install our API and change the domain name and the API calls will be working straight away.
Also we did the invoicing system for receiving payments like blockchain's receive payment api

This would be a very useful project in the long run. I appreciate your work. Is https://github.com/goethewins/EzBitcoin-Api-Wallet/tree/master/wallet equivalent to https://blockchain.info/api/api_send ?

Moreover, a demo link, where your project is running, added to the github repo would be great.

skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
September 13, 2014, 10:58:41 PM
 #8

Hey, we have released it as opensource made in PHP + codeigniter. We are finishing our payment processor + POS and going to release that service soon
The code for the API server is here https://github.com/goethewins/EzBitcoin-Api-Wallet
It is running on bitcoind, you can find documentation on github.
It has mysql/postgresql database on backend for storing all created addresses, transactions and balances.
We used same URI paths as blockchain.info's blockchain wallet api. so if you r dependent now on blockchain.info's then all you have to do is install our API and change the domain name and the API calls will be working straight away.
Also we did the invoicing system for receiving payments like blockchain's receive payment api

This would be a very useful project in the long run. I appreciate your work. Is https://github.com/goethewins/EzBitcoin-Api-Wallet/tree/master/wallet equivalent to https://blockchain.info/api/api_send ?

Moreover, a demo link, where your project is running, added to the github repo would be great.
hey,
we don't have a demo for that, you can install it yourself it easily. this was the idea that you can host on your own same kind of API like blockchain.info so you are not dependent on any third party provider. you can find the documentation in the github. it is neatly split up how to install environment, bitcoind and the project itself.

answering your question, the wallet folder you pointed is actually unfinished demo app that used our built API. without it the API still works seamlessly, because API is not dependent on the wallet.
the blockchain.info api_send is in the api.php file https://github.com/goethewins/EzBitcoin-Api-Wallet/blob/master/applications/api/controllers/api.php
more exactly public function receive() method, which starts from line 611.
when payment is received the bitcoind shoots the txid to method public function callback() which starts from line 335. And there it does the same thing as blockchain.info - shoots the response to the provided callback url.

next week we are going to announce the release of our payment processor and also mention this open source API for bitcoin.
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
September 14, 2014, 02:05:11 PM
 #9

Hey, we have released it as opensource made in PHP + codeigniter. We are finishing our payment processor + POS and going to release that service soon
The code for the API server is here https://github.com/goethewins/EzBitcoin-Api-Wallet
It is running on bitcoind, you can find documentation on github.
It has mysql/postgresql database on backend for storing all created addresses, transactions and balances.
We used same URI paths as blockchain.info's blockchain wallet api. so if you r dependent now on blockchain.info's then all you have to do is install our API and change the domain name and the API calls will be working straight away.
Also we did the invoicing system for receiving payments like blockchain's receive payment api

This would be a very useful project in the long run. I appreciate your work. Is https://github.com/goethewins/EzBitcoin-Api-Wallet/tree/master/wallet equivalent to https://blockchain.info/api/api_send ?

Moreover, a demo link, where your project is running, added to the github repo would be great.
hey,
we don't have a demo for that, you can install it yourself it easily. this was the idea that you can host on your own same kind of API like blockchain.info so you are not dependent on any third party provider. you can find the documentation in the github. it is neatly split up how to install environment, bitcoind and the project itself.

answering your question, the wallet folder you pointed is actually unfinished demo app that used our built API. without it the API still works seamlessly, because API is not dependent on the wallet.
the blockchain.info api_send is in the api.php file https://github.com/goethewins/EzBitcoin-Api-Wallet/blob/master/applications/api/controllers/api.php
more exactly public function receive() method, which starts from line 611.
when payment is received the bitcoind shoots the txid to method public function callback() which starts from line 335. And there it does the same thing as blockchain.info - shoots the response to the provided callback url.


next week we are going to announce the release of our payment processor and also mention this open source API for bitcoin.

The functionality u have described in red is the functionality of https://blockchain.info/api/api_receive. But I was asking for https://blockchain.info/api/api_send, which is actually canonical to https://blockchain.info/api/blockchain_wallet_api. Is not it done in the project ?

If yes, then do u access blockchain.info wallet directly or use own Bitcoin-QT wallet running on the installed BitcoinD ?

skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
September 15, 2014, 08:36:09 AM
 #10

hey,
we don't have a demo for that, you can install it yourself it easily. this was the idea that you can host on your own same kind of API like blockchain.info so you are not dependent on any third party provider. you can find the documentation in the github. it is neatly split up how to install environment, bitcoind and the project itself.

answering your question, the wallet folder you pointed is actually unfinished demo app that used our built API. without it the API still works seamlessly, because API is not dependent on the wallet.
the blockchain.info api_send is in the api.php file https://github.com/goethewins/EzBitcoin-Api-Wallet/blob/master/applications/api/controllers/api.php
more exactly public function receive() method, which starts from line 611.
when payment is received the bitcoind shoots the txid to method public function callback() which starts from line 335. And there it does the same thing as blockchain.info - shoots the response to the provided callback url.


next week we are going to announce the release of our payment processor and also mention this open source API for bitcoin.

The functionality u have described in red is the functionality of https://blockchain.info/api/api_receive. But I was asking for https://blockchain.info/api/api_send, which is actually canonical to https://blockchain.info/api/blockchain_wallet_api. Is not it done in the project ?

If yes, then do u access blockchain.info wallet directly or use own Bitcoin-QT wallet running on the installed BitcoinD ?
Sorry for confusing. Actually it is done and this is the initial functionality we did, and receive was built additionally.
We don't use blockchain.info for that, that's the initial idea not to be dependent on 3rd party. We use own installed bitcoind on own hardware. The tutorial is here. So as the idea was if u're using the blockchain.info API and want to switch to your own and not be dependent on them (3rd party) then this is what we made exactly. The URI's, arguments and JSON response are also same as blockchain.info so all u have to do is change the domain.

The code for send is also in the same api.php file.
We didn't do 100% of all of them, but we have all necessary ones:
Making Outgoing Payments - payment() function
Fetching the wallet balance - balance()
Generating a new address - new_address()
Http Callbacks - callback()

So other stuff like address archiving, listing addresses and sending multiple transactions is really not necessary.
Maybe the only 2 things that may be useful is the resending the callback to callback_url up to 1000 times if the client didn't respond with *ok* (right now it sends callback twice - once transaction hits mempool and on 1st confirmation just like bitcoind shoots on walletnotify). The second one is get the balance of an address, because we didn't find a good way for that. Bitcoind doesn't have RPC command for address'es current balance and didn't decide to parse from rawtransactions to get the outputs. Does anybody know more solutions how to get current balance of specific address in bitcoind?

But for now the above implemented commands are enough to build quite any bitcoin startup. We are using it already in 3 different projects.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 16, 2014, 01:57:52 AM
 #11

Over the last few months I have been doing pretty much the exact same thing!  Ill pm you.  You seem to be further along than I am, so may as well contribute not compete.
skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
September 16, 2014, 08:25:58 AM
 #12

Over the last few months I have been doing pretty much the exact same thing!  Ill pm you.  You seem to be further along than I am, so may as well contribute not compete.
Ok, feel free to ask questions
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
September 17, 2014, 09:28:28 AM
 #13

hey,
we don't have a demo for that, you can install it yourself it easily. this was the idea that you can host on your own same kind of API like blockchain.info so you are not dependent on any third party provider. you can find the documentation in the github. it is neatly split up how to install environment, bitcoind and the project itself.

answering your question, the wallet folder you pointed is actually unfinished demo app that used our built API. without it the API still works seamlessly, because API is not dependent on the wallet.
the blockchain.info api_send is in the api.php file https://github.com/goethewins/EzBitcoin-Api-Wallet/blob/master/applications/api/controllers/api.php
more exactly public function receive() method, which starts from line 611.
when payment is received the bitcoind shoots the txid to method public function callback() which starts from line 335. And there it does the same thing as blockchain.info - shoots the response to the provided callback url.


next week we are going to announce the release of our payment processor and also mention this open source API for bitcoin.

The functionality u have described in red is the functionality of https://blockchain.info/api/api_receive. But I was asking for https://blockchain.info/api/api_send, which is actually canonical to https://blockchain.info/api/blockchain_wallet_api. Is not it done in the project ?

If yes, then do u access blockchain.info wallet directly or use own Bitcoin-QT wallet running on the installed BitcoinD ?
Sorry for confusing. Actually it is done and this is the initial functionality we did, and receive was built additionally.
We don't use blockchain.info for that, that's the initial idea not to be dependent on 3rd party. We use own installed bitcoind on own hardware. The tutorial is here. So as the idea was if u're using the blockchain.info API and want to switch to your own and not be dependent on them (3rd party) then this is what we made exactly. The URI's, arguments and JSON response are also same as blockchain.info so all u have to do is change the domain.

The code for send is also in the same api.php file.
We didn't do 100% of all of them, but we have all necessary ones:
Making Outgoing Payments - payment() function
Fetching the wallet balance - balance()
Generating a new address - new_address()
Http Callbacks - callback()

So other stuff like address archiving, listing addresses and sending multiple transactions is really not necessary.
Maybe the only 2 things that may be useful is the resending the callback to callback_url up to 1000 times if the client didn't respond with *ok* (right now it sends callback twice - once transaction hits mempool and on 1st confirmation just like bitcoind shoots on walletnotify). The second one is get the balance of an address, because we didn't find a good way for that. Bitcoind doesn't have RPC command for address'es current balance and didn't decide to parse from rawtransactions to get the outputs. Does anybody know more solutions how to get current balance of specific address in bitcoind?

But for now the above implemented commands are enough to build quite any bitcoin startup. We are using it already in 3 different projects.

1. I think send to many is a necessary feature for real businesses as it saves on miner's fee.

2. Getting current balance of specific address in bitcoind requires to traverse the whole blockchain to sum up all the transactions which has this address either in i/p or o/p. This is actually done in a block explorer. Abe is an open source block explorer which does this. U may read more about Abe here => https://bitcointalk.org/index.php?topic=22785.0

Initscri
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 759


View Profile WWW
September 18, 2014, 03:46:02 AM
 #14

Made a pull request for commenting changes.

I'll look into it a bit more and see if I can make any changes/fixes.

----------------------------------
Web Developer. PM for details.
----------------------------------
skyzer (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
November 25, 2014, 02:16:50 PM
 #15

Revamping now whole project into Laravel framework, because CodeIgniter is quite dead and Laravel is super great.
Don't worry, the API will remain the same.

Also planning to include instructions for load balancing, replication and failover scenarios.
Is anybody here open to discuss and give input or your views on how you could implement the scaling part?
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!