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

Function encodePushCount

packages/utils/src/fingerprint.ts:62–64  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

60// Encode a push count using the smallest possible push encoding.
61// libauth's encodeDataPush minimally encodes VM Numbers in the -1..16 range as OP_N.
62function encodePushCount(count: number): Uint8Array {
63 return encodeDataPush(encodeInt(BigInt(count)));
64}

Callers 1

computeBytecodePatternFunction · 0.85

Calls 1

encodeIntFunction · 0.85

Tested by

no test coverage detected