Documentation ¶
Overview ¶
Package nft contains non-divisible non-fungible NEP11-compatible token implementation. This token can be minted with GAS transfer to contract address, it will hash some data (including data provided in transfer) and produce base64-encoded string that is your NFT. Since it's based on hashing and basically you own a hash it's HASHY.
Index ¶
- func BalanceOf(holder interop.Hash160) int
- func Decimals() int
- func Destroy()
- func OnNEP17Payment(from interop.Hash160, amount int, data interface{})
- func OwnerOf(token []byte) interop.Hash160
- func Properties(id []byte) map[string]string
- func Symbol() string
- func Tokens() iterator.Iterator
- func TokensOf(holder interop.Hash160) iterator.Iterator
- func TotalSupply() int
- func Transfer(to interop.Hash160, token []byte, data interface{}) bool
- func Update(nef, manifest []byte)
- func Verify() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decimals ¶
func Decimals() int
Decimals returns token decimals, this NFT is non-divisible, so it's 0.
func OnNEP17Payment ¶
OnNEP17Payment mints tokens if at least 10 GAS is provided. You don't call this method directly, instead it's called by GAS contract when you transfer GAS from your address to the address of this NFT contract.
func Properties ¶ added in v0.95.0
Properties returns properties of the given NFT.
func Tokens ¶ added in v0.95.0
Tokens returns an iterator that contains all of the tokens minted by the contract.
func TotalSupply ¶
func TotalSupply() int
TotalSupply is a contract method that returns the number of tokens minted.
func Transfer ¶
Transfer token from its owner to another user, notice that it only has three parameters because token owner can be deduced from token ID itself.
Types ¶
This section is empty.