MCPcopy Create free account
hub / github.com/CashScript/cashscript / toBin

Function toBin

packages/cashscript/src/utils.ts:262–266  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

260}
261
262function toBin(output: string): Uint8Array {
263 const data = output.replace(/^0x/, '');
264 const encode = data === output ? utf8ToBin : hexToBin;
265 return encode(data);
266}
267
268export function createSighashPreimage(
269 transaction: Transaction,

Callers 1

createOpReturnOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected