Skip to main content

Getting started

KeyHold is a small protocol with a deliberate boundary: a password encrypts one secp256k1 private key, and the result is a portable JSON document. Start with the SDK that matches your application.

Install​

npm install keyhold

First operation​

The TypeScript SDK returns a promise for cryptographic work. The Go SDK returns an explicit error; both produce the same document format.

import {exportPrivateKey, recommendedParameters} from 'keyhold';

const document = await exportPrivateKey({
privateKey,
password: 'correct horse battery staple',
label: 'primary signing key',
parameters: recommendedParameters(),
});

Next, use the operation map to choose a capability, or follow the export and unlock workflow.