Utils
isMsgSend
Type guard for MsgSend
Parameters
msgMsg
Returns boolean true or false.
isMsgMultiSend
Type guard for MsgMultiSend
Parameters
msgMsg
Returns boolean true or false.
getDenom
Get denomination from Asset - currently ATOM supported only
Parameters
assetAsset
Returns string The denomination of the given asset.
getAsset
Get Asset from denomination
Parameters
denomstring
Returns (Asset | null) The asset of the given denomination.
getCoinAmount
Parses amount from ICoin[]
Parameters
coinscoinstArray<ICoin> List of coins
Returns BaseAmount Coin amount
getCoinsByAsset
Filters ICoin[] by given Asset
Parameters
coinsassetAsset Asset to filter coinscoinstArray<ICoin> List of coins
Returns Array<ICoin> Filtered list
getTxsFromHistory
Parses transaction history
Parameters
txsArray<TxResponse> The transaction response from the node.assetAsset Asset to get history of transactions from
Returns Array<Tx> List of transactions
getQueryString
Get Query String
Parameters
paramsAPIQueryParam
Returns string The query string.
getDefaultFees
Get the default fee.
Returns Fees The default fee.
getPrefix
Get address prefix based on the network.
Returns string The address prefix based on the network.*
getDefaultClientUrls
Default client urls
Returns ClientUrls The client urls for Cosmos.
getDefaultChainIds
Default chain ids
Returns ChainIds Chain ids for Cosmos.
getChainId
Helper to get Cosmos' chain id
Parameters
urlstring API url
getChainIds
Helper to get Cosmos' chain id for all networks
Parameters
urlsClientUrl urls (usegetDefaultClientUrl()if you don't need to use custom urls)