https://github.com/jeankassio/openchainapi
OpenChain, a PHP Blockchain Wallet Bitcoin API
https://github.com/jeankassio/openchainapi
api api-rest bitcoin blockchain cryptocurrency wallet
Last synced: 17 days ago
JSON representation
OpenChain, a PHP Blockchain Wallet Bitcoin API
- Host: GitHub
- URL: https://github.com/jeankassio/openchainapi
- Owner: jeankassio
- License: mit
- Created: 2021-12-26T11:11:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T13:27:37.000Z (almost 2 years ago)
- Last Synced: 2025-03-23T22:25:42.900Z (about 1 month ago)
- Topics: api, api-rest, bitcoin, blockchain, cryptocurrency, wallet
- Language: PHP
- Homepage:
- Size: 54.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenChain Api
OpenChain, a PHP Blockchain Bitcoin Wallet APIConnection work with EasyBitcoin.php
https://github.com/aceat64/EasyBitcoin-PHPDonation Bitcoin: bc1qeu8eledtdn8s7et3duvp8s5tzk6ch3lkq48a4n
Tutorial Ubuntu:
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
nano bitcoin.conf** Add config to bitcoin.conf file **
rpcuser=someusername
rpcpassword=somepassword
testnet=0
rpcport=8332
rpcallowip=127.0.0.1
server=1
listen=1
daemon=1
txindex=1
prune=0
addresstype=bech32
addnode=127.0.0.1
dbcache=2000
walletnotify=curl "https://your_url/hook/walletnotify.php?tx=%s"
blocknotify=curl "https://your_url/hook/blocknotify.php?tx=%s"If using an external volume for the blockchain, use the code "datadir=/youdirectory/bitcoin" above
And activate the Load on Startup
if ubuntu version >= 18.04
touch /etc/rc.local
chmod +x /etc/rc.local
sudo systemctl enable rc-local.service
now, open file to edit
nano /etc/rc.localand write this following code:
#!/bin/sh -e
#
sudo bitcoind
exit 0The api has the endpoints:
-Calculation of fee;
https://your_url/call/calculatefee
-Create Wallet;https://your_url/call/createwallet
-Get balance;https://your_url/call/getbalance
-Generate new address;https://your_url/call/getnewaddress
-Get transaction info;https://your_url/call/gettxidinfo
-Withdraw;https://your_url/call/setnewtransaction
-Watch Address;
https://your_url/call/watchaddress
In addition to having a webhook for withdrawals and deposits.
Inside all call files has tha explanation how to receive calls.
## Copyright and license
Code released under the [MIT license](https://github.com/jeankassio/OpenChainApi/blob/main/LICENSE).