-
Notifications
You must be signed in to change notification settings - Fork 463
sign & push transaction separately #306
Comments
Got the following answer. Gonna work on make it run using eosjs. The docs don't go so much into detail, I try to find more information about
|
Did you see the cold storage example? https://github.com/EOSIO/eosjs#offline-or-cold-storage-transaction |
I did. It shows how to push separately. I'm interested in signing separately and then push it separately.
|
@MarcelBlockchain You can use That's how we're currently doing it. Keep in mind that if it's an action on a contract besides |
@aaroncox I worked through the file. Helped me to understand more, but is not exactly what I'm looking for. |
You never need |
Use ecc.pushTransaction to broadcast separate from any other action. |
Hi, i'm tackling the same issue and have a related question, when you sign the transaction on the other device, as shown in the mentioned example, you have to give it the transaction headers and prepare the same action. So far so good. But what if i happen to want to prepare the transaction today, and sign it tomorrow, and broadcast it a day later... That seems to invalidate the signature because the headers use expiration time and it is set to max 1 hour... Is there a way to bypass and have the transaction valid for broadcasting indefinitely, so long as the appropriate signature is added at any point in time? Thanks in advance. |
Goal: be able to separately create, sign and broadcast a transaction:
Global for both approaches:
Approach 1:
returns
"Invalid packed transaction"
Possible problem. Wrong
transaction
file ineos.pushTransaction()
or wrongdata
forecc.sign(data, ...)
Approach 2:
returns :
possible problem:
ecc.sign()
hast the wrong input. I tried to generate adigest
as suggested here, but could not find the option in eosjs.In https://github.com/EOSIO/eosjs/blob/v14.1.1/src/write-api.js#L406-L419 , a Buffer is used. I was not yet able to replicate it since I did not find the
Transaction
object/arg.The text was updated successfully, but these errors were encountered: