Initialize
Initialize Inscriptions
The initialize
instruction creates the inscription accounts for you where the data will be stored. There are three types of initializations:
initializeFromMint
- for Inscriptions attached to NFTs - you probably want thisinitialize
- for Inscriptions as a storage providerinitializeAssociatedInscription
- Additional Data Accounts
After the initialization has been done you can write Data to the inscriptions.
When initializing you can choose a shard
that is used for numbering. Make sure to use a random one to minimize locks. Read more about Sharding here
initializeFromMint
initializeFromMint
These inscriptions are tradable similar to NFTs. If you are unsure you probably want to use this.
If you want a tradable inscription you want to use this kind of inscription. It is derived from your NFT. When using this function you have to be the update authority of the NFT.
It can be done like this:
Initialize Mint Inscription
JavaScript
Initialize
Initialize
This kind of inscriptions is not tradable. We recommended it only for advanced use cases like gaming.
An Inscription has to be initialized before data can written to it. It can be done like so:
Initialize Inscription
JavaScript
initializeAssociatedInscription
initializeAssociatedInscription
One Inscription account can have multiple Associated Inscription Accounts. They are derived based on the associationTag
. For example the tag can be the datatype of the file, e.g. image/png
.
Pointers to the associated inscriptions are stored in an array in the inscriptionMetadata
Account in the field associatedInscriptions
.
To initialize a new Associated Inscription you can use the following function:
Initialize Associated Inscription
JavaScript
Last updated