nft

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

A simple NFT contract example based on WASM wrapper

Index

Constants

View Source
const (
	// Fields in default Object
	NFTNameKey        = "name"         // NFT name
	NFTSymbolKey      = "symbol"       // NFT symbol
	NFTTotalSupplyKey = "total_supply" // Total supply
	NFTTokenURIKey    = "token_uri"    // Token URI
	NFTTokenIDKey     = "token_id"     // Token ID
	NFTTokenOwnerKey  = "owner"        // Token owner
)

Constants - Field names in objects

Variables

This section is empty.

Functions

func Burn

func Burn(tokenId core.ObjectID) bool

Burn NFT

func GetNFTInfo

func GetNFTInfo() (string, string, uint64)

Get NFT information

func GetOwner

func GetOwner() core.Address

Get contract owner

func InitializeNFT

func InitializeNFT(name string, symbol string) core.ObjectID

Initialize NFT contract

func Mint

func Mint(to core.Address, tokenURI string) core.ObjectID

Mint new NFT (owner only)

func OwnerOf

func OwnerOf(tokenId core.ObjectID) core.Address

Get NFT owner

func TokenURI

func TokenURI(tokenId core.ObjectID) string

Get NFT URI

func Transfer

func Transfer(from core.Address, to core.Address, tokenId core.ObjectID) bool

Transfer NFT

Types

This section is empty.

Jump to

Keyboard shortcuts

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