MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / writeWithSize

Method writeWithSize

modules/ecash-lib/src/script.ts:48–51  ·  view source on GitHub ↗

* Write the script to the writer with the script size as VARINT * prepended.

(writer: Writer)

Source from the content-addressed store, hash-verified

46 * prepended.
47 **/
48 public writeWithSize(writer: Writer) {
49 writeVarSize(this.bytecode.length, writer);
50 writer.putBytes(this.bytecode);
51 }
52
53 public static readWithSize(bytes: Bytes) {
54 const size = readVarSize(bytes);

Callers 6

script.test.tsFile · 0.80
writeLegacyScriptCodeFunction · 0.80
writeLegacyInputFunction · 0.80
writePreimageMethod · 0.80
writeTxInputFunction · 0.80
writeTxOutputFunction · 0.80

Calls 2

writeVarSizeFunction · 0.85
putBytesMethod · 0.65

Tested by

no test coverage detected