Hierarchy (view full)

Constructors

Properties

args: string[] = []

Extra arguments passed from the command line.

commandTree: CommandTree<default> = {}

All registered commands.

createDevnet: ((platform, version, chainId?) => Promise<any>) = ...

Type declaration

    • (platform, version, chainId?): Promise<any>
    • Parameters

      • platform: "scrt" | "okp4"
      • version: string
      • Optional chainId: string

      Returns Promise<any>

currentCommand: string = ''

Currently executing command.

cwd: string = ...

Current working directory at launch of process.

env: Record<string, string> = ...

Process environment at lauch of process.

exportDevnet: ((chainId, imageTag?) => never) = ...

Type declaration

    • (chainId, imageTag?): never
    • Parameters

      • chainId: string
      • Optional imageTag: string

      Returns never

info: string

Description of this command tree.

launchDevnet: ((platform, version, chainId?) => Promise<void>) = ...

Type declaration

    • (platform, version, chainId?): Promise<void>
    • Parameters

      • platform: "scrt" | "okp4"
      • version: string
      • Optional chainId: string

      Returns Promise<void>

listDevnets: (() => Promise<void>) = ...

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

listPlatforms: (() => void) = ...

Type declaration

    • (): void
    • Returns void

name: string

Name of this command tree.

pauseDevnet: ((chainId) => never) = ...

Type declaration

    • (chainId): never
    • Parameters

      • chainId: string

      Returns never

printUsageOnly: (() => Promise<void>) = ...

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

pruneDevnets: (() => Promise<void>) = ...

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

removeDevnet: ((chainId) => never) = ...

Type declaration

    • (chainId): never
    • Parameters

      • chainId: string

      Returns never

startDevnet: ((chainId) => Promise<void>) = ...

Type declaration

    • (chainId): Promise<void>
    • Parameters

      • chainId: string

      Returns Promise<void>

timestamp: string = ...

Start of command execution.

Methods

  • Define a command and return this.

    Type Parameters

    Parameters

    • parameters: {
          args: string;
          info: string;
          name: string;
      }
      • args: string
      • info: string
      • name: string
    • step: X

    Returns this

  • Attach a command subtree and return this.

    Parameters

    • name: string
    • info: string
    • subtree: default

    Returns this

  • Define a command and return it.

    Type Parameters

    Parameters

    • parameters: {
          args: string;
          info: string;
          name: string;
      }
      • args: string
      • info: string
      • name: string
    • step: X

    Returns X

  • Attach a command subtree and return it.

    Type Parameters

    • C extends default

    Parameters

    • name: string
    • info: string
    • subtree: C

    Returns C

  • If this command tree is the default export of the process entrypoint, run the commands as specified by the process command line.

    Parameters

    • url: string
    • argv: string[] = ...

    Returns this

    Example

    export default myCommands.main(import.meta.url)
    
  • End the process.

    Parameters

    • code: number = 0

    Returns void

  • Filter commands by each word from the list of arguments then pass the rest as arguments to the found command.

    Parameters

    • args: string[]

    Returns [default | Command<default>, ...string[]]

  • Parameters

    • __namedParameters: default

    Returns Promise<void>

  • Parameters

    • arg0: default

    Returns Promise<void>

  • Run a command from this command tree.

    Type Parameters

    • T

    Parameters

    • argv: string[]
    • context: any = ...

    Returns Promise<T>

  • Start an interactive REPL with this deployment as global context.

    Returns Promise<void>

    Throws

    if the node:repl and node:vm native modules are unavailable.

Generated using TypeDoc