ScWasmRunBridge class

Concrete WASM bridge backed by wasm_run.

Uses wasmtime (native) or wasmi to execute sc.wasm for processing unsigned transactions with signing digests.

Construction:

final wasmBytes = await rootBundle.load('assets/sc.wasm');
final bridge = ScWasmRunBridge(wasmBytes.buffer.asUint8List());
final builder = ScTransactionBuilder(wasmBridge: bridge);
Inheritance

Constructors

ScWasmRunBridge(Uint8List _wasmBytes)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Release the underlying WASM instance resources. Call when the bridge is no longer needed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processJson(String jsonString) Future<String>
Platform-specific: pass the unsigned transaction JSON, call the WASM module, and return the result JSON string.
override
processUnsignedTransaction(ScUnsignedTransaction unsignedTx) Future<ScWasmResult>
inherited
toString() String
A string representation of this object.
inherited

Operators

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