forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Mar 01, 2022, 05:40 am

Title: createPaymentTransactionNew with Bech32 address
Post by: Bitcoin on Mar 01, 2022, 05:40 am
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 (https://bitcoin.stackexchange.com/questions/103624/createpaymenttransactionnew-with-bech32-address)