Electrum server wrapper API for HTTP based apps. Simply mediates TCP (Electrum) and HTTP (any web browser) connections.
Node >= 7.x
npm start ip=127.0.0.1 port=9999
Run npm install
npm start
Note: Use eprotocol=1.4 param in case a server doesn't support any versions below 1.4. In other cases don't use eprotocol param at all.
Refer to Electrum Server doc for method specific params and outputs https://github.com/kyuupichan/electrumx/blob/master/docs/PROTOCOL.rst
ex. GET /getbalance?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1
params: ip, port, address where address is a valid pub address
ex. GET /getbalance?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1
ex. Electrum Protocol 1.4 GET /listunspent?ip=tomscryptos.com&port=50002&proto=ssl&address=3d7ef4693bf858826540d4bf3bb3f73338bec2080d91e9938b108b28a7112378&eprotocol=1.4
params: ip, port, height where height is a valid blockchain height
ex. GET /getblockinfo?ip=127.0.0.1&port=1111&height=100000
params: ip, port
ex. GET /getcurrentblock?ip=127.0.0.1&port=1111
params: ip, port, blocks where blocks is a target number of blocks you want your transaction to be included within
ex. GET /estimatefee?ip=127.0.0.1&port=1111&blocks=10
- applies only to coin daemons that have built in support for smart fees
params: ip, port, txid where txid is a valid blockchain transaction hash
ex. GET /estimatefee?ip=127.0.0.1&port=1111&txid=a110b2ce1a4ab3c6182d3861100s0c1143b0e2473fbf1ddcdd4c4899c1349fb1
params: ip, port, address where address is a valid pub address
ex. GET /listtransactions?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1
ex. GET /listtransactions?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1&raw=true
ex. GET /listtransactions?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1&raw=true&page=2&pagination=true
ex. Electrum Protocol 1.4 GET /listunspent?ip=tomscryptos.com&port=50002&proto=ssl&address=3d7ef4693bf858826540d4bf3bb3f73338bec2080d91e9938b108b28a7112378&eprotocol=1.4
optional params: raw - return raw transaction data for all transactions, maxlength (only together with raw, default value 10). If raw=true transactions are sorted Z to A by timestamp value.
pagination=true - enable pagination
page - specific page number
pagesize - number within a range from 10 to 30, default 10
return format: txsCount - total transactions count for a specific address, pageSize - transactions per page, page, pagesTotal, transactions - transactions object
params: ip, port, address where address is a valid pub address
ex. GET /listunspent?ip=127.0.0.1&port=1111&address=RD1D2UgjiimRPbR8ZMFB21LimBgppcnaU1
ex. Electrum Protocol 1.4 GET /listunspent?ip=tomscryptos.com&port=50002&proto=ssl&address=3d7ef4693bf858826540d4bf3bb3f73338bec2080d91e9938b108b28a7112378&eprotocol=1.4
params: ip, port, address where address is a valid pub address
ex. POST /pushtx data: { ip: 127.0.0.1, port: 1111, rawtx: 010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff061368b73f0101ffffffff0250d6dc01000000001976a914bfc6e590610d2f598a340bf5ff3f2675c7903af188ac0000000000000000222b24cc21a9ede2f61c3f71d1defd3fa999dfa36953755c690689499462b48bebd332974e8cc91120000000000000000000000000000000000000000000000000000000000000000000000000 }
params: ip, port, txid, height where txid is a valid blockchain transaction hash and height is a valid blockchain height
ex. GET /getmerkle?ip=127.0.0.1&port=1111&txid=a110b2ce1a4ab3c6182d3861100s0c1143b0e2473fbf1ddcdd4c4899c1349fb1&height=100000
params: ip, port
ex. GET /server/version?ip=127.0.0.1&port=1111