Options
All
  • Public
  • Public/Protected
  • All
Menu

A client for the program state. Similar to the base Program client, one can use this to send transactions and read accounts for the state abstraction.

Type parameters

Hierarchy

  • StateClient

Index

Constructors

Properties

coder: Coder<string, string> = ...
instruction: InstructionNamespace<IDL, NullableMethods<IDL>[number]>

InstructionNamespace for all state methods.

provider: Provider = ...
rpc: RpcNamespace<IDL, NullableMethods<IDL>[number]>

RpcNamespace for all state methods.

transaction: TransactionNamespace<IDL, NullableMethods<IDL>[number]>

TransactionNamespace for all state methods.

Accessors

Methods

  • fetch(): Promise<TypeDef<IDL["state"] extends undefined ? IdlTypeDef : NonNullable<IDL["state"]>["struct"], IdlTypes<IDL>>>
  • subscribe(commitment?: Commitment): EventEmitter<string | symbol, any>
  • Returns an EventEmitter with a "change" event that's fired whenever the state account cahnges.

    Parameters

    Returns EventEmitter<string | symbol, any>

  • unsubscribe(): void

Generated using TypeDoc