README ¶
sidebar_position: 1
x/nft
Contents
Abstract
x/nft
is an implementation of a Cosmos SDK module, per ADR 43, that allows you to create nft classification, create nft, transfer nft, update nft, and support various queries by integrating the module. It is fully compatible with the ERC721 specification.
Concepts
Class
x/nft
module defines a struct Class
to describe the common characteristics of a class of nft, under this class, you can create a variety of nft, which is equivalent to an erc721 contract for Ethereum. The design is defined in the ADR 043.
NFT
The full name of NFT is Non-Fungible Tokens. Because of the irreplaceable nature of NFT, it means that it can be used to represent unique things. The nft implemented by this module is fully compatible with Ethereum ERC721 standard.
State
Class
Class is mainly composed of id
, name
, symbol
, description
, uri
, uri_hash
,data
where id
is the unique identifier of the class, similar to the Ethereum ERC721 contract address, the others are optional.
- Class:
0x01 | classID | -> ProtocolBuffer(Class)
NFT
NFT is mainly composed of class_id
, id
, uri
, uri_hash
and data
. Among them, class_id
and id
are two-tuples that identify the uniqueness of nft, uri
and uri_hash
is optional, which identifies the off-chain storage location of the nft, and data
is an Any type. Use Any chain of x/nft
modules can be customized by extending this field
- NFT:
0x02 | classID | 0x00 | nftID |-> ProtocolBuffer(NFT)
NFTOfClassByOwner
NFTOfClassByOwner is mainly to realize the function of querying all nfts using classID and owner, without other redundant functions.
- NFTOfClassByOwner:
0x03 | owner | 0x00 | classID | 0x00 | nftID |-> 0x01
Owner
Since there is no extra field in NFT to indicate the owner of nft, an additional key-value pair is used to save the ownership of nft. With the transfer of nft, the key-value pair is updated synchronously.
- OwnerKey:
0x04 | classID | 0x00 | nftID |-> owner
TotalSupply
TotalSupply is responsible for tracking the number of all nfts under a certain class. Mint operation is performed under the changed class, supply increases by one, burn operation, and supply decreases by one.
- OwnerKey:
0x05 | classID |-> totalSupply
Messages
In this section we describe the processing of messages for the NFT module.
:::warning
The validation of ClassID
and NftID
is left to the app developer.
The SDK does not provide any validation for these fields.
:::
MsgSend
You can use the MsgSend
message to transfer the ownership of nft. This is a function provided by the x/nft
module. Of course, you can use the Transfer
method to implement your own transfer logic, but you need to pay extra attention to the transfer permissions.
The message handling should fail if:
- provided
ClassID
does not exist. - provided
Id
does not exist. - provided
Sender
does not the owner of nft.
Events
The nft module emits proto events defined in the Protobuf reference.
Documentation ¶
Overview ¶
Package nft is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateGenesis(data GenesisState) error
- type AccountKeeper
- type BankKeeper
- type Class
- func (*Class) Descriptor() ([]byte, []int)
- func (m *Class) GetData() *types.Any
- func (m *Class) GetDescription() string
- func (m *Class) GetId() string
- func (m *Class) GetName() string
- func (m *Class) GetSymbol() string
- func (m *Class) GetUri() string
- func (m *Class) GetUriHash() string
- func (m *Class) Marshal() (dAtA []byte, err error)
- func (m *Class) MarshalTo(dAtA []byte) (int, error)
- func (m *Class) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Class) ProtoMessage()
- func (m *Class) Reset()
- func (m *Class) Size() (n int)
- func (m *Class) String() string
- func (m *Class) Unmarshal(dAtA []byte) error
- func (m *Class) XXX_DiscardUnknown()
- func (m *Class) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Class) XXX_Merge(src proto.Message)
- func (m *Class) XXX_Size() int
- func (m *Class) XXX_Unmarshal(b []byte) error
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetNfts() []*NFT
- func (m *Entry) GetOwner() string
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (m *Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (m *Entry) Size() (n int)
- func (m *Entry) String() string
- func (m *Entry) Unmarshal(dAtA []byte) error
- func (m *Entry) XXX_DiscardUnknown()
- func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Entry) XXX_Merge(src proto.Message)
- func (m *Entry) XXX_Size() int
- func (m *Entry) XXX_Unmarshal(b []byte) error
- type EventBurn
- func (*EventBurn) Descriptor() ([]byte, []int)
- func (m *EventBurn) GetClassId() string
- func (m *EventBurn) GetId() string
- func (m *EventBurn) GetOwner() string
- func (m *EventBurn) Marshal() (dAtA []byte, err error)
- func (m *EventBurn) MarshalTo(dAtA []byte) (int, error)
- func (m *EventBurn) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventBurn) ProtoMessage()
- func (m *EventBurn) Reset()
- func (m *EventBurn) Size() (n int)
- func (m *EventBurn) String() string
- func (m *EventBurn) Unmarshal(dAtA []byte) error
- func (m *EventBurn) XXX_DiscardUnknown()
- func (m *EventBurn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventBurn) XXX_Merge(src proto.Message)
- func (m *EventBurn) XXX_Size() int
- func (m *EventBurn) XXX_Unmarshal(b []byte) error
- type EventMint
- func (*EventMint) Descriptor() ([]byte, []int)
- func (m *EventMint) GetClassId() string
- func (m *EventMint) GetId() string
- func (m *EventMint) GetOwner() string
- func (m *EventMint) Marshal() (dAtA []byte, err error)
- func (m *EventMint) MarshalTo(dAtA []byte) (int, error)
- func (m *EventMint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventMint) ProtoMessage()
- func (m *EventMint) Reset()
- func (m *EventMint) Size() (n int)
- func (m *EventMint) String() string
- func (m *EventMint) Unmarshal(dAtA []byte) error
- func (m *EventMint) XXX_DiscardUnknown()
- func (m *EventMint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventMint) XXX_Merge(src proto.Message)
- func (m *EventMint) XXX_Size() int
- func (m *EventMint) XXX_Unmarshal(b []byte) error
- type EventSend
- func (*EventSend) Descriptor() ([]byte, []int)
- func (m *EventSend) GetClassId() string
- func (m *EventSend) GetId() string
- func (m *EventSend) GetReceiver() string
- func (m *EventSend) GetSender() string
- func (m *EventSend) Marshal() (dAtA []byte, err error)
- func (m *EventSend) MarshalTo(dAtA []byte) (int, error)
- func (m *EventSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventSend) ProtoMessage()
- func (m *EventSend) Reset()
- func (m *EventSend) Size() (n int)
- func (m *EventSend) String() string
- func (m *EventSend) Unmarshal(dAtA []byte) error
- func (m *EventSend) XXX_DiscardUnknown()
- func (m *EventSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventSend) XXX_Merge(src proto.Message)
- func (m *EventSend) XXX_Size() int
- func (m *EventSend) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetClasses() []*Class
- func (m *GenesisState) GetEntries() []*Entry
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgSend
- func (*MsgSend) Descriptor() ([]byte, []int)
- func (m *MsgSend) GetClassId() string
- func (m *MsgSend) GetId() string
- func (m *MsgSend) GetReceiver() string
- func (m *MsgSend) GetSender() string
- func (m MsgSend) GetSigners() []sdk.AccAddress
- func (m *MsgSend) Marshal() (dAtA []byte, err error)
- func (m *MsgSend) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSend) ProtoMessage()
- func (m *MsgSend) Reset()
- func (m *MsgSend) Size() (n int)
- func (m *MsgSend) String() string
- func (m *MsgSend) Unmarshal(dAtA []byte) error
- func (m MsgSend) ValidateBasic() error
- func (m *MsgSend) XXX_DiscardUnknown()
- func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSend) XXX_Merge(src proto.Message)
- func (m *MsgSend) XXX_Size() int
- func (m *MsgSend) XXX_Unmarshal(b []byte) error
- type MsgSendResponse
- func (*MsgSendResponse) Descriptor() ([]byte, []int)
- func (m *MsgSendResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSendResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSendResponse) ProtoMessage()
- func (m *MsgSendResponse) Reset()
- func (m *MsgSendResponse) Size() (n int)
- func (m *MsgSendResponse) String() string
- func (m *MsgSendResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSendResponse) XXX_DiscardUnknown()
- func (m *MsgSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSendResponse) XXX_Merge(src proto.Message)
- func (m *MsgSendResponse) XXX_Size() int
- func (m *MsgSendResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type NFT
- func (*NFT) Descriptor() ([]byte, []int)
- func (m *NFT) GetClassId() string
- func (m *NFT) GetData() *types.Any
- func (m *NFT) GetId() string
- func (m *NFT) GetUri() string
- func (m *NFT) GetUriHash() string
- func (m *NFT) Marshal() (dAtA []byte, err error)
- func (m *NFT) MarshalTo(dAtA []byte) (int, error)
- func (m *NFT) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NFT) ProtoMessage()
- func (m *NFT) Reset()
- func (m *NFT) Size() (n int)
- func (m *NFT) String() string
- func (m *NFT) Unmarshal(dAtA []byte) error
- func (m *NFT) XXX_DiscardUnknown()
- func (m *NFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NFT) XXX_Merge(src proto.Message)
- func (m *NFT) XXX_Size() int
- func (m *NFT) XXX_Unmarshal(b []byte) error
- type QueryBalanceRequest
- func (*QueryBalanceRequest) Descriptor() ([]byte, []int)
- func (m *QueryBalanceRequest) GetClassId() string
- func (m *QueryBalanceRequest) GetOwner() string
- func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBalanceRequest) ProtoMessage()
- func (m *QueryBalanceRequest) Reset()
- func (m *QueryBalanceRequest) Size() (n int)
- func (m *QueryBalanceRequest) String() string
- func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBalanceRequest) XXX_DiscardUnknown()
- func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBalanceRequest) XXX_Merge(src proto.Message)
- func (m *QueryBalanceRequest) XXX_Size() int
- func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error
- type QueryBalanceResponse
- func (*QueryBalanceResponse) Descriptor() ([]byte, []int)
- func (m *QueryBalanceResponse) GetAmount() uint64
- func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBalanceResponse) ProtoMessage()
- func (m *QueryBalanceResponse) Reset()
- func (m *QueryBalanceResponse) Size() (n int)
- func (m *QueryBalanceResponse) String() string
- func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBalanceResponse) XXX_DiscardUnknown()
- func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBalanceResponse) XXX_Merge(src proto.Message)
- func (m *QueryBalanceResponse) XXX_Size() int
- func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error
- type QueryClassRequest
- func (*QueryClassRequest) Descriptor() ([]byte, []int)
- func (m *QueryClassRequest) GetClassId() string
- func (m *QueryClassRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryClassRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClassRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClassRequest) ProtoMessage()
- func (m *QueryClassRequest) Reset()
- func (m *QueryClassRequest) Size() (n int)
- func (m *QueryClassRequest) String() string
- func (m *QueryClassRequest) Unmarshal(dAtA []byte) error
- func (m *QueryClassRequest) XXX_DiscardUnknown()
- func (m *QueryClassRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClassRequest) XXX_Merge(src proto.Message)
- func (m *QueryClassRequest) XXX_Size() int
- func (m *QueryClassRequest) XXX_Unmarshal(b []byte) error
- type QueryClassResponse
- func (*QueryClassResponse) Descriptor() ([]byte, []int)
- func (m *QueryClassResponse) GetClass() *Class
- func (m *QueryClassResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryClassResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClassResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClassResponse) ProtoMessage()
- func (m *QueryClassResponse) Reset()
- func (m *QueryClassResponse) Size() (n int)
- func (m *QueryClassResponse) String() string
- func (m *QueryClassResponse) Unmarshal(dAtA []byte) error
- func (m *QueryClassResponse) XXX_DiscardUnknown()
- func (m *QueryClassResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClassResponse) XXX_Merge(src proto.Message)
- func (m *QueryClassResponse) XXX_Size() int
- func (m *QueryClassResponse) XXX_Unmarshal(b []byte) error
- type QueryClassesRequest
- func (*QueryClassesRequest) Descriptor() ([]byte, []int)
- func (m *QueryClassesRequest) GetPagination() *query.PageRequest
- func (m *QueryClassesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryClassesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClassesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClassesRequest) ProtoMessage()
- func (m *QueryClassesRequest) Reset()
- func (m *QueryClassesRequest) Size() (n int)
- func (m *QueryClassesRequest) String() string
- func (m *QueryClassesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryClassesRequest) XXX_DiscardUnknown()
- func (m *QueryClassesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClassesRequest) XXX_Merge(src proto.Message)
- func (m *QueryClassesRequest) XXX_Size() int
- func (m *QueryClassesRequest) XXX_Unmarshal(b []byte) error
- type QueryClassesResponse
- func (*QueryClassesResponse) Descriptor() ([]byte, []int)
- func (m *QueryClassesResponse) GetClasses() []*Class
- func (m *QueryClassesResponse) GetPagination() *query.PageResponse
- func (m *QueryClassesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryClassesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryClassesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryClassesResponse) ProtoMessage()
- func (m *QueryClassesResponse) Reset()
- func (m *QueryClassesResponse) Size() (n int)
- func (m *QueryClassesResponse) String() string
- func (m *QueryClassesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryClassesResponse) XXX_DiscardUnknown()
- func (m *QueryClassesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryClassesResponse) XXX_Merge(src proto.Message)
- func (m *QueryClassesResponse) XXX_Size() int
- func (m *QueryClassesResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryNFTRequest
- func (*QueryNFTRequest) Descriptor() ([]byte, []int)
- func (m *QueryNFTRequest) GetClassId() string
- func (m *QueryNFTRequest) GetId() string
- func (m *QueryNFTRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryNFTRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNFTRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNFTRequest) ProtoMessage()
- func (m *QueryNFTRequest) Reset()
- func (m *QueryNFTRequest) Size() (n int)
- func (m *QueryNFTRequest) String() string
- func (m *QueryNFTRequest) Unmarshal(dAtA []byte) error
- func (m *QueryNFTRequest) XXX_DiscardUnknown()
- func (m *QueryNFTRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNFTRequest) XXX_Merge(src proto.Message)
- func (m *QueryNFTRequest) XXX_Size() int
- func (m *QueryNFTRequest) XXX_Unmarshal(b []byte) error
- type QueryNFTResponse
- func (*QueryNFTResponse) Descriptor() ([]byte, []int)
- func (m *QueryNFTResponse) GetNft() *NFT
- func (m *QueryNFTResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryNFTResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNFTResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNFTResponse) ProtoMessage()
- func (m *QueryNFTResponse) Reset()
- func (m *QueryNFTResponse) Size() (n int)
- func (m *QueryNFTResponse) String() string
- func (m *QueryNFTResponse) Unmarshal(dAtA []byte) error
- func (m *QueryNFTResponse) XXX_DiscardUnknown()
- func (m *QueryNFTResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNFTResponse) XXX_Merge(src proto.Message)
- func (m *QueryNFTResponse) XXX_Size() int
- func (m *QueryNFTResponse) XXX_Unmarshal(b []byte) error
- type QueryNFTsRequest
- func (*QueryNFTsRequest) Descriptor() ([]byte, []int)
- func (m *QueryNFTsRequest) GetClassId() string
- func (m *QueryNFTsRequest) GetOwner() string
- func (m *QueryNFTsRequest) GetPagination() *query.PageRequest
- func (m *QueryNFTsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryNFTsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNFTsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNFTsRequest) ProtoMessage()
- func (m *QueryNFTsRequest) Reset()
- func (m *QueryNFTsRequest) Size() (n int)
- func (m *QueryNFTsRequest) String() string
- func (m *QueryNFTsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryNFTsRequest) XXX_DiscardUnknown()
- func (m *QueryNFTsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNFTsRequest) XXX_Merge(src proto.Message)
- func (m *QueryNFTsRequest) XXX_Size() int
- func (m *QueryNFTsRequest) XXX_Unmarshal(b []byte) error
- type QueryNFTsResponse
- func (*QueryNFTsResponse) Descriptor() ([]byte, []int)
- func (m *QueryNFTsResponse) GetNfts() []*NFT
- func (m *QueryNFTsResponse) GetPagination() *query.PageResponse
- func (m *QueryNFTsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryNFTsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNFTsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNFTsResponse) ProtoMessage()
- func (m *QueryNFTsResponse) Reset()
- func (m *QueryNFTsResponse) Size() (n int)
- func (m *QueryNFTsResponse) String() string
- func (m *QueryNFTsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryNFTsResponse) XXX_DiscardUnknown()
- func (m *QueryNFTsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNFTsResponse) XXX_Merge(src proto.Message)
- func (m *QueryNFTsResponse) XXX_Size() int
- func (m *QueryNFTsResponse) XXX_Unmarshal(b []byte) error
- type QueryOwnerRequest
- func (*QueryOwnerRequest) Descriptor() ([]byte, []int)
- func (m *QueryOwnerRequest) GetClassId() string
- func (m *QueryOwnerRequest) GetId() string
- func (m *QueryOwnerRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryOwnerRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryOwnerRequest) ProtoMessage()
- func (m *QueryOwnerRequest) Reset()
- func (m *QueryOwnerRequest) Size() (n int)
- func (m *QueryOwnerRequest) String() string
- func (m *QueryOwnerRequest) Unmarshal(dAtA []byte) error
- func (m *QueryOwnerRequest) XXX_DiscardUnknown()
- func (m *QueryOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryOwnerRequest) XXX_Merge(src proto.Message)
- func (m *QueryOwnerRequest) XXX_Size() int
- func (m *QueryOwnerRequest) XXX_Unmarshal(b []byte) error
- type QueryOwnerResponse
- func (*QueryOwnerResponse) Descriptor() ([]byte, []int)
- func (m *QueryOwnerResponse) GetOwner() string
- func (m *QueryOwnerResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryOwnerResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryOwnerResponse) ProtoMessage()
- func (m *QueryOwnerResponse) Reset()
- func (m *QueryOwnerResponse) Size() (n int)
- func (m *QueryOwnerResponse) String() string
- func (m *QueryOwnerResponse) Unmarshal(dAtA []byte) error
- func (m *QueryOwnerResponse) XXX_DiscardUnknown()
- func (m *QueryOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryOwnerResponse) XXX_Merge(src proto.Message)
- func (m *QueryOwnerResponse) XXX_Size() int
- func (m *QueryOwnerResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QuerySupplyRequest
- func (*QuerySupplyRequest) Descriptor() ([]byte, []int)
- func (m *QuerySupplyRequest) GetClassId() string
- func (m *QuerySupplyRequest) Marshal() (dAtA []byte, err error)
- func (m *QuerySupplyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySupplyRequest) ProtoMessage()
- func (m *QuerySupplyRequest) Reset()
- func (m *QuerySupplyRequest) Size() (n int)
- func (m *QuerySupplyRequest) String() string
- func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error
- func (m *QuerySupplyRequest) XXX_DiscardUnknown()
- func (m *QuerySupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySupplyRequest) XXX_Merge(src proto.Message)
- func (m *QuerySupplyRequest) XXX_Size() int
- func (m *QuerySupplyRequest) XXX_Unmarshal(b []byte) error
- type QuerySupplyResponse
- func (*QuerySupplyResponse) Descriptor() ([]byte, []int)
- func (m *QuerySupplyResponse) GetAmount() uint64
- func (m *QuerySupplyResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySupplyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySupplyResponse) ProtoMessage()
- func (m *QuerySupplyResponse) Reset()
- func (m *QuerySupplyResponse) Size() (n int)
- func (m *QuerySupplyResponse) String() string
- func (m *QuerySupplyResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySupplyResponse) XXX_DiscardUnknown()
- func (m *QuerySupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySupplyResponse) XXX_Merge(src proto.Message)
- func (m *QuerySupplyResponse) XXX_Size() int
- func (m *QuerySupplyResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error)
- func (*UnimplementedQueryServer) Class(ctx context.Context, req *QueryClassRequest) (*QueryClassResponse, error)
- func (*UnimplementedQueryServer) Classes(ctx context.Context, req *QueryClassesRequest) (*QueryClassesResponse, error)
- func (*UnimplementedQueryServer) NFT(ctx context.Context, req *QueryNFTRequest) (*QueryNFTResponse, error)
- func (*UnimplementedQueryServer) NFTs(ctx context.Context, req *QueryNFTsRequest) (*QueryNFTsResponse, error)
- func (*UnimplementedQueryServer) Owner(ctx context.Context, req *QueryOwnerRequest) (*QueryOwnerResponse, error)
- func (*UnimplementedQueryServer) Supply(ctx context.Context, req *QuerySupplyRequest) (*QuerySupplyResponse, error)
Constants ¶
const ( // ModuleName defines the name of the nft module ModuleName = "nft" // StoreKey is the default store key for nft StoreKey = ModuleName // RouterKey is the message route for nft RouterKey = ModuleName )
const (
// TypeMsgSend nft message types
TypeMsgSend = "send"
)
Variables ¶
var ( ErrClassExists = errors.Register(ModuleName, 3, "nft class already exists") ErrClassNotExists = errors.Register(ModuleName, 4, "nft class does not exist") ErrNFTExists = errors.Register(ModuleName, 5, "nft already exists") ErrNFTNotExists = errors.Register(ModuleName, 6, "nft does not exist") ErrEmptyClassID = errors.Register(ModuleName, 7, "empty class id") ErrEmptyNFTID = errors.Register(ModuleName, 8, "empty nft id") )
x/nft module sentinel errors
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthNft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNft = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupNft = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the interface registry.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis checks that the given genesis state has no integrity issues
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI }
AccountKeeper defines the contract required for account APIs.
type BankKeeper ¶
BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.
type Class ¶
type Class struct { // id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // name defines the human-readable name of the NFT classification. Optional Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // symbol is an abbreviated name for nft classification. Optional Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` // description is a brief description of nft classification. Optional Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"` // uri_hash is a hash of the document pointed by uri. Optional UriHash string `protobuf:"bytes,6,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` // data is the app specific metadata of the NFT class. Optional Data *types.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` }
Class defines the class of the nft type.
func (*Class) Descriptor ¶
func (*Class) GetDescription ¶
func (*Class) GetUriHash ¶
func (*Class) ProtoMessage ¶
func (*Class) ProtoMessage()
func (*Class) XXX_DiscardUnknown ¶
func (m *Class) XXX_DiscardUnknown()
func (*Class) XXX_Marshal ¶
func (*Class) XXX_Unmarshal ¶
type Entry ¶
type Entry struct { // owner is the owner address of the following nft Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // nfts is a group of nfts of the same owner Nfts []*NFT `protobuf:"bytes,2,rep,name=nfts,proto3" json:"nfts,omitempty"` }
Entry Defines all nft owned by a person
func (*Entry) Descriptor ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) XXX_DiscardUnknown ¶
func (m *Entry) XXX_DiscardUnknown()
func (*Entry) XXX_Marshal ¶
func (*Entry) XXX_Unmarshal ¶
type EventBurn ¶
type EventBurn struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the nft Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // owner is the owner address of the nft Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` }
EventBurn is emitted on Burn
func (*EventBurn) Descriptor ¶
func (*EventBurn) GetClassId ¶
func (*EventBurn) MarshalToSizedBuffer ¶
func (*EventBurn) ProtoMessage ¶
func (*EventBurn) ProtoMessage()
func (*EventBurn) XXX_DiscardUnknown ¶
func (m *EventBurn) XXX_DiscardUnknown()
func (*EventBurn) XXX_Marshal ¶
func (*EventBurn) XXX_Unmarshal ¶
type EventMint ¶
type EventMint struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the nft Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // owner is the owner address of the nft Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` }
EventMint is emitted on Mint
func (*EventMint) Descriptor ¶
func (*EventMint) GetClassId ¶
func (*EventMint) MarshalToSizedBuffer ¶
func (*EventMint) ProtoMessage ¶
func (*EventMint) ProtoMessage()
func (*EventMint) XXX_DiscardUnknown ¶
func (m *EventMint) XXX_DiscardUnknown()
func (*EventMint) XXX_Marshal ¶
func (*EventMint) XXX_Unmarshal ¶
type EventSend ¶
type EventSend struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the nft Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // sender is the address of the owner of nft Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // receiver is the receiver address of nft Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` }
EventSend is emitted on Msg/Send
func (*EventSend) Descriptor ¶
func (*EventSend) GetClassId ¶
func (*EventSend) GetReceiver ¶
func (*EventSend) MarshalToSizedBuffer ¶
func (*EventSend) ProtoMessage ¶
func (*EventSend) ProtoMessage()
func (*EventSend) XXX_DiscardUnknown ¶
func (m *EventSend) XXX_DiscardUnknown()
func (*EventSend) XXX_Marshal ¶
func (*EventSend) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { // class defines the class of the nft type. Classes []*Class `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` // entry defines all nft owned by a person. Entries []*Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` }
GenesisState defines the nft module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState - Returns a default genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetClasses ¶
func (m *GenesisState) GetClasses() []*Class
func (*GenesisState) GetEntries ¶
func (m *GenesisState) GetEntries() []*Entry
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Send defines a method to send a nft from one account to another account. Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgSend ¶
type MsgSend struct { // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id defines the unique identification of nft Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // sender is the address of the owner of nft Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // receiver is the receiver address of nft Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` }
MsgSend represents a message to send a nft from one account to another account.
func (*MsgSend) Descriptor ¶
func (*MsgSend) GetClassId ¶
func (*MsgSend) GetReceiver ¶
func (MsgSend) GetSigners ¶
func (m MsgSend) GetSigners() []sdk.AccAddress
GetSigners returns the expected signers for MsgSend.
func (*MsgSend) MarshalToSizedBuffer ¶
func (*MsgSend) ProtoMessage ¶
func (*MsgSend) ProtoMessage()
func (MsgSend) ValidateBasic ¶
ValidateBasic implements the Msg.ValidateBasic method.
func (*MsgSend) XXX_DiscardUnknown ¶
func (m *MsgSend) XXX_DiscardUnknown()
func (*MsgSend) XXX_Marshal ¶
func (*MsgSend) XXX_Unmarshal ¶
type MsgSendResponse ¶
type MsgSendResponse struct { }
MsgSendResponse defines the Msg/Send response type.
func (*MsgSendResponse) Descriptor ¶
func (*MsgSendResponse) Descriptor() ([]byte, []int)
func (*MsgSendResponse) Marshal ¶
func (m *MsgSendResponse) Marshal() (dAtA []byte, err error)
func (*MsgSendResponse) MarshalToSizedBuffer ¶
func (m *MsgSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSendResponse) ProtoMessage ¶
func (*MsgSendResponse) ProtoMessage()
func (*MsgSendResponse) Reset ¶
func (m *MsgSendResponse) Reset()
func (*MsgSendResponse) Size ¶
func (m *MsgSendResponse) Size() (n int)
func (*MsgSendResponse) String ¶
func (m *MsgSendResponse) String() string
func (*MsgSendResponse) Unmarshal ¶
func (m *MsgSendResponse) Unmarshal(dAtA []byte) error
func (*MsgSendResponse) XXX_DiscardUnknown ¶
func (m *MsgSendResponse) XXX_DiscardUnknown()
func (*MsgSendResponse) XXX_Marshal ¶
func (m *MsgSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSendResponse) XXX_Merge ¶
func (m *MsgSendResponse) XXX_Merge(src proto.Message)
func (*MsgSendResponse) XXX_Size ¶
func (m *MsgSendResponse) XXX_Size() int
func (*MsgSendResponse) XXX_Unmarshal ¶
func (m *MsgSendResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Send defines a method to send a nft from one account to another account. Send(context.Context, *MsgSend) (*MsgSendResponse, error) }
MsgServer is the server API for Msg service.
type NFT ¶
type NFT struct { // class_id associated with the NFT, similar to the contract address of ERC721 ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the NFT Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // uri for the NFT metadata stored off chain Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` // uri_hash is a hash of the document pointed by uri UriHash string `protobuf:"bytes,4,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` // data is an app specific data of the NFT. Optional Data *types.Any `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` }
NFT defines the NFT.
func (*NFT) Descriptor ¶
func (*NFT) GetClassId ¶
func (*NFT) GetUriHash ¶
func (*NFT) ProtoMessage ¶
func (*NFT) ProtoMessage()
func (*NFT) XXX_DiscardUnknown ¶
func (m *NFT) XXX_DiscardUnknown()
func (*NFT) XXX_Unmarshal ¶
type QueryBalanceRequest ¶
type QueryBalanceRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // owner is the owner address of the nft Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` }
QueryBalanceRequest is the request type for the Query/Balance RPC method
func (*QueryBalanceRequest) Descriptor ¶
func (*QueryBalanceRequest) Descriptor() ([]byte, []int)
func (*QueryBalanceRequest) GetClassId ¶
func (m *QueryBalanceRequest) GetClassId() string
func (*QueryBalanceRequest) GetOwner ¶
func (m *QueryBalanceRequest) GetOwner() string
func (*QueryBalanceRequest) Marshal ¶
func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error)
func (*QueryBalanceRequest) MarshalTo ¶
func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBalanceRequest) MarshalToSizedBuffer ¶
func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBalanceRequest) ProtoMessage ¶
func (*QueryBalanceRequest) ProtoMessage()
func (*QueryBalanceRequest) Reset ¶
func (m *QueryBalanceRequest) Reset()
func (*QueryBalanceRequest) Size ¶
func (m *QueryBalanceRequest) Size() (n int)
func (*QueryBalanceRequest) String ¶
func (m *QueryBalanceRequest) String() string
func (*QueryBalanceRequest) Unmarshal ¶
func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error
func (*QueryBalanceRequest) XXX_DiscardUnknown ¶
func (m *QueryBalanceRequest) XXX_DiscardUnknown()
func (*QueryBalanceRequest) XXX_Marshal ¶
func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBalanceRequest) XXX_Merge ¶
func (m *QueryBalanceRequest) XXX_Merge(src proto.Message)
func (*QueryBalanceRequest) XXX_Size ¶
func (m *QueryBalanceRequest) XXX_Size() int
func (*QueryBalanceRequest) XXX_Unmarshal ¶
func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error
type QueryBalanceResponse ¶
type QueryBalanceResponse struct { // amount is the number of all NFTs of a given class owned by the owner Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` }
QueryBalanceResponse is the response type for the Query/Balance RPC method
func (*QueryBalanceResponse) Descriptor ¶
func (*QueryBalanceResponse) Descriptor() ([]byte, []int)
func (*QueryBalanceResponse) GetAmount ¶
func (m *QueryBalanceResponse) GetAmount() uint64
func (*QueryBalanceResponse) Marshal ¶
func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error)
func (*QueryBalanceResponse) MarshalTo ¶
func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBalanceResponse) MarshalToSizedBuffer ¶
func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBalanceResponse) ProtoMessage ¶
func (*QueryBalanceResponse) ProtoMessage()
func (*QueryBalanceResponse) Reset ¶
func (m *QueryBalanceResponse) Reset()
func (*QueryBalanceResponse) Size ¶
func (m *QueryBalanceResponse) Size() (n int)
func (*QueryBalanceResponse) String ¶
func (m *QueryBalanceResponse) String() string
func (*QueryBalanceResponse) Unmarshal ¶
func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error
func (*QueryBalanceResponse) XXX_DiscardUnknown ¶
func (m *QueryBalanceResponse) XXX_DiscardUnknown()
func (*QueryBalanceResponse) XXX_Marshal ¶
func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBalanceResponse) XXX_Merge ¶
func (m *QueryBalanceResponse) XXX_Merge(src proto.Message)
func (*QueryBalanceResponse) XXX_Size ¶
func (m *QueryBalanceResponse) XXX_Size() int
func (*QueryBalanceResponse) XXX_Unmarshal ¶
func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error
type QueryClassRequest ¶
type QueryClassRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` }
QueryClassRequest is the request type for the Query/Class RPC method
func (*QueryClassRequest) Descriptor ¶
func (*QueryClassRequest) Descriptor() ([]byte, []int)
func (*QueryClassRequest) GetClassId ¶
func (m *QueryClassRequest) GetClassId() string
func (*QueryClassRequest) Marshal ¶
func (m *QueryClassRequest) Marshal() (dAtA []byte, err error)
func (*QueryClassRequest) MarshalTo ¶
func (m *QueryClassRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryClassRequest) MarshalToSizedBuffer ¶
func (m *QueryClassRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClassRequest) ProtoMessage ¶
func (*QueryClassRequest) ProtoMessage()
func (*QueryClassRequest) Reset ¶
func (m *QueryClassRequest) Reset()
func (*QueryClassRequest) Size ¶
func (m *QueryClassRequest) Size() (n int)
func (*QueryClassRequest) String ¶
func (m *QueryClassRequest) String() string
func (*QueryClassRequest) Unmarshal ¶
func (m *QueryClassRequest) Unmarshal(dAtA []byte) error
func (*QueryClassRequest) XXX_DiscardUnknown ¶
func (m *QueryClassRequest) XXX_DiscardUnknown()
func (*QueryClassRequest) XXX_Marshal ¶
func (m *QueryClassRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClassRequest) XXX_Merge ¶
func (m *QueryClassRequest) XXX_Merge(src proto.Message)
func (*QueryClassRequest) XXX_Size ¶
func (m *QueryClassRequest) XXX_Size() int
func (*QueryClassRequest) XXX_Unmarshal ¶
func (m *QueryClassRequest) XXX_Unmarshal(b []byte) error
type QueryClassResponse ¶
type QueryClassResponse struct { // class defines the class of the nft type. Class *Class `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` }
QueryClassResponse is the response type for the Query/Class RPC method
func (*QueryClassResponse) Descriptor ¶
func (*QueryClassResponse) Descriptor() ([]byte, []int)
func (*QueryClassResponse) GetClass ¶
func (m *QueryClassResponse) GetClass() *Class
func (*QueryClassResponse) Marshal ¶
func (m *QueryClassResponse) Marshal() (dAtA []byte, err error)
func (*QueryClassResponse) MarshalTo ¶
func (m *QueryClassResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryClassResponse) MarshalToSizedBuffer ¶
func (m *QueryClassResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClassResponse) ProtoMessage ¶
func (*QueryClassResponse) ProtoMessage()
func (*QueryClassResponse) Reset ¶
func (m *QueryClassResponse) Reset()
func (*QueryClassResponse) Size ¶
func (m *QueryClassResponse) Size() (n int)
func (*QueryClassResponse) String ¶
func (m *QueryClassResponse) String() string
func (*QueryClassResponse) Unmarshal ¶
func (m *QueryClassResponse) Unmarshal(dAtA []byte) error
func (*QueryClassResponse) XXX_DiscardUnknown ¶
func (m *QueryClassResponse) XXX_DiscardUnknown()
func (*QueryClassResponse) XXX_Marshal ¶
func (m *QueryClassResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClassResponse) XXX_Merge ¶
func (m *QueryClassResponse) XXX_Merge(src proto.Message)
func (*QueryClassResponse) XXX_Size ¶
func (m *QueryClassResponse) XXX_Size() int
func (*QueryClassResponse) XXX_Unmarshal ¶
func (m *QueryClassResponse) XXX_Unmarshal(b []byte) error
type QueryClassesRequest ¶
type QueryClassesRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryClassesRequest is the request type for the Query/Classes RPC method
func (*QueryClassesRequest) Descriptor ¶
func (*QueryClassesRequest) Descriptor() ([]byte, []int)
func (*QueryClassesRequest) GetPagination ¶
func (m *QueryClassesRequest) GetPagination() *query.PageRequest
func (*QueryClassesRequest) Marshal ¶
func (m *QueryClassesRequest) Marshal() (dAtA []byte, err error)
func (*QueryClassesRequest) MarshalTo ¶
func (m *QueryClassesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryClassesRequest) MarshalToSizedBuffer ¶
func (m *QueryClassesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClassesRequest) ProtoMessage ¶
func (*QueryClassesRequest) ProtoMessage()
func (*QueryClassesRequest) Reset ¶
func (m *QueryClassesRequest) Reset()
func (*QueryClassesRequest) Size ¶
func (m *QueryClassesRequest) Size() (n int)
func (*QueryClassesRequest) String ¶
func (m *QueryClassesRequest) String() string
func (*QueryClassesRequest) Unmarshal ¶
func (m *QueryClassesRequest) Unmarshal(dAtA []byte) error
func (*QueryClassesRequest) XXX_DiscardUnknown ¶
func (m *QueryClassesRequest) XXX_DiscardUnknown()
func (*QueryClassesRequest) XXX_Marshal ¶
func (m *QueryClassesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClassesRequest) XXX_Merge ¶
func (m *QueryClassesRequest) XXX_Merge(src proto.Message)
func (*QueryClassesRequest) XXX_Size ¶
func (m *QueryClassesRequest) XXX_Size() int
func (*QueryClassesRequest) XXX_Unmarshal ¶
func (m *QueryClassesRequest) XXX_Unmarshal(b []byte) error
type QueryClassesResponse ¶
type QueryClassesResponse struct { // class defines the class of the nft type. Classes []*Class `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryClassesResponse is the response type for the Query/Classes RPC method
func (*QueryClassesResponse) Descriptor ¶
func (*QueryClassesResponse) Descriptor() ([]byte, []int)
func (*QueryClassesResponse) GetClasses ¶
func (m *QueryClassesResponse) GetClasses() []*Class
func (*QueryClassesResponse) GetPagination ¶
func (m *QueryClassesResponse) GetPagination() *query.PageResponse
func (*QueryClassesResponse) Marshal ¶
func (m *QueryClassesResponse) Marshal() (dAtA []byte, err error)
func (*QueryClassesResponse) MarshalTo ¶
func (m *QueryClassesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryClassesResponse) MarshalToSizedBuffer ¶
func (m *QueryClassesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryClassesResponse) ProtoMessage ¶
func (*QueryClassesResponse) ProtoMessage()
func (*QueryClassesResponse) Reset ¶
func (m *QueryClassesResponse) Reset()
func (*QueryClassesResponse) Size ¶
func (m *QueryClassesResponse) Size() (n int)
func (*QueryClassesResponse) String ¶
func (m *QueryClassesResponse) String() string
func (*QueryClassesResponse) Unmarshal ¶
func (m *QueryClassesResponse) Unmarshal(dAtA []byte) error
func (*QueryClassesResponse) XXX_DiscardUnknown ¶
func (m *QueryClassesResponse) XXX_DiscardUnknown()
func (*QueryClassesResponse) XXX_Marshal ¶
func (m *QueryClassesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryClassesResponse) XXX_Merge ¶
func (m *QueryClassesResponse) XXX_Merge(src proto.Message)
func (*QueryClassesResponse) XXX_Size ¶
func (m *QueryClassesResponse) XXX_Size() int
func (*QueryClassesResponse) XXX_Unmarshal ¶
func (m *QueryClassesResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error) // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in // ERC721Enumerable NFTs(ctx context.Context, in *QueryNFTsRequest, opts ...grpc.CallOption) (*QueryNFTsResponse, error) // NFT queries an NFT based on its class and id. NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error) // Class queries an NFT class based on its id Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error) // Classes queries all NFT classes Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryNFTRequest ¶
type QueryNFTRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the NFT Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` }
QueryNFTRequest is the request type for the Query/NFT RPC method
func (*QueryNFTRequest) Descriptor ¶
func (*QueryNFTRequest) Descriptor() ([]byte, []int)
func (*QueryNFTRequest) GetClassId ¶
func (m *QueryNFTRequest) GetClassId() string
func (*QueryNFTRequest) GetId ¶
func (m *QueryNFTRequest) GetId() string
func (*QueryNFTRequest) Marshal ¶
func (m *QueryNFTRequest) Marshal() (dAtA []byte, err error)
func (*QueryNFTRequest) MarshalToSizedBuffer ¶
func (m *QueryNFTRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNFTRequest) ProtoMessage ¶
func (*QueryNFTRequest) ProtoMessage()
func (*QueryNFTRequest) Reset ¶
func (m *QueryNFTRequest) Reset()
func (*QueryNFTRequest) Size ¶
func (m *QueryNFTRequest) Size() (n int)
func (*QueryNFTRequest) String ¶
func (m *QueryNFTRequest) String() string
func (*QueryNFTRequest) Unmarshal ¶
func (m *QueryNFTRequest) Unmarshal(dAtA []byte) error
func (*QueryNFTRequest) XXX_DiscardUnknown ¶
func (m *QueryNFTRequest) XXX_DiscardUnknown()
func (*QueryNFTRequest) XXX_Marshal ¶
func (m *QueryNFTRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNFTRequest) XXX_Merge ¶
func (m *QueryNFTRequest) XXX_Merge(src proto.Message)
func (*QueryNFTRequest) XXX_Size ¶
func (m *QueryNFTRequest) XXX_Size() int
func (*QueryNFTRequest) XXX_Unmarshal ¶
func (m *QueryNFTRequest) XXX_Unmarshal(b []byte) error
type QueryNFTResponse ¶
type QueryNFTResponse struct { // owner is the owner address of the nft Nft *NFT `protobuf:"bytes,1,opt,name=nft,proto3" json:"nft,omitempty"` }
QueryNFTResponse is the response type for the Query/NFT RPC method
func (*QueryNFTResponse) Descriptor ¶
func (*QueryNFTResponse) Descriptor() ([]byte, []int)
func (*QueryNFTResponse) GetNft ¶
func (m *QueryNFTResponse) GetNft() *NFT
func (*QueryNFTResponse) Marshal ¶
func (m *QueryNFTResponse) Marshal() (dAtA []byte, err error)
func (*QueryNFTResponse) MarshalToSizedBuffer ¶
func (m *QueryNFTResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNFTResponse) ProtoMessage ¶
func (*QueryNFTResponse) ProtoMessage()
func (*QueryNFTResponse) Reset ¶
func (m *QueryNFTResponse) Reset()
func (*QueryNFTResponse) Size ¶
func (m *QueryNFTResponse) Size() (n int)
func (*QueryNFTResponse) String ¶
func (m *QueryNFTResponse) String() string
func (*QueryNFTResponse) Unmarshal ¶
func (m *QueryNFTResponse) Unmarshal(dAtA []byte) error
func (*QueryNFTResponse) XXX_DiscardUnknown ¶
func (m *QueryNFTResponse) XXX_DiscardUnknown()
func (*QueryNFTResponse) XXX_Marshal ¶
func (m *QueryNFTResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNFTResponse) XXX_Merge ¶
func (m *QueryNFTResponse) XXX_Merge(src proto.Message)
func (*QueryNFTResponse) XXX_Size ¶
func (m *QueryNFTResponse) XXX_Size() int
func (*QueryNFTResponse) XXX_Unmarshal ¶
func (m *QueryNFTResponse) XXX_Unmarshal(b []byte) error
type QueryNFTsRequest ¶
type QueryNFTsRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // owner is the owner address of the nft Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryNFTstRequest is the request type for the Query/NFTs RPC method
func (*QueryNFTsRequest) Descriptor ¶
func (*QueryNFTsRequest) Descriptor() ([]byte, []int)
func (*QueryNFTsRequest) GetClassId ¶
func (m *QueryNFTsRequest) GetClassId() string
func (*QueryNFTsRequest) GetOwner ¶
func (m *QueryNFTsRequest) GetOwner() string
func (*QueryNFTsRequest) GetPagination ¶
func (m *QueryNFTsRequest) GetPagination() *query.PageRequest
func (*QueryNFTsRequest) Marshal ¶
func (m *QueryNFTsRequest) Marshal() (dAtA []byte, err error)
func (*QueryNFTsRequest) MarshalToSizedBuffer ¶
func (m *QueryNFTsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNFTsRequest) ProtoMessage ¶
func (*QueryNFTsRequest) ProtoMessage()
func (*QueryNFTsRequest) Reset ¶
func (m *QueryNFTsRequest) Reset()
func (*QueryNFTsRequest) Size ¶
func (m *QueryNFTsRequest) Size() (n int)
func (*QueryNFTsRequest) String ¶
func (m *QueryNFTsRequest) String() string
func (*QueryNFTsRequest) Unmarshal ¶
func (m *QueryNFTsRequest) Unmarshal(dAtA []byte) error
func (*QueryNFTsRequest) XXX_DiscardUnknown ¶
func (m *QueryNFTsRequest) XXX_DiscardUnknown()
func (*QueryNFTsRequest) XXX_Marshal ¶
func (m *QueryNFTsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNFTsRequest) XXX_Merge ¶
func (m *QueryNFTsRequest) XXX_Merge(src proto.Message)
func (*QueryNFTsRequest) XXX_Size ¶
func (m *QueryNFTsRequest) XXX_Size() int
func (*QueryNFTsRequest) XXX_Unmarshal ¶
func (m *QueryNFTsRequest) XXX_Unmarshal(b []byte) error
type QueryNFTsResponse ¶
type QueryNFTsResponse struct { // NFT defines the NFT Nfts []*NFT `protobuf:"bytes,1,rep,name=nfts,proto3" json:"nfts,omitempty"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryNFTsResponse is the response type for the Query/NFTs RPC methods
func (*QueryNFTsResponse) Descriptor ¶
func (*QueryNFTsResponse) Descriptor() ([]byte, []int)
func (*QueryNFTsResponse) GetNfts ¶
func (m *QueryNFTsResponse) GetNfts() []*NFT
func (*QueryNFTsResponse) GetPagination ¶
func (m *QueryNFTsResponse) GetPagination() *query.PageResponse
func (*QueryNFTsResponse) Marshal ¶
func (m *QueryNFTsResponse) Marshal() (dAtA []byte, err error)
func (*QueryNFTsResponse) MarshalTo ¶
func (m *QueryNFTsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryNFTsResponse) MarshalToSizedBuffer ¶
func (m *QueryNFTsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNFTsResponse) ProtoMessage ¶
func (*QueryNFTsResponse) ProtoMessage()
func (*QueryNFTsResponse) Reset ¶
func (m *QueryNFTsResponse) Reset()
func (*QueryNFTsResponse) Size ¶
func (m *QueryNFTsResponse) Size() (n int)
func (*QueryNFTsResponse) String ¶
func (m *QueryNFTsResponse) String() string
func (*QueryNFTsResponse) Unmarshal ¶
func (m *QueryNFTsResponse) Unmarshal(dAtA []byte) error
func (*QueryNFTsResponse) XXX_DiscardUnknown ¶
func (m *QueryNFTsResponse) XXX_DiscardUnknown()
func (*QueryNFTsResponse) XXX_Marshal ¶
func (m *QueryNFTsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNFTsResponse) XXX_Merge ¶
func (m *QueryNFTsResponse) XXX_Merge(src proto.Message)
func (*QueryNFTsResponse) XXX_Size ¶
func (m *QueryNFTsResponse) XXX_Size() int
func (*QueryNFTsResponse) XXX_Unmarshal ¶
func (m *QueryNFTsResponse) XXX_Unmarshal(b []byte) error
type QueryOwnerRequest ¶
type QueryOwnerRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` // id is a unique identifier of the NFT Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` }
QueryOwnerRequest is the request type for the Query/Owner RPC method
func (*QueryOwnerRequest) Descriptor ¶
func (*QueryOwnerRequest) Descriptor() ([]byte, []int)
func (*QueryOwnerRequest) GetClassId ¶
func (m *QueryOwnerRequest) GetClassId() string
func (*QueryOwnerRequest) GetId ¶
func (m *QueryOwnerRequest) GetId() string
func (*QueryOwnerRequest) Marshal ¶
func (m *QueryOwnerRequest) Marshal() (dAtA []byte, err error)
func (*QueryOwnerRequest) MarshalTo ¶
func (m *QueryOwnerRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryOwnerRequest) MarshalToSizedBuffer ¶
func (m *QueryOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryOwnerRequest) ProtoMessage ¶
func (*QueryOwnerRequest) ProtoMessage()
func (*QueryOwnerRequest) Reset ¶
func (m *QueryOwnerRequest) Reset()
func (*QueryOwnerRequest) Size ¶
func (m *QueryOwnerRequest) Size() (n int)
func (*QueryOwnerRequest) String ¶
func (m *QueryOwnerRequest) String() string
func (*QueryOwnerRequest) Unmarshal ¶
func (m *QueryOwnerRequest) Unmarshal(dAtA []byte) error
func (*QueryOwnerRequest) XXX_DiscardUnknown ¶
func (m *QueryOwnerRequest) XXX_DiscardUnknown()
func (*QueryOwnerRequest) XXX_Marshal ¶
func (m *QueryOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryOwnerRequest) XXX_Merge ¶
func (m *QueryOwnerRequest) XXX_Merge(src proto.Message)
func (*QueryOwnerRequest) XXX_Size ¶
func (m *QueryOwnerRequest) XXX_Size() int
func (*QueryOwnerRequest) XXX_Unmarshal ¶
func (m *QueryOwnerRequest) XXX_Unmarshal(b []byte) error
type QueryOwnerResponse ¶
type QueryOwnerResponse struct { // owner is the owner address of the nft Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` }
QueryOwnerResponse is the response type for the Query/Owner RPC method
func (*QueryOwnerResponse) Descriptor ¶
func (*QueryOwnerResponse) Descriptor() ([]byte, []int)
func (*QueryOwnerResponse) GetOwner ¶
func (m *QueryOwnerResponse) GetOwner() string
func (*QueryOwnerResponse) Marshal ¶
func (m *QueryOwnerResponse) Marshal() (dAtA []byte, err error)
func (*QueryOwnerResponse) MarshalTo ¶
func (m *QueryOwnerResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryOwnerResponse) MarshalToSizedBuffer ¶
func (m *QueryOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryOwnerResponse) ProtoMessage ¶
func (*QueryOwnerResponse) ProtoMessage()
func (*QueryOwnerResponse) Reset ¶
func (m *QueryOwnerResponse) Reset()
func (*QueryOwnerResponse) Size ¶
func (m *QueryOwnerResponse) Size() (n int)
func (*QueryOwnerResponse) String ¶
func (m *QueryOwnerResponse) String() string
func (*QueryOwnerResponse) Unmarshal ¶
func (m *QueryOwnerResponse) Unmarshal(dAtA []byte) error
func (*QueryOwnerResponse) XXX_DiscardUnknown ¶
func (m *QueryOwnerResponse) XXX_DiscardUnknown()
func (*QueryOwnerResponse) XXX_Marshal ¶
func (m *QueryOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryOwnerResponse) XXX_Merge ¶
func (m *QueryOwnerResponse) XXX_Merge(src proto.Message)
func (*QueryOwnerResponse) XXX_Size ¶
func (m *QueryOwnerResponse) XXX_Size() int
func (*QueryOwnerResponse) XXX_Unmarshal ¶
func (m *QueryOwnerResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 Owner(context.Context, *QueryOwnerRequest) (*QueryOwnerResponse, error) // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in // ERC721Enumerable NFTs(context.Context, *QueryNFTsRequest) (*QueryNFTsResponse, error) // NFT queries an NFT based on its class and id. NFT(context.Context, *QueryNFTRequest) (*QueryNFTResponse, error) // Class queries an NFT class based on its id Class(context.Context, *QueryClassRequest) (*QueryClassResponse, error) // Classes queries all NFT classes Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error) }
QueryServer is the server API for Query service.
type QuerySupplyRequest ¶
type QuerySupplyRequest struct { // class_id associated with the nft ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` }
QuerySupplyRequest is the request type for the Query/Supply RPC method
func (*QuerySupplyRequest) Descriptor ¶
func (*QuerySupplyRequest) Descriptor() ([]byte, []int)
func (*QuerySupplyRequest) GetClassId ¶
func (m *QuerySupplyRequest) GetClassId() string
func (*QuerySupplyRequest) Marshal ¶
func (m *QuerySupplyRequest) Marshal() (dAtA []byte, err error)
func (*QuerySupplyRequest) MarshalTo ¶
func (m *QuerySupplyRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySupplyRequest) MarshalToSizedBuffer ¶
func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySupplyRequest) ProtoMessage ¶
func (*QuerySupplyRequest) ProtoMessage()
func (*QuerySupplyRequest) Reset ¶
func (m *QuerySupplyRequest) Reset()
func (*QuerySupplyRequest) Size ¶
func (m *QuerySupplyRequest) Size() (n int)
func (*QuerySupplyRequest) String ¶
func (m *QuerySupplyRequest) String() string
func (*QuerySupplyRequest) Unmarshal ¶
func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error
func (*QuerySupplyRequest) XXX_DiscardUnknown ¶
func (m *QuerySupplyRequest) XXX_DiscardUnknown()
func (*QuerySupplyRequest) XXX_Marshal ¶
func (m *QuerySupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySupplyRequest) XXX_Merge ¶
func (m *QuerySupplyRequest) XXX_Merge(src proto.Message)
func (*QuerySupplyRequest) XXX_Size ¶
func (m *QuerySupplyRequest) XXX_Size() int
func (*QuerySupplyRequest) XXX_Unmarshal ¶
func (m *QuerySupplyRequest) XXX_Unmarshal(b []byte) error
type QuerySupplyResponse ¶
type QuerySupplyResponse struct { // amount is the number of all NFTs from the given class Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` }
QuerySupplyResponse is the response type for the Query/Supply RPC method
func (*QuerySupplyResponse) Descriptor ¶
func (*QuerySupplyResponse) Descriptor() ([]byte, []int)
func (*QuerySupplyResponse) GetAmount ¶
func (m *QuerySupplyResponse) GetAmount() uint64
func (*QuerySupplyResponse) Marshal ¶
func (m *QuerySupplyResponse) Marshal() (dAtA []byte, err error)
func (*QuerySupplyResponse) MarshalTo ¶
func (m *QuerySupplyResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySupplyResponse) MarshalToSizedBuffer ¶
func (m *QuerySupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySupplyResponse) ProtoMessage ¶
func (*QuerySupplyResponse) ProtoMessage()
func (*QuerySupplyResponse) Reset ¶
func (m *QuerySupplyResponse) Reset()
func (*QuerySupplyResponse) Size ¶
func (m *QuerySupplyResponse) Size() (n int)
func (*QuerySupplyResponse) String ¶
func (m *QuerySupplyResponse) String() string
func (*QuerySupplyResponse) Unmarshal ¶
func (m *QuerySupplyResponse) Unmarshal(dAtA []byte) error
func (*QuerySupplyResponse) XXX_DiscardUnknown ¶
func (m *QuerySupplyResponse) XXX_DiscardUnknown()
func (*QuerySupplyResponse) XXX_Marshal ¶
func (m *QuerySupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySupplyResponse) XXX_Merge ¶
func (m *QuerySupplyResponse) XXX_Merge(src proto.Message)
func (*QuerySupplyResponse) XXX_Size ¶
func (m *QuerySupplyResponse) XXX_Size() int
func (*QuerySupplyResponse) XXX_Unmarshal ¶
func (m *QuerySupplyResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Send ¶
func (*UnimplementedMsgServer) Send(ctx context.Context, req *MsgSend) (*MsgSendResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Balance ¶
func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error)
func (*UnimplementedQueryServer) Class ¶
func (*UnimplementedQueryServer) Class(ctx context.Context, req *QueryClassRequest) (*QueryClassResponse, error)
func (*UnimplementedQueryServer) Classes ¶
func (*UnimplementedQueryServer) Classes(ctx context.Context, req *QueryClassesRequest) (*QueryClassesResponse, error)
func (*UnimplementedQueryServer) NFT ¶
func (*UnimplementedQueryServer) NFT(ctx context.Context, req *QueryNFTRequest) (*QueryNFTResponse, error)
func (*UnimplementedQueryServer) NFTs ¶
func (*UnimplementedQueryServer) NFTs(ctx context.Context, req *QueryNFTsRequest) (*QueryNFTsResponse, error)
func (*UnimplementedQueryServer) Owner ¶
func (*UnimplementedQueryServer) Owner(ctx context.Context, req *QueryOwnerRequest) (*QueryOwnerResponse, error)
func (*UnimplementedQueryServer) Supply ¶
func (*UnimplementedQueryServer) Supply(ctx context.Context, req *QuerySupplyRequest) (*QuerySupplyResponse, error)