cosmos/nft

Table of Contents

cosmos/nft/module/v1/module.proto

Top

Module

Module is the config object of the nft module.

cosmos/nft/v1beta1/event.proto

Top

EventBurn

EventBurn is emitted on Burn

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

Top

Entry

Entry Defines all nft owned by a person

FieldTypeLabelDescription
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.

FieldTypeLabelDescription
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

Top

Class

Class defines the class of the nft type.

FieldTypeLabelDescription
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.

FieldTypeLabelDescription
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

Top

QueryBalanceRequest

QueryBalanceRequest is the request type for the Query/Balance RPC method

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
class_id string

class_id associated with the nft

QueryClassResponse

QueryClassResponse is the response type for the Query/Class RPC method

FieldTypeLabelDescription
class Class

class defines the class of the nft type.

QueryClassesRequest

QueryClassesRequest is the request type for the Query/Classes RPC method

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
nft NFT

owner is the owner address of the nft

QueryNFTsRequest

QueryNFTstRequest is the request type for the Query/NFTs RPC method

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
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

FieldTypeLabelDescription
owner string

owner is the owner address of the nft

QuerySupplyRequest

QuerySupplyRequest is the request type for the Query/Supply RPC method

FieldTypeLabelDescription
class_id string

class_id associated with the nft

QuerySupplyResponse

QuerySupplyResponse is the response type for the Query/Supply RPC method

FieldTypeLabelDescription
amount uint64

amount is the number of all NFTs from the given class

Query

Query defines the gRPC querier service.

Method NameRequest TypeResponse TypeDescription
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

Top

MsgSend

MsgSend represents a message to send a nft from one account to another account.

FieldTypeLabelDescription
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 NameRequest TypeResponse TypeDescription
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