Skip to content

AuditorKeyDerivation

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / 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.

new AuditorKeyDerivation(): AuditorKeyDerivation

AuditorKeyDerivation

readonly static COIN_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.


readonly static PURPOSE: 44 = 44

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7520

BIP-44 purpose field

static derivePath(auditorType, account?): string

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7541

Generate BIP-44 derivation path

AuditorType

Type of auditor key

number

Account index (default: 0)

string

BIP-44 style path string

AuditorKeyDerivation.derivePath(AuditorType.REGULATORY)
// Returns: "m/44'/1234'/0'/1"
AuditorKeyDerivation.derivePath(AuditorType.TAX, 5)
// Returns: "m/44'/1234'/5'/3"

static deriveViewingKey(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:

  1. Derive master key from seed
  2. Harden purpose (44’)
  3. Harden coin type (1234’)
  4. Harden account index
  5. Derive auditor type (non-hardened)

DeriveViewingKeyParams

Derivation parameters

DerivedViewingKey

Derived viewing key with metadata

If parameters are invalid

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..."

static deriveMultiple(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.

DeriveMultipleParams

Derivation parameters

DerivedViewingKey[]

Array of derived viewing keys

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)

static getAuditorTypeName(auditorType): string

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7602

Get human-readable name for auditor type

AuditorType

Auditor type enum value

string

Friendly name string