You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportinterfaceTokenMetadata{// The authority that can sign to update the metadataupdateAuthority?: PublicKey;// The associated mint, used to counter spoofing to be sure that metadata belongs to a particular mintmint: PublicKey;// The longer name of the tokenname: string;// The shortened symbol for the tokensymbol: string;// The URI pointing to richer metadatauri: string;// Any additional metadata about the token as key-value pairsadditionalMetadata: [string,string][];}
Almost all the old things that used to be in the JSON file - name, symbol, description, key/value attribute pairs - are now in the TokenMetadata object.
Why not add image?
Use case
Someone wishes to make an SPL token with minimum features. Right now they need to make a JSON file with:
It'll be a breaking change to add a new default field, so I don't think it's the best idea, but couldn't someone just use the additionalMetadata and add "image" there?
The token extensions with metadata example uses this TokenMetadata
From @solana/spl-token-metadata/src/state.ts
Almost all the old things that used to be in the JSON file - name, symbol, description, key/value attribute pairs - are now in the
TokenMetadata
object.Why not add
image
?Use case
Someone wishes to make an SPL token with minimum features. Right now they need to make a JSON file with:
As the only contents, and add that as a
uri
in theirTokenMetadata
instance.Instead, we could allow
image
(or some other other equivalent) to theTokenMetadata
instance and save people the effort.The text was updated successfully, but these errors were encountered: