# API Reference - v0.3.0

# Table of contents

# Classes

# Interfaces

# Type Aliases

# Functions

# Type Aliases

# AccountInfoBytes

Ƭ AccountInfoBytes: AccountInfo<Uint8Array>

# Defined in

index.ts:42 (opens new window)


# ClusterType

Ƭ ClusterType: Cluster | "development"

# Defined in

index.ts:137 (opens new window)

# Functions

# start

start(programs, accounts, computeMaxUnits?, transactionAccountLockLimit?): Promise<ProgramTestContext>

Start a bankrun!

This will spin up a BanksServer and a BanksClient, deploy programs and add accounts as instructed.

# Parameters

Name Type Description
programs AddedProgram[] An array of objects indicating which programs to deploy to the test environment. See the main bankrun docs for more explanation on how to add programs.
accounts AddedAccount[] An array of objects indicating what data to write to the given addresses.
computeMaxUnits? bigint Override the default compute unit limit for a transaction.
transactionAccountLockLimit? bigint Override the default transaction account lock limit.

# Returns

Promise<ProgramTestContext>

A container for stuff you'll need to send transactions and interact with the test environment.

# Defined in

index.ts:505 (opens new window)


# startAnchor

startAnchor(path, extraPrograms, accounts, computeMaxUnits?, transactionAccountLockLimit?): Promise<ProgramTestContext>

Start a bankrun in an Anchor workspace, with all the workspace programs deployed.

This will spin up a BanksServer and a BanksClient, deploy programs and add accounts as instructed.

# Parameters

Name Type Description
path string Path to root of the Anchor project.
extraPrograms AddedProgram[] -
accounts AddedAccount[] An array of objects indicating what data to write to the given addresses.
computeMaxUnits? bigint Override the default compute unit limit for a transaction.
transactionAccountLockLimit? bigint Override the default transaction account lock limit.

# Returns

Promise<ProgramTestContext>

A container for stuff you'll need to send transactions and interact with the test environment.

# Defined in

index.ts:533 (opens new window)