• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

createPaymentTransactionNew with Bech32 address

Started by Bitcoin, Mar 01, 2022, 05:40 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

createPaymentTransactionNew with Bech32 address

How to properly call createPaymentTransactionNew using @ledgerhq/hw-app-bt to spend utxos from a bech32 transaction?


This is the code I'm using to call it, having previously defined inputs and purpose, coinPath, accountNumber:


tx = await appBtc.createPaymentTransactionNew({
                    inputs: inputs,
                    associatedKeysets: `${purpose}'/${coinPath}'/${accountNumber}'/0/0`,
                    outputScriptHex: outputScriptHex,
                    segwit:true,
                    additionals: ["bech32"]
                });

Source: createPaymentTransactionNew with Bech32 address