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

Method parseBareMultisigSpend

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

* Parse bare multisig spend scriptSig to extract signatures. * For bare multisig the output script is the multisig script; the scriptSig * is [dummy] sig1 sig2 ... sig_m with no redeem script. * Assumes a fully-formed scriptSig (see parseP2shMultisigSpend for details). * @param o

(outputScript: Script)

Source from the content-addressed store, hash-verified

353 * @param outputScript - The multisig output script (OP_m pubkey1 ... pubkey_n OP_n OP_CHECKMULTISIG)
354 */
355 public parseBareMultisigSpend(outputScript: Script): {
356 signatures: (Uint8Array | undefined)[];
357 numSignatures: number;
358 numPubkeys: number;
359 pubkeys: Uint8Array[];
360 isSchnorr: boolean;
361 pubkeyIndices?: Set<number>;
362 } {
363 const ops: Op[] = [];
364 const iter = this.ops();
365 let op: Op | undefined;
366 while ((op = iter.next()) !== undefined) {
367 ops.push(op);
368 }
369 return Script.parseMultisigScriptSig(ops, outputScript);
370 }
371
372 /** Parse an OP_m ... OP_CHECKMULTISIG redeem script (used by multisig PSBT flows). */
373 public parseMultisigRedeemScript(): {

Callers 7

script.test.tsFile · 0.80
addMultisigSignatureMethod · 0.80
isFullySignedMultisigMethod · 0.80
multisig.test.tsFile · 0.80
txBuilder.test.tsFile · 0.80

Calls 3

opsMethod · 0.95
nextMethod · 0.45

Tested by

no test coverage detected