Fetch

Fetching Inscription Data

Once Inscription Accounts are initializedarrow-up-right their Metadata can be read from chain again. Once data is writtenarrow-up-right it can also be read. To fetch inscriptions you also have to use different functions according to the inscription type.

Fetch inscription Metadata

Both inscription types use a metadata account. This Account contains for example the inscriptionRank, associatedInscriptions, updateAuthorities and morearrow-up-right. The Metadata can be fetched like so:

Fetch Inscription Metadata

JavaScript

import { safeFetchInscriptionMetadataFromSeeds } from '@metaplex-foundation/mpl-inscription'

const inscriptionMetadataAccount = await safeFetchInscriptionMetadataFromSeeds(
  umi,
  {
    inscriptionAccount: inscriptionAccount.publicKey,
  }
)

console.log(inscriptionMetadataAccount)

Fetch mint inscription

To fetch the deserialized mint inscription you can use safeFetchMintInscriptionFromSeeds like so:

Fetch Mint Inscription

JavaScript

Fetch data inscription

To read Inscription Data that is not attached to NFTs a different function is used:

Fetch Inscription

JavaScript

Fetch current Inscription count

The current total inscription count can be fetched like so:

Fetch current Inscription count

JavaScript

Last updated