coinbase / mesh-specifications

Specification files for the Mesh Blockchain Standard
Apache License 2.0
324 stars 92 forks source link

Improve /account/balance Documentation #9

Closed patrick-ogrady closed 4 years ago

patrick-ogrady commented 4 years ago

Is your feature request related to a problem? Please describe. It is unclear if making an account balance request with an AccountIdentifier without a populated SubAccountIdentifier should return the balance of all SubAccountIdentifiers pertaining to an AccountIdentifier.

Describe the solution you'd like Clearly state the balance returned on a request that does not include a SubAccountIdentifier should only include the balance that does not pertain to any SubAccountIdentifier.

Specific Example In the case of a blockchain with staking, each address may have balances described by:

{
  "address": "addr"
}
{
  "address": "addr",
  "sub_account": {
    "address": "staked"
  }
}

The documentation should state that requests for the balance of {"address":"addr"} will not return the balance of {"address": "addr", "sub_account": {"address": "staked"}}.