Skip to content

@lelantos-org/sdk / primitives / verifyPath

Function: verifyPath() ​

ts
function verifyPath(
   P, 
   leaf, 
   pathElements, 
   pathIndices, 
   isKnownRootOnChain
): Promise<PathCheck>;

Defined in: @lelantos-org/sdk/dist/crypto/path.d.ts:24

Check a path against the set of roots the chain accepts. Returns the computed root alongside the verdict so a rejection is diagnosable.

Parameters ​

ParameterType
PPoseidon
leafbigint
pathElementsbigint[][]
pathIndicesnumber[]
isKnownRootOnChainIsKnownRoot

Returns ​

Promise<PathCheck>