Class CargoProgram

Hierarchy

Constructors

Properties

accountClosedListener: null | ((update: AccountClosedUpdate) => void)
accountDiscriminants: {
    cargoPod: Readonly<Buffer>;
    cargoStatsDefinition: Readonly<Buffer>;
    cargoType: Readonly<Buffer>;
}

Type declaration

  • cargoPod: Readonly<Buffer>
  • cargoStatsDefinition: Readonly<Buffer>
  • cargoType: Readonly<Buffer>
parsers: {
    cargoPod: (new (...args: never[]) => CargoPod & Account) & AccountStatic<CargoPod, CargoIDL>;
    cargoStatsDefinition: (new (...args: never[]) => CargoStatsDefinition & Account) & AccountStatic<CargoStatsDefinition, CargoIDL>;
    cargoType: (new (...args: never[]) => CargoType & Account) & AccountStatic<CargoType, CargoIDL>;
}

Type declaration

program: ProgramMethods<CargoIDL>

Accessors

  • get programId(): PublicKey
  • Returns PublicKey

Methods

  • Parameters

    Returns Buffer

  • Parameters

    • data: Buffer

    Returns null | {
        discriminantLength: number;
        key: "cargoPod" | "cargoType" | "cargoStatsDefinition";
    }

  • Parameters

    • discriminant: Buffer

    Returns null | {
        discriminantLength: number;
        key: "cargoPod" | "cargoType" | "cargoStatsDefinition";
    }

  • 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
    • Optional unknownAccountHandler: ((key: PublicKey) => void)
        • (key: PublicKey): void
        • Parameters

          • key: PublicKey

          Returns void

    Returns void

  • Type Parameters

    Parameters

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

    Returns void

  • Parameters

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

          • update: AccountClosedUpdate

          Returns null | void

    Returns void

  • Type Parameters

    Parameters

    • accountId: AccountId
    • accountType: (new (...args: never[]) => CargoAccounts[AccountId])
    • listener: null | AccountUpdateHandler<CargoAccounts[AccountId]>

    Returns void

  • Parameters

    • programId: PublicKey
    • Optional provider: default
    • Optional coder: Coder<string, string>

    Returns CargoIDLProgram

Generated using TypeDoc