@owlmeans/did
v0.1.11
Published
Hierarchical deterministic (HD) wallet and DID document management for OwlMeans identity.
Readme
@owlmeans/did
Hierarchical deterministic (HD) wallet and DID document management for OwlMeans identity.
Overview
makeWallet()creates a DID wallet from a persistent store, generating a master key on first use- Wallets derive child keys by path (entity, profile, service) using BIP39 mnemonics
- The
owlmkkey type is a custom HD key scheme on top of ED25519 - Used by
@owlmeans/client-didand@owlmeans/server-authfor identity management
Installation
bun add @owlmeans/didUsage
Create or load a wallet from a persistent store:
import { makeWallet } from '@owlmeans/did'
import type { DIDStore } from '@owlmeans/did'
const wallet = await makeWallet(store)
// Derive a key for a specific entity
const key = await wallet.key({ entityId: 'entity-abc' })
const address = key.model.exportAddress()API
makeWallet(store, opts?): Promise<DIDWallet>
Creates a wallet backed by the given DIDStore. Generates a master key on first call unless opts.allowEmpty is true.
DIDWallet
key(meta): Promise<DIDKeyModel>— derive a key for the given metadata pathmnemonic(): string— export the wallet mnemonic phraserestore(mnemonic)— restore the wallet from a mnemonic
DIDKeyModel
model: KeyPairModel— the underlying@owlmeans/basic-keysmodelmeta: KeyMeta— path metadata for this key
KEY_OWL
The default key type identifier: 'owlmk'.
Related Packages
@owlmeans/basic-keys—KeyPairModelused internally for signing/verification@owlmeans/client-did— client-side DID wallet service@owlmeans/server-auth— server-side auth using DID keys
Agent guidance
This package ships embedded Claude Code skills and GitHub Copilot instructions under
agent-meta/. After installing your @owlmeans/* packages, run the OwlMeans
agent-skills installer to place them into your project's native locations
(.claude/skills/ and .github/instructions/):
npx @owlmeans/agent-skillsThe embedded files are version-matched to this package release. Do not edit them directly — they are regenerated on each publish. To contribute guidance edits, open a PR against the source monorepo.
