nft

package
v3.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package nft is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName module name
	ModuleName = "nft"

	// StoreKey is the default store key for nft
	StoreKey = ModuleName

	// RouterKey is the message route for nft
	RouterKey = ModuleName
)
View Source
const (
	// TypeMsgSend nft message types
	TypeMsgSend = "send"
)

Variables

View Source
var (
	ErrInvalidNFT     = sdkerrors.Register(ModuleName, 2, "invalid nft")
	ErrClassExists    = sdkerrors.Register(ModuleName, 3, "nft class already exist")
	ErrClassNotExists = sdkerrors.Register(ModuleName, 4, "nft class does not exist")
	ErrNFTExists      = sdkerrors.Register(ModuleName, 5, "nft already exist")
	ErrNFTNotExists   = sdkerrors.Register(ModuleName, 6, "nft does not exist")
	ErrInvalidID      = sdkerrors.Register(ModuleName, 7, "invalid id")
	ErrInvalidClassID = sdkerrors.Register(ModuleName, 8, "invalid class id")
)

x/nft module sentinel errors

View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 ValidateClassID

func ValidateClassID(id string) error

ValidateClassID returns whether the class id is valid

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis check the given genesis state has no integrity issues

func ValidateNFTID

func ValidateNFTID(id string) error

ValidateNFTID returns whether the nft id is valid

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

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

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) Descriptor() ([]byte, []int)

func (*Class) GetData

func (m *Class) GetData() *types.Any

func (*Class) GetDescription

func (m *Class) GetDescription() string

func (*Class) GetId

func (m *Class) GetId() string

func (*Class) GetName

func (m *Class) GetName() string

func (*Class) GetSymbol

func (m *Class) GetSymbol() string

func (*Class) GetUri

func (m *Class) GetUri() string

func (*Class) GetUriHash

func (m *Class) GetUriHash() string

func (*Class) Marshal

func (m *Class) Marshal() (dAtA []byte, err error)

func (*Class) MarshalTo

func (m *Class) MarshalTo(dAtA []byte) (int, error)

func (*Class) MarshalToSizedBuffer

func (m *Class) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Class) ProtoMessage

func (*Class) ProtoMessage()

func (*Class) Reset

func (m *Class) Reset()

func (*Class) Size

func (m *Class) Size() (n int)

func (*Class) String

func (m *Class) String() string

func (*Class) Unmarshal

func (m *Class) Unmarshal(dAtA []byte) error

func (*Class) XXX_DiscardUnknown

func (m *Class) XXX_DiscardUnknown()

func (*Class) XXX_Marshal

func (m *Class) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Class) XXX_Merge

func (m *Class) XXX_Merge(src proto.Message)

func (*Class) XXX_Size

func (m *Class) XXX_Size() int

func (*Class) XXX_Unmarshal

func (m *Class) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Entry) GetNfts

func (m *Entry) GetNfts() []*NFT

func (*Entry) GetOwner

func (m *Entry) GetOwner() string

func (*Entry) Marshal

func (m *Entry) Marshal() (dAtA []byte, err error)

func (*Entry) MarshalTo

func (m *Entry) MarshalTo(dAtA []byte) (int, error)

func (*Entry) MarshalToSizedBuffer

func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size

func (m *Entry) Size() (n int)

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

func (m *Entry) Unmarshal(dAtA []byte) error

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entry) XXX_Merge

func (m *Entry) XXX_Merge(src proto.Message)

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

func (m *Entry) XXX_Unmarshal(b []byte) error

type EventBurn

type EventBurn struct {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	Id      string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Owner   string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
}

EventBurn is emitted on Burn

func (*EventBurn) Descriptor

func (*EventBurn) Descriptor() ([]byte, []int)

func (*EventBurn) GetClassId

func (m *EventBurn) GetClassId() string

func (*EventBurn) GetId

func (m *EventBurn) GetId() string

func (*EventBurn) GetOwner

func (m *EventBurn) GetOwner() string

func (*EventBurn) Marshal

func (m *EventBurn) Marshal() (dAtA []byte, err error)

func (*EventBurn) MarshalTo

func (m *EventBurn) MarshalTo(dAtA []byte) (int, error)

