API
| Function | Signature |
|---|---|
from | (input) => Effect<StateRootType, InvalidLengthError> |
empty | () => StateRootType (32 zero bytes) |
StateRootSchema | Accepts string, Uint8Array, bigint, number |
32-byte hash representing blockchain state trie root
import { StateRoot } from 'voltaire-effect'
import { Effect } from 'effect'
// From various inputs
const root = yield* StateRoot.from('0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421')
const fromBytes = yield* StateRoot.from(new Uint8Array(32))
const fromBigInt = yield* StateRoot.from(0n)
// Empty root (all zeros)
const emptyRoot = StateRoot.empty()
| Function | Signature |
|---|---|
from | (input) => Effect<StateRootType, InvalidLengthError> |
empty | () => StateRootType (32 zero bytes) |
StateRootSchema | Accepts string, Uint8Array, bigint, number |