types

package
v0.0.0-...-d68c2fe Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "vnft"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_vnft"
)
View Source
const CLASS_ID_PREFIX = "vconftclass"
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const NFT_ID_PREFIX = "vconft"
View Source
const NONCE = "000000000000000000000000000000000000000000000000"
View Source
const TypeMsgBurnNFT = "burn_nft"
View Source
const TypeMsgCreateClass = "create_class"
View Source
const TypeMsgMintNft = "mint_nft"

Variables

View Source
var (
	ErrInvalidLengthClassData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClassData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClassData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrSample                 = sdkerrors.Register(ModuleName, 1100, "sample error")
	ErrFailedToSaveClass      = sdkerrors.Register(ModuleName, 3, "Failed to save class")
	ErrFailedToMarshalData    = sdkerrors.Register(ModuleName, 4, "Failed to marshal data")
	ErrNftClassNotFound       = sdkerrors.Register(ModuleName, 5, "NFT Class not found")
	ErrFailedToUnmarshalData  = sdkerrors.Register(ModuleName, 6, "Failed to unmarshal data")
	ErrFailedToMintNFT        = sdkerrors.Register(ModuleName, 7, "Failed to mint NFT")
	ErrFailedToGetUserAddress = sdkerrors.Register(ModuleName, 8, "Failed to obtain user address")
	ErrFailedToCreateNftId    = sdkerrors.Register(ModuleName, 9, "Failed to Create NFT ID")
	ErrOwnerAddressUsedBefore = sdkerrors.Register(ModuleName, 10, "Owner Address is used before")
	ErrNftNotFound            = sdkerrors.Register(ModuleName, 11, "NFT was not found")
	ErrFailedToBurnNFT        = sdkerrors.Register(ModuleName, 12, "Failed to Burn the NFT")
	ErrNftNotBurnable         = sdkerrors.Register(ModuleName, 13, "NFT is not burnable")
)

x/vnft module sentinel errors

View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNftData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNftData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNftData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func NewClassId

func NewClassId(prefix []byte, serial int) (string, error)

func NewNftId

func NewNftId(class string, version int, tokenHash string, creator string) (string, error)

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

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

BankKeeper defines the expected interface needed to retrieve account balances.

type ClassData

type ClassData struct {
	Metadata JsonInput `protobuf:"bytes,1,opt,name=metadata,proto3,customtype=JsonInput" json:"metadata"`
}

func (*ClassData) Descriptor

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

func (*ClassData) Marshal

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

func (*ClassData) MarshalTo

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

func (*ClassData) MarshalToSizedBuffer

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

func (*ClassData) ProtoMessage

func (*ClassData) ProtoMessage()

func (*ClassData) Reset

func (m *ClassData) Reset()

func (*ClassData) Size

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

func (*ClassData) String

func (m *ClassData) String() string

func (*ClassData) Unmarshal

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

func (*ClassData) XXX_DiscardUnknown

func (m *ClassData) XXX_DiscardUnknown()

func (*ClassData) XXX_Marshal

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

func (*ClassData) XXX_Merge

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

func (*ClassData) XXX_Size

func (m *ClassData) XXX_Size() int

func (*ClassData) XXX_Unmarshal

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

type EventBurnNFT

type EventBurnNFT struct {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	NftId   string `protobuf:"bytes,2,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty"`
	Owner   string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
}

func (*EventBurnNFT) Descriptor

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

func (*EventBurnNFT) GetClassId

func (m *EventBurnNFT) GetClassId() string

func (*EventBurnNFT) GetNftId

func (m *EventBurnNFT) GetNftId() string

func (*EventBurnNFT) GetOwner

func (m *EventBurnNFT) GetOwner() string

func (*EventBurnNFT) Marshal

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

func (*EventBurnNFT) MarshalTo

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

func (*EventBurnNFT) MarshalToSizedBuffer

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

func (*EventBurnNFT) ProtoMessage

func (*EventBurnNFT) ProtoMessage()

func (*EventBurnNFT) Reset

func (m *EventBurnNFT) Reset()

func (*EventBurnNFT) Size

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

func (*EventBurnNFT) String

func (m *EventBurnNFT) String() string

func (*EventBurnNFT) Unmarshal

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

func (*EventBurnNFT) XXX_DiscardUnknown

func (m *EventBurnNFT) XXX_DiscardUnknown()

func (*EventBurnNFT) XXX_Marshal

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

func (*EventBurnNFT) XXX_Merge

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

func (*EventBurnNFT) XXX_Size

func (m *EventBurnNFT) XXX_Size() int

func (*EventBurnNFT) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the vnft module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type JsonInput

type JsonInput json.RawMessage // JSON encoded

func (JsonInput) GetPath

func (input JsonInput) GetPath(path ...interface{}) (interface{}, bool)

for testing

func (JsonInput) Marshal

func (input JsonInput) Marshal() ([]byte, error)

func (JsonInput) MarshalJSON

func (input JsonInput) MarshalJSON() ([]byte, error)

func (*JsonInput) MarshalTo

func (input *JsonInput) MarshalTo(dAtA []byte) (int, error)

func (JsonInput) Normalize

func (input JsonInput) Normalize() (json.RawMessage, error)

Normalize returns a sorted JSON without indentation

func (JsonInput) Size

func (input JsonInput) Size() int

func (JsonInput) String

func (input JsonInput) String() string

func (*JsonInput) Unmarshal

func (input *JsonInput) Unmarshal(bz []byte) error

func (*JsonInput) UnmarshalJSON

func (input *JsonInput) UnmarshalJSON(bz []byte) error

func (JsonInput) Validate

func (input JsonInput) Validate() error

type MsgBurnNFT

type MsgBurnNFT struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	NftId   string `protobuf:"bytes,3,opt,name=nft_id,json=nftId,proto3" json:"nft_id,omitempty"`
}

func NewMsgBurnNFT

func NewMsgBurnNFT(creator string, classID string, nftID string) *MsgBurnNFT

func (*MsgBurnNFT) Descriptor

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

func (*MsgBurnNFT) GetClassId

func (m *MsgBurnNFT) GetClassId() string

func (*MsgBurnNFT) GetCreator

func (m *MsgBurnNFT) GetCreator() string

func (*MsgBurnNFT) GetNftId

func (m *MsgBurnNFT) GetNftId() string

func (*MsgBurnNFT) GetSignBytes

func (msg *MsgBurnNFT) GetSignBytes() []byte

func (*MsgBurnNFT) GetSigners

func (msg *MsgBurnNFT) GetSigners() []sdk.AccAddress

func (*MsgBurnNFT) Marshal

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

func (*MsgBurnNFT) MarshalTo

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

func (*MsgBurnNFT) MarshalToSizedBuffer

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

func (*MsgBurnNFT) ProtoMessage

func (*MsgBurnNFT) ProtoMessage()

func (*MsgBurnNFT) Reset

func (m *MsgBurnNFT) Reset()

func (*MsgBurnNFT) Route

func (msg *MsgBurnNFT) Route() string

func (*MsgBurnNFT) Size

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

func (*MsgBurnNFT) String

func (m *MsgBurnNFT) String() string

func (*MsgBurnNFT) Type

func (msg *MsgBurnNFT) Type() string

func (*MsgBurnNFT) Unmarshal

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

func (*MsgBurnNFT) ValidateBasic

func (msg *MsgBurnNFT) ValidateBasic() error

func (*MsgBurnNFT) XXX_DiscardUnknown

func (m *MsgBurnNFT) XXX_DiscardUnknown()

func (*MsgBurnNFT) XXX_Marshal

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

func (*MsgBurnNFT) XXX_Merge

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

func (*MsgBurnNFT) XXX_Size

func (m *MsgBurnNFT) XXX_Size() int

func (*MsgBurnNFT) XXX_Unmarshal

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

type MsgBurnNFTResponse

type MsgBurnNFTResponse struct {
}

func (*MsgBurnNFTResponse) Descriptor

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

func (*MsgBurnNFTResponse) Marshal

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

func (*MsgBurnNFTResponse) MarshalTo

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

func (*MsgBurnNFTResponse) MarshalToSizedBuffer

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

func (*MsgBurnNFTResponse) ProtoMessage

func (*MsgBurnNFTResponse) ProtoMessage()

func (*MsgBurnNFTResponse) Reset

func (m *MsgBurnNFTResponse) Reset()

func (*MsgBurnNFTResponse) Size

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

func (*MsgBurnNFTResponse) String

func (m *MsgBurnNFTResponse) String() string

func (*MsgBurnNFTResponse) Unmarshal

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

func (*MsgBurnNFTResponse) XXX_DiscardUnknown

func (m *MsgBurnNFTResponse) XXX_DiscardUnknown()

func (*MsgBurnNFTResponse) XXX_Marshal

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

func (*MsgBurnNFTResponse) XXX_Merge

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

func (*MsgBurnNFTResponse) XXX_Size

func (m *MsgBurnNFTResponse) XXX_Size() int