func (*EventBurn) MarshalToSizedBuffer

func (m *EventBurn) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventBurn) ProtoMessage

func (*EventBurn) ProtoMessage()

func (*EventBurn) Reset

func (m *EventBurn) Reset()

func (*EventBurn) Size

func (m *EventBurn) Size() (n int)

func (*EventBurn) String

func (m *EventBurn) String() string

func (*EventBurn) Unmarshal

func (m *EventBurn) Unmarshal(dAtA []byte) error

func (*EventBurn) XXX_DiscardUnknown

func (m *EventBurn) XXX_DiscardUnknown()

func (*EventBurn) XXX_Marshal

func (m *EventBurn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventBurn) XXX_Merge

func (m *EventBurn) XXX_Merge(src proto.Message)

func (*EventBurn) XXX_Size

func (m *EventBurn) XXX_Size() int

func (*EventBurn) XXX_Unmarshal

func (m *EventBurn) XXX_Unmarshal(b []byte) error

type EventMint

type EventMint struct {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	Id      string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Owner   string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
}

EventMint is emitted on Mint

func (*EventMint) Descriptor

func (*EventMint) Descriptor() ([]byte, []int)

func (*EventMint) GetClassId

func (m *EventMint) GetClassId() string

func (*EventMint) GetId

func (m *EventMint) GetId() string

func (*EventMint) GetOwner

func (m *EventMint) GetOwner() string

func (*EventMint) Marshal

func (m *EventMint) Marshal() (dAtA []byte, err error)

func (*EventMint) MarshalTo

func (m *EventMint) MarshalTo(dAtA []byte) (int, error)

func (*EventMint) MarshalToSizedBuffer

func (m *EventMint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventMint) ProtoMessage

func (*EventMint) ProtoMessage()

func (*EventMint) Reset

func (m *EventMint) Reset()

func (*EventMint) Size

func (m *EventMint) Size() (n int)

func (*EventMint) String

func (m *EventMint) String() string

func (*EventMint) Unmarshal

func (m *EventMint) Unmarshal(dAtA []byte) error

func (*EventMint) XXX_DiscardUnknown

func (m *EventMint) XXX_DiscardUnknown()

func (*EventMint) XXX_Marshal

func (m *EventMint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventMint) XXX_Merge

func (m *EventMint) XXX_Merge(src proto.Message)

func (*EventMint) XXX_Size

func (m *EventMint) XXX_Size() int

func (*EventMint) XXX_Unmarshal

func (m *EventMint) XXX_Unmarshal(b []byte) error

type EventSend

type EventSend struct {
	ClassId  string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	Id       string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Sender   string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"`
}

EventSend is emitted on Msg/Send

func (*EventSend) Descriptor

func (*EventSend) Descriptor() ([]byte, []int)

func (*EventSend) GetClassId

func (m *EventSend) GetClassId() string

func (*EventSend) GetId

func (m *EventSend) GetId() string

func (*EventSend) GetReceiver

func (m *EventSend) GetReceiver() string

func (*EventSend) GetSender

func (m *EventSend) GetSender() string

func (*EventSend) Marshal

func (m *EventSend) Marshal() (dAtA []byte, err error)

func (*EventSend) MarshalTo

func (m *EventSend) MarshalTo(dAtA []byte) (int, error)

func (*EventSend) MarshalToSizedBuffer

func (m *EventSend) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventSend) ProtoMessage

func (*EventSend) ProtoMessage()

func (*EventSend) Reset

func (m *EventSend) Reset()

func (*EventSend) Size

func (m *EventSend) Size() (n int)

func (*EventSend) String

func (m *EventSend) String() string

func (*EventSend) Unmarshal

func (m *EventSend) Unmarshal(dAtA []byte) error

func (*EventSend) XXX_DiscardUnknown

func (m *EventSend) XXX_DiscardUnknown()

func (*EventSend) XXX_Marshal

func (m *EventSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventSend) XXX_Merge

func (m *EventSend) XXX_Merge(src proto.Message)

func (*EventSend) XXX_Size

func (m *EventSend) XXX_Size() int

func (*EventSend) XXX_Unmarshal

func (m *EventSend) XXX_Unmarshal(b []byte) error

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"`
	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 - Return 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) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*MsgSend) GetClassId

