Skip to content

@lelantos-org/sdk / primitives / buildViewingKey

Function: buildViewingKey() ​

ts
function buildViewingKey(P, ivk): ViewingKey;

Defined in: @lelantos-org/sdk/dist/keys/keys.d.ts:38

Build an incoming viewing key from ivk. dk is derived from it, so a serialized viewing key carries only the scalar.

Parameters ​

ParameterType
PPoseidon
ivkbigint

Returns ​

ViewingKey

Throws ​

when ivk or dk is zero mod q: every pk_d, respectively every ck_d, of the account would be the identity.