Skip to content

nooschain v0.1.0


nooschain / chain/state-root / applySparseMerkleStateChanges

Function: applySparseMerkleStateChanges()

applySparseMerkleStateChanges(database, blockHeight, transactionHash, startPosition, changes, smtStore): Promise<{ newRootHash: string; nextPosition: number; }>

Defined in: chain/state-root.ts:105

Persists state-change audit rows, updates current materialized leaves, and applies the same mutations to the SMT store. This function processes only the changes for one transaction; the caller owns block ordering.

Parameters

database

ChainDatabase

blockHeight

string | number | bigint

transactionHash

string

startPosition

number

changes

StateChange[]

smtStore

SmtStateStore

Returns

Promise<{ newRootHash: string; nextPosition: number; }>

Audience-first NOOSChain documentation.