Bitcoinjs-lib: Bech32 output

Created on 2 Apr 2018  路  2Comments  路  Source: bitcoinjs/bitcoinjs-lib

How should I create outputs to a native segwit bech32 address? Is it the same as a native address like this (but with a bc1.. addr)?
txb.addOutput(bitcoin.address.toOutputScript("1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX", network), +value);

how to / question / docs

Most helpful comment

Yes. Try it.

All 2 comments

Yes. Try it.

Thanks! just checkin

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dakk picture dakk  路  3Comments

askucher picture askucher  路  3Comments

zhaozhiming picture zhaozhiming  路  3Comments

namnv04 picture namnv04  路  3Comments

Beardcoding picture Beardcoding  路  3Comments