cosmos-sdk
cosmos-sdk copied to clipboard
Normalize account response
Summary
The response for vesting accounts has nested the parent struct "BaseVestingAccount".
Problem Definition
This is harder to parse as we need to switch if an account is a vesting account or a normal account.
Proposal
Let's just normalize the response ala:
{
"type":"auth/DelayedVestingAccount",
"value":{
"address":"xxx",
"coins":[
{
"denom":"uatom",
"amount":""
}
],
"public_key":{
"type":"tendermint/PubKeySecp256k1",
"value":""
},
"account_number":"",
"sequence":"",
"original_vesting":[
{
"denom":"uatom",
"amount":""
}
],
"delegated_free":null,
"delegated_vesting":[
{
"denom":"uatom",
"amount":""
}
],
"end_time":""
}
For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned
Hmm. What would you like to parse - all the fields at the top level?
yes, as the standard auth/Account
has all the fields on the top level as well. "top level" means ".value".
This can be done if we just implement the json encoding interfaces for these accounts using the vanilla json
marshaller and not Amino.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
closing, reopen if still applicable