@lelantos-org/sdk / primitives / ownsAddress
Function: ownsAddress()
ts
function ownsAddress(
P,
J,
ivk,
a
): boolean;Defined in: @lelantos-org/sdk/dist/keys/diversified.d.ts:45
Whether a is the address of ivk at diversifier a.d: pk, pk_d and ck_d all equal the keys ivk derives for a.d.
A note sent to the address is committed under pk, encrypted to pk_d and flagged under ck_d; the account receives it only when all three are its own. A d outside [0, 2^128) belongs to no address and yields false.
Parameters
| Parameter | Type |
|---|---|
P | Poseidon |
J | Jubjub |
ivk | bigint |
a | Pick<DiversifiedKeys, "d" | "pk" | "pk_d" | "ck_d"> |
Returns
boolean
Throws
when ivk is not canonical, or ivk mod q or dk_root is zero.