Git Product home page Git Product logo

ebitcoind's Introduction

#ebitcoind

Erlang to Bitcoind API based off API documentation @ https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Linux or Mac is required to run this, Windows is not supported as of yet.

Steps

  1. First create a bitcoin configuration in your home directory that contains the following example
rpcuser=bitcoinrpc
rpcpassword=changeme
server=1
  1. Start the daemon by typing
bitcoind -daemon
  1. Start erlang

Usage

1> {ok,Pid} = ebitcoind:start_link().
{ok,<0.177.0>}
2> ebitcoind:getbalance(Pid).
8437.02478294
3> ebitcoind:getinfo(Pid).
{ok, #{<<"balance">> => 8437.02478294,
  <<"blocks">> => 260404,
  <<"connections">> => 8,
  <<"difficulty">> => 148819199.80509263,
  <<"errors">> => <<>>,
  <<"keypoololdest">> => 1420307921,
  <<"keypoolsize">> => 102,
  <<"paytxfee">> => 0.0,
  <<"protocolversion">> => 70002,
  <<"proxy">> => <<>>,
  <<"relayfee">> => 1.0e-5,
  <<"testnet">> => false,
  <<"timeoffset">> => -3,
  <<"version">> => 90300,
  <<"walletversion">> => 60000}}
4> ebitcoind:setgenerate(Pid,true).
{ok, null}

OR you can specify connection information as start_link argument

1> {ok,Pid} = ebitcoind:start_link(<<"http://rpcuser:rpcpassword@host:port">>).
{ok,<0.177.0>}

ebitcoind's People

Contributors

mijkenator avatar ericdc avatar forge33 avatar edescourtis avatar yurkohoshko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.