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

Function p2pkh

packages/utils/test/fingerprint.test.ts:106–108  ·  view source on GitHub ↗
(pkh: Uint8Array)

Source from the content-addressed store, hash-verified

104
105 it('is invariant to the values of pushed data', () => {
106 const p2pkh = (pkh: Uint8Array): Uint8Array => (
107 concat(Op.OP_DUP, Op.OP_HASH160, Op.OP_PUSHBYTES_20, pkh, Op.OP_EQUALVERIFY, Op.OP_CHECKSIG)
108 );
109 const bytecodeA = p2pkh(new Uint8Array(20).fill(0xaa));
110 const bytecodeB = p2pkh(new Uint8Array(20).fill(0xbb));
111 expect(computeBytecodeFingerprint(bytecodeA)).toBe(computeBytecodeFingerprint(bytecodeB));

Callers 1

Calls 1

concatFunction · 0.85

Tested by

no test coverage detected