@metaplex-foundation/mpl-token-metadata-kit - v0.0.1
    Preparing search index...

    Function fetchDigitalAssetWithToken

    • Fetches a digital asset along with a specific token account

      This function fetches the mint, metadata, edition, token account, and token record (if applicable) in a single RPC call.

      Type Parameters

      • TMint extends string = string

      Parameters

      • rpc: Rpc<any>

        The RPC client

      • mint: Address<TMint>

        The mint address

      • tokenAddress: Address

        The token account address

      • Optionalconfig: FetchAccountConfig

        Optional fetch configuration

      Returns Promise<DigitalAssetWithToken<TMint>>

      The digital asset with token data

      const asset = await fetchDigitalAssetWithToken(rpc, mintAddress, tokenAddress);
      console.log('Owner:', asset.token.owner);
      console.log('Amount:', asset.token.amount);