rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
162 stars 85 forks source link

[gh-2473] add a tx sign subcommand. #2477

Closed feliciss closed 2 months ago

feliciss commented 2 months ago

Summary

rooch tx sign or rooch transaction sign command for signing the output from rooch tx build.

Sign tx with --tx-hex:

rooch transaction sign --tx-hex 0ea3bb55c14aec8e074cd48c6a850526aa46965e176df53fadb433adeeeb56570000000000000000040000000000000000e1f5050000000001000000000000000000000000000000000000000000000000000000000000000305656d70747905656d7074790000 --output 
Sign transaction succeeded with the signed transaction hex [0ea3bb55c14aec8e074cd48c6a850526aa46965e176df53fadb433adeeeb56570000000000000000040000000000000000e1f5050000000001000000000000000000000000000000000000000000000000000000000000000305656d70747905656d70747900000100000000000000d101408a21fac7d536f667d84760bdd6bb8a2da0635422c0602d08c46b570a4d725863456cd1ede688fd77cea59c784c1d559687a1ada0df91e690e93c2adc8f7d42f218426974636f696e205369676e6564204d6573736167653a0a13526f6f6368205472616e73616374696f6e3a0a21028b2ed052fd389c09184a08fa8ffd1baa5ae5cdbf76f6369e4fd67e7b2af59adf406263727431707768756d7737326332686a6e7730633066367365643768783065306e687073366d75327767747638647761647165663777756a71376668767338]

Sign tx with reading file buffers:

rooch transaction sign --read --file-location ~/text.txt --output
Sign transaction succeeded with the signed transaction hex [0ea3bb55c14aec8e074cd48c6a850526aa46965e176df53fadb433adeeeb56570000000000000000040000000000000000e1f5050000000001000000000000000000000000000000000000000000000000000000000000000305656d70747905656d70747900000100000000000000d101408a21fac7d536f667d84760bdd6bb8a2da0635422c0602d08c46b570a4d725863456cd1ede688fd77cea59c784c1d559687a1ada0df91e690e93c2adc8f7d42f218426974636f696e205369676e6564204d6573736167653a0a13526f6f6368205472616e73616374696f6e3a0a21028b2ed052fd389c09184a08fa8ffd1baa5ae5cdbf76f6369e4fd67e7b2af59adf406263727431707768756d7737326332686a6e7730633066367365643768783065306e687073366d75327767747638647761647165663777756a71376668767338]
rooch transaction sign --read --file-location ~/text.txt --file-destination ~/out.txt 
Write signed tx data succeeded in the destination
vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 4:55pm
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **rooch** | ⬜️ Ignored ([Inspect](https://vercel.com/rooch/rooch/GfZCnB1eRawf9ip4Gmhk9GNJ9S5U)) | [Visit Preview](https://rooch-git-fork-feliciss-2473-rooch.vercel.app) | | Aug 22, 2024 4:55pm |
feliciss commented 2 months ago

Next PR I'll squash this. Sorry for that.