2018-05-31 02:13:43 -04:00
! function ( a ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = a ( ) ; else if ( "function" == typeof define && define . amd ) define ( [ ] , a ) ; else { var b ; b = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , b . ethers = a ( ) } } ( function ( ) { var a ; return function ( ) { function a ( b , c , d ) { function e ( g , h ) { if ( ! c [ g ] ) { if ( ! b [ g ] ) { var i = "function" == typeof require && require ; if ( ! h && i ) return i ( g , ! 0 ) ; if ( f ) return f ( g , ! 0 ) ; var j = new Error ( "Cannot find module '" + g + "'" ) ; throw j . code = "MODULE_NOT_FOUND" , j } var k = c [ g ] = { exports : { } } ; b [ g ] [ 0 ] . call ( k . exports , function ( a ) { var c = b [ g ] [ 1 ] [ a ] ; return e ( c || a ) } , k , k . exports , a , b , c , d ) } return c [ g ] . exports } for ( var f = "function" == typeof require && require , g = 0 ; g < d . length ; g ++ ) e ( d [ g ] ) ; return e } return a } ( ) ( { 1 : [ function ( a , b , c ) { "use strict" ; function d ( a ) { var b = { } ; for ( var c in a ) b [ c ] = a [ c ] ; return b } function e ( a , b , c ) { function j ( c , e ) { return function ( ) { var f = { } , j = Array . prototype . slice . call ( arguments ) ; if ( j . length === c . inputs . types . length + 1 && "object" == typeof j [ j . length - 1 ] ) { f = d ( j . pop ( ) ) ; for ( var m in f ) if ( ! i [ m ] ) throw new Error ( "unknown transaction override " + m ) } [ "data" , "to" ] . forEach ( function ( a ) { if ( null != f [ a ] ) throw new Error ( "cannot override " + a ) } ) ; var n = c . apply ( b , j ) ; switch ( f . to = a , f . data = n . data , n . type ) { case "call" : if ( e ) return Promise . resolve ( new g . bigNumberify ( 0 ) ) ; [ "gasLimit" , "gasPrice" , "value" ] . forEach ( function ( a ) { if ( null != f [ a ] ) throw new Error ( "call cannot override " + a ) } ) ; var o = null ; return null == f . from && k && k . getAddress ? ( o = k . getAddress ( ) , o instanceof Promise || ( o = Promise . resolve ( o ) ) ) : o = Promise . resolve ( null ) , o . then ( function ( a ) { return a && ( f . from = g . getAddress ( a ) ) , l . call ( f ) } ) . then ( function ( b ) { try { var d = n . parse ( b ) } catch ( e ) { throw "0x" === b && c . inputs . types . length > 0 && h . throwError ( "call exception" , h . CALL _EXCEPTION , { address : a , method : n . signature , value : j } ) , e } return 1 === c . outputs . types . length && ( d = d [ 0 ] ) , d } ) ; case "transaction" : if ( ! k ) return Promise . reject ( new Error ( "missing signer" ) ) ; if ( null != f . from ) throw new Error ( "transaction cannot override from" ) ; if ( e ) return k && k . estimateGas ? k . estimateGas ( f ) : l . estimateGas ( f ) ; if ( k . sendTransaction ) return k . sendTransaction ( f ) ; if ( ! k . sign ) return Promise . reject ( new Error ( "custom signer does not support signing" ) ) ; null == f . gasLimit && ( f . gasLimit = k . defaultGasLimit || 2e6 ) ; var p = null ; if ( f . nonce ) p = Promise . resolve ( f . nonce ) ; else if ( k . getTransactionCount ) p = k . getTransactionCount ( ) , p instanceof Promise || ( p = Promise . resolve ( p ) ) ; else { var q = k . getAddress ( ) ; q instanceof Promise || ( q = Promise . resolve ( q ) ) , p = q . then ( function ( a ) { return l . getTransactionCount ( a , "pending" ) } ) } var r = null ; return r = f . gasPrice ? Promise . resolve ( f . gasPrice ) : l . getGasPrice ( ) , Promise . all ( [ p , r ] ) . then ( function ( a ) { return f . nonce = a [ 0 ] , f . gasPrice = a [ 1 ] , k . sign ( f ) } ) . then ( function ( a ) { return l . sendTransaction ( a ) } ) } } } if ( ! ( this instanceof e ) ) throw new Error ( "missing new" ) ; if ( b instanceof f || ( b = new f ( b ) ) , ! c ) throw new Error ( "missing signer or provider" ) ; var k = c , l = null ; c . provider ? l = c . provider : ( l = c , k = null ) , g . defineProperty ( this , "address" , a ) , g . defineProperty ( this , "interface" , b ) , g . defineProperty ( this , "signer" , k ) , g . defineProperty ( this , "provider" , l ) ; var m = l . resolveName ( a ) , n = { } ; g . defineProperty ( this , "estimate" , n ) ; var o = { } ; g . defineProperty ( this , "functions" , o ) ; var p = { } ; g . defineProperty ( this , "events" , p ) , Object . keys ( b . functions ) . forEach ( function ( a ) { var c = b . functions [ a ] , d = j ( c , ! 1 ) ; null == this [ a ] ? g . defineProperty ( this , a , d ) : console . log ( "WARNING: Multiple definitions for " + c ) , null == o [ c ] && ( g . defineProperty ( o , a , d ) , g . defineProperty ( n , a , j ( c , ! 0 ) ) ) } , this ) , Object . keys ( b . events ) . forEach ( function ( a ) { function c ( b ) { m . then ( function ( f ) { if ( f == b . address ) try { var g = d . parse ( b . topics , b . data ) ; b . args = g , b . event = a , b . parse = d . parse , b . removeListener = function ( ) { l . removeListener ( d . topics , c ) } , b . getBlock = function ( ) { return l . getBlock ( b . blockHash ) } , b . getTransaction = function ( ) { return l . getTransaction ( b . transactionHash ) } , b . getTransactionReceipt = function ( ) { return l . getTransactionReceipt ( b . transactionHash ) } , b . eventSignature = d . signature , e . apply ( b , Array . prototype . slice . call ( g ) ) } catch ( h ) { console . log ( h ) } } ) } var d = b . events [ a ] , e = null , f = { enumerable : ! 0 , get : function ( ) { return e } , set : function ( a ) { a || ( a = null ) , ! a &&
2018-03-04 19:31:09 -05:00
if ( ! ( this instanceof E ) ) throw Error ( "AES must be instanitated with `new`" ) ; Object . defineProperty ( this , "key" , { value : g ( a , ! 0 ) } ) , this . _prepare ( ) } ; E . prototype . _prepare = function ( ) { var a = o [ this . key . length ] ; if ( null == a ) throw new Error ( "invalid key size (must be 16, 24 or 32 bytes)" ) ; this . _Ke = [ ] , this . _Kd = [ ] ; for ( var b = 0 ; b <= a ; b ++ ) this . _Ke . push ( [ 0 , 0 , 0 , 0 ] ) , this . _Kd . push ( [ 0 , 0 , 0 , 0 ] ) ; for ( var c , d = 4 * ( a + 1 ) , e = this . key . length / 4 , f = j ( this . key ) , b = 0 ; b < e ; b ++ ) c = b >> 2 , this . _Ke [ c ] [ b % 4 ] = f [ b ] , this . _Kd [ a - c ] [ b % 4 ] = f [ b ] ; for ( var g , h = 0 , i = e ; i < d ; ) { if ( g = f [ e - 1 ] , f [ 0 ] ^= q [ g >> 16 & 255 ] << 24 ^ q [ g >> 8 & 255 ] << 16 ^ q [ 255 & g ] << 8 ^ q [ g >> 24 & 255 ] ^ p [ h ] << 24 , h += 1 , 8 != e ) for ( var b = 1 ; b < e ; b ++ ) f [ b ] ^= f [ b - 1 ] ; else { for ( var b = 1 ; b < e / 2 ; b ++ ) f [ b ] ^= f [ b - 1 ] ; g = f [ e / 2 - 1 ] , f [ e / 2 ] ^= q [ 255 & g ] ^ q [ g >> 8 & 255 ] << 8 ^ q [ g >> 16 & 255 ] << 16 ^ q [ g >> 24 & 255 ] << 24 ; for ( var b = e / 2 + 1 ; b < e ; b ++ ) f [ b ] ^= f [ b - 1 ] } for ( var k , l , b = 0 ; b < e && i < d ; ) k = i >> 2 , l = i % 4 , this . _Ke [ k ] [ l ] = f [ b ] , this . _Kd [ a - k ] [ l ] = f [ b ++ ] , i ++ } for ( var k = 1 ; k < a ; k ++ ) for ( var l = 0 ; l < 4 ; l ++ ) g = this . _Kd [ k ] [ l ] , this . _Kd [ k ] [ l ] = A [ g >> 24 & 255 ] ^ B [ g >> 16 & 255 ] ^ C [ g >> 8 & 255 ] ^ D [ 255 & g ] } , E . prototype . encrypt = function ( a ) { if ( 16 != a . length ) throw new Error ( "invalid plaintext size (must be 16 bytes)" ) ; for ( var b = this . _Ke . length - 1 , c = [ 0 , 0 , 0 , 0 ] , d = j ( a ) , e = 0 ; e < 4 ; e ++ ) d [ e ] ^= this . _Ke [ 0 ] [ e ] ; for ( var f = 1 ; f < b ; f ++ ) { for ( var e = 0 ; e < 4 ; e ++ ) c [ e ] = s [ d [ e ] >> 24 & 255 ] ^ t [ d [ ( e + 1 ) % 4 ] >> 16 & 255 ] ^ u [ d [ ( e + 2 ) % 4 ] >> 8 & 255 ] ^ v [ 255 & d [ ( e + 3 ) % 4 ] ] ^ this . _Ke [ f ] [ e ] ; d = c . slice ( ) } for ( var g , i = h ( 16 ) , e = 0 ; e < 4 ; e ++ ) g = this . _Ke [ b ] [ e ] , i [ 4 * e ] = 255 & ( q [ d [ e ] >> 24 & 255 ] ^ g >> 24 ) , i [ 4 * e + 1 ] = 255 & ( q [ d [ ( e + 1 ) % 4 ] >> 16 & 255 ] ^ g >> 16 ) , i [ 4 * e + 2 ] = 255 & ( q [ d [ ( e + 2 ) % 4 ] >> 8 & 255 ] ^ g >> 8 ) , i [ 4 * e + 3 ] = 255 & ( q [ 255 & d [ ( e + 3 ) % 4 ] ] ^ g ) ; return i } , E . prototype . decrypt = function ( a ) { if ( 16 != a . length ) throw new Error ( "invalid ciphertext size (must be 16 bytes)" ) ; for ( var b = this . _Kd . length - 1 , c = [ 0 , 0 , 0 , 0 ] , d = j ( a ) , e = 0 ; e < 4 ; e ++ ) d [ e ] ^= this . _Kd [ 0 ] [ e ] ; for ( var f = 1 ; f < b ; f ++ ) { for ( var e = 0 ; e < 4 ; e ++ ) c [ e ] = w [ d [ e ] >> 24 & 255 ] ^ x [ d [ ( e + 3 ) % 4 ] >> 16 & 255 ] ^ y [ d [ ( e + 2 ) % 4 ] >> 8 & 255 ] ^ z [ 255 & d [ ( e + 1 ) % 4 ] ] ^ this . _Kd [ f ] [ e ] ; d = c . slice ( ) } for ( var g , i = h ( 16 ) , e = 0 ; e < 4 ; e ++ ) g = this . _Kd [ b ] [ e ] , i [ 4 * e ] = 255 & ( r [ d [ e ] >> 24 & 255 ] ^ g >> 24 ) , i [ 4 * e + 1 ] = 255 & ( r [ d [ ( e + 3 ) % 4 ] >> 16 & 255 ] ^ g >> 16 ) , i [ 4 * e + 2 ] = 255 & ( r [ d [ ( e + 2 ) % 4 ] >> 8 & 255 ] ^ g >> 8 ) , i [ 4 * e + 3 ] = 255 & ( r [ 255 & d [ ( e + 1 ) % 4 ] ] ^ g ) ; return i } ; var F = function ( a ) { if ( ! ( this instanceof F ) ) throw Error ( "AES must be instanitated with `new`" ) ; this . description = "Electronic Code Block" , this . name = "ecb" , this . _aes = new E ( a ) } ; F . prototype . encrypt = function ( a ) { if ( a = g ( a ) , a . length % 16 !== 0 ) throw new Error ( "invalid plaintext size (must be multiple of 16 bytes)" ) ; for ( var b = h ( a . length ) , c = h ( 16 ) , d = 0 ; d < a . length ; d += 16 ) i ( a , c , 0 , d , d + 16 ) , c = this . _aes . encrypt ( c ) , i ( c , b , d ) ; return b } , F . prototype . decrypt = function ( a ) { if ( a = g ( a ) , a . length % 16 !== 0 ) throw new Error ( "invalid ciphertext size (must be multiple of 16 bytes)" ) ; for ( var b = h ( a . length ) , c = h ( 16 ) , d = 0 ; d < a . length ; d += 16 ) i ( a , c , 0 , d , d + 16 ) , c = this . _aes . decrypt ( c ) , i ( c , b , d ) ; return b } ; var G = function ( a , b ) { if ( ! ( this instanceof G ) ) throw Error ( "AES must be instanitated with `new`" ) ; if ( this . description = "Cipher Block Chaining" , this . name = "cbc" , b ) { if ( 16 != b . length ) throw new Error ( "invalid initialation vector size (must be 16 bytes)" ) } else b = h ( 16 ) ; this . _lastCipherblock = g ( b , ! 0 ) , this . _aes = new E ( a ) } ; G . prototype . encrypt = function ( a ) { if ( a = g ( a ) , a . length % 16 !== 0 ) throw new Error ( "invalid plaintext size (must be multiple of 16 bytes)" ) ; for ( var b = h ( a . length ) , c = h ( 16 ) , d = 0 ; d < a . length ; d += 16 ) { i ( a , c , 0 , d , d + 16 ) ; for ( var e = 0 ; e < 16 ; e ++ ) c [ e ] ^= this . _lastCipherblock [ e ] ; this . _lastCipherblock = this . _aes . encrypt ( c ) , i ( this . _lastCipherblock , b , d ) } return b } , G . prototype . decrypt = function ( a ) { if ( a = g ( a ) , a . length % 16 !== 0 ) throw new Error ( "invalid ciphertext size (must be multiple of 16 bytes)" ) ; for ( var b = h ( a . length ) , c = h ( 16 ) , d = 0 ; d < a . length ; d += 16 ) { i ( a , c , 0 , d , d + 16 ) , c = this . _aes . decrypt ( c ) ; for ( var e = 0 ; e < 16 ; e ++ ) b [ d + e ] = c [ e ] ^ this . _lastCipherblock [ e ] ; i ( a , this . _lastCipherblock , 0 , d , d + 16 ) } return b } ; var H = function ( a , b , c ) { if ( ! ( this instanceof H ) ) throw Error ( "AES must be instanitated with `new`" ) ; if ( this . description = "Cipher Feedback" , this . name = "cfb" , b ) { if ( 16 != b . length ) throw new Error ( "invalid initialation vector size (must be 16 size)" ) } else b = h ( 16 ) ; c || ( c = 1 ) , this . segmentSize = c , this . _shiftRegister = g ( b , ! 0 ) , this . _aes = new E ( a ) } ; H . prototype . encrypt = function ( a ) { if ( a . length %
2018-05-31 02:13:43 -04:00
f >>>= 13 , c [ 2 * g + 1 ] = 8191 & f , f >>>= 13 ; for ( g = 2 * b ; g < e ; ++ g ) c [ g ] = 0 ; d ( 0 === f ) , d ( 0 === ( f & - 8192 ) ) } , m . prototype . stub = function ( a ) { for ( var b = new Array ( a ) , c = 0 ; c < a ; c ++ ) b [ c ] = 0 ; return b } , m . prototype . mulp = function ( a , b , c ) { var d = 2 * this . guessLen13b ( a . length , b . length ) , e = this . makeRBT ( d ) , f = this . stub ( d ) , g = new Array ( d ) , h = new Array ( d ) , i = new Array ( d ) , j = new Array ( d ) , k = new Array ( d ) , l = new Array ( d ) , m = c . words ; m . length = d , this . convert13b ( a . words , a . length , g , d ) , this . convert13b ( b . words , b . length , j , d ) , this . transform ( g , f , h , i , d , e ) , this . transform ( j , f , k , l , d , e ) ; for ( var n = 0 ; n < d ; n ++ ) { var o = h [ n ] * k [ n ] - i [ n ] * l [ n ] ; i [ n ] = h [ n ] * l [ n ] + i [ n ] * k [ n ] , h [ n ] = o } return this . conjugate ( h , i , d ) , this . transform ( h , i , m , f , d , e ) , this . conjugate ( m , f , d ) , this . normalize13b ( m , d ) , c . negative = a . negative ^ b . negative , c . length = a . length + b . length , c . strip ( ) } , f . prototype . mul = function ( a ) { var b = new f ( null ) ; return b . words = new Array ( this . length + a . length ) , this . mulTo ( a , b ) } , f . prototype . mulf = function ( a ) { var b = new f ( null ) ; return b . words = new Array ( this . length + a . length ) , l ( this , a , b ) } , f . prototype . imul = function ( a ) { return this . clone ( ) . mulTo ( a , this ) } , f . prototype . imuln = function ( a ) { d ( "number" == typeof a ) , d ( a < 67108864 ) ; for ( var b = 0 , c = 0 ; c < this . length ; c ++ ) { var e = ( 0 | this . words [ c ] ) * a , f = ( 67108863 & e ) + ( 67108863 & b ) ; b >>= 26 , b += e / 67108864 | 0 , b += f >>> 26 , this . words [ c ] = 67108863 & f } return 0 !== b && ( this . words [ c ] = b , this . length ++ ) , this } , f . prototype . muln = function ( a ) { return this . clone ( ) . imuln ( a ) } , f . prototype . sqr = function ( ) { return this . mul ( this ) } , f . prototype . isqr = function ( ) { return this . imul ( this . clone ( ) ) } , f . prototype . pow = function ( a ) { var b = i ( a ) ; if ( 0 === b . length ) return new f ( 1 ) ; for ( var c = this , d = 0 ; d < b . length && 0 === b [ d ] ; d ++ , c = c . sqr ( ) ) ; if ( ++ d < b . length ) for ( var e = c . sqr ( ) ; d < b . length ; d ++ , e = e . sqr ( ) ) 0 !== b [ d ] && ( c = c . mul ( e ) ) ; return c } , f . prototype . iushln = function ( a ) { d ( "number" == typeof a && a >= 0 ) ; var b , c = a % 26 , e = ( a - c ) / 26 , f = 67108863 >>> 26 - c << 26 - c ; if ( 0 !== c ) { var g = 0 ; for ( b = 0 ; b < this . length ; b ++ ) { var h = this . words [ b ] & f , i = ( 0 | this . words [ b ] ) - h << c ; this . words [ b ] = i | g , g = h >>> 26 - c } g && ( this . words [ b ] = g , this . length ++ ) } if ( 0 !== e ) { for ( b = this . length - 1 ; b >= 0 ; b -- ) this . words [ b + e ] = this . words [ b ] ; for ( b = 0 ; b < e ; b ++ ) this . words [ b ] = 0 ; this . length += e } return this . strip ( ) } , f . prototype . ishln = function ( a ) { return d ( 0 === this . negative ) , this . iushln ( a ) } , f . prototype . iushrn = function ( a , b , c ) { d ( "number" == typeof a && a >= 0 ) ; var e ; e = b ? ( b - b % 26 ) / 26 : 0 ; var f = a % 26 , g = Math . min ( ( a - f ) / 26 , this . length ) , h = 67108863 ^ 67108863 >>> f << f , i = c ; if ( e -= g , e = Math . max ( 0 , e ) , i ) { for ( var j = 0 ; j < g ; j ++ ) i . words [ j ] = this . words [ j ] ; i . length = g } if ( 0 === g ) ; else if ( this . length > g ) for ( this . length -= g , j = 0 ; j < this . length ; j ++ ) this . words [ j ] = this . words [ j + g ] ; else this . words [ 0 ] = 0 , this . length = 1 ; var k = 0 ; for ( j = this . length - 1 ; j >= 0 && ( 0 !== k || j >= e ) ; j -- ) { var l = 0 | this . words [ j ] ; this . words [ j ] = k << 26 - f | l >>> f , k = l & h } return i && 0 !== k && ( i . words [ i . length ++ ] = k ) , 0 === this . length && ( this . words [ 0 ] = 0 , this . length = 1 ) , this . strip ( ) } , f . prototype . ishrn = function ( a , b , c ) { return d ( 0 === this . negative ) , this . iushrn ( a , b , c ) } , f . prototype . shln = function ( a ) { return this . clone ( ) . ishln ( a ) } , f . prototype . ushln = function ( a ) { return this . clone ( ) . iushln ( a ) } , f . prototype . shrn = function ( a ) { return this . clone ( ) . ishrn ( a ) } , f . prototype . ushrn = function ( a ) { return this . clone ( ) . iushrn ( a ) } , f . prototype . testn = function ( a ) { d ( "number" == typeof a && a >= 0 ) ; var b = a % 26 , c = ( a - b ) / 26 , e = 1 << b ; if ( this . length <= c ) return ! 1 ; var f = this . words [ c ] ; return ! ! ( f & e ) } , f . prototype . imaskn = function ( a ) { d ( "number" == typeof a && a >= 0 ) ; var b = a % 26 , c = ( a - b ) / 26 ; if ( d ( 0 === this . negative , "imaskn works only with positive numbers" ) , this . length <= c ) return this ; if ( 0 !== b && c ++ , this . length = Math . min ( c , this . length ) , 0 !== b ) { var e = 67108863 ^ 67108863 >>> b << b ; this . words [ this . length - 1 ] &= e } return this . strip ( ) } , f . prototype . maskn = function ( a ) { return this . clone ( ) . imaskn ( a ) } , f . prototype . iaddn = function ( a ) { return d ( "number" == typeof a ) , d ( a < 67108864 ) , a < 0 ? this . isubn ( - a ) : 0 !== this . negative ? 1 === this . length && ( 0 | this . words [ 0 ] ) < a ? ( this . words [ 0 ] = a - ( 0 | this . words [ 0 ] ) , this . negative = 0 , this ) : ( this . negative = 0 , this . isubn ( a ) , this . negative = 1 , this ) : this . _iaddn ( a ) } , f . prototype . _iaddn = function ( a ) { this . words [ 0 ] += a ; for ( var b = 0 ; b < this . length && this . words [ b ] >= 67108864 ; b ++ ) this . words [ b ] -= 67108864 , b === this . length - 1 ? this . words [ b + 1 ] = 1 : this . words [ b + 1 ] ++ ; return this . length = Math .
2018-03-04 19:31:09 -05:00
return this . curve . jpoint ( l , m , n ) } , f . prototype . dblp = function ( a ) { if ( 0 === a ) return this ; if ( this . isInfinity ( ) ) return this ; if ( ! a ) return this . dbl ( ) ; if ( this . curve . zeroA || this . curve . threeA ) { for ( var b = this , c = 0 ; c < a ; c ++ ) b = b . dbl ( ) ; return b } for ( var d = this . curve . a , e = this . curve . tinv , f = this . x , g = this . y , h = this . z , i = h . redSqr ( ) . redSqr ( ) , j = g . redAdd ( g ) , c = 0 ; c < a ; c ++ ) { var k = f . redSqr ( ) , l = j . redSqr ( ) , m = l . redSqr ( ) , n = k . redAdd ( k ) . redIAdd ( k ) . redIAdd ( d . redMul ( i ) ) , o = f . redMul ( l ) , p = n . redSqr ( ) . redISub ( o . redAdd ( o ) ) , q = o . redISub ( p ) , r = n . redMul ( q ) ; r = r . redIAdd ( r ) . redISub ( m ) ; var s = j . redMul ( h ) ; c + 1 < a && ( i = i . redMul ( m ) ) , f = p , h = s , j = r } return this . curve . jpoint ( f , j . redMul ( e ) , h ) } , f . prototype . dbl = function ( ) { return this . isInfinity ( ) ? this : this . curve . zeroA ? this . _zeroDbl ( ) : this . curve . threeA ? this . _threeDbl ( ) : this . _dbl ( ) } , f . prototype . _zeroDbl = function ( ) { var a , b , c ; if ( this . zOne ) { var d = this . x . redSqr ( ) , e = this . y . redSqr ( ) , f = e . redSqr ( ) , g = this . x . redAdd ( e ) . redSqr ( ) . redISub ( d ) . redISub ( f ) ; g = g . redIAdd ( g ) ; var h = d . redAdd ( d ) . redIAdd ( d ) , i = h . redSqr ( ) . redISub ( g ) . redISub ( g ) , j = f . redIAdd ( f ) ; j = j . redIAdd ( j ) , j = j . redIAdd ( j ) , a = i , b = h . redMul ( g . redISub ( i ) ) . redISub ( j ) , c = this . y . redAdd ( this . y ) } else { var k = this . x . redSqr ( ) , l = this . y . redSqr ( ) , m = l . redSqr ( ) , n = this . x . redAdd ( l ) . redSqr ( ) . redISub ( k ) . redISub ( m ) ; n = n . redIAdd ( n ) ; var o = k . redAdd ( k ) . redIAdd ( k ) , p = o . redSqr ( ) , q = m . redIAdd ( m ) ; q = q . redIAdd ( q ) , q = q . redIAdd ( q ) , a = p . redISub ( n ) . redISub ( n ) , b = o . redMul ( n . redISub ( a ) ) . redISub ( q ) , c = this . y . redMul ( this . z ) , c = c . redIAdd ( c ) } return this . curve . jpoint ( a , b , c ) } , f . prototype . _threeDbl = function ( ) { var a , b , c ; if ( this . zOne ) { var d = this . x . redSqr ( ) , e = this . y . redSqr ( ) , f = e . redSqr ( ) , g = this . x . redAdd ( e ) . redSqr ( ) . redISub ( d ) . redISub ( f ) ; g = g . redIAdd ( g ) ; var h = d . redAdd ( d ) . redIAdd ( d ) . redIAdd ( this . curve . a ) , i = h . redSqr ( ) . redISub ( g ) . redISub ( g ) ; a = i ; var j = f . redIAdd ( f ) ; j = j . redIAdd ( j ) , j = j . redIAdd ( j ) , b = h . redMul ( g . redISub ( i ) ) . redISub ( j ) , c = this . y . redAdd ( this . y ) } else { var k = this . z . redSqr ( ) , l = this . y . redSqr ( ) , m = this . x . redMul ( l ) , n = this . x . redSub ( k ) . redMul ( this . x . redAdd ( k ) ) ; n = n . redAdd ( n ) . redIAdd ( n ) ; var o = m . redIAdd ( m ) ; o = o . redIAdd ( o ) ; var p = o . redAdd ( o ) ; a = n . redSqr ( ) . redISub ( p ) , c = this . y . redAdd ( this . z ) . redSqr ( ) . redISub ( l ) . redISub ( k ) ; var q = l . redSqr ( ) ; q = q . redIAdd ( q ) , q = q . redIAdd ( q ) , q = q . redIAdd ( q ) , b = n . redMul ( o . redISub ( a ) ) . redISub ( q ) } return this . curve . jpoint ( a , b , c ) } , f . prototype . _dbl = function ( ) { var a = this . curve . a , b = this . x , c = this . y , d = this . z , e = d . redSqr ( ) . redSqr ( ) , f = b . redSqr ( ) , g = c . redSqr ( ) , h = f . redAdd ( f ) . redIAdd ( f ) . redIAdd ( a . redMul ( e ) ) , i = b . redAdd ( b ) ; i = i . redIAdd ( i ) ; var j = i . redMul ( g ) , k = h . redSqr ( ) . redISub ( j . redAdd ( j ) ) , l = j . redISub ( k ) , m = g . redSqr ( ) ; m = m . redIAdd ( m ) , m = m . redIAdd ( m ) , m = m . redIAdd ( m ) ; var n = h . redMul ( l ) . redISub ( m ) , o = c . redAdd ( c ) . redMul ( d ) ; return this . curve . jpoint ( k , n , o ) } , f . prototype . trpl = function ( ) { if ( ! this . curve . zeroA ) return this . dbl ( ) . add ( this ) ; var a = this . x . redSqr ( ) , b = this . y . redSqr ( ) , c = this . z . redSqr ( ) , d = b . redSqr ( ) , e = a . redAdd ( a ) . redIAdd ( a ) , f = e . redSqr ( ) , g = this . x . redAdd ( b ) . redSqr ( ) . redISub ( a ) . redISub ( d ) ; g = g . redIAdd ( g ) , g = g . redAdd ( g ) . redIAdd ( g ) , g = g . redISub ( f ) ; var h = g . redSqr ( ) , i = d . redIAdd ( d ) ; i = i . redIAdd ( i ) , i = i . redIAdd ( i ) , i = i . redIAdd ( i ) ; var j = e . redIAdd ( g ) . redSqr ( ) . redISub ( f ) . redISub ( h ) . redISub ( i ) , k = b . redMul ( j ) ; k = k . redIAdd ( k ) , k = k . redIAdd ( k ) ; var l = this . x . redMul ( h ) . redISub ( k ) ; l = l . redIAdd ( l ) , l = l . redIAdd ( l ) ; var m = this . y . redMul ( j . redMul ( i . redISub ( j ) ) . redISub ( g . redMul ( h ) ) ) ; m = m . redIAdd ( m ) , m = m . redIAdd ( m ) , m = m . redIAdd ( m ) ; var n = this . z . redAdd ( g ) . redSqr ( ) . redISub ( c ) . redISub ( h ) ; return this . curve . jpoint ( l , m , n ) } , f . prototype . mul = function ( a , b ) { return a = new i ( a , b ) , this . curve . _wnafMul ( this , a ) } , f . prototype . eq = function ( a ) { if ( "affine" === a . type ) return this . eq ( a . toJ ( ) ) ; if ( this === a ) return ! 0 ; var b = this . z . redSqr ( ) , c = a . z . redSqr ( ) ; if ( 0 !== this . x . redMul ( c ) . redISub ( a . x . redMul ( b ) ) . cmpn ( 0 ) ) return ! 1 ; var d = b . redMul ( this . z ) , e = c . redMul ( a . z ) ; return 0 === this . y . redMul ( e ) . redISub ( a . y . redMul ( d ) ) . cmpn ( 0 ) } , f . prototype . eqXToP = function ( a ) { var b = this . z . redSqr ( ) , c = a . toRed ( this . curve . red ) . redMul ( b ) ; if ( 0 === this . x . cmp ( c ) ) return ! 0 ; for ( var d = a . clone ( ) , e = this . curve . redN . redMul ( b ) ; ; ) { if ( d . iadd ( this . curve . n ) , d . cmp ( this . curve . p ) >= 0 ) return ! 1 ; if ( c . redIAdd ( e ) , 0 === this . x . cmp ( c ) ) return ! 0 } return ! 1 } , f . prototype . inspect = function ( ) { return this . isInfinity ( ) ? " < EC JPoint Infin
2018-05-31 02:13:43 -04:00
} function z ( a , b , c ) { var d = a << 32 - c | b >>> c ; return d >>> 0 } function A ( a , b , c ) { return a >>> c } function B ( a , b , c ) { var d = a << 32 - c | b >>> c ; return d >>> 0 } var C = a ( "minimalistic-assert" ) , D = a ( "inherits" ) ; c . inherits = D , c . toArray = d , c . toHex = e , c . htonl = f , c . toHex32 = g , c . zero2 = h , c . zero8 = i , c . join32 = j , c . split32 = k , c . rotr32 = l , c . rotl32 = m , c . sum32 = n , c . sum32 _3 = o , c . sum32 _4 = p , c . sum32 _5 = q , c . sum64 = r , c . sum64 _hi = s , c . sum64 _lo = t , c . sum64 _4 _hi = u , c . sum64 _4 _lo = v , c . sum64 _5 _hi = w , c . sum64 _5 _lo = x , c . rotr64 _hi = y , c . rotr64 _lo = z , c . shr64 _hi = A , c . shr64 _lo = B } , { inherits : 36 , "minimalistic-assert" : 39 } ] , 36 : [ function ( a , b , c ) { "function" == typeof Object . create ? b . exports = function ( a , b ) { a . super _ = b , a . prototype = Object . create ( b . prototype , { constructor : { value : a , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) } : b . exports = function ( a , b ) { a . super _ = b ; var c = function ( ) { } ; c . prototype = b . prototype , a . prototype = new c , a . prototype . constructor = a } } , { } ] , 37 : [ function ( a , b , c ) { arguments [ 4 ] [ 36 ] [ 0 ] . apply ( c , arguments ) } , { dup : 36 } ] , 38 : [ function ( a , b , c ) { ( function ( a , c ) { ! function ( ) { "use strict" ; function d ( a , b , c ) { this . blocks = [ ] , this . s = [ ] , this . padding = b , this . outputBits = c , this . reset = ! 0 , this . block = 0 , this . start = 0 , this . blockCount = 1600 - ( a << 1 ) >> 5 , this . byteCount = this . blockCount << 2 , this . outputBlocks = c >> 5 , this . extraBytes = ( 31 & c ) >> 3 ; for ( var d = 0 ; d < 50 ; ++ d ) this . s [ d ] = 0 } var e = "object" == typeof window ? window : { } , f = ! e . JS _SHA3 _NO _NODE _JS && "object" == typeof a && a . versions && a . versions . node ; f && ( e = c ) ; for ( var g = ! e . JS _SHA3 _NO _COMMON _JS && "object" == typeof b && b . exports , h = "0123456789abcdef" . split ( "" ) , i = [ 31 , 7936 , 2031616 , 520093696 ] , j = [ 1 , 256 , 65536 , 16777216 ] , k = [ 6 , 1536 , 393216 , 100663296 ] , l = [ 0 , 8 , 16 , 24 ] , m = [ 1 , 0 , 32898 , 0 , 32906 , 2147483648 , 2147516416 , 2147483648 , 32907 , 0 , 2147483649 , 0 , 2147516545 , 2147483648 , 32777 , 2147483648 , 138 , 0 , 136 , 0 , 2147516425 , 0 , 2147483658 , 0 , 2147516555 , 0 , 139 , 2147483648 , 32905 , 2147483648 , 32771 , 2147483648 , 32770 , 2147483648 , 128 , 2147483648 , 32778 , 0 , 2147483658 , 2147483648 , 2147516545 , 2147483648 , 32896 , 2147483648 , 2147483649 , 0 , 2147516424 , 2147483648 ] , n = [ 224 , 256 , 384 , 512 ] , o = [ 128 , 256 ] , p = [ "hex" , "buffer" , "arrayBuffer" , "array" ] , q = function ( a , b , c ) { return function ( e ) { return new d ( a , b , a ) . update ( e ) [ c ] ( ) } } , r = function ( a , b , c ) { return function ( e , f ) { return new d ( a , b , f ) . update ( e ) [ c ] ( ) } } , s = function ( a , b ) { var c = q ( a , b , "hex" ) ; c . create = function ( ) { return new d ( a , b , a ) } , c . update = function ( a ) { return c . create ( ) . update ( a ) } ; for ( var e = 0 ; e < p . length ; ++ e ) { var f = p [ e ] ; c [ f ] = q ( a , b , f ) } return c } , t = function ( a , b ) { var c = r ( a , b , "hex" ) ; c . create = function ( c ) { return new d ( a , b , c ) } , c . update = function ( a , b ) { return c . create ( b ) . update ( a ) } ; for ( var e = 0 ; e < p . length ; ++ e ) { var f = p [ e ] ; c [ f ] = r ( a , b , f ) } return c } , u = [ { name : "keccak" , padding : j , bits : n , createMethod : s } , { name : "sha3" , padding : k , bits : n , createMethod : s } , { name : "shake" , padding : i , bits : o , createMethod : t } ] , v = { } , w = [ ] , x = 0 ; x < u . length ; ++ x ) for ( var y = u [ x ] , z = y . bits , A = 0 ; A < z . length ; ++ A ) { var B = y . name + "_" + z [ A ] ; w . push ( B ) , v [ B ] = y . createMethod ( z [ A ] , y . padding ) } d . prototype . update = function ( a ) { var b = "string" != typeof a ; b && a . constructor === ArrayBuffer && ( a = new Uint8Array ( a ) ) ; for ( var c , d , e = a . length , f = this . blocks , g = this . byteCount , h = this . blockCount , i = 0 , j = this . s ; i < e ; ) { if ( this . reset ) for ( this . reset = ! 1 , f [ 0 ] = this . block , c = 1 ; c < h + 1 ; ++ c ) f [ c ] = 0 ; if ( b ) for ( c = this . start ; i < e && c < g ; ++ i ) f [ c >> 2 ] |= a [ i ] << l [ 3 & c ++ ] ; else for ( c = this . start ; i < e && c < g ; ++ i ) d = a . charCodeAt ( i ) , d < 128 ? f [ c >> 2 ] |= d << l [ 3 & c ++ ] : d < 2048 ? ( f [ c >> 2 ] |= ( 192 | d >> 6 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | 63 & d ) << l [ 3 & c ++ ] ) : d < 55296 || d >= 57344 ? ( f [ c >> 2 ] |= ( 224 | d >> 12 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | d >> 6 & 63 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | 63 & d ) << l [ 3 & c ++ ] ) : ( d = 65536 + ( ( 1023 & d ) << 10 | 1023 & a . charCodeAt ( ++ i ) ) , f [ c >> 2 ] |= ( 240 | d >> 18 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | d >> 12 & 63 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | d >> 6 & 63 ) << l [ 3 & c ++ ] , f [ c >> 2 ] |= ( 128 | 63 & d ) << l [ 3 & c ++ ] ) ; if ( this . lastByteIndex = c , c >= g ) { for ( this . start = c - g , this . block = f [ h ] , c = 0 ; c < h ; ++ c ) j [ c ] ^= f [ c ] ; C ( j ) , this . reset = ! 0 } else this . start = c } return this } , d . prototype . finalize = function ( ) { var a = this . blocks , b = this . lastByteIndex , c = this . blockCount , d = this . s ; if ( a [ b >> 2 ] |= this . padding [ 3 & b ] , this . lastByteIndex === this . byteCount ) for ( a [ 0 ] = a [ c ] , b = 1 ; b < c + 1 ; ++ b ) a [ b ] = 0 ; for ( a [ c - 1 ] |= 2147483648 , b = 0 ; b < c ; ++ b ) d [ b ] ^= a [ b ] ; C ( d ) } , d . prototype . toString = d . prototype . hex = function ( ) { this . finalize ( ) ; for ( var a , b = this . blockCount , c = this . s , d = this . outputBlocks , e = thi
} ) } } ) . then ( function ( ) { return a . _pendingFilter != b ? void a . send ( "eth_uninstallFilter" , [ filterIf ] ) : void setTimeout ( function ( ) { e ( ) } , 0 ) } ) } return e ( ) , c } ) } } ) , k . defineProperty ( i . prototype , "_stopPending" , function ( ) { this . _pendingFilter = null } ) , k . defineProperty ( i , "_hexlifyTransaction" , function ( a ) { return f ( a ) } ) , b . exports = i } , { "../utils/address" : 57 , "../utils/convert" : 62 , "../utils/errors" : 64 , "../utils/properties" : 71 , "../utils/utf8" : 77 , "./provider.js" : 54 } ] , 53 : [ function ( a , b , c ) { b . exports = { unspecified : { chainId : 0 , name : "unspecified" } , homestead : { chainId : 1 , ensAddress : "0x314159265dd8dbb310642f98f50c066173c1259b" , name : "homestead" } , mainnet : { chainId : 1 , ensAddress : "0x314159265dd8dbb310642f98f50c066173c1259b" , name : "homestead" } , morden : { chainId : 2 , name : "morden" } , ropsten : { chainId : 3 , ensAddress : "0x112234455c3a32fd11230c42e7bccd4a84e02010" , name : "ropsten" } , testnet : { chainId : 3 , ensAddress : "0x112234455c3a32fd11230c42e7bccd4a84e02010" , name : "ropsten" } , rinkeby : { chainId : 4 , name : "rinkeby" } , kovan : { chainId : 42 , name : "kovan" } , classic : { chainId : 61 , name : "classic" } } } , { } ] , 54 : [ function ( a , b , c ) { "use strict" ; function d ( a ) { var b = { } ; for ( var c in a ) b [ c ] = a [ c ] ; return b } function e ( a , b ) { var c = { } ; for ( var d in a ) try { var e = a [ d ] ( b [ d ] ) ; void 0 !== e && ( c [ d ] = e ) } catch ( f ) { throw f . checkKey = d , f . checkValue = b [ d ] , f } return c } function f ( a , b ) { return function ( c ) { return null == c ? b : a ( c ) } } function g ( a , b ) { return function ( c ) { return c ? a ( c ) : b } } function h ( a ) { return function ( b ) { if ( ! Array . isArray ( b ) ) throw new Error ( "not an array" ) ; var c = [ ] ; return b . forEach ( function ( b ) { c . push ( a ( b ) ) } ) , c } } function i ( a ) { if ( ! F . isHexString ( a ) || 66 !== a . length ) throw new Error ( "invalid hash - " + a ) ; return a } function j ( a ) { return F . bigNumberify ( a ) . toNumber ( ) } function k ( a ) { var b = F . bigNumberify ( a ) ; try { b = b . toNumber ( ) } catch ( c ) { b = null } return b } function l ( a ) { if ( "boolean" == typeof a ) return a ; if ( "string" == typeof a ) { if ( "true" === a ) return ! 0 ; if ( "false" === a ) return ! 1 } throw new Error ( "invaid boolean - " + a ) } function m ( a ) { if ( ! F . isHexString ( a ) ) throw new Error ( "invalid uint256" ) ; for ( ; a . length < 66 ; ) a = "0x0" + a . substring ( 2 ) ; return a } function n ( a ) { if ( null == a ) return "latest" ; if ( "earliest" === a ) return "0x0" ; if ( "latest" === a || "pending" === a ) return a ; if ( "number" == typeof a ) return F . hexStripZeros ( F . hexlify ( a ) ) ; if ( F . isHexString ( a ) ) return F . hexStripZeros ( a ) ; throw new Error ( "invalid blockTag" ) } function o ( a ) { return null != a . author && null == a . miner && ( a . miner = a . author ) , e ( H , a ) } function p ( a ) { if ( null != a . gas && null == a . gasLimit && ( a . gasLimit = a . gas ) , a . to && F . bigNumberify ( a . to ) . isZero ( ) && ( a . to = "0x0000000000000000000000000000000000000000" ) , null != a . input && null == a . data && ( a . data = a . input ) , null == a . to && null == a . creates && ( a . creates = F . getContractAddress ( a ) ) , ! a . raw && a . v && a . r && a . s ) { var b = [ F . stripZeros ( F . hexlify ( a . nonce ) ) , F . stripZeros ( F . hexlify ( a . gasPrice ) ) , F . stripZeros ( F . hexlify ( a . gasLimit ) ) , a . to || "0x" , F . stripZeros ( F . hexlify ( a . value || "0x" ) ) , F . hexlify ( a . data || "0x" ) , F . stripZeros ( F . hexlify ( a . v || "0x" ) ) , F . stripZeros ( F . hexlify ( a . r ) ) , F . stripZeros ( F . hexlify ( a . s ) ) ] ; a . raw = F . RLP . encode ( b ) } var c = e ( I , a ) , d = a . networkId ; return F . isHexString ( d ) && ( d = F . bigNumberify ( d ) . toNumber ( ) ) , "number" != typeof d && null != c . v && ( d = ( c . v - 35 ) / 2 , d < 0 && ( d = 0 ) , d = parseInt ( d ) ) , "number" != typeof d && ( d = 0 ) , c . networkId = d , c . blockHash && "x" === c . blockHash . replace ( /0/g , "" ) && ( c . blockHash = null ) , c } function q ( a ) { return e ( J , a ) } function r ( a ) { return e ( K , a ) } function s ( a ) { var b = ( a . status , a . root , e ( L , a ) ) ; return b . logs . forEach ( function ( a , b ) { null == a . transactionLogIndex && ( a . transactionLogIndex = b ) } ) , null != a . status && ( b . byzantium = ! 0 ) , b } function t ( a ) { return Array . isArray ( a ) ? a . forEach ( function ( a ) { t ( a ) } ) : null != a && i ( a ) , a } function u ( a ) { return e ( M , a ) } function v ( a ) { return e ( N , a ) } function w ( a ) { function b ( ) { e . getBlockNumber ( ) . then ( function ( a ) { if ( a !== f ) { null === f && ( f = a - 1 ) ; for ( var b = f + 1 ; b <= a ; b ++ ) e . _emitted . block < b && ( e . _emitted . block = b , Object . keys ( e . _emitted ) . forEach ( function ( a ) { "block" !== a && e . _emitted [ a ] > b + 12 && delete e . _emitted [ a ] } ) ) , e . emit ( "block" , b ) ; var c = { } ; Object . keys ( d ) . forEach ( function ( b ) { var d = B ( b ) ; "transaction" === d . type ? e . getTransaction ( d . hash ) . then ( function ( a ) { a && null != a . blockNumber && ( e . _emitted [ "t:" + a . hash . toLowerCase ( ) ] = a . blockNumber , e . emit ( d . hash , a ) ) } ) : "address" === d . type ? ( g [ d . address ] && ( c [
getRandomValues : function ( a ) { for ( var b = 0 ; b < 20 ; b ++ ) for ( var c = 0 ; c < a . length ; c ++ ) b ? a [ c ] ^= parseInt ( 256 * Math . random ( ) ) : a [ c ] = parseInt ( 256 * Math . random ( ) ) ; return a } , _weakCrypto : ! 0 } ) , g . _weakCrypto === ! 0 && f ( d , "_weakCrypto" , ! 0 ) , b . exports = d } ) . call ( this , "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : { } ) } , { "./convert" : 62 , "./properties" : 71 } ] , 61 : [ function ( a , b , c ) { function d ( a ) { if ( ! a . from ) throw new Error ( "missing from address" ) ; var b = a . nonce ; return e ( "0x" + g ( h . encode ( [ e ( a . from ) , f . stripZeros ( f . hexlify ( b , "nonce" ) ) ] ) ) . substring ( 26 ) ) } var e = a ( "./address" ) . getAddress , f = a ( "./convert" ) , g = a ( "./keccak256" ) , h = a ( "./rlp" ) ; b . exports = { getContractAddress : d } } , { "./address" : 57 , "./convert" : 62 , "./keccak256" : 68 , "./rlp" : 72 } ] , 62 : [ function ( a , b , c ) { function d ( a ) { return a . slice ? a : ( a . slice = function ( ) { var b = Array . prototype . slice . call ( arguments ) ; return new Uint8Array ( Array . prototype . slice . apply ( a , b ) ) } , a ) } function e ( a ) { if ( ! a || parseInt ( a . length ) != a . length || "string" == typeof a ) return ! 1 ; for ( var b = 0 ; b < a . length ; b ++ ) { var c = a [ b ] ; if ( c < 0 || c >= 256 || parseInt ( c ) != c ) return ! 1 } return ! 0 } function f ( a ) { if ( null == a && o . throwError ( "cannot convert null value to array" , o . INVALID _ARGUMENT , { arg : "value" , value : a } ) , a && a . toHexString && ( a = a . toHexString ( ) ) , j ( a ) ) { a = a . substring ( 2 ) , a . length % 2 && ( a = "0" + a ) ; for ( var b = [ ] , c = 0 ; c < a . length ; c += 2 ) b . push ( parseInt ( a . substr ( c , 2 ) , 16 ) ) ; return d ( new Uint8Array ( b ) ) } return "string" == typeof a && ( a . match ( /^[0-9a-fA-F]*$/ ) && o . throwError ( "hex string must have 0x prefix" , o . INVALID _ARGUMENT , { arg : "value" , value : a } ) , o . throwError ( "invalid hexidecimal string" , o . INVALID _ARGUMENT , { arg : "value" , value : a } ) ) , e ( a ) ? d ( new Uint8Array ( a ) ) : void o . throwError ( "invalid arrayify value" , { arg : "value" , value : a , type : typeof a } ) } function g ( a ) { for ( var b = [ ] , c = 0 , e = 0 ; e < a . length ; e ++ ) { var g = f ( a [ e ] ) ; b . push ( g ) , c += g . length } for ( var h = new Uint8Array ( c ) , i = 0 , e = 0 ; e < b . length ; e ++ ) h . set ( b [ e ] , i ) , i += b [ e ] . length ; return d ( h ) } function h ( a ) { if ( a = f ( a ) , 0 === a . length ) return a ; for ( var b = 0 ; 0 === a [ b ] ; ) b ++ ; return b && ( a = a . slice ( b ) ) , a } function i ( a , b ) { if ( a = f ( a ) , b < a . length ) throw new Error ( "cannot pad" ) ; var c = new Uint8Array ( b ) ; return c . set ( a , b - a . length ) , d ( c ) } function j ( a , b ) { return ! ( "string" != typeof a || ! a . match ( /^0x[0-9A-Fa-f]*$/ ) ) && ( ! b || a . length === 2 + 2 * b ) } function k ( a ) { if ( a && a . toHexString ) return a . toHexString ( ) ; if ( "number" == typeof a ) { a < 0 && o . throwError ( "cannot hexlify negative value" , o . INVALID _ARG , { arg : "value" , value : a } ) ; for ( var b = "" ; a ; ) b = p [ 15 & a ] + b , a = parseInt ( a / 16 ) ; return b . length ? ( b . length % 2 && ( b = "0" + b ) , "0x" + b ) : "0x00" } if ( j ( a ) ) return a . length % 2 && ( a = "0x0" + a . substring ( 2 ) ) , a ; if ( e ( a ) ) { for ( var c = [ ] , d = 0 ; d < a . length ; d ++ ) { var f = a [ d ] ; c . push ( p [ ( 240 & f ) >> 4 ] + p [ 15 & f ] ) } return "0x" + c . join ( "" ) } o . throwError ( "invalid hexlify value" , { arg : "value" , value : a } ) } function l ( a ) { for ( ; a . length > 3 && "0x0" === a . substring ( 0 , 3 ) ; ) a = "0x" + a . substring ( 3 ) ; return a } function m ( a , b ) { for ( ; a . length < 2 * b + 2 ; ) a = "0x0" + a . substring ( 2 ) ; return a } function n ( a ) { if ( a = f ( a ) , 65 !== a . length ) throw new Error ( "invalid signature" ) ; var b = a [ 64 ] ; return 27 !== b && 28 !== b && ( b = 27 + b % 2 ) , { r : k ( a . slice ( 0 , 32 ) ) , s : k ( a . slice ( 32 , 64 ) ) , v : b } } var o = ( a ( "./properties.js" ) . defineProperty , a ( "./errors" ) ) , p = "0123456789abcdef" ; b . exports = { arrayify : f , isArrayish : e , concat : g , padZeros : i , stripZeros : h , splitSignature : n , hexlify : k , isHexString : j , hexStripZeros : l , hexZeroPad : m } } , { "./errors" : 64 , "./properties.js" : 71 } ] , 63 : [ function ( a , b , c ) { b . exports = void 0 } , { } ] , 64 : [ function ( a , b , c ) { "use strict" ; var d = a ( "./properties" ) . defineProperty , e = { } ; [ "UNKNOWN_ERROR" , "NOT_IMPLEMENTED" , "MISSING_NEW" , "CALL_EXCEPTION" , "INVALID_ARGUMENT" , "MISSING_ARGUMENT" , "UNEXPECTED_ARGUMENT" , "UNSUPPORTED_OPERATION" ] . forEach ( function ( a ) { d ( e , a , a ) } ) , d ( e , "throwError" , function ( a , b , c ) { b || ( b = e . UNKNOWN _ERROR ) , c || ( c = { } ) ; var d = [ ] ; Object . keys ( c ) . forEach ( function ( a ) { try { d . push ( a + "=" + JSON . stringify ( c [ a ] ) ) } catch ( b ) { d . push ( a + "=" + JSON . stringify ( c [ a ] . toString ( ) ) ) } } ) ; var f = a ; d . length && ( a += " (" + d . join ( ", " ) + ")" ) ; var g = new Error ( a ) ; throw g . reason = f , g . code = b , Object . keys ( c ) . forEach ( function ( a ) { g [ a ] = c [ a ] } ) , g } ) , d ( e , "checkNew" , function ( a , b ) { a instanceof b || e . throwError ( "missing new" , e . MISSING _NEW , { name : b . name } ) } ) , b . exports = e } , { "./properties" : 71 } ] , 65 : [ function ( a , b , c ) { "use strict"
e ( b ) } , function ( a ) { g ( a ) } ) : g ( "invalid wallet JSON" ) } ) } ) , f . defineProperty ( d , "fromMnemonic" , function ( a , b ) { b || ( b = k ) ; var c = h . fromMnemonic ( a ) . derivePath ( b ) , e = new d ( c . privateKey ) ; return f . defineProperty ( e , "mnemonic" , a ) , f . defineProperty ( e , "path" , b ) , e } ) , f . defineProperty ( d , "fromBrainWallet" , function ( a , b , c ) { if ( c && "function" != typeof c ) throw new Error ( "invalid callback" ) ; return a = "string" == typeof a ? f . toUtf8Bytes ( a , "NFKC" ) : f . arrayify ( a , "password" ) , b = "string" == typeof b ? f . toUtf8Bytes ( b , "NFKC" ) : f . arrayify ( b , "password" ) , new Promise ( function ( g , h ) { e ( b , a , 1 << 18 , 8 , 1 , 32 , function ( a , b , e ) { if ( a ) h ( a ) ; else if ( e ) g ( new d ( f . hexlify ( e ) ) ) ; else if ( c ) return c ( b ) } ) } ) } ) , b . exports = d } , { "../utils" : 67 , "../utils/address" : 57 , "../utils/bignumber" : 58 , "../utils/convert" : 62 , "../utils/errors" : 64 , "../utils/keccak256" : 68 , "../utils/properties" : 71 , "../utils/rlp" : 72 , "../utils/utf8" : 77 , "./hdnode" : 78 , "./secret-storage" : 80 , "./signing-key" : 81 , "scrypt-js" : 41 , setimmediate : 42 } ] , 83 : [ function ( a , b , c ) { b . exports = " AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEi