src/tx.js
// Build a witness from a pubkey and a signature
Build a witness from a pubkey and a signature
Build a witness from a pubkey and a signature
function wpkhWitness(pubkey, signature) {
  return utils.concatUint8Arrays(
    new Uint8Array([0x02, signature.length + 1]),
    signature,
    new Uint8Array([0x01, 33]), 
    pubkey
  );
}
function wpkhWitness ( pubkey , signature ) { return utils . concatUint8Arrays ( new Uint8Array ( [ 0x02 , signature . length + 1 ] ) , signature , new Uint8Array ( [ 0x01 , 33 ] ) , pubkey ) ; }
Build a witness from a pubkey and a signature
Build a witness from a pubkey and a signature
// SIGHASH_ALL + pubkey is always 33 bytes