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

Function writeLegacyScriptCode

modules/ecash-lib/src/unsignedTx.ts:101–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 sigHashType.inputType === SigHashTypeInputs.ANYONECANPAY;
100
101 const writeLegacyScriptCode = () => {
102 const ops = scriptCode.ops();
103 let nextOp: Op | undefined = undefined;
104 const newOps = [];
105 // Filter out all code separators
106 while ((nextOp = ops.next()) !== undefined) {
107 if (isPushOp(nextOp) || nextOp != OP_CODESEPARATOR) {
108 newOps.push(nextOp);
109 }
110 }
111 Script.fromOps(newOps).writeWithSize(writer);
112 };
113
114 const writeLegacyInput = (idx: number) => {
115 // In case of SIGHASH_ANYONECANPAY, only the input being signed is

Callers 1

writeLegacyInputFunction · 0.85

Calls 5

isPushOpFunction · 0.85
opsMethod · 0.80
writeWithSizeMethod · 0.80
fromOpsMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected