mirror of https://github.com/status-im/web3.js.git
bumped version
This commit is contained in:
parent
f4cf699324
commit
271b00f069
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "web3",
|
"name": "web3",
|
||||||
"namespace": "ethereum",
|
"namespace": "ethereum",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "Ethereum Compatible JavaScript API",
|
"description": "Ethereum Compatible JavaScript API",
|
||||||
"main": [
|
"main": [
|
||||||
"./dist/web3.js",
|
"./dist/web3.js",
|
||||||
|
|
|
@ -1167,7 +1167,7 @@ module.exports = {
|
||||||
|
|
||||||
},{"bignumber.js":"bignumber.js"}],8:[function(require,module,exports){
|
},{"bignumber.js":"bignumber.js"}],8:[function(require,module,exports){
|
||||||
module.exports={
|
module.exports={
|
||||||
"version": "0.2.7"
|
"version": "0.2.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],9:[function(require,module,exports){
|
},{}],9:[function(require,module,exports){
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1167,7 +1167,7 @@ module.exports = {
|
||||||
|
|
||||||
},{"bignumber.js":"bignumber.js"}],8:[function(require,module,exports){
|
},{"bignumber.js":"bignumber.js"}],8:[function(require,module,exports){
|
||||||
module.exports={
|
module.exports={
|
||||||
"version": "0.2.7"
|
"version": "0.2.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],9:[function(require,module,exports){
|
},{}],9:[function(require,module,exports){
|
||||||
|
@ -3348,13 +3348,13 @@ module.exports = {
|
||||||
},{"./method":19}],27:[function(require,module,exports){
|
},{"./method":19}],27:[function(require,module,exports){
|
||||||
|
|
||||||
},{}],"bignumber.js":[function(require,module,exports){
|
},{}],"bignumber.js":[function(require,module,exports){
|
||||||
/*! bignumber.js v2.0.3 https://github.com/MikeMcl/bignumber.js/LICENCE */
|
/*! bignumber.js v2.0.7 https://github.com/MikeMcl/bignumber.js/LICENCE */
|
||||||
|
|
||||||
;(function (global) {
|
;(function (global) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bignumber.js v2.0.3
|
bignumber.js v2.0.7
|
||||||
A JavaScript library for arbitrary-precision arithmetic.
|
A JavaScript library for arbitrary-precision arithmetic.
|
||||||
https://github.com/MikeMcl/bignumber.js
|
https://github.com/MikeMcl/bignumber.js
|
||||||
Copyright (c) 2015 Michael Mclaughlin <M8ch88l@gmail.com>
|
Copyright (c) 2015 Michael Mclaughlin <M8ch88l@gmail.com>
|
||||||
|
@ -4186,10 +4186,12 @@ module.exports = {
|
||||||
i = 0;
|
i = 0;
|
||||||
s += 2;
|
s += 2;
|
||||||
|
|
||||||
// Normalise xc and yc so highest order digit of yc is >= base/2
|
// Normalise xc and yc so highest order digit of yc is >= base / 2.
|
||||||
|
|
||||||
n = mathfloor( base / ( yc[0] + 1 ) );
|
n = mathfloor( base / ( yc[0] + 1 ) );
|
||||||
|
|
||||||
|
// Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1.
|
||||||
|
// if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) {
|
||||||
if ( n > 1 ) {
|
if ( n > 1 ) {
|
||||||
yc = multiply( yc, n, base );
|
yc = multiply( yc, n, base );
|
||||||
xc = multiply( xc, n, base );
|
xc = multiply( xc, n, base );
|
||||||
|
@ -4207,6 +4209,8 @@ module.exports = {
|
||||||
yz.unshift(0);
|
yz.unshift(0);
|
||||||
yc0 = yc[0];
|
yc0 = yc[0];
|
||||||
if ( yc[1] >= base / 2 ) yc0++;
|
if ( yc[1] >= base / 2 ) yc0++;
|
||||||
|
// Not necessary, but to prevent trial digit n > base, when using base 3.
|
||||||
|
// else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
n = 0;
|
n = 0;
|
||||||
|
@ -4234,7 +4238,9 @@ module.exports = {
|
||||||
// 6. If remainder > divisor: remainder -= divisor, n++
|
// 6. If remainder > divisor: remainder -= divisor, n++
|
||||||
|
|
||||||
if ( n > 1 ) {
|
if ( n > 1 ) {
|
||||||
if ( n >= base ) n = base - 1;
|
|
||||||
|
// n may be > base only when base is 3.
|
||||||
|
if (n >= base) n = base - 1;
|
||||||
|
|
||||||
// product = divisor * trial digit.
|
// product = divisor * trial digit.
|
||||||
prod = multiply( yc, n, base );
|
prod = multiply( yc, n, base );
|
||||||
|
@ -4242,58 +4248,66 @@ module.exports = {
|
||||||
remL = rem.length;
|
remL = rem.length;
|
||||||
|
|
||||||
// Compare product and remainder.
|
// Compare product and remainder.
|
||||||
cmp = compare( prod, rem, prodL, remL );
|
// If product > remainder.
|
||||||
|
// Trial digit n too high.
|
||||||
// product > remainder.
|
// n is 1 too high about 5% of the time, and is not known to have
|
||||||
if ( cmp == 1 ) {
|
// ever been more than 1 too high.
|
||||||
|
while ( compare( prod, rem, prodL, remL ) == 1 ) {
|
||||||
n--;
|
n--;
|
||||||
|
|
||||||
// Subtract divisor from product.
|
// Subtract divisor from product.
|
||||||
subtract( prod, yL < prodL ? yz : yc, prodL, base );
|
subtract( prod, yL < prodL ? yz : yc, prodL, base );
|
||||||
|
prodL = prod.length;
|
||||||
|
cmp = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// cmp is -1.
|
// n is 0 or 1, cmp is -1.
|
||||||
// If n is 0, there is no need to compare yc and rem again
|
// If n is 0, there is no need to compare yc and rem again below,
|
||||||
// below, so change cmp to 1 to avoid it.
|
// so change cmp to 1 to avoid it.
|
||||||
// If n is 1, compare yc and rem again below.
|
// If n is 1, leave cmp as -1, so yc and rem are compared again.
|
||||||
if ( n == 0 ) cmp = n = 1;
|
if ( n == 0 ) {
|
||||||
prod = yc.slice();
|
|
||||||
|
// divisor < remainder, so n must be at least 1.
|
||||||
|
cmp = n = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// product = divisor
|
||||||
|
prod = yc.slice();
|
||||||
prodL = prod.length;
|
prodL = prod.length;
|
||||||
|
}
|
||||||
|
|
||||||
if ( prodL < remL ) prod.unshift(0);
|
if ( prodL < remL ) prod.unshift(0);
|
||||||
|
|
||||||
// Subtract product from remainder.
|
// Subtract product from remainder.
|
||||||
subtract( rem, prod, remL, base );
|
subtract( rem, prod, remL, base );
|
||||||
|
|
||||||
// If product was < previous remainder.
|
|
||||||
if ( cmp == -1 ) {
|
|
||||||
remL = rem.length;
|
remL = rem.length;
|
||||||
|
|
||||||
// Compare divisor and new remainder.
|
// If product was < remainder.
|
||||||
cmp = compare( yc, rem, yL, remL );
|
if ( cmp == -1 ) {
|
||||||
|
|
||||||
|
// Compare divisor and new remainder.
|
||||||
// If divisor < new remainder, subtract divisor from remainder.
|
// If divisor < new remainder, subtract divisor from remainder.
|
||||||
if ( cmp < 1 ) {
|
// Trial digit n too low.
|
||||||
|
// n is 1 too low about 5% of the time, and very rarely 2 too low.
|
||||||
|
while ( compare( yc, rem, yL, remL ) < 1 ) {
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
// Subtract divisor from remainder.
|
// Subtract divisor from remainder.
|
||||||
subtract( rem, yL < remL ? yz : yc, remL, base );
|
subtract( rem, yL < remL ? yz : yc, remL, base );
|
||||||
}
|
|
||||||
}
|
|
||||||
remL = rem.length;
|
remL = rem.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if ( cmp === 0 ) {
|
} else if ( cmp === 0 ) {
|
||||||
n++;
|
n++;
|
||||||
rem = [0];
|
rem = [0];
|
||||||
}
|
} // else cmp === 1 and n will be 0
|
||||||
// if cmp === 1, n will be 0
|
|
||||||
|
|
||||||
// Add the next digit, n, to the result array.
|
// Add the next digit, n, to the result array.
|
||||||
qc[i++] = n;
|
qc[i++] = n;
|
||||||
|
|
||||||
// Update the remainder.
|
// Update the remainder.
|
||||||
if ( cmp && rem[0] ) {
|
if ( rem[0] ) {
|
||||||
rem[remL++] = xc[xi] || 0;
|
rem[remL++] = xc[xi] || 0;
|
||||||
} else {
|
} else {
|
||||||
rem = [ xc[xi] ];
|
rem = [ xc[xi] ];
|
||||||
|
@ -4464,11 +4478,11 @@ module.exports = {
|
||||||
|
|
||||||
// Handle values that fail the validity test in BigNumber.
|
// Handle values that fail the validity test in BigNumber.
|
||||||
parseNumeric = (function () {
|
parseNumeric = (function () {
|
||||||
var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i,
|
var basePrefix = /^(-?)0([xbo])/i,
|
||||||
dotAfter = /^([^.]+)\.$/,
|
dotAfter = /^([^.]+)\.$/,
|
||||||
dotBefore = /^\.([^.]+)$/,
|
dotBefore = /^\.([^.]+)$/,
|
||||||
isInfinityOrNaN = /^-?(Infinity|NaN)$/,
|
isInfinityOrNaN = /^-?(Infinity|NaN)$/,
|
||||||
whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
whitespaceOrPlus = /^\s*\+|^\s+|\s+$/g;
|
||||||
|
|
||||||
return function ( x, str, num, b ) {
|
return function ( x, str, num, b ) {
|
||||||
var base,
|
var base,
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
Package.describe({
|
Package.describe({
|
||||||
name: 'ethereum:web3',
|
name: 'ethereum:web3',
|
||||||
version: '0.2.7',
|
version: '0.2.8',
|
||||||
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',
|
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',
|
||||||
git: 'https://github.com/ethereum/ethereum.js',
|
git: 'https://github.com/ethereum/ethereum.js',
|
||||||
// By default, Meteor will default to using README.md for documentation.
|
// By default, Meteor will default to using README.md for documentation.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "web3",
|
"name": "web3",
|
||||||
"namespace": "ethereum",
|
"namespace": "ethereum",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "Ethereum JavaScript API, middleware to talk to a ethereum node over RPC",
|
"description": "Ethereum JavaScript API, middleware to talk to a ethereum node over RPC",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
Loading…
Reference in New Issue