Class ListenProgram<Accounts, IDL>Abstract

Type Parameters

  • Accounts extends Record<string, Account>

  • IDL extends Idl

Hierarchy

  • ListenProgram

Constructors

  • Type Parameters

    • Accounts extends Record<string, Account>

    • IDL extends Idl

    Parameters

    Returns ListenProgram<Accounts, IDL>

Properties

accountClosedListener: null | ((update) => void) = null

Type declaration

accountDiscriminants: {
    [K in string | number | symbol]: Readonly<Buffer>
}
parsers: {
    [K in string]: (new (...args) => Accounts[K] & Account) & AccountStatic<Accounts[K], IDL>
}
program: ProgramMethods<IDL>

Accessors

  • get programId(): PublicKey
  • Returns PublicKey

Methods

  • Parameters

    • accountId: keyof Accounts

    Returns Buffer

  • Parameters

    • data: Buffer

    Returns null | {
        discriminantLength: number;
        key: keyof Accounts & string;
    }

  • Parameters

    • discriminant: Buffer

    Returns null | {
        discriminantLength: number;
        key: keyof Accounts & string;
    }

  • Parameters

    • key: PublicKey
    • oldOwner: PublicKey
    • newOwner: PublicKey
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • writeVersion: number
    • accountInfo: AccountInfo<Buffer>

    Returns void

  • Parameters

    • account: KeyedAccountInfo
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • isStartup: boolean
    • writeVersion: number
    • unknownAccountHandler: ((key) => void) = ...
        • (key): void
        • Parameters

          • key: PublicKey

          Returns void

    Returns void

  • Type Parameters

    • AccountId extends string | number | symbol

    Parameters

    • accountId: AccountId
    • account: Accounts[AccountId]
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • isStartup: boolean
    • accountInfo: AccountInfo<Buffer>
    • writeVersion: number

    Returns void

  • Parameters

    • listener: ((update) => null | void)

    Returns void

  • Type Parameters

    • AccountId extends string | number | symbol

    Parameters

    • accountId: AccountId
    • accountType: (new (...args) => Accounts[AccountId])
        • new (...args): Accounts[AccountId]
        • Parameters

          • Rest ...args: never[]

          Returns Accounts[AccountId]

    • listener: null | AccountUpdateHandler<Accounts[AccountId]>

    Returns void

Generated using TypeDoc