feat: Introduce Cosmos Scalars (#9933)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #9694

goes hand-in-hand with https://github.com/cosmos/cosmos-proto/pull/17

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
This commit is contained in:
Andrei Ivasko
2021-09-21 09:46:29 +00:00
committed by GitHub
parent 16cd1307f9
commit 94377f1cb3
93 changed files with 2912 additions and 2632 deletions
+20 -18
View File
@@ -3199,7 +3199,7 @@ GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method.
<a name="cosmos.base.tendermint.v1beta1.GetNodeInfoResponse"></a>
### GetNodeInfoResponse
GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method.
GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.
| Field | Type | Label | Description |
@@ -7223,11 +7223,12 @@ Class defines the class of the nft type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | |
| `name` | [string](#string) | | |
| `symbol` | [string](#string) | | |
| `description` | [string](#string) | | |
| `uri` | [string](#string) | | |
| `id` | [string](#string) | | id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 |
| `name` | [string](#string) | | name defines the human-readable name of the NFT classification |
| `symbol` | [string](#string) | | symbol is an abbreviated name for nft classification |
| `description` | [string](#string) | | description is a brief description of nft classification |
| `uri` | [string](#string) | | uri is a URI may point to a JSON file that conforms to the nft classification Metadata JSON Schema. |
| `uri_hash` | [string](#string) | | uri_hash is a hash of the document pointed to uri |
@@ -7237,15 +7238,16 @@ Class defines the class of the nft type.
<a name="cosmos.nft.v1beta1.NFT"></a>
### NFT
NFT defines the nft.
NFT defines the NFT.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `class_id` | [string](#string) | | |
| `id` | [string](#string) | | |
| `uri` | [string](#string) | | |
| `data` | [google.protobuf.Any](#google.protobuf.Any) | | |
| `class_id` | [string](#string) | | class_id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 |
| `id` | [string](#string) | | id defines the unique identification of NFT |
| `uri` | [string](#string) | | uri defines NFT's metadata storage address outside the chain |
| `uri_hash` | [string](#string) | | uri_hash is a hash of the document pointed to uri |
| `data` | [google.protobuf.Any](#google.protobuf.Any) | | data is the metadata of the NFT |
@@ -7276,8 +7278,8 @@ Entry Defines all nft owned by a person
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `owner` | [string](#string) | | |
| `nfts` | [NFT](#cosmos.nft.v1beta1.NFT) | repeated | |
| `owner` | [string](#string) | | owner is the owner address of the following nft |
| `nfts` | [NFT](#cosmos.nft.v1beta1.NFT) | repeated | nfts is a group of nfts of the same owner |
@@ -7548,7 +7550,7 @@ Query defines the gRPC querier service.
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `Balance` | [QueryBalanceRequest](#cosmos.nft.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.nft.v1beta1.QueryBalanceResponse) | Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 | GET|/cosmos/nft/v1beta1/balance/{class_id}/{owner}|
| `Owner` | [QueryOwnerRequest](#cosmos.nft.v1beta1.QueryOwnerRequest) | [QueryOwnerResponse](#cosmos.nft.v1beta1.QueryOwnerResponse) | Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 | GET|/cosmos/nft/v1beta1/owner/{class_id}/{id}|
| `Supply` | [QuerySupplyRequest](#cosmos.nft.v1beta1.QuerySupplyRequest) | [QuerySupplyResponse](#cosmos.nft.v1beta1.QuerySupplyResponse) | Supply queries the number of nft based on the class, same as totalSupply of ERC721 | GET|/cosmos/nft/v1beta1/supply/{class_id}|
| `Supply` | [QuerySupplyRequest](#cosmos.nft.v1beta1.QuerySupplyRequest) | [QuerySupplyResponse](#cosmos.nft.v1beta1.QuerySupplyResponse) | Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. | GET|/cosmos/nft/v1beta1/supply/{class_id}|
| `NFTsOfClass` | [QueryNFTsOfClassRequest](#cosmos.nft.v1beta1.QueryNFTsOfClassRequest) | [QueryNFTsOfClassResponse](#cosmos.nft.v1beta1.QueryNFTsOfClassResponse) | NFTsOfClass queries all NFTs of a given class or optional owner, similar to tokenByIndex in ERC721Enumerable | GET|/cosmos/nft/v1beta1/nfts/{class_id}|
| `NFT` | [QueryNFTRequest](#cosmos.nft.v1beta1.QueryNFTRequest) | [QueryNFTResponse](#cosmos.nft.v1beta1.QueryNFTResponse) | NFT queries an NFT based on its class and id. | GET|/cosmos/nft/v1beta1/nfts/{class_id}/{id}|
| `Class` | [QueryClassRequest](#cosmos.nft.v1beta1.QueryClassRequest) | [QueryClassResponse](#cosmos.nft.v1beta1.QueryClassResponse) | Class queries an NFT class based on its id | GET|/cosmos/nft/v1beta1/classes/{class_id}|
@@ -7573,10 +7575,10 @@ MsgSend represents a message to send a nft from one account to another account.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `class_id` | [string](#string) | | |
| `id` | [string](#string) | | |
| `sender` | [string](#string) | | |
| `receiver` | [string](#string) | | |
| `class_id` | [string](#string) | | class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 |
| `id` | [string](#string) | | id defines the unique identification of nft |
| `sender` | [string](#string) | | sender is the address of the owner of nft |
| `receiver` | [string](#string) | | receiver is the receiver address of nft |