MetadataAccount class

Inheritance
Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

MetadataAccount.new({required int key, required String updateAuthority, required String mint, required String name, required String symbol, required String uri, required int sellerFeeBasisPoints, required List<MetadataCreator>? creators, required bool primarySaleHappened, required bool isMutable, required int? editionNonce, required TokenStandard? tokenStandard, required MetadataCollection? collection, required MetadataUses? uses})
Metadata Account Information.
const
MetadataAccount.fromAccountInfo(AccountInfo info)
Creates an instance of this class from an account info.
factory
MetadataAccount.fromJson(Map<String, dynamic> json)
Creates an instance of this class from the constructor parameters defined in the json object.
factory

Properties

borshSchema BorshSchema
Maps this class' properties to codecs.
no setteroverride
collection MetadataCollection?
This field optionally links to the Mint address of another NFT that acts as a Collection NFT.
final
creators List<MetadataCreator>?
An array of creators and their share of the royalties. This array is limited to 5 creators. Note that, because the Creators field is an array of variable length, we cannot guarantee the byte position of any field that follows.
final
editionNonce int?
A nonce used to verify the edition number of printed NFTs. It will only be set on Edition NFTs and not Master Edition NFTs.
final
hashCode int
The hash code for this object.
no setterinherited
isMutable bool
A boolean indicating if the Metadata Account can be updated. Once flipped to false, it cannot ever be true again.
final
key int
The discriminator of the account as an enum.
final
mint String
The public key of the Mint Account it derives from.
final
name String
The on-chain name of the token, limited to 32 bytes. For instance "Degen Ape #1 ".
final
primarySaleHappened bool
A boolean indicating if the token has already been sold at least once. Once flipped to true, it cannot ever be False again. This field can affect the way royalties are distributed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sellerFeeBasisPoints int
The royalties shared by the creators in basis points — i.e. 550 means 5.5%. Whilst this field is used by virtually all NFT marketplaces, it is not enforced by the Token Metadata program itself.
final
symbol String
The on-chain symbol of the token, limited to 10 bytes. For instance "DAPE".
final
tokenStandard TokenStandard?
This enum captures the fungibility of the token. You can learn more about the token standard here.
final
updateAuthority String
The public key that is allowed to update this account.
final
uri String
The URI of the token, limited to 200 bytes. This URI points to an off-chain JSON file that contains additional data following a certain standard. You can learn more about this JSON standard here. The JSON file can either be stored in a traditional server (e.g. using AWS) or using a permanent storage solution such as using Arweave.
final
uses MetadataUses?
This field can make NFTs usable. Meaning you can load it with a certain amount of "uses" and use it until it has run out. You can learn more about using NFTs here.
final

Methods

borshSize() int
Returns the serialized byte length of this instance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBorsh() Iterable<int>
Serializes this instance into a buffer.
inherited
toJson() Map<String, dynamic>
Serialises this class into a JSON object.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

codec BorshStructCodec
The encoders/decoders of this class' properties.
no setter

Static Methods

fromBorsh(Iterable<int> buffer) MetadataAccount
Creates an instance of this class from a buffer.
override
fromBorshBase64(String encoded) MetadataAccount
Creates an instance of this class from a base-64 encoded string.
override
tryFromAccountInfo(AccountInfo? info) MetadataAccount?
Creates an instance of this class from an account info.
tryFromBorsh(Iterable<int>? buffer) MetadataAccount?
Creates an instance of this class from a buffer.
override
tryFromBorshBase64(String? encoded) MetadataAccount?
Creates an instance of this class from a base-64 encoded string.
override