-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to sign transaction offline #3732
Comments
Your code is correct. If you want to clean it up a bit, you actually don't need to re-assign tx as all of those will modify tx in place. As for signing, your private keys need to be the corresponding private keys for the |
thanks for the reply @kajoseph! I have an external service to sign, which does not use If its this way, how should i construct the final transaction object before broadcasting? If my way is not correct, whats the correct way? thanks, dante |
The sign function can take an array of private keys to sign all utxos, or you can call tx.sign multiple times. If you're only trying to use I would recommend using bitcore-lib in your signing service if you can, then do something like this:
Signer:
Then broadcast the signed tx. |
thanks for the reply, sorry for my questions, im not familiar with bitcoin. I don't get how should i create what should i do for each addresses utxo's? should i create a it would be great if you provide a working example, or types that i shall use thanks, dante |
@kajoseph hello, can you provide information on how I can sign utxos with different private keys on same transaction? |
I have two questions
tx.to
usage correct?thanks, dante
The text was updated successfully, but these errors were encountered: