Class Operation

An operation object.

Constructors

Properties

id: string
provider: Provider

Methods

  • Waits for the operation to reach a specific status.

    Parameters

    • exitThreshold: OperationStatus

      The minimal status to wait for.

    • timeout: number = DEFAULT_WAIT_TIMEOUT_MS

      The maximum time to wait.

    • period: number = DEFAULT_WAIT_PERIOD_MS

      The time interval to check the status.

    Returns Promise<OperationStatus>

    The status of the operation or NotFound if the timeout is reached.

  • Waits for the block containing the operation to be final.

    Parameters

    • Optional timeout: number

      The maximum time to wait.

    • Optional period: number

      The time interval to check the status.

    Returns Promise<OperationStatus>

    The status of the operation or NotFound if the timeout is reached.

  • Waits for the operation to be included in a block.

    Parameters

    • Optional timeout: number

      The maximum time to wait.

    • Optional period: number

      The time interval to check the status.

    Returns Promise<OperationStatus>

    The status of the operation or NotFound if the timeout is reached.