3636var BigNumber = require ( 'bignumber.js' ) ;
3737
3838var unitMap = {
39- 'wei' : '1' ,
40- 'kwei' : '1000' ,
41- 'ada' : '1000' ,
42- 'mwei' : '1000000' ,
43- 'babbage' : '1000000' ,
44- 'gwei' : '1000000000' ,
45- 'shannon' : '1000000000' ,
46- 'szabo' : '1000000000000' ,
47- 'finney' : '1000000000000000' ,
48- 'ether' : '1000000000000000000' ,
49- 'kether' : '1000000000000000000000' ,
50- 'grand' : '1000000000000000000000' ,
51- 'einstein' : '1000000000000000000000' ,
52- 'mether' : '1000000000000000000000000' ,
53- 'gether' : '1000000000000000000000000000' ,
54- 'tether' : '1000000000000000000000000000000'
39+ 'wei' : '1' ,
40+ 'kwei' : '1000' ,
41+ 'ada' : '1000' ,
42+ 'femtoether' : '1000' ,
43+ 'mwei' : '1000000' ,
44+ 'babbage' : '1000000' ,
45+ 'picoether' : '1000000' ,
46+ 'gwei' : '1000000000' ,
47+ 'shannon' : '1000000000' ,
48+ 'nanoether' : '1000000000' ,
49+ 'nano' : '1000000000' ,
50+ 'szabo' : '1000000000000' ,
51+ 'microether' : '1000000000000' ,
52+ 'micro' : '1000000000000' ,
53+ 'finney' : '1000000000000000' ,
54+ 'milliether' : '1000000000000000' ,
55+ 'milli' : '1000000000000000' ,
56+ 'ether' : '1000000000000000000' ,
57+ 'kether' : '1000000000000000000000' ,
58+ 'grand' : '1000000000000000000000' ,
59+ 'einstein' : '1000000000000000000000' ,
60+ 'mether' : '1000000000000000000000000' ,
61+ 'gether' : '1000000000000000000000000000' ,
62+ 'tether' : '1000000000000000000000000000000'
5563} ;
5664
5765/**
@@ -239,13 +247,14 @@ var getValueOfUnit = function (unit) {
239247 * Takes a number of wei and converts it to any other ether unit.
240248 *
241249 * Possible units are:
242- * - kwei/ada
243- * - mwei/babbage
244- * - gwei/shannon
245- * - szabo
246- * - finney
247- * - ether
248- * - kether/grand/einstein
250+ * SI Short SI Full Effigy Other
251+ * - kwei femtoether ada
252+ * - mwei picoether babbage
253+ * - gwei nanoether shannon nano
254+ * - -- microether szabo micro
255+ * - -- milliether finney milli
256+ * - ether -- --
257+ * - kether einstein grand
249258 * - mether
250259 * - gether
251260 * - tether
@@ -265,13 +274,14 @@ var fromWei = function(number, unit) {
265274 * Takes a number of a unit and converts it to wei.
266275 *
267276 * Possible units are:
268- * - kwei/ada
269- * - mwei/babbage
270- * - gwei/shannon
271- * - szabo
272- * - finney
273- * - ether
274- * - kether/grand/einstein
277+ * SI Short SI Full Effigy Other
278+ * - kwei femtoether ada
279+ * - mwei picoether babbage
280+ * - gwei nanoether shannon nano
281+ * - -- microether szabo micro
282+ * - -- milliether finney milli
283+ * - ether -- --
284+ * - kether einstein grand
275285 * - mether
276286 * - gether
277287 * - tether
0 commit comments