lib/keypair.js
function KeyPair(privkey) {
  if (!(this instanceof KeyPair)) {
    return new KeyPair(privkey);
  }

  if (privkey) {
    this._keypair = ecdsa.keyFromPrivate(privkey);
  } else {
    this._keypair = ecdsa.genKeyPair();
  }
}
function KeyPair(privkey) {
  if (!(this instanceof KeyPair)) {
    return new KeyPair(privkey);
  }

  if (privkey) {
    this._keypair = ecdsa.keyFromPrivate(privkey);
  } else {
    this._keypair = ecdsa.genKeyPair();
  }
}
function KeyPair ( privkey ) { if ( ! ( this instanceof KeyPair ) ) { return new KeyPair ( privkey ) ; } if ( privkey ) { this . _keypair = ecdsa . keyFromPrivate ( privkey ) ; } else { this . _keypair = ecdsa . genKeyPair ( ) ; } }
Creates a ECDSA key pair instance for bridge authentication
@constructor
@param {String|Buffer} privkey - Hex encoded ECDSA (secp256k1) public key
Creates a ECDSA key pair instance for bridge authentication