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

    Function fetchDigitalAssetWithAssociatedToken

    • Fetches a digital asset with its associated token account

      This is a convenience function that automatically derives the associated token account (ATA) for the given owner.

      Type Parameters

      • TMint extends string = string

      Parameters

      • rpc: Rpc<any>

        The RPC client

      • mint: Address<TMint>

        The mint address

      • owner: Address

        The token owner address

      • Optionalconfig: FetchAccountConfig

        Optional fetch configuration

      Returns Promise<DigitalAssetWithToken<TMint>>

      The digital asset with token data

      const asset = await fetchDigitalAssetWithAssociatedToken(
      rpc,
      mintAddress,
      walletAddress
      );
      console.log('Balance:', asset.token.amount);