Function getParsedTokenAccountsByOwner

  • Fetch all the parsed token accounts owned by the specified account

    Better than connection.getTokenAccountsByOwner or connection.getParsedTokenAccountsByOwner as it properly decodes the token accounts using the more modern unpackAccount.

    Parameters

    • connection: Connection

      Solana connection object

    • owner: PublicKey

      the token accounts owner

    • programId: PublicKey = TOKEN_PROGRAM_ID

      the token program id

    Returns Promise<Account[]>

    the parsed token accounts for the given owner

Generated using TypeDoc