Skip to content

et/ex_blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExBlockchain

Elixir wrapper for the Blockchain.info API.

Installation

  1. Add ex_blockchain to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:ex_blockchain, "~> 0.1.0"}]
end
```
  1. Ensure ex_blockchain is started before your application:
```elixir
def application do
  [applications: [:ex_blockchain]]
end
```

Usage

# retrieve a block
block = ExBlockchain.Blockchain.block("000000000000000016f9a2c3e0f4c1245ff24856a79c34806969f5084f410680")
# retrieve a transaction
tx = ExBlockchain.Blockchain.tx("d4af240386cdacab4ca666d178afc88280b620ae308ae8d2585e9ab8fc664a94")
# retrieve an address
address = ExBlockchain.Blockchain.address("1HS9RLmKvJ7D1ZYgfPExJZQZA1DMU3DEVd")
# retrieves ticker of currency codes
ticker = ExBlockchain.ExchangeRates.ticker
# retrieves `value` of `currency` in BTC
btc_value = ExBlockchain.ExchangeRates.to_btc("USD", 50)
# retrieve stats from Blockchain.info homepage
stats = ExBlockchain.Stats.stats

About

Elixir wrapper around the blockchain.info API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages