HB-Auth
Keys stay where they belong.
Open-source, browser-based authentication for Hive. Private keys never leave the WebWorker — encrypted, isolated, secure.
npm install @hiveio/hb-auth
Built for security-first applications
Enterprise-grade authentication primitives that keep private keys where they belong — on the user's device.
Zero Key Exposure
The core security model. Private keys never leave the WebWorker — encrypted by Beekeeper WASM, fully isolated from main thread. Your app cannot access them.
Wax SDK + TypeScript
Drop-in signer provider for @hiveio/wax with strict types and full autocomplete out of the box.
import { HBAuthProvider } from '@hiveio/signers-hb-auth';
// Full TypeScript definitions & autocomplete
const signer: IOnlineSignerProvider =
HBAuthProvider.for(
client, 'username', 'posting'
);
// Type-safe transaction building
const tx = await chain.createTransaction();
tx.pushOperation({ vote: { ... } });
await tx.sign(signer); // Keys never leave Worker Session-Based Auth
One session synced across all tabs via SharedWorker. Survives page refresh. No repeated logins.
Role-Based Access
Granular key roles — posting, active, owner. Each operation uses the minimum authority required.
Built for Hive
Native Hive blockchain integration. On-chain verification when connected, local-only mode when offline.
Secure authentication in three steps
Install & Initialize
Install from npm. Create a chain instance and initialize the client. The WebWorker spins up automatically.
import { createHiveChain } from '@hiveio/wax';
import { OnlineClient } from '@hiveio/hb-auth';
const chain = await createHiveChain();
const client = new OnlineClient();
await client.initialize(chain); Register & Authenticate
Register your key once — it's encrypted and stored in IndexedDB. Authenticate with your password to start a session.
await client.register(
'username', 'password', wifKey, 'posting'
);
await client.authenticate(
'username', 'password', 'posting'
); Sign Transactions
Sign transactions directly or use the Wax SDK provider. Keys never leave the WebWorker context.
import { HBAuthProvider } from '@hiveio/signers-hb-auth';
const signer = HBAuthProvider.for(
client, 'username', 'posting'
);
// Use with wax transaction builder Security by isolation
Private keys are processed inside a WebWorker — completely isolated from your application code.
- OnlineClient
- OfflineClient
- HBAuthProvider
AuthWorker
Private Keys
Encrypted Store