deriveNEARChildViewingKey()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / deriveNEARChildViewingKey
Function: deriveNEARChildViewingKey()
Section titled “Function: 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.
Parameters
Section titled “Parameters”parentKey
Section titled “parentKey”The parent viewing key
childPath
Section titled “childPath”string
A path string for derivation (e.g., “audit/2024”)
label?
Section titled “label?”string
Optional label for the child key
Returns
Section titled “Returns”The derived child viewing key
Example
Section titled “Example”const auditKey = deriveNEARChildViewingKey(masterKey, 'audit/2024', 'Audit 2024')const accountingKey = deriveNEARChildViewingKey(masterKey, 'accounting', 'Accounting')