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
idundercheckpointId; throwsCryptoExceptionon native failure.override -
closeContext(
int id) → void -
Drops context
id; throwsCryptoExceptionon native failure.override -
createContext(
) → int -
Creates an empty wallet context and returns its id; throws
CryptoExceptionon native failure, including backend refusal (id 0).override -
createWitness(
int id, {required int kind, required int checkpointId, required List< int> positions}) → BuMerkleWitness -
Witnesses
positionsatcheckpointIdforkindin contextidand returns the witness; throwsCryptoExceptionon native failure.override -
getContext(
int id) → BuBytes -
Exports context
idas a restorable blob; throwsCryptoExceptionon native failure.override -
insertChainState(
int id, {required List< int> blob}) → void -
Restores context
idfrom exportedblob; throwsCryptoExceptionon native failure.override -
mergeState(
int id, {required int kind, required List< int> blob}) → void -
Merges exported
blobinto treekindin contextid; throwsCryptoExceptionon 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 treekindin contextid; throwsCryptoExceptionon native failure.override -
updateSubtree(
int id, {required int kind, required int start, required List< int> root32}) → void -
Absorbs level-16 subtree
root32atstartforkindin contextid; throwsCryptoExceptionon native failure.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited