Options
All
  • Public
  • Public/Protected
  • All
Menu

@coral-xyz/anchor - v0.30.0

Index

Type Aliases

AccountNamespace<I>: { [ A in keyof AllAccountsMap<I>]: AccountClient<I, A> }

The namespace provides handles to an AccountClient object for each account in a program.

Usage

account.<account-client>

Example

To fetch a Counter account from the above example,

const counter = await program.account.counter.fetch(address);

For the full API, see the AccountClient reference.

Type Parameters

Accounts<A>: { [ N in A["name"]]: Account<A & { name: N }> }

A set of accounts mapping one-to-one to the program's accounts struct, i.e., the type deriving #[derive(Accounts)].

The name of each field should match the name for that account in the IDL.

If multiple accounts are nested in the rust program, then they should be nested here.

Type Parameters

  • A extends IdlInstructionAccountItem = IdlInstructionAccountItem

Address: PublicKey | string

An address to identify an account on chain. Can be a PublicKey, or Base 58 encoded string.

Context<A>: { accounts?: A; instructions?: TransactionInstruction[]; options?: ConfirmOptions; postInstructions?: TransactionInstruction[]; preInstructions?: TransactionInstruction[]; remainingAccounts?: AccountMeta[]; signers?: Signer[] }

Context provides all non-argument inputs for generating Anchor transactions.

Type Parameters

Type declaration

  • Optional accounts?: A

    Accounts used in the instruction context.

  • Optional instructions?: TransactionInstruction[]
    deprecated

    use preInstructions instead. Instructions to run before a given method. Often this is used, for example to create accounts prior to executing a method.

  • Optional options?: ConfirmOptions

    Commitment parameters to use for a transaction.

  • Optional postInstructions?: TransactionInstruction[]

    Instructions to run after a given method. Often this is used, for example to close accounts after executing a method.

  • Optional preInstructions?: TransactionInstruction[]

    Instructions to run before a given method. Often this is used, for example to create accounts prior to executing a method.

  • Optional remainingAccounts?: AccountMeta[]

    All accounts to pass into an instruction after the main accounts. This can be used for optional or otherwise unknown accounts.

  • Optional signers?: Signer[]

    Accounts that must sign a given transaction.

CustomAccountResolver<IDL>: ((params: { accounts: AccountsGeneric; args: any[]; idlIx: AllInstructions<IDL>; programId: PublicKey; provider: Provider }) => Promise<{ accounts: AccountsGeneric; resolved: number }>)

Type Parameters

  • IDL extends Idl

Type declaration

    • (params: { accounts: AccountsGeneric; args: any[]; idlIx: AllInstructions<IDL>; programId: PublicKey; provider: Provider }): Promise<{ accounts: AccountsGeneric; resolved: number }>
    • Parameters

      • params: { accounts: AccountsGeneric; args: any[]; idlIx: AllInstructions<IDL>; programId: PublicKey; provider: Provider }
        • accounts: AccountsGeneric
        • args: any[]
        • idlIx: AllInstructions<IDL>
        • programId: PublicKey
        • provider: Provider

      Returns Promise<{ accounts: AccountsGeneric; resolved: number }>

DecodeType<T, Defined>: IdlType extends T ? unknown : T extends keyof TypeMap ? TypeMap[T] : T extends { defined: { name: keyof Defined } } ? Defined[T["defined"]["name"]] : T extends { option: IdlType } ? DecodeType<T["option"], Defined> | null : T extends { coption: IdlType } ? DecodeType<T["coption"], Defined> | null : T extends { vec: IdlType } ? DecodeType<T["vec"], Defined>[] : T extends { array: [defined: IdlType, size: IdlArrayLen] } ? DecodeType<T["array"][0], Defined>[] : unknown

Type Parameters

  • T extends IdlType

  • Defined

Event<E, Defined>: { data: any; name: E["name"] }

Type Parameters

  • E extends IdlEvent = IdlEvent

  • Defined = Record<string, never>

Type declaration

  • data: any
  • name: E["name"]
EventData<T, Defined>: { [ N in T["name"]]: DecodeType<(T & { name: N })["type"], Defined> }

Type Parameters

  • T extends IdlField

  • Defined

Idl: { accounts?: IdlAccount[]; address: string; constants?: IdlConst[]; docs?: string[]; errors?: IdlErrorCode[]; events?: IdlEvent[]; instructions: IdlInstruction[]; metadata: IdlMetadata; types?: IdlTypeDef[] }

Type declaration

  • Optional accounts?: IdlAccount[]
  • address: string
  • Optional constants?: IdlConst[]
  • Optional docs?: string[]
  • Optional errors?: IdlErrorCode[]
  • Optional events?: IdlEvent[]
  • instructions: IdlInstruction[]
  • metadata: IdlMetadata
  • Optional types?: IdlTypeDef[]
IdlAccounts<I>: ResolveIdlPointerSection<I, "accounts">

Type Parameters

IdlEvents<I>: ResolveIdlPointerSection<I, "events">

Type Parameters

IdlTypes<I>: RecursiveTypes<NonNullable<I["types"]>>

Type Parameters

Instruction: { data: Object; name: string }

Type declaration

  • data: Object
  • name: string
InstructionFn<IDL, I>: InstructionContextFn<IDL, I, TransactionInstruction> & IxProps<Accounts<I["accounts"][number]>>

Function to create a TransactionInstruction generated from an IDL. Additionally it provides an accounts utility method, returning a list of ordered accounts for the instruction.

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

InstructionNamespace<IDL, I>: MakeInstructionsNamespace<IDL, I, TransactionInstruction, { [ M in keyof AllInstructionsMap<IDL>]: { accounts: any } }>

The namespace provides functions to build TransactionInstruction objects for each method of a program.

Usage

instruction.<method>(...args, ctx);

Parameters

  1. args - The positional arguments for the program. The type and number of these arguments depend on the program being used.
  2. ctx - Context non-argument parameters to pass to the method. Always the last parameter in the method call.

Example

To create an instruction for the increment method above,

const tx = await program.instruction.increment({
accounts: {
counter,
},
});

Type Parameters

  • IDL extends Idl = Idl

  • I extends IdlInstruction = AllInstructions<IDL>

MethodsNamespace<IDL, I>: MakeMethodsNamespace<IDL, I>

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

RpcFn<IDL, I>: InstructionContextFn<IDL, I, Promise<TransactionSignature>>

RpcFn is a single RPC method generated from an IDL, sending a transaction paid for and signed by the configured provider.

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

RpcNamespace<IDL, I>: MakeInstructionsNamespace<IDL, I, Promise<TransactionSignature>>

The namespace provides async methods to send signed transactions for each non-state method on Anchor program.

Keys are method names, values are RPC functions returning a TransactionInstruction.

Usage

rpc.<method>(...args, ctx);

Parameters

  1. args - The positional arguments for the program. The type and number of these arguments depend on the program being used.
  2. ctx - Context non-argument parameters to pass to the method. Always the last parameter in the method call.

## Example

To send a transaction invoking the `increment` method above,

```javascript
const txSignature = await program.rpc.increment({
accounts: {
counter,
authority,
},
});

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

SimulateFn<IDL, I>: InstructionContextFn<IDL, I, Promise<SimulateResponse<AllEvents<IDL>[number], IdlTypes<IDL>>>>

SimulateFn is a single method generated from an IDL. It simulates a method against a cluster configured by the provider, returning a list of all the events and raw logs that were emitted during the execution of the method.

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

SimulateNamespace<IDL, I>: MakeInstructionsNamespace<IDL, I, Promise<SimulateResponse<AllEvents<IDL>[number], IdlTypes<IDL>>>>

The namespace provides functions to simulate transactions for each method of a program, returning a list of deserialized events and raw program logs.

One can use this to read data calculated from a program on chain, by emitting an event in the program and reading the emitted event client side via the simulate namespace.

Usage

program.simulate.<method>(...args, ctx);

Parameters

  1. args - The positional arguments for the program. The type and number of these arguments depend on the program being used.
  2. ctx - Context non-argument parameters to pass to the method. Always the last parameter in the method call.

Example

To simulate the increment method above,

const events = await program.simulate.increment({
accounts: {
counter,
},
});

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

Subscription: { ee: EventEmitter; listener: number }

Type declaration

  • ee: EventEmitter
  • listener: number
SystemProgram: { accounts: [{ discriminator: []; name: "nonce" }]; address: "11111111111111111111111111111111"; instructions: [{ accounts: [{ name: "nonce"; writable: true }, { name: "recentBlockhashes" }, { name: "authorized"; signer: true }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [4, 0, 0, 0]; name: "advanceNonceAccount" }, { accounts: [{ name: "pubkey"; signer: true; writable: true }]; args: [{ name: "space"; type: "u64" }]; discriminator: [8, 0, 0, 0]; name: "allocate" }, { accounts: [{ name: "account"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [9, 0, 0, 0]; name: "allocateWithSeed" }, { accounts: [{ name: "pubkey"; signer: true; writable: true }]; args: [{ name: "owner"; type: "pubkey" }]; discriminator: [1, 0, 0, 0]; name: "assign" }, { accounts: [{ name: "account"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "owner"; type: "pubkey" }]; discriminator: [10, 0, 0, 0]; name: "assignWithSeed" }, { accounts: [{ name: "nonce"; writable: true }, { name: "authorized"; signer: true }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [7, 0, 0, 0]; name: "authorizeNonceAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; signer: true; writable: true }]; args: [{ name: "lamports"; type: "u64" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [0, 0, 0, 0]; name: "createAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "lamports"; type: "u64" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [3, 0, 0, 0]; name: "createAccountWithSeed" }, { accounts: [{ name: "nonce"; signer: true; writable: true }, { name: "recentBlockhashes" }, { address: "SysvarRent111111111111111111111111111111111"; name: "rent" }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [6, 0, 0, 0]; name: "initializeNonceAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; writable: true }]; args: [{ name: "lamports"; type: "u64" }]; discriminator: [2, 0, 0, 0]; name: "transfer" }, { accounts: [{ name: "from"; writable: true }, { name: "base"; signer: true }, { name: "to"; writable: true }]; args: [{ name: "lamports"; type: "u64" }, { name: "seed"; type: "string" }, { name: "owner"; type: "pubkey" }]; discriminator: [11, 0, 0, 0]; name: "transferWithSeed" }, { accounts: [{ name: "nonce"; writable: true }, { name: "to"; writable: true }, { name: "recentBlockhashes" }, { address: "SysvarRent111111111111111111111111111111111"; name: "rent" }, { name: "authorized"; signer: true }]; args: [{ name: "lamports"; type: "u64" }]; discriminator: [5, 0, 0, 0]; name: "withdrawNonceAccount" }]; metadata: { name: "systemProgram"; spec: "0.1.0"; version: "0.1.0" }; types: [{ name: "feeCalculator"; type: { fields: [{ name: "lamportsPerSignature"; type: "u64" }]; kind: "struct" } }, { name: "nonce"; type: { fields: [{ name: "version"; type: "u32" }, { name: "state"; type: "u32" }, { name: "authorizedPubkey"; type: "pubkey" }, { name: "nonce"; type: "pubkey" }, { name: "feeCalculator"; type: { defined: { name: "feeCalculator" } } }]; kind: "struct" } }] }

System IDL.

Type declaration

  • accounts: [{ discriminator: []; name: "nonce" }]
  • address: "11111111111111111111111111111111"
  • instructions: [{ accounts: [{ name: "nonce"; writable: true }, { name: "recentBlockhashes" }, { name: "authorized"; signer: true }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [4, 0, 0, 0]; name: "advanceNonceAccount" }, { accounts: [{ name: "pubkey"; signer: true; writable: true }]; args: [{ name: "space"; type: "u64" }]; discriminator: [8, 0, 0, 0]; name: "allocate" }, { accounts: [{ name: "account"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [9, 0, 0, 0]; name: "allocateWithSeed" }, { accounts: [{ name: "pubkey"; signer: true; writable: true }]; args: [{ name: "owner"; type: "pubkey" }]; discriminator: [1, 0, 0, 0]; name: "assign" }, { accounts: [{ name: "account"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "owner"; type: "pubkey" }]; discriminator: [10, 0, 0, 0]; name: "assignWithSeed" }, { accounts: [{ name: "nonce"; writable: true }, { name: "authorized"; signer: true }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [7, 0, 0, 0]; name: "authorizeNonceAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; signer: true; writable: true }]; args: [{ name: "lamports"; type: "u64" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [0, 0, 0, 0]; name: "createAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; writable: true }, { name: "base"; signer: true }]; args: [{ name: "base"; type: "pubkey" }, { name: "seed"; type: "string" }, { name: "lamports"; type: "u64" }, { name: "space"; type: "u64" }, { name: "owner"; type: "pubkey" }]; discriminator: [3, 0, 0, 0]; name: "createAccountWithSeed" }, { accounts: [{ name: "nonce"; signer: true; writable: true }, { name: "recentBlockhashes" }, { address: "SysvarRent111111111111111111111111111111111"; name: "rent" }]; args: [{ name: "authorized"; type: "pubkey" }]; discriminator: [6, 0, 0, 0]; name: "initializeNonceAccount" }, { accounts: [{ name: "from"; signer: true; writable: true }, { name: "to"; writable: true }]; args: [{ name: "lamports"; type: "u64" }]; discriminator: [2, 0, 0, 0]; name: "transfer" }, { accounts: [{ name: "from"; writable: true }, { name: "base"; signer: true }, { name: "to"; writable: true }]; args: [{ name: "lamports"; type: "u64" }, { name: "seed"; type: "string" }, { name: "owner"; type: "pubkey" }]; discriminator: [11, 0, 0, 0]; name: "transferWithSeed" }, { accounts: [{ name: "nonce"; writable: true }, { name: "to"; writable: true }, { name: "recentBlockhashes" }, { address: "SysvarRent111111111111111111111111111111111"; name: "rent" }, { name: "authorized"; signer: true }]; args: [{ name: "lamports"; type: "u64" }]; discriminator: [5, 0, 0, 0]; name: "withdrawNonceAccount" }]
  • metadata: { name: "systemProgram"; spec: "0.1.0"; version: "0.1.0" }
    • name: "systemProgram"
    • spec: "0.1.0"
    • version: "0.1.0"
  • types: [{ name: "feeCalculator"; type: { fields: [{ name: "lamportsPerSignature"; type: "u64" }]; kind: "struct" } }, { name: "nonce"; type: { fields: [{ name: "version"; type: "u32" }, { name: "state"; type: "u32" }, { name: "authorizedPubkey"; type: "pubkey" }, { name: "nonce"; type: "pubkey" }, { name: "feeCalculator"; type: { defined: { name: "feeCalculator" } } }]; kind: "struct" } }]
TransactionFn<IDL, I>: InstructionContextFn<IDL, I, Transaction>

Tx is a function to create a Transaction for a given program instruction.

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

TransactionNamespace<IDL, I>: MakeInstructionsNamespace<IDL, I, Transaction>

The namespace provides functions to build Transaction objects for each method of a program.

Usage

program.transaction.<method>(...args, ctx);

Parameters

  1. args - The positional arguments for the program. The type and number of these arguments depend on the program being used.
  2. ctx - Context non-argument parameters to pass to the method. Always the last parameter in the method call.

Example

To create an instruction for the increment method above,

const tx = await program.transaction.increment({
accounts: {
counter,
},
});

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

ViewFn<IDL, I>: InstructionContextFn<IDL, I, Promise<any>>

ViewFn is a single method generated from an IDL. It simulates a method against a cluster configured by the provider, and then parses the events and extracts return data from the raw logs emitted during the simulation.

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

ViewNamespace<IDL, I>: MakeInstructionsNamespace<IDL, I, Promise<any>>

Type Parameters

  • IDL extends Idl = Idl

  • I extends AllInstructions<IDL> = AllInstructions<IDL>

Variables

DISCRIMINATOR_SIZE: 8 = 8

Number of bytes in anchor discriminators

LangErrorCode: { AccountDidNotDeserialize: number; AccountDidNotSerialize: number; AccountDiscriminatorAlreadySet: number; AccountDiscriminatorMismatch: number; AccountDiscriminatorNotFound: number; AccountDuplicateReallocs: number; AccountNotAssociatedTokenAccount: number; AccountNotEnoughKeys: number; AccountNotInitialized: number; AccountNotMutable: number; AccountNotProgramData: number; AccountNotSigner: number; AccountNotSystemOwned: number; AccountOwnedByWrongProgram: number; AccountReallocExceedsLimit: number; AccountSysvarMismatch: number; ConstraintAccountIsNone: number; ConstraintAddress: number; ConstraintAssociated: number; ConstraintAssociatedInit: number; ConstraintAssociatedTokenTokenProgram: number; ConstraintClose: number; ConstraintExecutable: number; ConstraintHasOne: number; ConstraintMintCloseAuthorityExtension: number; ConstraintMintCloseAuthorityExtensionAuthority: number; ConstraintMintDecimals: number; ConstraintMintFreezeAuthority: number; ConstraintMintGroupMemberPointerExtension: number; ConstraintMintGroupMemberPointerExtensionAuthority: number; ConstraintMintGroupMemberPointerExtensionMemberAddress: number; ConstraintMintGroupPointerExtension: number; ConstraintMintGroupPointerExtensionAuthority: number; ConstraintMintGroupPointerExtensionGroupAddress: number; ConstraintMintMetadataPointerExtension: number; ConstraintMintMetadataPointerExtensionAuthority: number; ConstraintMintMetadataPointerExtensionMetadataAddress: number; ConstraintMintMintAuthority: number; ConstraintMintPermanentDelegateExtension: number; ConstraintMintPermanentDelegateExtensionDelegate: number; ConstraintMintTokenProgram: number; ConstraintMintTransferHookExtension: number; ConstraintMintTransferHookExtensionAuthority: number; ConstraintMintTransferHookExtensionProgramId: number; ConstraintMut: number; ConstraintOwner: number; ConstraintRaw: number; ConstraintRentExempt: number; ConstraintSeeds: number; ConstraintSigner: number; ConstraintSpace: number; ConstraintState: number; ConstraintTokenMint: number; ConstraintTokenOwner: number; ConstraintTokenTokenProgram: number; ConstraintZero: number; DeclaredProgramIdMismatch: number; Deprecated: number; EventInstructionStub: number; IdlAccountNotEmpty: number; IdlInstructionInvalidProgram: number; IdlInstructionStub: number; InstructionDidNotDeserialize: number; InstructionDidNotSerialize: number; InstructionFallbackNotFound: number; InstructionMissing: number; InvalidProgramExecutable: number; InvalidProgramId: number; RequireEqViolated: number; RequireGtViolated: number; RequireGteViolated: number; RequireKeysEqViolated: number; RequireKeysNeqViolated: number; RequireNeqViolated: number; RequireViolated: number; TryingToInitPayerAsProgramAccount: number } = ...

Type declaration

  • AccountDidNotDeserialize: number
  • AccountDidNotSerialize: number
  • AccountDiscriminatorAlreadySet: number
  • AccountDiscriminatorMismatch: number
  • AccountDiscriminatorNotFound: number
  • AccountDuplicateReallocs: number
  • AccountNotAssociatedTokenAccount: number
  • AccountNotEnoughKeys: number
  • AccountNotInitialized: number
  • AccountNotMutable: number
  • AccountNotProgramData: number
  • AccountNotSigner: number
  • AccountNotSystemOwned: number
  • AccountOwnedByWrongProgram: number
  • AccountReallocExceedsLimit: number
  • AccountSysvarMismatch: number
  • ConstraintAccountIsNone: number
  • ConstraintAddress: number
  • ConstraintAssociated: number
  • ConstraintAssociatedInit: number
  • ConstraintAssociatedTokenTokenProgram: number
  • ConstraintClose: number
  • ConstraintExecutable: number
  • ConstraintHasOne: number
  • ConstraintMintCloseAuthorityExtension: number
  • ConstraintMintCloseAuthorityExtensionAuthority: number
  • ConstraintMintDecimals: number
  • ConstraintMintFreezeAuthority: number
  • ConstraintMintGroupMemberPointerExtension: number
  • ConstraintMintGroupMemberPointerExtensionAuthority: number
  • ConstraintMintGroupMemberPointerExtensionMemberAddress: number
  • ConstraintMintGroupPointerExtension: number
  • ConstraintMintGroupPointerExtensionAuthority: number
  • ConstraintMintGroupPointerExtensionGroupAddress: number
  • ConstraintMintMetadataPointerExtension: number
  • ConstraintMintMetadataPointerExtensionAuthority: number
  • ConstraintMintMetadataPointerExtensionMetadataAddress: number
  • ConstraintMintMintAuthority: number
  • ConstraintMintPermanentDelegateExtension: number
  • ConstraintMintPermanentDelegateExtensionDelegate: number
  • ConstraintMintTokenProgram: number
  • ConstraintMintTransferHookExtension: number
  • ConstraintMintTransferHookExtensionAuthority: number
  • ConstraintMintTransferHookExtensionProgramId: number
  • ConstraintMut: number
  • ConstraintOwner: number
  • ConstraintRaw: number
  • ConstraintRentExempt: number
  • ConstraintSeeds: number
  • ConstraintSigner: number
  • ConstraintSpace: number
  • ConstraintState: number
  • ConstraintTokenMint: number
  • ConstraintTokenOwner: number
  • ConstraintTokenTokenProgram: number
  • ConstraintZero: number
  • DeclaredProgramIdMismatch: number
  • Deprecated: number
  • EventInstructionStub: number
  • IdlAccountNotEmpty: number
  • IdlInstructionInvalidProgram: number
  • IdlInstructionStub: number
  • InstructionDidNotDeserialize: number
  • InstructionDidNotSerialize: number
  • InstructionFallbackNotFound: number
  • InstructionMissing: number
  • InvalidProgramExecutable: number
  • InvalidProgramId: number
  • RequireEqViolated: number
  • RequireGtViolated: number
  • RequireGteViolated: number
  • RequireKeysEqViolated: number
  • RequireKeysNeqViolated: number
  • RequireNeqViolated: number
  • RequireViolated: number
  • TryingToInitPayerAsProgramAccount: number
LangErrorMessage: Map<number, string> = ...
workspace: any

Functions

  • parseIdlErrors(idl: Idl): Map<number, string>
  • splitArgsAndCtx(idlIx: IdlInstruction, args: any[]): [any[], Context]
  • toInstruction(idlIx: IdlInstruction, ...args: any[]): {}
  • translateError(err: any, idlErrors: Map<number, string>): any
  • validateAccounts(ixAccounts: IdlInstructionAccountItem[], accounts?: Accounts<IdlInstructionAccountItem>): void

Generated using TypeDoc