libitx / txforge

Modern Bitcoin transaction builder, capable of supporting any non-standard and custom script type.
Apache License 2.0
63 stars 21 forks source link

Format for 'myPrivateKey' in Example #19

Closed Klar closed 2 years ago

Klar commented 2 years ago

Which Format must the 'myPrivateKey' be in the example forge Transaction?

I'm currently trying with bsv v2: const privKey = bsv.PrivKey.fromWif(myPrivateKey) but it does not work.

Maybe you could add a "real" privateKey as an example.

libitx commented 2 years ago

TxForge >= 2.0 uses nimble not bsv2, so it would be nimble.PrivateKey.fromString(wif)

If you don't want to use nimble, TxForge legacy uses bsv2 so it would be as you expect (although minor api differences in txforge so make sure you refer to the legacy branch readme.