DocumentEngine
All history methods include rejected outcomes. Verification checks the complete hash chain.
Type Parameters
Section titled “Type Parameters”E extends EditEnvelope
Methods
Section titled “Methods”apply()
Section titled “apply()”apply(
record):boolean
Parameters
Section titled “Parameters”record
Section titled “record”Confirmation<E>
Returns
Section titled “Returns”boolean
applyBatch()
Section titled “applyBatch()”applyBatch(
records):boolean
Applies the valid prefix and publishes its projection once, including on failure.
Parameters
Section titled “Parameters”records
Section titled “records”readonly Confirmation<E>[]
Returns
Section titled “Returns”boolean
checkpoint()
Section titled “checkpoint()”checkpoint():
Checkpoint
Returns
Section titled “Returns”exportHistory()
Section titled “exportHistory()”exportHistory(
from): readonlyConfirmation<E>[] |undefined
Parameters
Section titled “Parameters”Returns
Section titled “Returns”readonly Confirmation<E>[] | undefined
install()
Section titled “install()”install(
history,recovered?):void
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<E>[]
recovered?
Section titled “recovered?”readonly E[]
Returns
Section titled “Returns”void
outcome()
Section titled “outcome()”outcome(
id):Outcome|undefined
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Outcome | undefined
sequence()
Section titled “sequence()”sequence(
edit,rejection?):Confirmation<E>
Parameters
Section titled “Parameters”E
rejection?
Section titled “rejection?”string
Returns
Section titled “Returns”Confirmation<E>
sequenceBatch()
Section titled “sequenceBatch()”sequenceBatch(
edits): readonlyConfirmation<E>[]
Parameters
Section titled “Parameters”readonly object[]
Returns
Section titled “Returns”readonly Confirmation<E>[]
uniquePending()
Section titled “uniquePending()”uniquePending(
history): readonlyE[]
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<E>[]
Returns
Section titled “Returns”readonly E[]
verify()
Section titled “verify()”verify(
history,tip):boolean
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<E>[]
Returns
Section titled “Returns”boolean