src/tx.js
// Append a witness built from a pubkey and a signature to the transaction
Append a witness built from a pubkey and a signature to the transaction
Append a witness built from a pubkey and a signature to the transaction
function appendWitness(tx, pubkey, signature) {
  const timelock = utils.safeSlice(tx, tx.length - 4);
  const body = utils.safeSlice(tx, 0, tx.length - 4);
  return utils.concatUint8Arrays(
    body,
    wpkhWitness(pubkey, signature),
    timelock
  );
}
function appendWitness ( tx , pubkey , signature ) { const timelock = utils . safeSlice ( tx , tx . length - 4 ) ; const body = utils . safeSlice ( tx , 0 , tx . length - 4 ) ; return utils . concatUint8Arrays ( body , wpkhWitness ( pubkey , signature ) , timelock ) ; }
Append a witness built from a pubkey and a signature to the transaction
Append a witness built from a pubkey and a signature to the transaction