Documentation ¶
Index ¶
- func GetCollectionIDBytes(id uint64) []byte
- func GetCollectionIDFromBytes(bz []byte) uint64
- func GetNftIDBytes(id uint64) []byte
- func GetNftIDFromBytes(bz []byte) uint64
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddAdmin(ctx sdk.Context, admin, creator string) error
- func (k Keeper) AppendCollection(ctx sdk.Context, collection types.Collection) uint64
- func (k Keeper) AppendNft(ctx sdk.Context, nft types.Nft) uint64
- func (k Keeper) BuyNFT(ctx sdk.Context, nftID uint64, buyer sdk.AccAddress) (types.Nft, error)
- func (k Keeper) Collection(c context.Context, req *types.QueryGetCollectionRequest) (*types.QueryGetCollectionResponse, error)
- func (k Keeper) CollectionAll(c context.Context, req *types.QueryAllCollectionRequest) (*types.QueryAllCollectionResponse, error)
- func (k Keeper) CollectionByDenomId(goCtx context.Context, req *types.QueryCollectionByDenomIdRequest) (*types.QueryCollectionByDenomIdResponse, error)
- func (k Keeper) CreateCollection(ctx sdk.Context, sender sdk.AccAddress, ...) (uint64, error)
- func (k Keeper) DistributeRoyalties(ctx sdk.Context, price sdk.Coin, seller string, royalties []types.Royalty) error
- func (k Keeper) GetAdmins(ctx sdk.Context) ([]string, error)
- func (k Keeper) GetAllCollection(ctx sdk.Context) (list []types.Collection)
- func (k Keeper) GetAllNft(ctx sdk.Context) (list []types.Nft)
- func (k Keeper) GetCollection(ctx sdk.Context, id uint64) (val types.Collection, found bool)
- func (k Keeper) GetCollectionByDenomID(ctx sdk.Context, denomID string) (types.Collection, bool)
- func (k Keeper) GetCollectionCount(ctx sdk.Context) uint64
- func (k Keeper) GetCollectionStatus(ctx sdk.Context, id uint64) (bool, error)
- func (k Keeper) GetNextUniqueId(ctx sdk.Context) uint64
- func (k Keeper) GetNft(ctx sdk.Context, id uint64) (val types.Nft, found bool)
- func (k Keeper) GetNftCount(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) IsAdmin(ctx sdk.Context, address string) error
- func (k Keeper) ListAdmins(goCtx context.Context, req *types.QueryListAdminsRequest) (*types.QueryListAdminsResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintNFT(ctx sdk.Context, denomID, name, uri, data string, price sdk.Coin, ...) (string, error)
- func (k Keeper) Nft(c context.Context, req *types.QueryGetNftRequest) (*types.QueryGetNftResponse, error)
- func (k Keeper) NftAll(c context.Context, req *types.QueryAllNftRequest) (*types.QueryAllNftResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PublishCollection(ctx sdk.Context, collection types.Collection) (uint64, error)
- func (k Keeper) PublishNFT(ctx sdk.Context, nft types.Nft) (uint64, error)
- func (k Keeper) RemoveAdmin(ctx sdk.Context, admin, creator string) error
- func (k Keeper) RemoveCollection(ctx sdk.Context, id uint64)
- func (k Keeper) RemoveNFT(ctx sdk.Context, nftID uint64, owner sdk.AccAddress) (types.Nft, error)
- func (k Keeper) RemoveNft(ctx sdk.Context, id uint64)
- func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection)
- func (k Keeper) SetCollectionCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetCollectionRoyalties(ctx sdk.Context, sender string, id uint64, ...) error
- func (k Keeper) SetCollectionStatus(ctx sdk.Context, id uint64, verified bool) error
- func (k Keeper) SetNextUniqueId(ctx sdk.Context, nextUniqueId uint64)
- func (k Keeper) SetNft(ctx sdk.Context, nft types.Nft)
- func (k Keeper) SetNftCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetNftPrice(ctx sdk.Context, sender string, id uint64, price sdk.Coin) (types.Nft, error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollectionIDBytes ¶
GetCollectionIDBytes returns the byte representation of the ID
func GetCollectionIDFromBytes ¶
GetCollectionIDFromBytes returns ID in uint64 format from a byte array
func GetNftIDBytes ¶
GetNftIDBytes returns the byte representation of the ID
func GetNftIDFromBytes ¶
GetNftIDFromBytes returns ID in uint64 format from a byte array
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, nftKeeper types.NftKeeper, ) *Keeper
func (Keeper) AppendCollection ¶
AppendCollection appends a collection in the store with a new id and update the count
func (Keeper) Collection ¶
func (k Keeper) Collection(c context.Context, req *types.QueryGetCollectionRequest) (*types.QueryGetCollectionResponse, error)
func (Keeper) CollectionAll ¶
func (k Keeper) CollectionAll(c context.Context, req *types.QueryAllCollectionRequest) (*types.QueryAllCollectionResponse, error)
func (Keeper) CollectionByDenomId ¶
func (k Keeper) CollectionByDenomId(goCtx context.Context, req *types.QueryCollectionByDenomIdRequest) (*types.QueryCollectionByDenomIdResponse, error)
func (Keeper) CreateCollection ¶
func (Keeper) DistributeRoyalties ¶
func (Keeper) GetAllCollection ¶
func (k Keeper) GetAllCollection(ctx sdk.Context) (list []types.Collection)
GetAllCollection returns all collection
func (Keeper) GetCollection ¶
GetCollection returns a collection from its id
func (Keeper) GetCollectionByDenomID ¶
func (Keeper) GetCollectionCount ¶
GetCollectionCount get the total number of collection
func (Keeper) GetCollectionStatus ¶
func (Keeper) GetNextUniqueId ¶
SetNextUniqueId gets the next unique id for new nft listings
func (Keeper) GetNftCount ¶
GetNftCount get the total number of nft
func (Keeper) ListAdmins ¶
func (k Keeper) ListAdmins(goCtx context.Context, req *types.QueryListAdminsRequest) (*types.QueryListAdminsResponse, error)
func (Keeper) Nft ¶
func (k Keeper) Nft(c context.Context, req *types.QueryGetNftRequest) (*types.QueryGetNftResponse, error)
func (Keeper) NftAll ¶
func (k Keeper) NftAll(c context.Context, req *types.QueryAllNftRequest) (*types.QueryAllNftResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PublishCollection ¶
func (Keeper) PublishNFT ¶
func (Keeper) RemoveAdmin ¶
func (Keeper) RemoveCollection ¶
RemoveCollection removes a collection from the store
func (Keeper) SetCollection ¶
func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection)
SetCollection set a specific collection in the store
func (Keeper) SetCollectionCount ¶
SetCollectionCount set the total number of collection
func (Keeper) SetCollectionRoyalties ¶
func (Keeper) SetCollectionStatus ¶
func (Keeper) SetNextUniqueId ¶
SetNextUniqueId set the next unique id for new nft listings
func (Keeper) SetNftCount ¶
SetNftCount set the total number of nft
func (Keeper) SetNftPrice ¶
Source Files ¶
- collection.go
- grpc_query.go
- grpc_query_collection.go
- grpc_query_collection_by_denom_id.go
- grpc_query_list_admins.go
- grpc_query_nft.go
- grpc_query_params.go
- keeper.go
- msg_server.go
- msg_server_add_admin.go
- msg_server_buy_nft.go
- msg_server_create_collection.go
- msg_server_mint_nft.go
- msg_server_publish_collection.go
- msg_server_publish_nft.go
- msg_server_remove_admin.go
- msg_server_remove_nft.go
- msg_server_unverify_collection.go
- msg_server_update_price.go
- msg_server_update_royalties.go
- msg_server_verify_collection.go
- nft.go
- params.go