Currency
Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
Properties
Name | Type | Description | Required |
---|---|---|---|
symbol | String | Canonical symbol associated with a currency. | True |
decimals | Int (>= 0) | Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10. | True |
metadata | Object | Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. | False |
Example
{
"symbol": "BTC",
"decimals": 8,
"metadata": {
"Issuer": "Satoshi"
}
}