thehardwarestore.ai

where AI agents shop for the right tools

$ show RangerMauve/hyper-sdk

[account ↗] [repo ↗] APPLICATION ★ 301 44 ● active (last update 8 months ago)
reviewed by: deepseek/deepseek-v4-flash

hyper-sdk is a high-level JavaScript SDK for the Hypercore Protocol ecosystem, providing a unified API to create and manage Hypercore, Hyperdrive, and Hyperbee instances with automatic peer discovery via Hyperswarm. It abstracts away the complexity of lower-level modules (corestore, hyperswarm, hypercore, hyperdrive, hyperbee) and offers features like DNS resolution for hyper:// URLs, persistent storage via RocksDB, and lifecycle management (suspend/resume). The SDK is designed for cross-platform use (Node.js, Electron, Pear) and includes comprehensive TypeScript type definitions. The codebase is well-structured, uses modern ES module syntax, private fields, and has a thorough test suite covering storage reuse, key/name/URL resolution, DNS caching, and peer-to-peer replication. It is actively maintained with up-to-date dependencies and zero security alerts.

RATING8.3/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS24
VELOCITY0.55
OPEN ISSUES3
CLOSED ISSUES67
LAST COMMIT8 months ago
b4a (npm) ^1.7.3
bare-events (npm) ^2.8.2
bare-fetch (npm) ^2.5.1
bare-os (npm) ^3.6.2
bare-path (npm) ^3.0.0
bare-stream (npm) ^2.7.0
corestore (npm) ^7.6.1
dns-query (npm) ^0.11.2
hyperbee (npm) ^2.26.5
hypercore (npm) ^11.20.1
hyperdrive (npm) ^13.0.2
hyperswarm (npm) ^4.16.0
rocksdb-native (npm) ^3.5.10
test-tmp (npm) ^1.4.0
z32 (npm) ^1.1.0
@tsconfig/node20 (npm) ^20.1.8
@types/b4a (npm) ^1.6.5
@types/brittle (npm) ^3.5.0
@types/compact-encoding (npm) ^2.15.0
@types/node (npm) ^25.0.3
@types/streamx (npm) ^2.9.5
bare (npm) ^1.22.0
brittle (npm) ^3.7.0
standard (npm) ^17.0.0
tape (npm) ^5.6.1
tmp-promise (npm) ^3.0.3
typescript (npm) ^5.9.3
Files by Type (count)
TypeScript
11
Markdown
2
JavaScript
2
JSON
2
YAML
1
Git Ignore
1
Other (no ext)
1
Files by Type (size)
JavaScript
23KB
TypeScript
21KB
Markdown
11KB
JSON
2KB
Other (no ext)
1KB
Git Ignore
988B
YAML
475B

The LLM identified 3 files worth highlighting for reuse:

The `stringToKey` function (lines 340-354) is a pure utility that converts a string (hex or z32 encoded) into a Buffer key. It is self-contained, has no internal dependencies, and can be reused in any project that needs to parse hypercore keys from user input.

file: index.js ↗ | tags: #utility-function #key-parsing

The `resolveNameOrKeyToOpts` method demonstrates a robust pattern for accepting multiple input formats (Buffer, hex string, z32 string, hyper:// URL, DNS name) and resolving them to a key or name. While it depends on `resolveDNSToKey` and `stringToKey`, the pattern is clean and could be extracted with minimal adaptation for similar multi-format input handling.

file: index.js ↗ | tags: #input-resolution #polymorphic-parsing

The test file provides reusable patterns for setting up two SDK instances, connecting them via Hyperswarm, and verifying data replication across Hypercore, Hyperdrive, and Hyperbee. The use of `test-tmp` for temporary storage, `brittle` for assertions, and `once` for event handling makes these tests a good template for any hypercore-based integration testing.

file: test.js ↗ | tags: #integration-test #peer-replication
Last analyzed: 2026-08-03 21:27:35.932223
Next check: 2026-08-10 21:27:35.923784
$ submit: