Module: "api/currency/erc20"

Index

Interfaces

Variables

Functions

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:

NameTypeDescription
symbolstringThe ERC20 token symbol
networkstringThe 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:

NameTypeDescription
currencyICurrencyThe 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:

NameType
currencyICurrency

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:

NameTypeDescription
addressstringthe 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:

NameTypeDescription
symbolstringthe 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:

NameTypeDescription
addressstringThe address to validate

Returns: boolean

If the address is valid or not