v2

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrefixNFT        = []byte{0x01}
	PrefixOwners     = []byte{0x02} // key for a owner
	PrefixCollection = []byte{0x03} // key for balance of NFTs held by the denom
	PrefixDenom      = []byte{0x04} // key for denom of the nft
	PrefixDenomName  = []byte{0x05} // key for denom name of the nft

)

Functions

func KeyCollection

func KeyCollection(denomID string) []byte

KeyCollection gets the storeKey by the collection

func KeyDenom

func KeyDenom(id string) []byte

KeyDenom gets the storeKey by the denom id

func KeyDenomName

func KeyDenomName(name string) []byte

KeyDenomName gets the storeKey by the denom name

func KeyNFT

func KeyNFT(denomID, tokenID string) []byte

KeyNFT gets the key of nft stored by an denom and id

func KeyOwner

func KeyOwner(address sdk.AccAddress, denomID, tokenID string) []byte

KeyOwner gets the key of a collection owned by an account address

func Migrate

func Migrate(ctx sdk.Context,
	storeKey storetypes.StoreKey,
	cdc codec.Codec,
	logger log.Logger,
	k NFTKeeper,
) error

Types

type NFTKeeper

type NFTKeeper interface {
	SaveDenom(ctx sdk.Context, id,
		name,
		schema,
		symbol string,
		creator sdk.AccAddress,
		mintRestricted,
		updateRestricted bool,
		description,
		uri,
		uriHash,
		data string,
	) error

	SaveNFT(ctx sdk.Context, denomID,
		tokenID,
		tokenNm,
		tokenURI,
		tokenUriHash,
		tokenData string,
		receiver sdk.AccAddress,
	) error
}

Jump to

Keyboard shortcuts

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