aboutsummaryrefslogtreecommitdiffstats
path: root/lib/const.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-02-03 00:40:05 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-02-03 00:40:05 +0800
commit9d9c23e315a124c9fa5fa929d00c18791cfdb4e6 (patch)
tree451697fd9c0ae2720f3f10ee649f3be46177476f /lib/const.js
parent011fdd91df02abd7ee88bdef183186fe95eeeb18 (diff)
downloaddexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar.gz
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar.bz2
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar.lz
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar.xz
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.tar.zst
dexon-9d9c23e315a124c9fa5fa929d00c18791cfdb4e6.zip
common cleanup
Diffstat (limited to 'lib/const.js')
-rw-r--r--lib/const.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/const.js b/lib/const.js
index 22f6dc690..8a17b794d 100644
--- a/lib/const.js
+++ b/lib/const.js
@@ -25,9 +25,32 @@ if (process.env.NODE_ENV !== 'build') {
var BigNumber = require('bignumber.js'); // jshint ignore:line
}
+var ETH_UNITS = [
+ 'wei',
+ 'Kwei',
+ 'Mwei',
+ 'Gwei',
+ 'szabo',
+ 'finney',
+ 'ether',
+ 'grand',
+ 'Mether',
+ 'Gether',
+ 'Tether',
+ 'Pether',
+ 'Eether',
+ 'Zether',
+ 'Yether',
+ 'Nether',
+ 'Dether',
+ 'Vether',
+ 'Uether'
+];
+
module.exports = {
ETH_PADDING: 32,
ETH_SIGNATURE_LENGTH: 4,
+ ETH_UNITS: ETH_UNITS,
ETH_BIGNUMBER_ROUNDING_MODE: { ROUNDING_MODE: BigNumber.ROUND_DOWN }
};