index.js
function Wallet (options) {
  this.priv = typeof options.priv === 'string' ?
    bitcoin.ECKey.fromWIF(options.priv) :
    options.priv

  typeforce(typeforce.Object, this.priv)
  typeforce({
    blockchain: typeforce.Object,
    networkName: typeforce.String
  }, options)

  assert(options.networkName in bitcoin.networks, 'unknown network: ' + options.networkName)

  this.txs = []
  this.pub = this.priv.pub
  this.networkName = options.networkName
  this.address = this.pub.getAddress(bitcoin.networks[this.networkName])
  this.addressString = this.address.toString()
  this.blockchain = options.blockchain
}
function Wallet (options) {
  this.priv = typeof options.priv === 'string' ?
    bitcoin.ECKey.fromWIF(options.priv) :
    options.priv

  typeforce(typeforce.Object, this.priv)
  typeforce({
    blockchain: typeforce.Object,
    networkName: typeforce.String
  }, options)

  assert(options.networkName in bitcoin.networks, 'unknown network: ' + options.networkName)

  this.txs = []
  this.pub = this.priv.pub
  this.networkName = options.networkName
  this.address = this.pub.getAddress(bitcoin.networks[this.networkName])
  this.addressString = this.address.toString()
  this.blockchain = options.blockchain
}
function Wallet ( options ) { this . priv = typeof options . priv === 'string' ? bitcoin . ECKey . fromWIF ( options . priv ) : options . priv typeforce ( typeforce . Object , this . priv ) typeforce ( { blockchain : typeforce . Object , networkName : typeforce . String } , options ) assert ( options . networkName in bitcoin . networks , 'unknown network: ' + options . networkName ) this . txs = [ ] this . pub = this . priv . pub this . networkName = options . networkName this . address = this . pub . getAddress ( bitcoin . networks [ this . networkName ] ) this . addressString = this . address . toString ( ) this . blockchain = options . blockchain }
primitive one key common blockchain wallet
@param  {Object} options
@param  {String|ECKey} options.priv
@param  {CommonBlockchain impl} options.blockchain common-blockchain api
primitive one key common blockchain wallet