The p2wsh method will generate an object that contains the P2WSH address. const p2wsh = bitcoin.payments.p2wsh({redeem: {output: witnessScript, network}, network}) console.log('p2wsh.address ', p2wsh.address) Send 1 BTC to this P2WSH address, which is the reward for whoever as the solution to the locking script.. To generate a P2SH address you have to hash the redeem script first with SHA256 and then with RIPEMD-160. The output script for P2SH address looks like this: OP_HASH160 <hash of the redeem script> OP_EQUAL P2WSH. In P2WSH addresses the reedem script is only hashed with SHA256. The output script is also a little simpler: OP_0 <hash of the redeem .... "/>P2wsh address