Skip to content
This repository has been archived by the owner on Dec 22, 2019. It is now read-only.

Support for cosmos json address #49

Open
ethanfrey opened this issue Jul 1, 2019 · 0 comments
Open

Support for cosmos json address #49

ethanfrey opened this issue Jul 1, 2019 · 0 comments
Assignees

Comments

@ethanfrey
Copy link

User Story

First off, very nice progress and I do like the interfaces you provide. But I want to create amino json that I can sign properly.

Why Is this Needed?

One point I noticed looking over the readme, is that addresses are an array of bytes in the json output. However, to create proper "canonical json" for signing I belive them must be in the bech32 format of cosmosacct1q..... The base64 binary inside of signatures is easy enough to read, properly encoded in binary, and is not included in signbytes, so this shouldn't be an issue

{"type":"auth/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgMultiSend","value":{"inputs":[{"address":[59,58,243,13,132,163,164,202,233,7,236,93,136,166,181,175,236,69,48,186],"coins":[{"denom":"cyb","amount":"10000"}]}],"outputs":[{"address":[94,222,114,42,196,107,51,203,139,142,219,243,137,60,54,250,139,153,46,168],"coins":[{"denom":"cyb","amount":"10000"}]}]}}],"fee":{"amount":[{"denom":"cyb","amount":"0"}],"gas":"200000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AhsYAP9gkxVAHYTAbNs7hs7JfuA/oBjsqnykXyu0Bvb6"},"signature":"pUxtPTWBvpM04CJq69DgJL4ZzCTigWFtI4LZ5JBqCoYOt1/82+sWXCU1A1lvrQyekkdScezxqnnZFOwXgyNQHQ=="}],"memo":"elonmusk"}}

Definition of Done

Json output is compatible with the json used for sign bytes in cosmos hub tx signing

Additional Information

@cyborgshead cyborgshead self-assigned this Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants