Documentation
¶
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type BankKeeper
- type Collection
- func (*Collection) Descriptor() ([]byte, []int)
- func (this *Collection) Equal(that interface{}) bool
- func (m *Collection) Marshal() (dAtA []byte, err error)
- func (m *Collection) MarshalTo(dAtA []byte) (int, error)
- func (m *Collection) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Collection) ProtoMessage()
- func (m *Collection) Reset()
- func (m *Collection) Size() (n int)
- func (m *Collection) String() string
- func (m *Collection) Unmarshal(dAtA []byte) error
- func (m *Collection) XXX_DiscardUnknown()
- func (m *Collection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Collection) XXX_Merge(src proto.Message)
- func (m *Collection) XXX_Size() int
- func (m *Collection) XXX_Unmarshal(b []byte) error
- type Denom
- func (*Denom) Descriptor() ([]byte, []int)
- func (this *Denom) Equal(that interface{}) bool
- func (m *Denom) Marshal() (dAtA []byte, err error)
- func (m *Denom) MarshalTo(dAtA []byte) (int, error)
- func (m *Denom) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Denom) ProtoMessage()
- func (m *Denom) Reset()
- func (m *Denom) Size() (n int)
- func (m *Denom) String() string
- func (m *Denom) Unmarshal(dAtA []byte) error
- func (m *Denom) XXX_DiscardUnknown()
- func (m *Denom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Denom) XXX_Merge(src proto.Message)
- func (m *Denom) XXX_Size() int
- func (m *Denom) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetCollections() []Collection
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type NFT
- func (*NFT) Descriptor() ([]byte, []int)
- func (this *NFT) Equal(that interface{}) bool
- func (nf NFT) GetData() string
- func (nf NFT) GetOwner() sdk.AccAddress
- func (m *NFT) Marshal() (dAtA []byte, err error)
- func (m *NFT) MarshalTo(dAtA []byte) (int, error)
- func (m *NFT) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NFT) ProtoMessage()
- func (m *NFT) Reset()
- func (m *NFT) Size() (n int)
- func (m *NFT) String() string
- func (m *NFT) Unmarshal(dAtA []byte) error
- func (m *NFT) XXX_DiscardUnknown()
- func (m *NFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NFT) XXX_Merge(src proto.Message)
- func (m *NFT) XXX_Size() int
- func (m *NFT) XXX_Unmarshal(b []byte) error
- type NFTI
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module name ModuleName = "nft" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_nft" )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthNft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNft = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupNft = fmt.Errorf("proto: unexpected end of group") )
var (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)
x/nft module sentinel errors
var (
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
Functions ¶
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}
AccountKeeper defines the expected account keeper for query account
type BankKeeper ¶
type BankKeeper interface {
GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error
LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}
BankKeeper defines the expected interface needed to retrieve account balances.
type Collection ¶
type Collection struct {
Denom Denom `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom"`
Nfts []NFT `protobuf:"bytes,2,rep,name=nfts,proto3" json:"nfts"`
}
func (*Collection) Descriptor ¶
func (*Collection) Descriptor() ([]byte, []int)
func (*Collection) Equal ¶
func (this *Collection) Equal(that interface{}) bool
func (*Collection) Marshal ¶
func (m *Collection) Marshal() (dAtA []byte, err error)
func (*Collection) MarshalToSizedBuffer ¶
func (m *Collection) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Collection) ProtoMessage ¶
func (*Collection) ProtoMessage()
func (*Collection) Reset ¶
func (m *Collection) Reset()
func (*Collection) Size ¶
func (m *Collection) Size() (n int)
func (*Collection) String ¶
func (m *Collection) String() string
func (*Collection) Unmarshal ¶
func (m *Collection) Unmarshal(dAtA []byte) error
func (*Collection) XXX_DiscardUnknown ¶
func (m *Collection) XXX_DiscardUnknown()
func (*Collection) XXX_Marshal ¶
func (m *Collection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Collection) XXX_Merge ¶
func (m *Collection) XXX_Merge(src proto.Message)
func (*Collection) XXX_Size ¶
func (m *Collection) XXX_Size() int
func (*Collection) XXX_Unmarshal ¶
func (m *Collection) XXX_Unmarshal(b []byte) error
type Denom ¶
type Denom struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"`
Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"`
MintRestricted bool `protobuf:"varint,6,opt,name=mint_restricted,json=mintRestricted,proto3" json:"mint_restricted,omitempty"`
EditRestricted bool `protobuf:"varint,7,opt,name=edit_restricted,json=editRestricted,proto3" json:"edit_restricted,omitempty"`
}
func (*Denom) Descriptor ¶
func (*Denom) ProtoMessage ¶
func (*Denom) ProtoMessage()
func (*Denom) XXX_DiscardUnknown ¶
func (m *Denom) XXX_DiscardUnknown()
func (*Denom) XXX_Marshal ¶
func (*Denom) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct {
Collections []Collection `protobuf:"bytes,1,rep,name=collections,proto3" json:"collections"`
}
GenesisState defines the nft module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetCollections ¶
func (m *GenesisState) GetCollections() []Collection
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) 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 MsgClient ¶
type MsgClient interface {
}
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 NFT ¶
type NFT struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
URL string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"`
}
func (*NFT) Descriptor ¶
func (NFT) GetOwner ¶
func (nf NFT) GetOwner() sdk.AccAddress
func (*NFT) ProtoMessage ¶
func (*NFT) ProtoMessage()
func (*NFT) XXX_DiscardUnknown ¶
func (m *NFT) XXX_DiscardUnknown()
func (*NFT) XXX_Unmarshal ¶
type NFTI ¶
type NFTI interface {
GetOwner() sdk.AccAddress
GetData() string
}
type QueryClient ¶
type QueryClient interface {
}
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 UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct {
}
UnimplementedQueryServer can be embedded to have forward compatible implementations.