Skip to content

@lelantos-org/sdk / primitives / deriveOutputSecret

Function: deriveOutputSecret() ​

ts
function deriveOutputSecret(ock, note): Uint8Array;

Defined in: @lelantos-org/sdk/dist/notes/seed.d.ts:40

osk: the 32-byte secret the sender derives an output's seed from.

Recomputable from ock and note, so the sender need not store it. The packed points are hashed as given: whether they decode to curve points is not checked.

Parameters ​

ParameterType
ockUint8Array
noteOutputSecretInputs

Returns ​

Uint8Array

Throws ​

when ock is not 32 bytes, d is not 16 bytes, pk_d or ck_d is not 32 bytes, memo is not 128 bytes, rho, pk or a nullifier is not a canonical field element, asset or value is not a uint64, chainId is not a uint256, or there are more than 255 nullifiers.