Static abstract class definition to parse entities.

interface ParsableEntity<T> {
    parse: (
        address: PublicKey,
        accountData: undefined | null | AccountInfo<Buffer<ArrayBufferLike>>,
    ) => null | T;
}

Type Parameters

  • T

Properties

Properties

parse: (
    address: PublicKey,
    accountData: undefined | null | AccountInfo<Buffer<ArrayBufferLike>>,
) => null | T

Parse account data

Type declaration

    • (
          address: PublicKey,
          accountData: undefined | null | AccountInfo<Buffer<ArrayBufferLike>>,
      ): null | T
    • Parameters

      • address: PublicKey
      • accountData: undefined | null | AccountInfo<Buffer<ArrayBufferLike>>

        Buffer data for the entity

      Returns null | T

      Parsed entity