Utility API
utils.toAtomic(value)
Converts from standard to atomic units.
Parameters
| Name | Type | Description |
|---|---|---|
| value | BigNumber | The value to be converted. |
Returns
| Type | Description |
|---|---|
| BigNumber | The value in atomic units. |
Example
Info
Use a token-specific version of
getIrysUploader() to connect to an Irys Bundler before uploading. Choose one from the setup documentation.const irys = await getIrysUploader();
const amountAtomic = irys.utils.toAtomic(amountStandard);Atomic Units
Info
Atomic units refer to the smallest possible unit of a given cryptocurrency. In Ethereum, atomic units are called Wei, and they represent the smallest unit of Ether. Similar to how 1 dollar can be broken down into 100 cents, 1 Ether can be broken down into 10^18 Wei. In Solana, atomic units are called Lamports, and 1 SOL can be broken down into 10^9 Lamports.