bitcoinjs/bitcoinjs-lib

offline signing with multiple utxos from different addresses

dev-dantealighieri opened this issue · 3 comments

hi,

I want to create a transaction with different Utxos coming from different addresses(and private keys) and sign them offline. How can I use bitcoinjs for this? I have a signer that is using elliptic with secp256k1 function, how can i create a transaction and its data to sign, can you provide an example for it?

thanks, dante

it('can create (and broadcast via 3PBP) a typical Transaction', async () => {

I tried these but its not working, im getting different kinds of errors. For example even if I specify type as p2pkh, it gives me errors like redeem script is missing or not enough data (create payments method sends only two arguments bitcoin.payment.p2sh function, but this function expecting five arguments).

Can you provide a working example that generates the data to sign that i can sign via elliptic library with different utxo inputs from different addresses.