Options
All
  • Public
  • Public/Protected
  • All
Menu

Encodes and decodes account objects.

Type parameters

  • A: string = string

Hierarchy

  • BorshAccountsCoder

Implements

Index

Constructors

Methods

  • decode<T>(accountName: A, data: Buffer): T
  • decodeUnchecked<T>(accountName: A, ix: Buffer): T
  • encode<T>(accountName: A, account: T): Promise<Buffer>
  • memcmp(accountName: A, appendData?: Buffer): any
  • size(idlAccount: IdlTypeDef): number
  • accountDiscriminator(name: string): Buffer
  • Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.

    Parameters

    • name: string

      The name of the account to calculate the discriminator.

    Returns Buffer

Generated using TypeDoc