Skip to main content

Chain Interface

Reference

All chains implement a standard ChainCommon interface:

Methods

addressExplorerLink - return a link to the address's page in an explorer

assetDecimals - return the provided asset's number of decimals

formattedTransactionHash - convert a URL-base64 transaction hash into the chain's standard transaction hash format

getBalance - fetch the provided address's balance for the provided asset

transactionConfidence - return a transaction's current number of confirmations

transactionExplorerLink - return a link to the transaction's page in an explorer

validateAddress - check if the address's format is valid

validateTransaction - check if the transaction's format is valid

withProvider - overwrite the chain's provider


Properties

chain - the name of the chain

assets - an object containing assets supported by the chain

network - the chain's current network config