Constructors

Properties

client: LuzidGrpcClient

Methods

  • Adds workspace to the list of workspaces that are available to be cloned or watched from the Workspace tab in the Luzid UI. This list persists across restarts of Luzid.

    Parameters

    • workspaceRoot: string

      the root of the workspace.

    Returns Promise<void>

  • Clones the workspace at the given root returns.

    const luzid = new LuzidApi()
    const signatures = await luzid.workspace.cloneWorkspace('/path/to/workspace/foo', {
    'solx': 'SoLXmnP9JvL6vJ7TN1VqtTxqsc2izmPfF9CsMDEuRzJ'
    })

    Parameters

    • workspaceRoot: string
    • programIds: Record<string, string> = {}

      allows to provide or override the programId for a given program

    Returns Promise<string[]>

    the signatures of the transactions that were used to perform the cloning and program upgrade

  • Gets information about the workspace at the given root, namely the following properties of each program in the workspace:

    • package: name of the rust package name as defined in the Cargo.toml, i.e foo
    • deployablePath: the path to which the program deployable is saved, i.e target/deploy/foo
    • programId?: the address of the program if it was found, i.e. via decclare_id!(..)
    • idlPath?: the path to the IDL file if it was found, i.e target/idl/foo.json

    Parameters

    • workspaceRoot: string

      the root of the workspace.

    Returns Promise<Workspace>

    the workspace information

  • Returns the list of workspaces that are available to be cloned or watched from the Workspace tab in the Luzid UI.

    Returns Promise<string[]>

  • Removes workspace from the list of workspaces that are available to be cloned or watched from the Workspace tab in the Luzid UI. This list persists across restarts of Luzid.

    Parameters

    • workspaceRoot: string

      the root of the workspace.

    Returns Promise<void>

  • Stops watching the workspace at the given root.

    const luzid = new LuzidApi()
    const signatures = await luzid.workspace.unwatchWorkspace('/path/to/workspace/foo')

    Parameters

    • workspaceRoot: string

      the root of the workspace.

    Returns Promise<void>

  • Watches the workspace at the given root after cloning it into the validator.

    const luzid = new LuzidApi()
    const signatures = await luzid.workspace.watchWorkspace('/path/to/workspace/foo')

    Parameters

    • workspaceRoot: string

      the root of the workspace.

    • programIds: Record<string, string> = {}

      allows to provide or override the programId for a given program

    Returns Promise<string[]>

    the signatures of the transactions that were used to perform the cloning and program upgrade

Generated using TypeDoc