Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AccountClient<IDL, A, N, T>

Type Parameters

Hierarchy

  • AccountClient

Index

Constructors

  • Type Parameters

    • IDL extends Idl = Idl

    • A extends string = (FilterTuple<NonNullable<IDL["types"]>, { name: NonNullable<IDL["accounts"]>[number]["name"] }> extends [] ? IdlTypeDef[] : FilterTuple<NonNullable<IDL["types"]>, { name: NonNullable<IDL["accounts"]>[number]["name"] }>)[number]["name"]

    • N extends IdlAccount = NullableIdlAccount<IDL>

    • T = IdlAccounts<IDL>[A] extends Record<string, unknown> ? any[any] : never

    Parameters

    Returns AccountClient<IDL, A, N, T>

Accessors

  • get coder(): Coder<string, string>
  • get size(): number

Methods

  • Returns all instances of this account type for the program.

    Parameters

    • Optional filters: Buffer | GetProgramAccountsFilter[]

      User-provided filters to narrow the results from connection.getProgramAccounts.

                 When filters are not defined this method returns all
      the account instances.

      When filters are of type `Buffer`, the filters are appended
      after the discriminator.

      When filters are of type `GetProgramAccountsFilter[]`,
      filters are appended after the discriminator filter.

    Returns Promise<ProgramAccount<T>[]>

  • subscribe(address: Address, commitment?: Commitment): EventEmitter<string | symbol, any>
  • unsubscribe(address: Address): Promise<void>

Generated using TypeDoc