Module: "api/currency/erc20"
Index
Interfaces
Variables
Functions
- getErc20Currency
- getErc20Decimals
- getErc20Symbol
- getMainnetErc20FromAddress
- getMainnetErc20FromSymbol
- getSupportedERC20Tokens
- validERC20Address
Variables
supportedERC20Tokens
• Const
supportedERC20Tokens: ITokenMap = require('eth-contract-metadata') as ITokenMap
Defined in request-client.js/src/api/currency/erc20.ts:21
Functions
getErc20Currency
▸ getErc20Currency(symbol
: string, network
: string): ICurrency | undefined
Defined in request-client.js/src/api/currency/erc20.ts:28
Returns a Currency object for an ERC20, if found
Parameters:
Name | Type | Description |
---|---|---|
symbol | string | The ERC20 token symbol |
network | string | The ERC20 contract network |
Returns: ICurrency | undefined
getErc20Decimals
▸ getErc20Decimals(currency
: ICurrency): number
Defined in request-client.js/src/api/currency/erc20.ts:62
Get the amount of decimals for an ERC20 currency
Parameters:
Name | Type | Description |
---|---|---|
currency | ICurrency | The ERC20 Currency object |
Returns: number
The number of decimals for the ERC20 currency
getErc20Symbol
▸ getErc20Symbol(currency
: ICurrency): string | null
Defined in request-client.js/src/api/currency/erc20.ts:131
Get an ERC20 symbol from the Currency object
Parameters:
Name | Type |
---|---|
currency | ICurrency |
Returns: string | null
the ERC20 currency symbol string
getMainnetErc20FromAddress
▸ getMainnetErc20FromAddress(address
: string): ITokenDescription | undefined
Defined in request-client.js/src/api/currency/erc20.ts:90
Get an ERC20 currency from the currency address
Parameters:
Name | Type | Description |
---|---|---|
address | string | the ERC20 currency address |
Returns: ITokenDescription | undefined
the ERC20 ITokenDescription
getMainnetErc20FromSymbol
▸ getMainnetErc20FromSymbol(symbol
: string): ITokenDescription | undefined
Defined in request-client.js/src/api/currency/erc20.ts:105
Get an ERC20 currency from the currency value string, for mainnet only
Parameters:
Name | Type | Description |
---|---|---|
symbol | string | the ERC20 currency symbol string |
Returns: ITokenDescription | undefined
the ERC20 ITokenDescription
getSupportedERC20Tokens
▸ getSupportedERC20Tokens(): ERC20TokenDetails[]
Defined in request-client.js/src/api/currency/erc20.ts:160
Returns a list of supported ERC20 currencies
Returns: ERC20TokenDetails[]
List of supported ERC20 currencies
validERC20Address
▸ validERC20Address(address
: string): boolean
Defined in request-client.js/src/api/currency/erc20.ts:121
Returns true if the address is a valid checksum address
Parameters:
Name | Type | Description |
---|---|---|
address | string | The address to validate |
Returns: boolean
If the address is valid or not