Utils
getHashFromTransfer
Get hash from transfer event sent by Binance chain.
Parameters
transferTransferEvent The transfer event. (optional)
Returns (string | undefined) The hash from transfer event.
getTxHashFromMemo
Get hash from memo
Parameters
transferTransferEvent The transfer event. (optional)
Returns (string | undefined) The hash from the memo.
isFee
Type guard for runtime checks of Fee
Parameters
v(Fee | TransferFee | DexFees)
Returns boolean true or false.
isTransferFee
Type guard for TransferFee
Parameters
v(Fee | TransferFee | DexFees)
Returns boolean true or false.
isDexFees
Type guard for DexFees
Parameters
v(Fee | TransferFee | DexFees)
Returns boolean true or false.
isAccount
Type guard for Account
Parameters
vunknown
Returns boolean true or false.
getTxType
Get TxType
Parameters
tBinanceTxType
Returns TxType transfer or unknown.
parseTx
Parse Tx
Parameters
txtBinanceTx The transaction to be parsed. (optional)
Returns (Tx | null) The transaction parsed from the binance tx.
getDerivePath
Get DerivePath
Parameters
indexnumber (optional) (optional, default0)
Returns DerivePath The binance derivation path by the index.
getDefaultFees
Get the default fee.
Returns Fees The default fee.
getPrefix
Get address prefix based on the network.
Parameters
networkNetwork
Returns string The address prefix based on the network.*