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

Function calculateBytesize

packages/utils/src/script.ts:126–128  ·  view source on GitHub ↗
(script: Script)

Source from the content-addressed store, hash-verified

124}
125
126export function calculateBytesize(script: Script): number {
127 return scriptToBytecode(script).byteLength;
128}
129
130// For encoding OP_RETURN data (doesn't require BIP62.3 / MINIMALDATA)
131export function encodeNullDataScript(chunks: OpOrData[]): Uint8Array {

Callers 3

constructorMethod · 0.90
runFunction · 0.90
script.test.tsFile · 0.85

Calls 1

scriptToBytecodeFunction · 0.85

Tested by

no test coverage detected