Skip to content

@lelantos-org/sdk / advanced / scanNotes

Function: scanNotes() ​

ts
function scanNotes(
   J, 
   P, 
   ivk, 
   inputs, 
   stats?
): ScanHit[];

Defined in: @lelantos-org/sdk/dist/sync/scan.d.ts:84

Trial-decrypt inputs with ivk; return the non-zero-value notes whose ChaCha tag verifies, whose plaintext decodes, and whose commitment, ephemeral key and clue are the ones the plaintext determines.

stats, when passed, is mutated in place.

Parameters ​

ParameterType
JJubjub
PPoseidon
ivkbigint
inputsScanInput[]
stats?ScanStats

Returns ​

ScanHit[]

Throws ​

when ivk is not canonical or its FMD root secret is zero mod q.

Throws ​

when a ciphertext is shorter than its clue-bits prefix.