Constructs a new Plasma client. All options are required, but
privateKey
can be null. If you don't set a privateKey
, methods
that require it such as send
will throw an error.
See PlasmaOptions for the full list of supported options.
Accessor method for the Plasma smart contract. Use this to make smart contract calls directly.
Deposits funds into the Plasma smart contract. Pass the depositNonce
included as part of the returned the OnChainDeposit to send
to
spend the deposited funds.
Amount you'd like to deposit.
Accessor method for the root node's gRPC client. Use this to query balances, list UTXOs, and make other requests to the root node directly.
Sends funds.
Address to send funds to.
How much money to send.
A fee amount.
The deposit nonce you'd like to spend.
Starts exiting the provided value or outpoint. If a value is provided, the outpoint whose amount is closest but higher than the given value is chosen. For example, if you have two UTXOs with amount 1.5ETH and 2ETH and you call startExit with 1ETH, the 1.5ETH outpoint will be exited.
The bond parameter is used to to protect against double-spends. Your bond must be higher than the value of your outpoint. The value of the bond will be returned when the challenge period expires.
WARNING: You will forfeit your bond if you attempt to exit a spent outpoint.
The or outpoint to exit.
The bond to post guaranteeing this exit.
Generated using TypeDoc
Entrypoint to the Plasma client. Provides convenience methods for common functionality such as sending value.