cosmos/nft
Table of Contents
cosmos/nft/module/v1/module.proto
TopModule
Module is the config object of the nft module.
cosmos/nft/v1beta1/event.proto
TopEventBurn
EventBurn is emitted on Burn
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| id | string | id is a unique identifier of the nft |
|
| owner | string | owner is the owner address of the nft |
EventMint
EventMint is emitted on Mint
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| id | string | id is a unique identifier of the nft |
|
| owner | string | owner is the owner address of the nft |
EventSend
EventSend is emitted on Msg/Send
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| id | string | id is a unique identifier of the nft |
|
| sender | string | sender is the address of the owner of nft |
|
| receiver | string | receiver is the receiver address of nft |
cosmos/nft/v1beta1/genesis.proto
TopEntry
Entry Defines all nft owned by a person
| Field | Type | Label | Description |
| owner | string | owner is the owner address of the following nft |
|
| nfts | NFT | repeated | nfts is a group of nfts of the same owner |
GenesisState
GenesisState defines the nft module's genesis state.
| Field | Type | Label | Description |
| classes | Class | repeated | class defines the class of the nft type. |
| entries | Entry | repeated | entry defines all nft owned by a person. |
cosmos/nft/v1beta1/nft.proto
TopClass
Class defines the class of the nft type.
| Field | Type | Label | Description |
| id | string | id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 |
|
| name | string | name defines the human-readable name of the NFT classification. Optional |
|
| symbol | string | symbol is an abbreviated name for nft classification. Optional |
|
| description | string | description is a brief description of nft classification. Optional |
|
| uri | string | uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional |
|
| uri_hash | string | uri_hash is a hash of the document pointed by uri. Optional |
|
| data | google.protobuf.Any | data is the app specific metadata of the NFT class. Optional |
NFT
NFT defines the NFT.
| Field | Type | Label | Description |
| class_id | string | class_id associated with the NFT, similar to the contract address of ERC721 |
|
| id | string | id is a unique identifier of the NFT |
|
| uri | string | uri for the NFT metadata stored off chain |
|
| uri_hash | string | uri_hash is a hash of the document pointed by uri |
|
| data | google.protobuf.Any | data is an app specific data of the NFT. Optional |
cosmos/nft/v1beta1/query.proto
TopQueryBalanceRequest
QueryBalanceRequest is the request type for the Query/Balance RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| owner | string | owner is the owner address of the nft |
QueryBalanceResponse
QueryBalanceResponse is the response type for the Query/Balance RPC method
| Field | Type | Label | Description |
| amount | uint64 | amount is the number of all NFTs of a given class owned by the owner |
QueryClassRequest
QueryClassRequest is the request type for the Query/Class RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
QueryClassResponse
QueryClassResponse is the response type for the Query/Class RPC method
| Field | Type | Label | Description |
| class | Class | class defines the class of the nft type. |
QueryClassesRequest
QueryClassesRequest is the request type for the Query/Classes RPC method
| Field | Type | Label | Description |
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryClassesResponse
QueryClassesResponse is the response type for the Query/Classes RPC method
| Field | Type | Label | Description |
| classes | Class | repeated | class defines the class of the nft type. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryNFTRequest
QueryNFTRequest is the request type for the Query/NFT RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| id | string | id is a unique identifier of the NFT |
QueryNFTResponse
QueryNFTResponse is the response type for the Query/NFT RPC method
| Field | Type | Label | Description |
| nft | NFT | owner is the owner address of the nft |
QueryNFTsRequest
QueryNFTstRequest is the request type for the Query/NFTs RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| owner | string | owner is the owner address of the nft |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryNFTsResponse
QueryNFTsResponse is the response type for the Query/NFTs RPC methods
| Field | Type | Label | Description |
| nfts | NFT | repeated | NFT defines the NFT |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryOwnerRequest
QueryOwnerRequest is the request type for the Query/Owner RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
|
| id | string | id is a unique identifier of the NFT |
QueryOwnerResponse
QueryOwnerResponse is the response type for the Query/Owner RPC method
| Field | Type | Label | Description |
| owner | string | owner is the owner address of the nft |
QuerySupplyRequest
QuerySupplyRequest is the request type for the Query/Supply RPC method
| Field | Type | Label | Description |
| class_id | string | class_id associated with the nft |
QuerySupplyResponse
QuerySupplyResponse is the response type for the Query/Supply RPC method
| Field | Type | Label | Description |
| amount | uint64 | amount is the number of all NFTs from the given class |
Query
Query defines the gRPC querier service.
| Method Name | Request Type | Response Type | Description |
| Balance | QueryBalanceRequest | QueryBalanceResponse | Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 |
| Owner | QueryOwnerRequest | QueryOwnerResponse | Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 |
| Supply | QuerySupplyRequest | QuerySupplyResponse | Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. |
| NFTs | QueryNFTsRequest | QueryNFTsResponse | NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in ERC721Enumerable |
| NFT | QueryNFTRequest | QueryNFTResponse | NFT queries an NFT based on its class and id. |
| Class | QueryClassRequest | QueryClassResponse | Class queries an NFT class based on its id |
| Classes | QueryClassesRequest | QueryClassesResponse | Classes queries all NFT classes |
Methods with HTTP bindings
| Method Name | Method | Pattern | Body |
| Balance | GET | /cosmos/nft/v1beta1/balance/{owner}/{class_id} | |
| Owner | GET | /cosmos/nft/v1beta1/owner/{class_id}/{id} | |
| Supply | GET | /cosmos/nft/v1beta1/supply/{class_id} | |
| NFTs | GET | /cosmos/nft/v1beta1/nfts | |
| NFT | GET | /cosmos/nft/v1beta1/nfts/{class_id}/{id} | |
| Class | GET | /cosmos/nft/v1beta1/classes/{class_id} | |
| Classes | GET | /cosmos/nft/v1beta1/classes |
cosmos/nft/v1beta1/tx.proto
TopMsgSend
MsgSend represents a message to send a nft from one account to another account.
| Field | Type | Label | Description |
| class_id | string | class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 |
|
| id | string | id defines the unique identification of nft |
|
| sender | string | sender is the address of the owner of nft |
|
| receiver | string | receiver is the receiver address of nft |
MsgSendResponse
MsgSendResponse defines the Msg/Send response type.
Msg
Msg defines the nft Msg service.
| Method Name | Request Type | Response Type | Description |
| Send | MsgSend | MsgSendResponse | Send defines a method to send a nft from one account to another account. |
Scalar Value Types
| .proto Type | Notes | Python Type |
| double | float | |
| float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int/long |
| uint32 | Uses variable-length encoding. | int/long |
| uint64 | Uses variable-length encoding. | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | int/long |
| sfixed32 | Always four bytes. | int |
| sfixed64 | Always eight bytes. | int/long |
| bool | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | str |