 
 #====================================================================================
 
-exports.run = () ->
-  r = new Runner
-  await r.run process.argv[2...], defer err
-  rc = 0
-  if err?
-    log.error err.message
-    rc = err.rc or 2
-  process.exit rc
+exports.run = () -> run Runner
 
 #====================================================================================


  run : (argv, cb) ->
    esc = make_esc cb, "Runner::main"
    await @init esc defer()
    await @find_transaction esc defer()
    await @get_private_key esc defer()
    await @make_transaction esc defer()

{dict_merge,a_json_parse} = require('iced-utils').util
btcjs = require 'keybase-bitcoinjs-lib'
{Client} = require 'bitcoin'
{run,SATOSHI_PER_BTC,Base} = require './base'

#====================================================================================

exports.Runner = class Runner extends Base

  #-----------------------------------

