vara=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");varb=fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");varn=fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");varh=BigInteger.ONE;varcurve=newECCurveFp(p,a,b);varG=curve.decodePointHex("04"+"188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"+"07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");returnnewX9ECParameters(curve,G,n,h)}functionsecp224r1(){varp=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");vara=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");varb=fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");varn=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");varh=BigInteger.ONE;varcurve=newECCurveFp(p,a,b);varG=curve.decodePointHex("04"+"B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"+"BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");returnnewX9ECParameters(curve,G,n,h)}functionsecp256k1(){varp=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F");vara=BigInteger.ZERO;varb=fromHex("7");varn=fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141");varh=BigInteger.ONE;varcurve=newECCurveFp(p,a,b);varG=curve.decodePointHex("04"+"79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"+"483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8");returnnewX9ECParameters(curve,G,n,h)}functionsecp256r1(){varp=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");vara=fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");varb=fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");varn=fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");varh=BigInteger.ONE;varcurve=newECCurveFp(p,a,b);varG=curve.decodePointHex("04"+"6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"+"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");returnnewX9ECParameters(curve,G,n,h)}functiongetSECCurveByName(name){if(name=="secp128r1")returnsecp128r1();if(name=="secp160k1")returnsecp160k1();if(name=="secp160r1")returnsecp160r1();if(name=="secp192k1")returnsecp192k1();if(name=="secp192r1")returnsecp192r1();if(name=="secp224r1")returnsecp224r1();if(name=="secp256k1")returnsecp256k1();if(name=="secp256r1")returnsecp256r1();returnnull}module.exports=getSECCurveByName},{"./ec":13,"./jsbn":14}],18:[function(require,module,exports){varCrypto=require("./crypto-js/crypto");varecdsa=require("./ecdsa");varconv=require("./convert");varutil=require("./util");varMessage={};Message.magicPrefix="Bitcoin Signed Message:\n";Message.makeMagicMessage=function(message){varmagicBytes=conv.stringToBytes(Message.magicPrefix);varmessageBytes=conv.stringToBytes(message);varbuffer=[];buffer=buffer.concat(util.numToVarInt(magicBytes.length));buffer=buffer.concat(magicBytes);buffer=buffer.concat(util.numToVarInt(messageBytes.length));buffer=buffer.concat(messageBytes);returnbuffer};Message.getHash=function(message){varbuffer=Message.makeMagicMessage(message);returnCrypto.SHA256(Crypto.SHA256(buffer,{asBytes:true}),{asBytes:true})};Message.signMessage=function(key,message,compressed){varhash=Message.getHash(message);varsig=key.sign(hash);varobj=ecdsa.parseSig(sig);varaddress=key.getBitcoinAddress().toString();vari=ecdsa.calcPubkeyRecoveryParam(address,obj.r,obj.s,hash);i+=27;if(compressed)i+=4;varrBa=obj.r.toByteArrayUnsigned();varsBa=obj.s.toByteArrayUnsigned();while(rBa.length<32)rBa.unshift(0);while(sBa.length<32)sBa.unshift(0);sig=[i].concat(rBa).concat(sBa);returnconv.bytesToHex(sig)};Message.verifyMessage=function(address,sig,message){sig=conv.hexToBytes(sig);sig=ecdsa.parseSigCompact(sig);varhash=Message.getHash(message);varisCompressed=!!(sig.i&4);varpubKey=ecdsa.recoverPubKey(sig.r,sig.s,hash,sig.i);pubKey.setCompressed(isCompressed);varexpectedAddress=pubKey.getBitcoinAddress().toString();returnaddress===expectedAddress};module.exports=Message},{"./co