eos icon indicating copy to clipboard operation
eos copied to clipboard

How to get the packed transaction

Open yankunsam opened this issue 8 years ago • 7 comments

Like ""packed_trx": "a8eb185baa00dc3b8641000000000100a6823403ea3055000000572d3ccdcd0100a6823403ea305500000000a8ed32322200a6823403ea30550000000000ea3055a0860100000000000453595300000000016d00","

Because I try push a transaction by HTTP API.

yankunsam avatar Jun 07 '18 14:06 yankunsam

I write a python a python EOS tool for pack sign and net request. you can use this like

`pip instll eosiopy raw = RawinputParams("transfer", { "from": "eosio.token", "memo": "dd", "quantity": "20.0000 EOS", "to": "eosio" }, "eosio.token", "eosio.token@active")

eosiop_arams=EosioParams(raw.eos_params) eosiop_arams.trx_json` eosiopy github

eosmoto avatar Jun 08 '18 03:06 eosmoto

How to get packed_trx without external code?

egonson avatar Jun 18 '18 07:06 egonson

@sergmetelin Im interested in this as well. I've written a ByteWriter class in swift based on some others I've seen online, but keep running into the "Invalid Packed Transaction" error when pushing via push_transaction to rpc. Is there anywhere that documents the requirements on how exactly to pack a transaction so that it can be written in any language?

Here is my current version. https://gist.github.com/ismyhc/8825bb4b560b061d91289967ddff45b7

ismyhc avatar Jul 03 '18 16:07 ismyhc

Is there some new process? I am confused about the pack transaction implement.

yankunsam avatar Jul 05 '18 09:07 yankunsam

@yankunsam As I know, there are 2 ways to get out packed_trx

  1. use cleos convert pack_transaction ‘{JSON format trans } ’ , please refer cleos -h for more info
  2. Rewrite the packed function by yourself

readygo586 avatar Sep 18 '18 02:09 readygo586

@readygo586 Thanks for your reply. I think if eos supply this RPC, it will be better.

yankunsam avatar Sep 18 '18 02:09 yankunsam

Yes, as @readygo586 said, you can use cleos convert pack_transaction

If you still have the problem and wish to discuss further, please post it in https://eosio.stackexchange.com. To keep things organized, Github issues are intended for bugs reporting and features tracking, and Stack Exchange is the right place for any technical support discussions. Thanks!

andriantolie avatar Oct 31 '18 06:10 andriantolie