NativeMerkleApi class

MerkleApi backed by a native (FFI/platform) implementation.

Implemented types

Constructors

NativeMerkleApi(BuMerkleApi api)
Creates a native Merkle backend over api.
const

Properties

api → BuMerkleApi
Underlying connector backend (Rust frontier-model Merkle core).
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkpoint(int id, int checkpointId) → void
Snapshots context id under checkpointId; throws CryptoException on native failure.
override
closeContext(int id) → void
Drops context id; throws CryptoException on native failure.
override
createContext() → int
Creates an empty wallet context and returns its id; throws CryptoException on native failure, including backend refusal (id 0).
override
createWitness(int id, {required int kind, required int checkpointId, required List<int> positions}) → BuMerkleWitness
Witnesses positions at checkpointId for kind in context id and returns the witness; throws CryptoException on native failure.
override
getContext(int id) → BuBytes
Exports context id as a restorable blob; throws CryptoException on native failure.
override
insertChainState(int id, {required List<int> blob}) → void
Restores context id from exported blob; throws CryptoException on native failure.
override
mergeState(int id, {required int kind, required List<int> blob}) → void
Merges exported blob into tree kind in context id; throws CryptoException on native failure.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
updateState(int id, {required int kind, required List<int> leaves}) → void
Appends leaves (len/32) to tree kind in context id; throws CryptoException on native failure.
override
updateSubtree(int id, {required int kind, required int start, required List<int> root32}) → void
Absorbs level-16 subtree root32 at start for kind in context id; throws CryptoException on native failure.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited