HistoryManager is a wrapper around HistoryDB that provides easy access to specific historical data.
HistoryManager handles things like generating history proofs, creating inclusion proofs, and inserting historical state updates.
HistoryDB to avoid coupling the underlying data storage with more complex queries.
async function getHistoryProof( start: number, end: number, startBlock: number, endBlock: number, plasmaContract: string ): Promise<HistoryProof>
Generates a proof for the history of a given range of state objects. Only returns the history for a specified block range so that a user with a known state doesn’t need to receive a significant amount of duplicate information.
number: Start of the range of state objects to query.
number: End of the range of state objects to query.
number: Block number to start querying history from.
number: Block number to query history to.
string: Address of the specific plasma contract to query.
function getInclusionProof( stateUpdate: StateUpdate ): Promise<InclusionProof>
Generates an inclusion proof for a given state update. Creates a proof for both the upper-level address tree and the lower-level state tree. Will throw an error if the client does not have enough information to generate the proof.
StateUpdateobject to generate an inclusion proof for.