v0 source pure
Package metadata is a stackable GRC721 extension for EIP-721 tokenURI and OpenSea on-chain metadata. Writes are issue...
Package metadata is a stackable GRC721 extension for EIP-721 tokenURI and OpenSea on-chain metadata. Writes are issuer-only so a holder cannot rewrite metadata after acquisition.
2
1
1
func NewMetadata
NewMetadata attaches a metadata extension and registers it as a core Extension. Attach it before the first mint so every token is indexed.
4
type Data
structData is the OpenSea on-chain metadata for a single token.
type Ledger
structMethods on Ledger
func ExtensionKind
method on Ledgerfunc OnBurn
method on LedgerOnBurn clears per-token state so it cannot resurface on re-mint.
func OnMint
method on Ledgerfunc OnTransfer
method on Ledgerfunc SetTokenMetadata
method on LedgerSetTokenMetadata sets the OpenSea on-chain metadata of tid; issuer-only.
func SetTokenURI
method on LedgerSetTokenURI sets the EIP-721 tokenURI of tid; issuer-only so a holder cannot rewrite the URI after acquisition.