In ripple, bitcoin and ethereum you can sign a transaction and push/broadcast signed transaction hash only. That effectively represents the whole transaction. for example


Is it possible in EOS as well?

I have signed a transaction and this is my signed transaction which I want to push:




Can I just used signature to push the transaction or do I have to send the Packed Transaction data as well?


Yes, you need the packed transaction data. If you add the flags --print-request and --print-response (example of this), you can see how the signature process works. It requires (docs):

  • txn - string
  • keys - string
  • id - string

The push transaction RPC API call requires:

  • signatures - array of signatures required to authorize transaction
  • compression - compression used, usually false
  • packed_context_free_data - string
  • packed_trx - string

In cleos, you can use the -d and --return-packed flags together to print to the console a signed transaction.

-d,--dont-broadcast  - don't broadcast transaction to the network (just print to stdout)
--return-packed      - used in conjunction with --dont-broadcast to get the packed transaction

So I did this for a simple contract:

cleos -u http://jungle2.cryptolions.io:80 push action -d --return-packed eosezchatnat sendmsg '["eosezchatnat","hi"]' -p eosezchatnat

  "signatures": [
  "compression": "none",
  "packed_context_free_data": "",
  "packed_trx": "56de0f5c82dc4a508078000000000190cdcca6a1af3055000000806199a6c20190cdcca6a1af305500000000a8ed32320b90cdcca6a1af305502686900"

You could then send that transaction to the chain.

  • 1
    Thanks, I have figured out as well. I used /v1/chain/abi_json_to_bin -X POST -d '{"code":"eosio.token", "action":"transfer", "args":{"from":"alice", "to":"bob", "quantity":"10.0000 EOS", "memo":"gift from alice to bob"}}' to get packed transaction.
    – VJV
    Dec 11 '18 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.