AccessKeyManager

class AccessKeyManager(hdWallet: HDWallet, accountIndex: Int = DEFAULT_ACCOUNT_INDEX)

Manages secp256k1 access keys derived from the HD wallet.

Access keys are the bridge between P-256 passkeys and Midnight's secp256k1 signing. The passkey can't sign Midnight transactions (wrong curve), so the access key does it. The passkey authorizes the access key via KeyAuthorization.

Derivation path: m/44'/2400'/account'/5/index

  • Role 5 = IDENTITY (Kuira-specific, beyond the standard Midnight roles 0-4)

  • Index 0 = default access key

  • Index 1+ = per-dApp access keys (future)

Because the key is HD-derived, it's deterministically recoverable from the seed — no separate backup needed for the access key itself.

Constructors

Link copied to clipboard
constructor(hdWallet: HDWallet, accountIndex: Int = DEFAULT_ACCOUNT_INDEX)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Derives an access key at a specific index.

Link copied to clipboard

Derives the default access key at index 0.