3294 lines
84 KiB
Go
3294 lines
84 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: cosmos/nft/v1beta1/query.proto
|
|
|
|
package nft
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
query "github.com/cosmos/cosmos-sdk/types/query"
|
|
grpc1 "github.com/gogo/protobuf/grpc"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// QueryBalanceRequest is the request type for the Query/Balance RPC method
|
|
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"`
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} }
|
|
func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryBalanceRequest) ProtoMessage() {}
|
|
func (*QueryBalanceRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{0}
|
|
}
|
|
func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryBalanceRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryBalanceRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryBalanceRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryBalanceRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) GetOwner() string {
|
|
if m != nil {
|
|
return m.Owner
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QueryBalanceResponse is the response type for the Query/Balance RPC method
|
|
type QueryBalanceResponse struct {
|
|
Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} }
|
|
func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryBalanceResponse) ProtoMessage() {}
|
|
func (*QueryBalanceResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{1}
|
|
}
|
|
func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryBalanceResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryBalanceResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryBalanceResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryBalanceResponse) GetAmount() uint64 {
|
|
if m != nil {
|
|
return m.Amount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// QueryOwnerRequest is the request type for the Query/Owner RPC method
|
|
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"`
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) Reset() { *m = QueryOwnerRequest{} }
|
|
func (m *QueryOwnerRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryOwnerRequest) ProtoMessage() {}
|
|
func (*QueryOwnerRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{2}
|
|
}
|
|
func (m *QueryOwnerRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryOwnerRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryOwnerRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryOwnerRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryOwnerRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryOwnerRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryOwnerRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryOwnerRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryOwnerRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QueryOwnerResponse is the response type for the Query/Owner RPC method
|
|
type QueryOwnerResponse struct {
|
|
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
|
|
}
|
|
|
|
func (m *QueryOwnerResponse) Reset() { *m = QueryOwnerResponse{} }
|
|
func (m *QueryOwnerResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryOwnerResponse) ProtoMessage() {}
|
|
func (*QueryOwnerResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{3}
|
|
}
|
|
func (m *QueryOwnerResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryOwnerResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryOwnerResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryOwnerResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryOwnerResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryOwnerResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryOwnerResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryOwnerResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryOwnerResponse) GetOwner() string {
|
|
if m != nil {
|
|
return m.Owner
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QuerySupplyRequest is the request type for the Query/Supply RPC method
|
|
type QuerySupplyRequest struct {
|
|
ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
|
|
}
|
|
|
|
func (m *QuerySupplyRequest) Reset() { *m = QuerySupplyRequest{} }
|
|
func (m *QuerySupplyRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QuerySupplyRequest) ProtoMessage() {}
|
|
func (*QuerySupplyRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{4}
|
|
}
|
|
func (m *QuerySupplyRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuerySupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuerySupplyRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuerySupplyRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuerySupplyRequest.Merge(m, src)
|
|
}
|
|
func (m *QuerySupplyRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuerySupplyRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuerySupplyRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuerySupplyRequest proto.InternalMessageInfo
|
|
|
|
func (m *QuerySupplyRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QuerySupplyResponse is the response type for the Query/Supply RPC method
|
|
type QuerySupplyResponse struct {
|
|
Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
}
|
|
|
|
func (m *QuerySupplyResponse) Reset() { *m = QuerySupplyResponse{} }
|
|
func (m *QuerySupplyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QuerySupplyResponse) ProtoMessage() {}
|
|
func (*QuerySupplyResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{5}
|
|
}
|
|
func (m *QuerySupplyResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuerySupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuerySupplyResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuerySupplyResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuerySupplyResponse.Merge(m, src)
|
|
}
|
|
func (m *QuerySupplyResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuerySupplyResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuerySupplyResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuerySupplyResponse proto.InternalMessageInfo
|
|
|
|
func (m *QuerySupplyResponse) GetAmount() uint64 {
|
|
if m != nil {
|
|
return m.Amount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// QueryNFTsOfClassRequest is the request type for the Query/NFTsOfClass RPC method
|
|
type QueryNFTsOfClassRequest 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"`
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) Reset() { *m = QueryNFTsOfClassRequest{} }
|
|
func (m *QueryNFTsOfClassRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryNFTsOfClassRequest) ProtoMessage() {}
|
|
func (*QueryNFTsOfClassRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{6}
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryNFTsOfClassRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryNFTsOfClassRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryNFTsOfClassRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryNFTsOfClassRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryNFTsOfClassRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) GetOwner() string {
|
|
if m != nil {
|
|
return m.Owner
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) GetPagination() *query.PageRequest {
|
|
if m != nil {
|
|
return m.Pagination
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// QueryNFTsOfClassResponse is the response type for the Query/NFTsOfClass and Query/NFTsOfClassByOwner RPC methods
|
|
type QueryNFTsOfClassResponse 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"`
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) Reset() { *m = QueryNFTsOfClassResponse{} }
|
|
func (m *QueryNFTsOfClassResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryNFTsOfClassResponse) ProtoMessage() {}
|
|
func (*QueryNFTsOfClassResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{7}
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryNFTsOfClassResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryNFTsOfClassResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryNFTsOfClassResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryNFTsOfClassResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryNFTsOfClassResponse) GetNfts() []*NFT {
|
|
if m != nil {
|
|
return m.Nfts
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) GetPagination() *query.PageResponse {
|
|
if m != nil {
|
|
return m.Pagination
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// QueryNFTRequest is the request type for the Query/NFT RPC method
|
|
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"`
|
|
}
|
|
|
|
func (m *QueryNFTRequest) Reset() { *m = QueryNFTRequest{} }
|
|
func (m *QueryNFTRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryNFTRequest) ProtoMessage() {}
|
|
func (*QueryNFTRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{8}
|
|
}
|
|
func (m *QueryNFTRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryNFTRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryNFTRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryNFTRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryNFTRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryNFTRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryNFTRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryNFTRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryNFTRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryNFTRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *QueryNFTRequest) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QueryNFTResponse is the response type for the Query/NFT RPC method
|
|
type QueryNFTResponse struct {
|
|
Nft *NFT `protobuf:"bytes,1,opt,name=nft,proto3" json:"nft,omitempty"`
|
|
}
|
|
|
|
func (m *QueryNFTResponse) Reset() { *m = QueryNFTResponse{} }
|
|
func (m *QueryNFTResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryNFTResponse) ProtoMessage() {}
|
|
func (*QueryNFTResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{9}
|
|
}
|
|
func (m *QueryNFTResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryNFTResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryNFTResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryNFTResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryNFTResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryNFTResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryNFTResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryNFTResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryNFTResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryNFTResponse) GetNft() *NFT {
|
|
if m != nil {
|
|
return m.Nft
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// QueryClassRequest is the request type for the Query/Class RPC method
|
|
type QueryClassRequest struct {
|
|
ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
|
|
}
|
|
|
|
func (m *QueryClassRequest) Reset() { *m = QueryClassRequest{} }
|
|
func (m *QueryClassRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryClassRequest) ProtoMessage() {}
|
|
func (*QueryClassRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{10}
|
|
}
|
|
func (m *QueryClassRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryClassRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryClassRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryClassRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryClassRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryClassRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryClassRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryClassRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryClassRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryClassRequest) GetClassId() string {
|
|
if m != nil {
|
|
return m.ClassId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// QueryClassResponse is the response type for the Query/Class RPC method
|
|
type QueryClassResponse struct {
|
|
Class *Class `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"`
|
|
}
|
|
|
|
func (m *QueryClassResponse) Reset() { *m = QueryClassResponse{} }
|
|
func (m *QueryClassResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryClassResponse) ProtoMessage() {}
|
|
func (*QueryClassResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{11}
|
|
}
|
|
func (m *QueryClassResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryClassResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryClassResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryClassResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryClassResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryClassResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryClassResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryClassResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryClassResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryClassResponse) GetClass() *Class {
|
|
if m != nil {
|
|
return m.Class
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// QueryClassesRequest is the request type for the Query/Classes RPC method
|
|
type QueryClassesRequest struct {
|
|
// pagination defines an optional pagination for the request.
|
|
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
|
}
|
|
|
|
func (m *QueryClassesRequest) Reset() { *m = QueryClassesRequest{} }
|
|
func (m *QueryClassesRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryClassesRequest) ProtoMessage() {}
|
|
func (*QueryClassesRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{12}
|
|
}
|
|
func (m *QueryClassesRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryClassesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryClassesRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryClassesRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryClassesRequest.Merge(m, src)
|
|
}
|
|
func (m *QueryClassesRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryClassesRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryClassesRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryClassesRequest proto.InternalMessageInfo
|
|
|
|
func (m *QueryClassesRequest) GetPagination() *query.PageRequest {
|
|
if m != nil {
|
|
return m.Pagination
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// QueryClassesResponse is the response type for the Query/Classes RPC method
|
|
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"`
|
|
}
|
|
|
|
func (m *QueryClassesResponse) Reset() { *m = QueryClassesResponse{} }
|
|
func (m *QueryClassesResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryClassesResponse) ProtoMessage() {}
|
|
func (*QueryClassesResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_0d24e0db697b0f9d, []int{13}
|
|
}
|
|
func (m *QueryClassesResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryClassesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryClassesResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QueryClassesResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryClassesResponse.Merge(m, src)
|
|
}
|
|
func (m *QueryClassesResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryClassesResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryClassesResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryClassesResponse proto.InternalMessageInfo
|
|
|
|
func (m *QueryClassesResponse) GetClasses() []*Class {
|
|
if m != nil {
|
|
return m.Classes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *QueryClassesResponse) GetPagination() *query.PageResponse {
|
|
if m != nil {
|
|
return m.Pagination
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos.nft.v1beta1.QueryBalanceRequest")
|
|
proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos.nft.v1beta1.QueryBalanceResponse")
|
|
proto.RegisterType((*QueryOwnerRequest)(nil), "cosmos.nft.v1beta1.QueryOwnerRequest")
|
|
proto.RegisterType((*QueryOwnerResponse)(nil), "cosmos.nft.v1beta1.QueryOwnerResponse")
|
|
proto.RegisterType((*QuerySupplyRequest)(nil), "cosmos.nft.v1beta1.QuerySupplyRequest")
|
|
proto.RegisterType((*QuerySupplyResponse)(nil), "cosmos.nft.v1beta1.QuerySupplyResponse")
|
|
proto.RegisterType((*QueryNFTsOfClassRequest)(nil), "cosmos.nft.v1beta1.QueryNFTsOfClassRequest")
|
|
proto.RegisterType((*QueryNFTsOfClassResponse)(nil), "cosmos.nft.v1beta1.QueryNFTsOfClassResponse")
|
|
proto.RegisterType((*QueryNFTRequest)(nil), "cosmos.nft.v1beta1.QueryNFTRequest")
|
|
proto.RegisterType((*QueryNFTResponse)(nil), "cosmos.nft.v1beta1.QueryNFTResponse")
|
|
proto.RegisterType((*QueryClassRequest)(nil), "cosmos.nft.v1beta1.QueryClassRequest")
|
|
proto.RegisterType((*QueryClassResponse)(nil), "cosmos.nft.v1beta1.QueryClassResponse")
|
|
proto.RegisterType((*QueryClassesRequest)(nil), "cosmos.nft.v1beta1.QueryClassesRequest")
|
|
proto.RegisterType((*QueryClassesResponse)(nil), "cosmos.nft.v1beta1.QueryClassesResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("cosmos/nft/v1beta1/query.proto", fileDescriptor_0d24e0db697b0f9d) }
|
|
|
|
var fileDescriptor_0d24e0db697b0f9d = []byte{
|
|
// 734 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4f, 0x4f, 0x13, 0x4f,
|
|
0x18, 0xc7, 0x99, 0x96, 0xd2, 0xdf, 0xef, 0x21, 0xf1, 0xcf, 0x48, 0xa4, 0x54, 0xdd, 0x90, 0x45,
|
|
0xda, 0x42, 0x65, 0x86, 0x3f, 0x89, 0x27, 0xf4, 0x80, 0xb1, 0xc6, 0x0b, 0x68, 0xe5, 0x64, 0x62,
|
|
0xcc, 0xb6, 0xdd, 0xd6, 0x8d, 0x65, 0x77, 0x61, 0xb6, 0x2a, 0x21, 0x1c, 0xe4, 0x60, 0xf4, 0x46,
|
|
0x14, 0xdf, 0x93, 0x47, 0x12, 0x2f, 0xde, 0x34, 0xe0, 0x0b, 0x31, 0x3b, 0xf3, 0x6c, 0xd9, 0x95,
|
|
0xed, 0x6e, 0x43, 0x3c, 0x91, 0xd9, 0xf9, 0x3e, 0xf3, 0xfd, 0xcc, 0xf3, 0x3c, 0xf3, 0x50, 0xd0,
|
|
0x9a, 0x8e, 0xd8, 0x72, 0x04, 0xb7, 0xdb, 0x1e, 0x7f, 0xb3, 0xd4, 0x30, 0x3d, 0x63, 0x89, 0x6f,
|
|
0xf7, 0xcc, 0x9d, 0x5d, 0xe6, 0xee, 0x38, 0x9e, 0x43, 0xa9, 0xda, 0x67, 0x76, 0xdb, 0x63, 0xb8,
|
|
0x5f, 0x9c, 0xc7, 0x98, 0x86, 0x21, 0x4c, 0x25, 0xee, 0x87, 0xba, 0x46, 0xc7, 0xb2, 0x0d, 0xcf,
|
|
0x72, 0x6c, 0x15, 0x5f, 0xbc, 0xd9, 0x71, 0x9c, 0x4e, 0xd7, 0xe4, 0x86, 0x6b, 0x71, 0xc3, 0xb6,
|
|
0x1d, 0x4f, 0x6e, 0x8a, 0x60, 0x37, 0xc6, 0xdd, 0x77, 0x92, 0xbb, 0x7a, 0x0d, 0xae, 0x3d, 0xf5,
|
|
0x4f, 0x5f, 0x33, 0xba, 0x86, 0xdd, 0x34, 0xeb, 0xe6, 0x76, 0xcf, 0x14, 0x1e, 0x9d, 0x82, 0xff,
|
|
0x9a, 0x5d, 0x43, 0x88, 0x97, 0x56, 0xab, 0x40, 0xa6, 0x49, 0xe5, 0xff, 0x7a, 0x5e, 0xae, 0x1f,
|
|
0xb7, 0xe8, 0x04, 0xe4, 0x9c, 0xb7, 0xb6, 0xb9, 0x53, 0xc8, 0xc8, 0xef, 0x6a, 0xa1, 0x33, 0x98,
|
|
0x88, 0x9e, 0x23, 0x5c, 0xc7, 0x16, 0x26, 0xbd, 0x0e, 0x63, 0xc6, 0x96, 0xd3, 0xb3, 0x3d, 0x79,
|
|
0xcc, 0x68, 0x1d, 0x57, 0xfa, 0x7d, 0xb8, 0x2a, 0xf5, 0x1b, 0x7e, 0xf4, 0x10, 0xae, 0x97, 0x20,
|
|
0x63, 0xb5, 0xd0, 0x32, 0x63, 0xb5, 0xf4, 0x79, 0xa0, 0xe1, 0x78, 0x74, 0xeb, 0xb3, 0x91, 0x30,
|
|
0x1b, 0x47, 0xed, 0xb3, 0x9e, 0xeb, 0x76, 0x77, 0xd3, 0xcd, 0xf4, 0x05, 0x4c, 0x4a, 0x10, 0x90,
|
|
0x72, 0x97, 0xcf, 0x04, 0x26, 0xa5, 0x7e, 0xbd, 0xb6, 0x29, 0x36, 0xda, 0x0f, 0xfc, 0x53, 0x2e,
|
|
0x9a, 0x48, 0x5a, 0x03, 0x38, 0x2b, 0x70, 0x21, 0x3b, 0x4d, 0x2a, 0xe3, 0xcb, 0x25, 0x86, 0x1d,
|
|
0xe2, 0x77, 0x03, 0x53, 0xad, 0x83, 0xa5, 0x64, 0x4f, 0x8c, 0x4e, 0x50, 0xb5, 0x7a, 0x28, 0x52,
|
|
0x3f, 0x24, 0x50, 0x38, 0x0f, 0x85, 0x37, 0xa9, 0xc2, 0xa8, 0xdd, 0xf6, 0x44, 0x81, 0x4c, 0x67,
|
|
0x2b, 0xe3, 0xcb, 0x93, 0xec, 0x7c, 0x03, 0xb2, 0xf5, 0xda, 0x66, 0x5d, 0x8a, 0xe8, 0xa3, 0x08,
|
|
0x51, 0x46, 0x12, 0x95, 0x53, 0x89, 0x94, 0x53, 0x04, 0x69, 0x15, 0x2e, 0x07, 0x44, 0x17, 0xa8,
|
|
0xf8, 0x3d, 0xb8, 0x72, 0x16, 0x8d, 0xf7, 0x98, 0x83, 0xac, 0xdd, 0x56, 0xe5, 0x48, 0xb8, 0x86,
|
|
0xaf, 0xd1, 0x19, 0x36, 0xdc, 0x90, 0xd5, 0xd1, 0x1f, 0x62, 0xd3, 0x44, 0x13, 0xc7, 0x21, 0x27,
|
|
0x05, 0x68, 0x39, 0x15, 0x67, 0xa9, 0x22, 0x94, 0x4e, 0x7f, 0x81, 0xad, 0x24, 0x3f, 0x9a, 0x7d,
|
|
0xe3, 0x68, 0x95, 0xc9, 0x85, 0xab, 0x7c, 0x44, 0xf0, 0xdd, 0xf5, 0xcf, 0x47, 0xd0, 0x15, 0x50,
|
|
0x37, 0x31, 0x83, 0x22, 0x27, 0xa0, 0x06, 0xca, 0x7f, 0x56, 0xe9, 0xe5, 0x9f, 0x79, 0xc8, 0x49,
|
|
0x2c, 0x7a, 0x44, 0x20, 0x8f, 0x33, 0x81, 0x96, 0xe3, 0x10, 0x62, 0xa6, 0x4f, 0xb1, 0x92, 0x2e,
|
|
0x54, 0xa6, 0xfa, 0xdd, 0x83, 0xef, 0xbf, 0xbf, 0x64, 0x16, 0x29, 0xe3, 0x31, 0x53, 0xae, 0xa1,
|
|
0xc4, 0x7c, 0x4f, 0xbe, 0xac, 0x7d, 0xbe, 0x17, 0xd4, 0x7a, 0x9f, 0x7e, 0x22, 0x90, 0x93, 0xa3,
|
|
0x83, 0xce, 0x0e, 0xf4, 0x0a, 0x8f, 0xa6, 0x62, 0x29, 0x4d, 0x86, 0x40, 0x4b, 0x12, 0xa8, 0x4a,
|
|
0xe7, 0xe2, 0x80, 0x24, 0x47, 0x08, 0x83, 0xef, 0xf9, 0x2c, 0x1f, 0x09, 0x8c, 0xa9, 0x49, 0x43,
|
|
0x07, 0xbb, 0x44, 0x66, 0x57, 0xb1, 0x9c, 0xaa, 0x43, 0x9c, 0x05, 0x89, 0x53, 0xa6, 0xb3, 0x71,
|
|
0x38, 0x42, 0x6a, 0xc3, 0x69, 0xf9, 0x4a, 0x60, 0x3c, 0x34, 0x2f, 0x68, 0x75, 0xa0, 0xcf, 0xf9,
|
|
0x51, 0x57, 0xbc, 0x33, 0x9c, 0x18, 0xc9, 0xaa, 0x92, 0x6c, 0x96, 0xce, 0xf0, 0xf8, 0xff, 0x4f,
|
|
0x22, 0xcc, 0x75, 0x40, 0x20, 0xbb, 0x5e, 0xdb, 0xa4, 0x33, 0x49, 0x16, 0x01, 0xc7, 0xed, 0x64,
|
|
0x11, 0xfa, 0x2f, 0x4a, 0xff, 0x79, 0x5a, 0x19, 0xc2, 0x5f, 0xd5, 0xe9, 0x03, 0x81, 0x9c, 0x4a,
|
|
0xcb, 0xe0, 0x9e, 0x89, 0x24, 0xa4, 0x94, 0x26, 0x43, 0x14, 0x26, 0x51, 0x2a, 0xb4, 0x14, 0x87,
|
|
0x82, 0x6f, 0x33, 0x9c, 0x8d, 0xf7, 0x04, 0xf2, 0xf8, 0xde, 0x13, 0xde, 0x54, 0x74, 0xe2, 0x24,
|
|
0xbc, 0xa9, 0xbf, 0x46, 0x87, 0x3e, 0x23, 0x71, 0x6e, 0xd1, 0x1b, 0x09, 0x38, 0x6b, 0xab, 0xdf,
|
|
0x4e, 0x34, 0x72, 0x7c, 0xa2, 0x91, 0x5f, 0x27, 0x1a, 0x39, 0x3c, 0xd5, 0x46, 0x8e, 0x4f, 0xb5,
|
|
0x91, 0x1f, 0xa7, 0xda, 0xc8, 0x73, 0xbd, 0x63, 0x79, 0xaf, 0x7a, 0x0d, 0xd6, 0x74, 0xb6, 0x82,
|
|
0x03, 0xd4, 0x9f, 0x05, 0xd1, 0x7a, 0xcd, 0xdf, 0xf9, 0xa7, 0x35, 0xc6, 0xe4, 0x8f, 0x8f, 0x95,
|
|
0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xed, 0xff, 0x2d, 0x1a, 0x09, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// 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.
|
|
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)
|
|
// NFTsOfClass queries all NFTs of a given class or optional owner, similar to tokenByIndex in ERC721Enumerable
|
|
NFTsOfClass(ctx context.Context, in *QueryNFTsOfClassRequest, opts ...grpc.CallOption) (*QueryNFTsOfClassResponse, 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)
|
|
}
|
|
|
|
type queryClient struct {
|
|
cc grpc1.ClientConn
|
|
}
|
|
|
|
func NewQueryClient(cc grpc1.ClientConn) QueryClient {
|
|
return &queryClient{cc}
|
|
}
|
|
|
|
func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) {
|
|
out := new(QueryBalanceResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Balance", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error) {
|
|
out := new(QueryOwnerResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Owner", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) {
|
|
out := new(QuerySupplyResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Supply", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) NFTsOfClass(ctx context.Context, in *QueryNFTsOfClassRequest, opts ...grpc.CallOption) (*QueryNFTsOfClassResponse, error) {
|
|
out := new(QueryNFTsOfClassResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/NFTsOfClass", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error) {
|
|
out := new(QueryNFTResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/NFT", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error) {
|
|
out := new(QueryClassResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Class", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *queryClient) Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) {
|
|
out := new(QueryClassesResponse)
|
|
err := c.cc.Invoke(ctx, "/cosmos.nft.v1beta1.Query/Classes", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// QueryServer is the server API for Query service.
|
|
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)
|
|
// NFTsOfClass queries all NFTs of a given class or optional owner, similar to tokenByIndex in ERC721Enumerable
|
|
NFTsOfClass(context.Context, *QueryNFTsOfClassRequest) (*QueryNFTsOfClassResponse, 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)
|
|
}
|
|
|
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedQueryServer struct {
|
|
}
|
|
|
|
func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) Owner(ctx context.Context, req *QueryOwnerRequest) (*QueryOwnerResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Owner not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) Supply(ctx context.Context, req *QuerySupplyRequest) (*QuerySupplyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Supply not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) NFTsOfClass(ctx context.Context, req *QueryNFTsOfClassRequest) (*QueryNFTsOfClassResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NFTsOfClass not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) NFT(ctx context.Context, req *QueryNFTRequest) (*QueryNFTResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NFT not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) Class(ctx context.Context, req *QueryClassRequest) (*QueryClassResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Class not implemented")
|
|
}
|
|
func (*UnimplementedQueryServer) Classes(ctx context.Context, req *QueryClassesRequest) (*QueryClassesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Classes not implemented")
|
|
}
|
|
|
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
|
s.RegisterService(&_Query_serviceDesc, srv)
|
|
}
|
|
|
|
func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryBalanceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).Balance(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/Balance",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_Owner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryOwnerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).Owner(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/Owner",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).Owner(ctx, req.(*QueryOwnerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_Supply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QuerySupplyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).Supply(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/Supply",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).Supply(ctx, req.(*QuerySupplyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_NFTsOfClass_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryNFTsOfClassRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).NFTsOfClass(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/NFTsOfClass",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).NFTsOfClass(ctx, req.(*QueryNFTsOfClassRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_NFT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryNFTRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).NFT(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/NFT",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).NFT(ctx, req.(*QueryNFTRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_Class_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryClassRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).Class(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/Class",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).Class(ctx, req.(*QueryClassRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Query_Classes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryClassesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(QueryServer).Classes(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cosmos.nft.v1beta1.Query/Classes",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(QueryServer).Classes(ctx, req.(*QueryClassesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "cosmos.nft.v1beta1.Query",
|
|
HandlerType: (*QueryServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Balance",
|
|
Handler: _Query_Balance_Handler,
|
|
},
|
|
{
|
|
MethodName: "Owner",
|
|
Handler: _Query_Owner_Handler,
|
|
},
|
|
{
|
|
MethodName: "Supply",
|
|
Handler: _Query_Supply_Handler,
|
|
},
|
|
{
|
|
MethodName: "NFTsOfClass",
|
|
Handler: _Query_NFTsOfClass_Handler,
|
|
},
|
|
{
|
|
MethodName: "NFT",
|
|
Handler: _Query_NFT_Handler,
|
|
},
|
|
{
|
|
MethodName: "Class",
|
|
Handler: _Query_Class_Handler,
|
|
},
|
|
{
|
|
MethodName: "Classes",
|
|
Handler: _Query_Classes_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "cosmos/nft/v1beta1/query.proto",
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Owner) > 0 {
|
|
i -= len(m.Owner)
|
|
copy(dAtA[i:], m.Owner)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Amount != 0 {
|
|
i = encodeVarintQuery(dAtA, i, uint64(m.Amount))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryOwnerResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryOwnerResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Owner) > 0 {
|
|
i -= len(m.Owner)
|
|
copy(dAtA[i:], m.Owner)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuerySupplyRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuerySupplyRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuerySupplyResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuerySupplyResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuerySupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Amount != 0 {
|
|
i = encodeVarintQuery(dAtA, i, uint64(m.Amount))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Pagination != nil {
|
|
{
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Owner) > 0 {
|
|
i -= len(m.Owner)
|
|
copy(dAtA[i:], m.Owner)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Pagination != nil {
|
|
{
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Nfts) > 0 {
|
|
for iNdEx := len(m.Nfts) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Nfts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryNFTRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryNFTRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryNFTRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryNFTResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryNFTResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryNFTResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Nft != nil {
|
|
{
|
|
size, err := m.Nft.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryClassRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryClassRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryClassRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ClassId) > 0 {
|
|
i -= len(m.ClassId)
|
|
copy(dAtA[i:], m.ClassId)
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryClassResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryClassResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryClassResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Class != nil {
|
|
{
|
|
size, err := m.Class.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryClassesRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryClassesRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryClassesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Pagination != nil {
|
|
{
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryClassesResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryClassesResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryClassesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Pagination != nil {
|
|
{
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Classes) > 0 {
|
|
for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovQuery(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *QueryBalanceRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
l = len(m.Owner)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Amount != 0 {
|
|
n += 1 + sovQuery(uint64(m.Amount))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryOwnerRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryOwnerResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Owner)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuerySupplyRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuerySupplyResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Amount != 0 {
|
|
n += 1 + sovQuery(uint64(m.Amount))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
l = len(m.Owner)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
if m.Pagination != nil {
|
|
l = m.Pagination.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryNFTsOfClassResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Nfts) > 0 {
|
|
for _, e := range m.Nfts {
|
|
l = e.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
}
|
|
if m.Pagination != nil {
|
|
l = m.Pagination.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryNFTRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryNFTResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Nft != nil {
|
|
l = m.Nft.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryClassRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClassId)
|
|
if l > 0 {
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryClassResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Class != nil {
|
|
l = m.Class.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryClassesRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Pagination != nil {
|
|
l = m.Pagination.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryClassesResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Classes) > 0 {
|
|
for _, e := range m.Classes {
|
|
l = e.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
}
|
|
if m.Pagination != nil {
|
|
l = m.Pagination.Size()
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovQuery(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozQuery(x uint64) (n int) {
|
|
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Owner = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
|
}
|
|
m.Amount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Amount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryOwnerRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryOwnerRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryOwnerResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryOwnerResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Owner = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuerySupplyRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuerySupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QuerySupplyResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuerySupplyResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuerySupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
|
}
|
|
m.Amount = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Amount |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryNFTsOfClassRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryNFTsOfClassRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryNFTsOfClassRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Owner = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pagination == nil {
|
|
m.Pagination = &query.PageRequest{}
|
|
}
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryNFTsOfClassResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryNFTsOfClassResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryNFTsOfClassResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Nfts", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Nfts = append(m.Nfts, &NFT{})
|
|
if err := m.Nfts[len(m.Nfts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pagination == nil {
|
|
m.Pagination = &query.PageResponse{}
|
|
}
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryNFTRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryNFTRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryNFTRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryNFTResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryNFTResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryNFTResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Nft", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Nft == nil {
|
|
m.Nft = &NFT{}
|
|
}
|
|
if err := m.Nft.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryClassRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryClassRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryClassRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClassId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryClassResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryClassResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryClassResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Class", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Class == nil {
|
|
m.Class = &Class{}
|
|
}
|
|
if err := m.Class.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryClassesRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryClassesRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryClassesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pagination == nil {
|
|
m.Pagination = &query.PageRequest{}
|
|
}
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryClassesResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryClassesResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryClassesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Classes = append(m.Classes, &Class{})
|
|
if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pagination == nil {
|
|
m.Pagination = &query.PageResponse{}
|
|
}
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthQuery
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipQuery(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowQuery
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthQuery
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupQuery
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthQuery
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
|
|
)
|