Skip to content

Instantly share code, notes, and snippets.

@greenbigfrog
Created December 17, 2017 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenbigfrog/62f3de6ab0b9cda161c2a2dad2851b02 to your computer and use it in GitHub Desktop.
Save greenbigfrog/62f3de6ab0b9cda161c2a2dad2851b02 to your computer and use it in GitHub Desktop.
require "bitcoin_rpc"
class CoinApi
def initialize(@config, @log : Logger)
@log.debug("Initializing Coin Interaction API for #{@coin} with type #{@type}")
if @type == "rpc"
# For RPC communication we are using https://github.com/citizen428/bitcoin_rpc
@rpc = BitcoinRpc.new(@config.rpc_url, @config.rpc_username, @config.rpc_password)
elsif @type == "blockio"
@blockio = Blockio::Client.new(@config.blockio_api_key)
end
end
def withdraw
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment