mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
8 lines
191 B
TypeScript
8 lines
191 B
TypeScript
export default function hexToBytes(hex: string) {
|
|
const bytes = [];
|
|
for (let c = 0; c < hex.length; c += 2) {
|
|
bytes.push(parseInt(hex.substring(c, c + 2), 16));
|
|
}
|
|
return bytes;
|
|
}
|