chronik/utils library
Extensions
Functions
-
bytesToHex(
Iterable< int> bytes) → String - Convert bytes to hex string
-
convertToBlock(
Block pbBlock) → Block -
convertToBlockchainInfo(
BlockchainInfo pbInfo) → BlockchainInfo -
convertToBlockInfo(
BlockInfo pbBlockInfo) → BlockInfo -
convertToChronikInfo(
ChronikInfo chronikInfo) → ChronikInfo -
convertToGenesisInfo(
GenesisInfo genesisInfo, TokenType tokenType) → GenesisInfo -
convertToTokenInfo(
TokenInfo tokenInfo) → TokenInfo -
convertToTx(
Tx pbTx) → Tx - Convert a protocol buffer Tx to a user-friendly Tx object
-
convertToUtxo(
Utxo utxo) → Utxo -
hexToBytes(
String hex) → List< int> - Convert a hex string to bytes
-
isValidLokadId(
String lokadId) → bool - Validate a lokad ID (should be 4 bytes in hex format)
-
isValidTokenId(
String tokenId) → bool - Validate a token ID (should be 32 bytes in hex format)
-
isValidTxId(
String txId) → bool - Validate a transaction ID (should be 32 bytes in hex format)
-
measureWebsocketLatency(
String wsUrl) → Future< double> - Measure WebSocket connection latency to a given URL
-
normalizeScriptType(
String scriptType) → String - Convert a script type string to normalized ScriptType enum value
-
sortNodesByLatency(
List< String> urls) → Future<List< String> > - Sort a list of server URLs by their WebSocket latency (fastest first)