Options
All
  • Public
  • Public/Protected
  • All
Menu

solana-test-validator-js

Index

Interfaces

Type Aliases

Variables

Functions

Type Aliases

Args: string[]
description

solana-test-validator arguments

see

https://docs.solana.com/developing/test-validator

Cleanup: (() => void)

Type declaration

    • (): void
    • description

      teardown function to close all created process

      Returns void

Variables

connection: Connection
description

Connection, managed internally

Functions

  • getAccounts(total: number): Keypair[]
  • description

    Get array of Keypair

    Parameters

    • total: number

      number of accounts to be returned

    Returns Keypair[]

    array of Keypair

  • startAndConnect(args?: string[], option?: Option): Promise<[Connection, Cleanup]>
  • description

    Spin-up solana-test-validator

    example

    start and connect with default args

    const [connection, cleanup] = await startAndConnect();
    
    example

    connection instance can also be obtained from anywhere else by import

    import { connection } from "solana-test-validator-js"
    
    see

    https://docs.solana.com/developing/test-validator

    Parameters

    • args: string[] = []

      solana-test-validator arguments

    • option: Option = DEFAULT_OPTION

      option for Initializing

    Returns Promise<[Connection, Cleanup]>

Generated using TypeDoc