AuditorKeyDerivation
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / AuditorKeyDerivation
Class: AuditorKeyDerivation
Section titled “Class: AuditorKeyDerivation”Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7499
Auditor Key Derivation
Provides BIP-44 style hierarchical key derivation for auditor viewing keys.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AuditorKeyDerivation():
AuditorKeyDerivation
Returns
Section titled “Returns”AuditorKeyDerivation
Properties
Section titled “Properties”COIN_TYPE
Section titled “COIN_TYPE”
readonlystaticCOIN_TYPE:1234=1234
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7516
SIP Protocol coin type for BIP-44 derivation
This uses 1234 as SIP Protocol’s internal coin type identifier.
Registration Status: Not registered with SLIP-44
Why this is acceptable:
- SIP viewing keys are protocol-specific, not wallet-portable
- Keys derived here are for auditor access, not user funds
- SLIP-44 registration is for coin types that need hardware wallet support
Future consideration: If hardware wallet integration for SIP auditor keys is desired, submit a PR to https://github.com/satoshilabs/slips to register an official coin type. Current value (1234) is in the unregistered range.
PURPOSE
Section titled “PURPOSE”
readonlystaticPURPOSE:44=44
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7520
BIP-44 purpose field
Methods
Section titled “Methods”derivePath()
Section titled “derivePath()”
staticderivePath(auditorType,account?):string
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7541
Generate BIP-44 derivation path
Parameters
Section titled “Parameters”auditorType
Section titled “auditorType”Type of auditor key
account?
Section titled “account?”number
Account index (default: 0)
Returns
Section titled “Returns”string
BIP-44 style path string
Example
Section titled “Example”AuditorKeyDerivation.derivePath(AuditorType.REGULATORY)// Returns: "m/44'/1234'/0'/1"
AuditorKeyDerivation.derivePath(AuditorType.TAX, 5)// Returns: "m/44'/1234'/5'/3"deriveViewingKey()
Section titled “deriveViewingKey()”
staticderiveViewingKey(params):DerivedViewingKey
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7568
Derive a viewing key for an auditor
Uses BIP-32 style hierarchical deterministic key derivation:
- Derive master key from seed
- Harden purpose (44’)
- Harden coin type (1234’)
- Harden account index
- Derive auditor type (non-hardened)
Parameters
Section titled “Parameters”params
Section titled “params”Derivation parameters
Returns
Section titled “Returns”Derived viewing key with metadata
Throws
Section titled “Throws”If parameters are invalid
Example
Section titled “Example”const regulatoryKey = AuditorKeyDerivation.deriveViewingKey({ masterSeed: randomBytes(32), auditorType: AuditorType.REGULATORY,})
console.log(regulatoryKey.path) // "m/44'/1234'/0'/1"console.log(regulatoryKey.viewingKey.key) // "0x..."deriveMultiple()
Section titled “deriveMultiple()”
staticderiveMultiple(params):DerivedViewingKey[]
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7595
Derive multiple viewing keys at once
Efficiently derives keys for multiple auditor types from the same master seed. This is more efficient than calling deriveViewingKey multiple times as it reuses intermediate derivations.
Parameters
Section titled “Parameters”params
Section titled “params”Derivation parameters
Returns
Section titled “Returns”Array of derived viewing keys
Example
Section titled “Example”const keys = AuditorKeyDerivation.deriveMultiple({ masterSeed: randomBytes(32), auditorTypes: [ AuditorType.PRIMARY, AuditorType.REGULATORY, AuditorType.INTERNAL, ],})
// keys[0] -> PRIMARY key (m/44'/1234'/0'/0)// keys[1] -> REGULATORY key (m/44'/1234'/0'/1)// keys[2] -> INTERNAL key (m/44'/1234'/0'/2)getAuditorTypeName()
Section titled “getAuditorTypeName()”
staticgetAuditorTypeName(auditorType):string
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7602
Get human-readable name for auditor type
Parameters
Section titled “Parameters”auditorType
Section titled “auditorType”Auditor type enum value
Returns
Section titled “Returns”string
Friendly name string