Skip to content

@lelantos-org/sdk / primitives / addressFromViewingKey

Function: addressFromViewingKey() ​

ts
function addressFromViewingKey(
   P, 
   J, 
   vk, 
   index?
): ShieldedAddress;

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

The address of a viewing key at diversifier index: d || pk_d || pk || ck_d, each a function of ivk and index. Index 0 is the account's default address. Lets a caller check a key against a stated address.

Parameters ​

ParameterType
PPoseidon
JJubjub
vkViewingKey
index?number

Returns ​

ShieldedAddress

Throws ​

when index is not an integer in [0, 2^32).