익명 02:53

createPaymentTransactionNew with Bech32 address

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"]
                });


Top Answer/Comment:
 tx = await app.createPaymentTransactionNew(
      inputs,
      paths,
      derivationPath,
      serializedOutputs, // app.serializeTransactionOutputs({ outputs }).toString('hex')
      undefined,
      undefined,
      true,
      undefined,
      ['bech32']
    )
상단 광고의 [X] 버튼을 누르면 내용이 보입니다