Utils
getHashFromTransfer
Get hash
from transfer event sent by Binance chain.
Parameters
transfer
TransferEvent The transfer event. (optional)
Returns (string | undefined) The hash from transfer event.
getTxHashFromMemo
Get hash
from memo
Parameters
transfer
TransferEvent 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
v
unknown
Returns boolean true
or false
.
getTxType
Get TxType
Parameters
t
BinanceTxType
Returns TxType transfer
or unknown
.
parseTx
Parse Tx
Parameters
tx
t
BinanceTx The transaction to be parsed. (optional)
Returns (Tx | null) The transaction parsed from the binance tx.
getDerivePath
Get DerivePath
Parameters
index
number (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
network
Network
Returns string The address prefix based on the network.*