1 2 3 4 5 6 7 8 9
import { encodeCrock } from './wallet-core/packages/taler-util/lib/index.js' const hex = process.argv[2]; const typedArray = new Uint8Array(hex.match(/[\da-f]{2}/gi).map(function (h) { return parseInt(h, 16) })) console.log(encodeCrock(typedArray));