Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@tokensoft/conversions
Advanced tools
Utils to convert values between on-chain "base" and human-readable "display" units
Utils to convert values between on-chain "base" and human-readable "display" units
$ yarn add @tokensoft/conversions
$ npm install @tokensoft/conversions
import { toBaseUnit, toDisplayUnit } from '@tokensoft/conversions'
const ethValue = '1'
const weiValue = '1000000000000000000'
const decimals = 18
const baseValue = toBaseUnit(ethValue, decimals) // => '1000000000000000000'
const displayValue = toDisplayUnit(weiValue, decimals) // => '1'
String
Converts value denominated in human-readable "display" unit (ether, bitcoins) to value denominated in on-chain "base" unit (wei, satoshis)
String
Converts value denominated in on-chain "base" unit (wei, satoshis) to value denominated in human-readable "display" unit (ether, bitcoins)
String
Converts value denominated in human-readable "display" unit (ether, bitcoins) to value denominated in on-chain "base" unit (wei, satoshis)
Kind: global function
Param | Type |
---|---|
value | String | Number | BigNumber |
decimals | String | Number | BigNumber |
String
Converts value denominated in on-chain "base" unit (wei, satoshis) to value denominated in human-readable "display" unit (ether, bitcoins)
Kind: global function
Param | Type |
---|---|
value | String | Number | BigNumber |
decimals | String | Number | BigNumber |
FAQs
Utils to convert values between on-chain "base" and human-readable "display" units
The npm package @tokensoft/conversions receives a total of 3 weekly downloads. As such, @tokensoft/conversions popularity was classified as not popular.
We found that @tokensoft/conversions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.