Tags

What are Tags?

Tags are named content trackers that can hold any string based content, as well as providing a way to store a checksum of the content and the algorithm used to produce the checksum. Tags can also easily be updated to change the underlying content with the option of updating the checksum and algorithm fields if necessary.

In short, Tags allow developers to attach specific, verifiable content to NFTs that will travel with changes in NFT ownership. Anyone can verify the contents of a tag by running the defined checksum algorithm over the content and comparing to the checksum stored on the tag.

Table Breakdown

Table Name: tags

Table Scoping: nft.serial

Field Name

Field Type

Description

tag_name

name

Tag Name Identifier

content

string

Tag Content (JSON, Endpoint, IPFS CID, etc.)

checksum

string

Checksum of content

algorithm

string

Algorithm used to produce checksum

No extra indices.

Create a Tag

To create a new tag for an NFT call the newtag() action.

Required Authority: group.manager

Note that parameters marked OPTIONAL still require the 'null' argument in their place and can't simply be omitted in the transaction.

Action Parameters

  • uint64_t serial: The serial number of the NFT to tag.

  • name tag_name: The name of the new tag.

  • string content: The content of the tag (JSON, Markdown, IPFS CID, etc).

  • OPTIONAL string checksum: Checksum of the content field.

  • OPTIONAL string algorithm: The algorithm used to produce the checksum.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} newtag '[ {params} ]' -p {manager}
Marble CLI
marble make tag ...

Update a Tag

To update a tag call the updatetag() action.

Required Authority: group.manager

Action Parameters

  • uint64_t serial: The serial number of the NFT with the tag.

  • name tag_name: The name of the tag to update.

  • string new_content: The new content for the tag.

  • OPTIONAL new_checksum: A checksum of the new content.

  • OPTIONAL new_algorithm: The algorithm used to produce the checksum.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} updatetag '[ {params} ]' -p {manager}
Marble CLI
marble modify tag ...

Remove a Tag

To remove a tag from an NFT call the rmvtag() action.

Required Authority: group.manager

Action Parameters

  • uint64_t serial: The serial of the NFT with the tag.

  • name tag_name: The name of the tag to remove.

  • string memo: An optional memo field.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} rmvtag '[ {params} ]' -p {manager}
Marble CLI
marble remove tag ...