Util

DECIMAL

The decimal for cosmos chain.

isMsgSend

Type guard for MsgSend

Parameters

  • msg Msg

Returns boolean true or false.

isMsgMultiSend

Type guard for MsgMultiSend

Parameters

  • msg Msg

Returns boolean true or false.

getDenom

Get denomination from Asset

Parameters

  • asset Asset

Returns string The denomination of the given asset.

getAsset

Get Asset from denomination

Parameters

Returns (Asset | null) The asset of the given denomination.

getTxsFromHistory

Parse transaction type

Parameters

  • txs Array<TxResponse> The transaction response from the node.
  • mainAsset Asset Current main asset which depends on the network.

Returns Txs The parsed transaction result.

getQueryString

Get Query String

Parameters

  • params
  • APIQueryParam

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.*