MCPcopy Index your code
hub / github.com/BlueWallet/BlueWallet / uint8ArrayToHex

Function uint8ArrayToHex

blue_modules/uint8array-extras/index.js:191–203  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

189const byteToHexLookupTable = Array.from({ length: 256 }, (_, index) => index.toString(16).padStart(2, '0'));
190
191export function uint8ArrayToHex(array) {
192 assertUint8Array(array);
193
194 // Concatenating a string is faster than using an array.
195 let hexString = '';
196
197 // eslint-disable-next-line unicorn/no-for-loop -- Max performance is critical.
198 for (let index = 0; index < array.length; index++) {
199 hexString += byteToHexLookupTable[array[index]];
200 }
201
202 return hexString;
203}
204
205const hexToDecimalLookupTable = {
206 0: 0,

Callers 15

SelfTestClass · 0.90
TransactionStatusFunction · 0.90
handleSendTransactionFunction · 0.90
HashItFunction · 0.90
WalletsAddFunction · 0.90
handleSaveFunction · 0.90
WalletDetailsFunction · 0.90
renderItemFunction · 0.90

Calls 1

assertUint8ArrayFunction · 0.85

Tested by

no test coverage detected