func (m *MsgSend) GetClassId() string

func (*MsgSend) GetId

func (m *MsgSend) GetId() string

func (*MsgSend) GetReceiver

func (m *MsgSend) GetReceiver() string

func (*MsgSend) GetSender

func (m *MsgSend) GetSender() string

func (MsgSend) GetSigners

func (m MsgSend) GetSigners() []sdk.AccAddress

GetSigners implements Msg

func (*MsgSend) Marshal

func (m *MsgSend) Marshal() (dAtA []byte, err error)

func (*MsgSend) MarshalTo

func (m *MsgSend) MarshalTo(dAtA []byte) (int, error)

func (*MsgSend) MarshalToSizedBuffer

func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSend) ProtoMessage

func (*MsgSend) ProtoMessage()

func (*MsgSend) Reset

func (m *MsgSend) Reset()

func (*MsgSend) Size

func (m *MsgSend) Size() (n int)

func (*MsgSend) String

func (m *MsgSend) String() string

func (*MsgSend) Unmarshal

func (m *MsgSend) Unmarshal(dAtA []byte) error

func (MsgSend) ValidateBasic

func (m MsgSend) ValidateBasic() error

ValidateBasic implements the Msg.ValidateBasic method.

func (*MsgSend) XXX_DiscardUnknown

func (m *MsgSend) XXX_DiscardUnknown()

func (*MsgSend) XXX_Marshal

func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSend) XXX_Merge

func (m *MsgSend) XXX_Merge(src proto.Message)

func (*MsgSend) XXX_Size

func (m *MsgSend) XXX_Size() int

func (*MsgSend) XXX_Unmarshal

func (m *MsgSend) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *MsgSendResponse) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*NFT) GetClassId

func (m *NFT) GetClassId() string

func (*NFT) GetData

func (m *NFT) GetData() *types.Any

func (*NFT) GetId

func (m *NFT) GetId() string

func (*NFT) GetUri

func (m *NFT) GetUri() string

func (*NFT) GetUriHash

func (m *NFT) GetUriHash() string

func (*NFT) Marshal

func (m *NFT) Marshal() (dAtA []byte, err error)

func (*NFT) MarshalTo

func (m *NFT) MarshalTo(dAtA []byte) (int, error)

func (*NFT) MarshalToSizedBuffer

func (m *NFT) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NFT) ProtoMessage

func (*NFT) ProtoMessage()

func (*NFT) Reset

func (m *NFT) Reset()

func (*NFT) Size

func (m *NFT) Size() (n int)

func (*NFT) String

func (m *NFT) String() string

func (*NFT) Unmarshal

func (m *NFT) Unmarshal(dAtA []byte) error

func (*NFT) XXX_DiscardUnknown

func (m *NFT) XXX_DiscardUnknown()

func (*NFT) XXX_Marshal

func (m *NFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NFT) XXX_Merge

func (m *NFT) XXX_Merge(src proto.Message)

func (*NFT) XXX_Size

func (m *NFT) XXX_Size() int

func (*NFT) XXX_Unmarshal

func (m *NFT) XXX_Unmarshal(b []byte) error

type QueryBalanceRequest

type QueryBalanceRequest struct {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	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 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 {
	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 *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 {
	Classes    []*Class            `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"`
	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 {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	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) MarshalTo

func (m *QueryNFTRequest) MarshalTo(dAtA []byte) (int, 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 {
	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) MarshalTo

func (m *QueryNFTResponse) MarshalTo(dAtA []byte) (int, 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 {
	ClassId    string             `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	Owner      string             `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	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) MarshalTo

func (m *QueryNFTsRequest) MarshalTo(dAtA []byte) (int, 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 {
	Nfts       []*NFT              `protobuf:"bytes,1,rep,name=nfts,proto3" json:"nfts,omitempty"`
	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 {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	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 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 {
	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 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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Balance

func (*UnimplementedQueryServer) Class

func (*UnimplementedQueryServer) Classes

func (*UnimplementedQueryServer) NFT

func (*UnimplementedQueryServer) NFTs

func (*UnimplementedQueryServer) Owner

func (*UnimplementedQueryServer) Supply

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL