Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

nft state

Back to all declarations

Token

func() v0.Teller

Token returns the collection as a read-only GRC721 teller.

Open
OID
00bda8…fa9e:3
Token details

Inspect func

GetName

func() string

GetName returns the name of the collection.

Open
OID
00bda8…fa9e:5
GetName details

Inspect func

GetSymbol

func() string

GetSymbol returns the symbol of the collection.

Open
OID
00bda8…fa9e:6
GetSymbol details

Inspect func

ID

func() string

ID returns the ID of the collection.

Open
OID
00bda8…fa9e:7
ID details

Inspect func

TotalSupply

func() int64

TotalSupply returns the number of Settlers minted so far.

Open
OID
00bda8…fa9e:8
TotalSupply details

Inspect func

BalanceOf

func(owner .uverse.address) (int64, .uverse.error)

BalanceOf returns the number of Settlers of an account, 0 or 1.

Open
OID
00bda8…fa9e:9
BalanceOf details

Inspect func

OwnerOf

func(tid v0.TokenID) (.uverse.address, .uverse.error)
Open
OID
00bda8…fa9e:10
OwnerOf details

Inspect func

GetApproved

func(tid v0.TokenID) (.uverse.address, .uverse.error)
Open
OID
00bda8…fa9e:11
GetApproved details

Inspect func

IsApprovedForAll

func(owner .uverse.address, operator .uverse.address) bool

IsApprovedForAll reports whether an account is allowed to move the Settler of another account. Settlers are soulbound, so it is always false.

Open
OID
00bda8…fa9e:12
IsApprovedForAll details

Inspect func

Approve

func(to .uverse.address, tid v0.TokenID)

Approve always fails, Settlers are soulbound.

Open
OID
00bda8…fa9e:13
Approve details

Inspect func

SetApprovalForAll

func(operator .uverse.address, approved bool)

SetApprovalForAll always fails, Settlers are soulbound.

Open
OID
00bda8…fa9e:14
SetApprovalForAll details

Inspect func

TransferFrom

func(from .uverse.address, to .uverse.address, tid v0.TokenID)

TransferFrom always fails, Settlers are soulbound.

Open
OID
00bda8…fa9e:15
TransferFrom details

Inspect func

TokenURI

func(tid v0.TokenID) (string, .uverse.error)

TokenURI returns the Settler image as an SVG data URI. Wallets such as Adena read TokenURI directly as the token image, so this must be the image itself. The metadata lives in TokenMetadata.

Open
OID
00bda8…fa9e:16
TokenURI details

Inspect func

TokenMetadata

func(tid v0.TokenID) (string, .uverse.error)

TokenMetadata returns a JSON string with the metadata of a Settler in the format the Adena wallet can understand.

Open
OID
00bda8…fa9e:18
TokenMetadata details

Inspect func

ExternalURL

func(tid v0.TokenID) string

ExternalURL returns the URL to a Settler profile page.

Open
OID
00bda8…fa9e:19
ExternalURL details

Inspect func

Name

untyped string

Value

"Settlers"

Symbol

untyped string

Value

"SETTLER"

capacity

untyped bigint

Value

(3000 <untyped> bigint)

maxNonce

untyped bigint

Value

(64 <untyped> bigint)

maxAunts

untyped bigint

Value

(40 <untyped> bigint)

ErrSoulbound

*errors.errorString

ErrSoulbound is returned for operation that are not allowed on a soulbound NFT.

Open
OID
00bda8…fa9e:21
ErrSoulbound details

Inspect pointer

RealmPath

string

Value

"/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/nft"

Notice

string

Value

""

NoticeType

v0.Type

Value

<zero>

supplyCap

int

Value

3000

total

int

Value

363791

soulbound

type

Soulbound is a GRC721 extension that aborts any transfer of a Settler. The realm never exposes a teller that can write, so a transfer can't be started, this makes sure that it could never finish either.

Value

nft.soulbound

newCollection

func() (*v0.Token, *v0.PrivateLedger)

newCollection creates the GRC721 token of the Settlers.

Open
OID
00bda8…fa9e:45
newCollection details

Inspect func

SetSnapshot

func(rootHex string, count int)

SetSnapshot opens the mint. It sets the Merkle root of the list of eligible accounts, in hex, and the number of accounts in the list. Only the owner can call it. It can be called again to correct a mistake until the first Settler is minted, from then on the list is frozen.

Open
OID
00bda8…fa9e:46
SetSnapshot details

Inspect func

TransferAdmin

func(newAdmin .uverse.address)

TransferAdmin makes another account the admin. Only the admin can call it.

Open
OID
00bda8…fa9e:48
TransferAdmin details

Inspect func

SetNotice

func(alertType v0.Type, msg string)

SetNotice posts a realm-wide message, shown at the top of the page.

Open
OID
00bda8…fa9e:49
SetNotice details

Inspect func

ClearNotice

func()

ClearNotice removes the current notice.

Open
OID
00bda8…fa9e:50
ClearNotice details

Inspect func

Mint

func(proof string) v0.TokenID

Mint mints a Settler to the caller and returns its ID. The proof shows that the caller is in the list of eligible accounts. Proof format is "\<index>.\<aunts>". Only user accounts can mint, either with a call or a run transaction, realms can't.

Open
OID
00bda8…fa9e:51
Mint details

Inspect func

Cap

func() int

Cap returns the number of Settlers that can be minted.

Open
OID
00bda8…fa9e:52
Cap details

Inspect func

MerkleRoot

func() string

MerkleRoot returns the Merkle root of the list of eligible accounts, in hex.

Open
OID
00bda8…fa9e:53
MerkleRoot details

Inspect func

Total

func() int

Total returns the number of eligible accounts in the list.

Open
OID
00bda8…fa9e:54
Total details

Inspect func

TokenOf

func(addr .uverse.address) v0.TokenID

TokenOf returns the ID of the Settler of an account, or an empty ID if it has none.

Open
OID
00bda8…fa9e:55
TokenOf details

Inspect func

TraitsOf

func(tid v0.TokenID) (v0.Traits, .uverse.error)

TraitsOf returns the traits of a Settler.

Open
OID
00bda8…fa9e:56
TraitsOf details

Inspect func

traitsOf

func(tid v0.TokenID) (uint32, bool)

traitsOf returns the packed traits of a Settler, or false if the ID is not a minted Settler.

Open
OID
00bda8…fa9e:57
traitsOf details

Inspect func

tokenID

func(settlerID int) v0.TokenID

tokenID returns the GRC721 ID of a Settler number.

Open
OID
00bda8…fa9e:58
tokenID details

Inspect func

parseTokenID

func(tid v0.TokenID) (int, bool)

parseTokenID returns the Settler number of an ID, only for the canonical form ("1", not "01" or "+1").

Open
OID
00bda8…fa9e:59
parseTokenID details

Inspect func

newTraitsFilter

func() *bloom.Bloom
Open
OID
00bda8…fa9e:60
newTraitsFilter details

Inspect func

generateSeed

func(caller .uverse.address, settlerID int, nonce int) string
Open
OID
00bda8…fa9e:61
generateSeed details

Inspect func

seedPrefix

func(caller .uverse.address, settlerID int) string
Open
OID
00bda8…fa9e:62
seedPrefix details

Inspect func

hashSeed

func(prefix string, nonce int) string
Open
OID
00bda8…fa9e:63
hashSeed details

Inspect func

splitProof

func(proof string) (int, []uint8, string)
Open
OID
00bda8…fa9e:64
splitProof details

Inspect func

makeKey

func(settlerID int) string
Open
OID
00bda8…fa9e:65
makeKey details

Inspect func

assertIsValidAlertType

func(t v0.Type)
Open
OID
00bda8…fa9e:67
assertIsValidAlertType details

Inspect func

galleryWidth

untyped bigint

Value

(96 <untyped> bigint)

detailWidth

untyped bigint

Value

(256 <untyped> bigint)

galleryLen

untyped bigint

Value

(5 <untyped> bigint)

Render

func(path string) string

Render renders the realm. By default renders the state of the mint and the last minted Settlers. Paths: - \`token/{id}\`: A Settler with its traits and its owner. - \`addr/{address}\`: The Settler of an account.

Open
OID
00bda8…fa9e:68
Render details

Inspect func

renderHome

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
00bda8…fa9e:70
renderHome details

Inspect func

renderToken

func(res *v0.ResponseWriter, req *v0.Request)
Open
OID
00bda8…fa9e:71
renderToken details

Inspect func

renderAddr

func(res *v0.ResponseWriter, req *v0.Request)
Open
OID
00bda8…fa9e:72
renderAddr details

Inspect func

image

func(settlerID int, t v0.Traits, width int) string
Open
OID
00bda8…fa9e:73
image details

Inspect func

tokenPath

func(settlerID int) string
Open
OID
00bda8…fa9e:74
tokenPath details

Inspect func

settlerName

func(settlerID int) string
Open
OID
00bda8…fa9e:76
settlerName details

Inspect func
Token : func() v0.Teller Inspect
GetName : func() string Inspect
GetSymbol : func() string Inspect
ID : func() string Inspect
TotalSupply : func() int64 Inspect
BalanceOf : func(owner .uverse.address) (int64, .uverse.error) Inspect
OwnerOf : func(tid v0.TokenID) (.uverse.address, .uverse.error) Inspect
GetApproved : func(tid v0.TokenID) (.uverse.address, .uverse.error) Inspect
IsApprovedForAll : func(owner .uverse.address, operator .uverse.address) bool Inspect
Approve : func(to .uverse.address, tid v0.TokenID) Inspect
SetApprovalForAll : func(operator .uverse.address, approved bool) Inspect
TransferFrom : func(from .uverse.address, to .uverse.address, tid v0.TokenID) Inspect
TokenURI : func(tid v0.TokenID) (string, .uverse.error) Inspect
TokenMetadata : func(tid v0.TokenID) (string, .uverse.error) Inspect
ExternalURL : func(tid v0.TokenID) string Inspect
Name : untyped string ="Settlers"
Symbol : untyped string ="SETTLER"
capacity : untyped bigint =(3000 <untyped> bigint)
maxNonce : untyped bigint =(64 <untyped> bigint)
maxAunts : untyped bigint =(40 <untyped> bigint)
ErrSoulbound : *errors.errorString Inspect
RealmPath : string ="/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/nft"
Notice : string =""
NoticeType : v0.Type =<zero>
admin : *v0.Ownable Inspect
supplyCap : int =3000
root : []uint8 (len=32) Inspect
total : int =363791
collection : *v0.Token Inspect
ledger : *v0.PrivateLedger Inspect
tokens : *v0.BPTree Inspect
claimed : *v0.BPTree Inspect
seenTraits : *bloom.Bloom Inspect
init.33 : func() Inspect
soulbound : type =nft.soulbound
newCollection : func() (*v0.Token, *v0.PrivateLedger) Inspect
SetSnapshot : func(rootHex string, count int) Inspect
Admin : func() .uverse.address Inspect
TransferAdmin : func(newAdmin .uverse.address) Inspect
SetNotice : func(alertType v0.Type, msg string) Inspect
ClearNotice : func() Inspect
Mint : func(proof string) v0.TokenID Inspect
Cap : func() int Inspect
MerkleRoot : func() string Inspect
Total : func() int Inspect
TokenOf : func(addr .uverse.address) v0.TokenID Inspect
TraitsOf : func(tid v0.TokenID) (v0.Traits, .uverse.error) Inspect
traitsOf : func(tid v0.TokenID) (uint32, bool) Inspect
tokenID : func(settlerID int) v0.TokenID Inspect
parseTokenID : func(tid v0.TokenID) (int, bool) Inspect
newTraitsFilter : func() *bloom.Bloom Inspect
generateSeed : func(caller .uverse.address, settlerID int, nonce int) string Inspect
seedPrefix : func(caller .uverse.address, settlerID int) string Inspect
hashSeed : func(prefix string, nonce int) string Inspect
splitProof : func(proof string) (int, []uint8, string) Inspect
makeKey : func(settlerID int) string Inspect
assertIsCurrent : func() Inspect
assertIsValidAlertType : func(t v0.Type) Inspect
galleryWidth : untyped bigint =(96 <untyped> bigint)
detailWidth : untyped bigint =(256 <untyped> bigint)
galleryLen : untyped bigint =(5 <untyped> bigint)
Render : func(path string) string Inspect
renderHome : func(res *v0.ResponseWriter, *v0.Request) Inspect
renderToken : func(res *v0.ResponseWriter, req *v0.Request) Inspect
renderAddr : func(res *v0.ResponseWriter, req *v0.Request) Inspect
image : func(settlerID int, t v0.Traits, width int) string Inspect
tokenPath : func(settlerID int) string Inspect
settlerName : func(settlerID int) string Inspect