Skip to content

@lelantos-org/sdk / x402 / deriveEphemeralKey

Function: deriveEphemeralKey() โ€‹

ts
function deriveEphemeralKey(nsk, index): `0x${string}`;

Defined in: @lelantos-org/sdk/dist/x402/ephemeral.d.ts:23

keccak256(domainTag โ€– nsk_le โ€– u32le(index)) reduced into [1, n-1].

Deterministic: the same wallet and index always yield the same key, so a top-up sent to index is still spendable after a restart.

Parameters โ€‹

ParameterTypeDescription
nskbigintNullifier spending key โ€” wallet.keys.nsk.
indexnumberPayer slot. Distinct indices are unlinkable to each other.

Returns โ€‹

`0x${string}`

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub