Skip to content

deriveNEARChildViewingKey()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / deriveNEARChildViewingKey

deriveNEARChildViewingKey(parentKey, childPath, label?): NEARViewingKey

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18860

Derive a child viewing key for hierarchical key management

Uses HMAC-SHA256 with the parent key and child path to derive a new independent viewing key.

NEARViewingKey

The parent viewing key

string

A path string for derivation (e.g., “audit/2024”)

string

Optional label for the child key

NEARViewingKey

The derived child viewing key

const auditKey = deriveNEARChildViewingKey(masterKey, 'audit/2024', 'Audit 2024')
const accountingKey = deriveNEARChildViewingKey(masterKey, 'accounting', 'Accounting')