MCPcopy Index your code
hub / github.com/CashScript/cashscript / computeBytecodeFingerprint

Function computeBytecodeFingerprint

packages/utils/src/fingerprint.ts:44–46  ·  view source on GitHub ↗
(bytecode: Uint8Array)

Source from the content-addressed store, hash-verified

42
43// Compute the SHA256 fingerprint of the normalized bytecode pattern, returned as hex.
44export function computeBytecodeFingerprint(bytecode: Uint8Array): string {
45 return binToHex(sha256(computeBytecodePattern(bytecode)));
46}
47
48// Add placeholder constructor arguments to the bytecode script and compute the fingerprint.
49export function computeBytecodeFingerprintWithConstructorArgs(bytecodeScript: Script, constructorArgsCount: number): string {

Calls 2

sha256Function · 0.85
computeBytecodePatternFunction · 0.85

Tested by

no test coverage detected