func (*MsgBurnNFTResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	CreateClass(ctx context.Context, in *MsgCreateClass, opts ...grpc.CallOption) (*MsgCreateClassResponse, error)
	MintNft(ctx context.Context, in *MsgMintNft, opts ...grpc.CallOption) (*MsgMintNftResponse, error)
	BurnNFT(ctx context.Context, in *MsgBurnNFT, opts ...grpc.CallOption) (*MsgBurnNFTResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateClass

type MsgCreateClass struct {
	Creator     string    `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Name        string    `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Symbol      string    `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Description string    `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Uri         string    `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"`
	UriHash     string    `protobuf:"bytes,6,opt,name=uriHash,proto3" json:"uriHash,omitempty"`
	Data        ClassData `protobuf:"bytes,7,opt,name=data,proto3" json:"data"`
}

func NewMsgCreateClass

func NewMsgCreateClass(creator string, name string, symbol string, description string, uri string, uriHash string, data ClassData) *MsgCreateClass

func (*MsgCreateClass) Descriptor

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

func (*MsgCreateClass) GetCreator

func (m *MsgCreateClass) GetCreator() string

func (*MsgCreateClass) GetData

func (m *MsgCreateClass) GetData() ClassData

func (*MsgCreateClass) GetDescription

func (m *MsgCreateClass) GetDescription() string

func (*MsgCreateClass) GetName

func (m *MsgCreateClass) GetName() string

func (*MsgCreateClass) GetSignBytes

func (msg *MsgCreateClass) GetSignBytes() []byte

func (*MsgCreateClass) GetSigners

func (msg *MsgCreateClass) GetSigners() []sdk.AccAddress

func (*MsgCreateClass) GetSymbol

func (m *MsgCreateClass) GetSymbol() string

func (*MsgCreateClass) GetUri

func (m *MsgCreateClass) GetUri() string

func (*MsgCreateClass) GetUriHash

func (m *MsgCreateClass) GetUriHash() string

func (*MsgCreateClass) Marshal

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

func (*MsgCreateClass) MarshalTo

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

func (*MsgCreateClass) MarshalToSizedBuffer

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

func (*MsgCreateClass) ProtoMessage

func (*MsgCreateClass) ProtoMessage()

func (*MsgCreateClass) Reset

func (m *MsgCreateClass) Reset()

func (*MsgCreateClass) Route

func (msg *MsgCreateClass) Route() string

func (*MsgCreateClass) Size

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

func (*MsgCreateClass) String

func (m *MsgCreateClass) String() string

func (*MsgCreateClass) Type

func (msg *MsgCreateClass) Type() string

func (*MsgCreateClass) Unmarshal

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

func (*MsgCreateClass) ValidateBasic

func (msg *MsgCreateClass) ValidateBasic() error

func (*MsgCreateClass) XXX_DiscardUnknown

func (m *MsgCreateClass) XXX_DiscardUnknown()

func (*MsgCreateClass) XXX_Marshal

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

func (*MsgCreateClass) XXX_Merge

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

func (*MsgCreateClass) XXX_Size

func (m *MsgCreateClass) XXX_Size() int

func (*MsgCreateClass) XXX_Unmarshal

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

type MsgCreateClassResponse

type MsgCreateClassResponse struct {
}

func (*MsgCreateClassResponse) Descriptor

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

func (*MsgCreateClassResponse) Marshal

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

func (*MsgCreateClassResponse) MarshalTo

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

func (*MsgCreateClassResponse) MarshalToSizedBuffer

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

func (*MsgCreateClassResponse) ProtoMessage

func (*MsgCreateClassResponse) ProtoMessage()

func (*MsgCreateClassResponse) Reset

func (m *MsgCreateClassResponse) Reset()

func (*MsgCreateClassResponse) Size

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

func (*MsgCreateClassResponse) String

func (m *MsgCreateClassResponse) String() string

func (*MsgCreateClassResponse) Unmarshal

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

func (*MsgCreateClassResponse) XXX_DiscardUnknown

func (m *MsgCreateClassResponse) XXX_DiscardUnknown()

func (*MsgCreateClassResponse) XXX_Marshal

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

func (*MsgCreateClassResponse) XXX_Merge

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

func (*MsgCreateClassResponse) XXX_Size

func (m *MsgCreateClassResponse) XXX_Size() int

func (*MsgCreateClassResponse) XXX_Unmarshal

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

type MsgMintNft

type MsgMintNft struct {
	Creator string  `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	ClassId string  `protobuf:"bytes,2,opt,name=classId,proto3" json:"classId,omitempty"`
	Id      string  `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Uri     string  `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"`
	UriHash string  `protobuf:"bytes,5,opt,name=uriHash,proto3" json:"uriHash,omitempty"`
	Data    NftData `protobuf:"bytes,6,opt,name=data,proto3" json:"data"`
}

func NewMsgMintNft

func NewMsgMintNft(creator string, classId string, id string, uri string, uriHash string, data NftData) *MsgMintNft

func (*MsgMintNft) Descriptor

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

func (*MsgMintNft) GetClassId

func (m *MsgMintNft) GetClassId() string

func (*MsgMintNft) GetCreator

func (m *MsgMintNft) GetCreator() string

func (*MsgMintNft) GetData

func (m *MsgMintNft) GetData() NftData

func (*MsgMintNft) GetId

func (m *MsgMintNft) GetId() string

func (*MsgMintNft) GetSignBytes

func (msg *MsgMintNft) GetSignBytes() []byte

func (*MsgMintNft) GetSigners

func (msg *MsgMintNft) GetSigners() []sdk.AccAddress

func (*MsgMintNft) GetUri

func (m *MsgMintNft) GetUri() string

func (*MsgMintNft) GetUriHash

func (m *MsgMintNft) GetUriHash() string

func (*MsgMintNft) Marshal

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

func (*MsgMintNft) MarshalTo

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

func (*MsgMintNft) MarshalToSizedBuffer

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

func (*MsgMintNft) ProtoMessage

func (*MsgMintNft) ProtoMessage()

func (*MsgMintNft) Reset

func (m *MsgMintNft) Reset()

func (*MsgMintNft) Route

func (msg *MsgMintNft) Route() string

func (*MsgMintNft) Size

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

func (*MsgMintNft) String

func (m *MsgMintNft) String() string

func (*MsgMintNft) Type

func (msg *MsgMintNft) Type() string

func (*MsgMintNft) Unmarshal

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

func (*MsgMintNft) ValidateBasic

func (msg *MsgMintNft) ValidateBasic() error

func (*MsgMintNft) XXX_DiscardUnknown

func (m *MsgMintNft) XXX_DiscardUnknown()

func (*MsgMintNft) XXX_Marshal

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

func (*MsgMintNft) XXX_Merge

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

func (*MsgMintNft) XXX_Size

func (m *MsgMintNft) XXX_Size() int

func (*MsgMintNft) XXX_Unmarshal

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

type MsgMintNftResponse

type MsgMintNftResponse struct {
}

func (*MsgMintNftResponse) Descriptor

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

func (*MsgMintNftResponse) Marshal

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

func (*MsgMintNftResponse) MarshalTo

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

func (*MsgMintNftResponse) MarshalToSizedBuffer

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

func (*MsgMintNftResponse) ProtoMessage

func (*MsgMintNftResponse) ProtoMessage()

func (*MsgMintNftResponse) Reset

func (m *MsgMintNftResponse) Reset()

func (*MsgMintNftResponse) Size

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

func (*MsgMintNftResponse) String

func (m *MsgMintNftResponse) String() string

func (*MsgMintNftResponse) Unmarshal

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

func (*MsgMintNftResponse) XXX_DiscardUnknown

func (m *MsgMintNftResponse) XXX_DiscardUnknown()

func (*MsgMintNftResponse) XXX_Marshal

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

func (*MsgMintNftResponse) XXX_Merge

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

func (*MsgMintNftResponse) XXX_Size

func (m *MsgMintNftResponse) XXX_Size() int

func (*MsgMintNftResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type NftData

type NftData struct {
	Metadata JsonInput `protobuf:"bytes,1,opt,name=metadata,proto3,customtype=JsonInput" json:"metadata"`
}

func (*NftData) Descriptor

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

func (*NftData) Marshal

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

func (*NftData) MarshalTo

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

func (*NftData) MarshalToSizedBuffer

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

func (*NftData) ProtoMessage

func (*NftData) ProtoMessage()

func (*NftData) Reset

func (m *NftData) Reset()

func (*NftData) Size

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

func (*NftData) String

func (m *NftData) String() string

func (*NftData) Unmarshal

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

func (*NftData) XXX_DiscardUnknown

func (m *NftData) XXX_DiscardUnknown()

func (*NftData) XXX_Marshal

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

func (*NftData) XXX_Merge

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

func (*NftData) XXX_Size

func (m *NftData) XXX_Size() int

func (*NftData) XXX_Unmarshal

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

type NftKeeper

type NftKeeper interface {
	SaveClass(ctx sdk.Context, class nft.Class) error
	GetClass(ctx sdk.Context, classID string) (nft.Class, bool)
	HasClass(ctx sdk.Context, classID string) bool
	GetBalance(ctx sdk.Context, classID string, owner sdk.AccAddress) (balance uint64)
	HasNFT(ctx sdk.Context, classID, id string) bool
	Mint(ctx sdk.Context, token nft.NFT, receiver sdk.AccAddress) error
	GetTotalSupply(ctx sdk.Context, classID string) uint64
	Burn(ctx sdk.Context, classID string, nftID string) error
	GetOwner(ctx sdk.Context, classID string, nftID string) sdk.AccAddress
}

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) BurnNFT

func (*UnimplementedMsgServer) CreateClass

func (*UnimplementedMsgServer) MintNft

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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