Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExitOperation

Constructs and executes an exit from the root chain.

Hierarchy

  • ExitOperation

Index

Constructors

constructor

  • Constructs an ExitOperation.

    Parameters

    • contract: PlasmaContract

      An instance of the Plasma smart contract.

    • client: IRootClient

      An instance of the Plasma root node gRPC client.

    • from: string

      The address whose outpoints are to be exited.

    Returns ExitOperation

Methods

exit

  • exit(): Promise<void>
  • Performs the exit. Will throw an error if outpoint or committedFee aren't set.

    Performing an exit entails the following steps:

    1. Retrieving all transactions from the block referenced by outpoint.
    2. Generating a Merkle proof-of-inclusion for the exiting transaction.
    3. Starting the exit on the root chain.

    Returns Promise<void>

withCommittedFee

  • Sets the exit bond.

    Parameters

    • committedFee: BN

      The amount of the fee.

    Returns ExitOperation

withOutpoint

  • Sets the outpoint to be exited.

    Parameters

    Returns ExitOperation

Generated using TypeDoc