Author

Topic: [ANN] Blockchain.info like self-hosted API written in PHP+Codeigniter (Read 3329 times)

newbie
Activity: 27
Merit: 0
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?
hero member
Activity: 1582
Merit: 759
Made a pull request for commenting changes.

I'll look into it a bit more and see if I can make any changes/fixes.
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
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://bitcointalksearch.org/topic/announce-abe-07-open-source-block-explorer-knockoff-22785
newbie
Activity: 27
Merit: 0
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
hero member
Activity: 765
Merit: 503
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.
newbie
Activity: 27
Merit: 0
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.
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
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 ?
newbie
Activity: 27
Merit: 0
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.
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
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.
newbie
Activity: 27
Merit: 0
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
hero member
Activity: 691
Merit: 569
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
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
hero member
Activity: 784
Merit: 500
Which blockchain API? The receive payments one? Wallet API? Wallet JSON-RPC API? Data API? Simple query API? Websocket? Stock tickers?
newbie
Activity: 27
Merit: 0
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.
Jump to: