tronprotocol / trident

151 stars 117 forks source link

Multi-signature Transactions - How to use client signature data for secondary signing and broadcast? #142

Open skysame opened 1 month ago

skysame commented 1 month ago

{ "visible": false, "txID": "276ce25939e58a2e5beb0058b698e370f4feb2fce8ef58d101b3e56c15dae8d2", "raw_data": { "contract": [ { "parameter": { "value": { "data": "a9059cbb0000000000000000000000008deee504836164970a8909bab4ede87a31e7ea5800000000000000000000000000000000000000000000000000000000001e8480", "owner_address": "415d7828ea9e9008fffbecb65eee42647d9226b430", "contract_address": "41eca9bc828a3005b9a3b909f2cc5c2a54794de05f" }, "type_url": "type.googleapis.com/protocol.TriggerSmartContract" }, "type": "TriggerSmartContract", "Permission_id": 2 } ], "ref_block_bytes": "4692", "ref_block_hash": "8779b3335b7986b2", "expiration": 1729705098000, "fee_limit": 50000000, "timestamp": 1729705040422 }, "raw_data_hex": "0a02469222088779b3335b7986b24090f6d4d3ab325ab001081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a15415d7828ea9e9008fffbecb65eee42647d9226b430121541eca9bc828a3005b9a3b909f2cc5c2a54794de05f2244a9059cbb0000000000000000000000008deee504836164970a8909bab4ede87a31e7ea5800000000000000000000000000000000000000000000000000000000001e8480280270a6b4d1d3ab32900180e1eb17", "signature": [ "f7edffb43fb93b718b2f19e937514d2ce4ec9893fb179821f4239e3ebf39a63f5c77db68e6ad2186f43897e9a75b496f1bed1c3e49a24eaa32e26e5f97143f1c1B" ] } Multi-signature Transactions - How to use client signature data for secondary signing and broadcast? How do I construct a Transaction with this data?

endiaoekoe commented 1 month ago

@skysame

How to use client signature data for secondary signing

currently,trident does not support multisig directly(no methods which can use directlly). but per my understanding, you can make a little code change in Apiwrapper.java(then rebuild the source codes) to support construct multisig tx. the Tranction Object can add more than one signature which means it can support multi sigatures

the code changes will be as below i think.

image
skysame commented 1 month ago

@endiaoekoe I know how to implement multi-sign transactions, but I don't know how to build transactionExtention with the data sent after the front-end signature

endiaoekoe commented 2 weeks ago

@endiaoekoe I know how to implement multi-sign transactions, but I don't know how to build transactionExtention with the data sent after the front-end signature

please refer to this page