🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@batpak/sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@batpak/sdk

One-install BatPAK TypeScript SDK: NETBAT/1 client, canonical codec, Effect schema bridge, and manifest-generated types.

latest
Source
npmnpm
Version
0.8.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@batpak/sdk

One-install TypeScript SDK for batpak, the embedded, tamper-evident event store. This package re-exports everything a client application needs to talk to a batpak host over the NETBAT/1 wire protocol:

  • @batpak/client — NETBAT/1 frame writer/reader with typed error codes, TCP transport included.
  • @batpak/canonical — named-field MessagePack codec, byte-for-byte identical to the Rust encoder (parity-tested in CI).
  • @batpak/generated — event types and Effect 4 schemas generated from the substrate-owned manifest.
  • @batpak/schema — runtime-validated decodeBytes/encodeBytes, plus bank.event() for authoring downstream-only TypeScript events.

Install

npm install @batpak/sdk

Use

import {
  call,
  decodeBytes,
  encodeBytes,
  encodeHex,
  BankCommitRequest,
  BANK_COMMIT,
} from "@batpak/sdk";

The reference host (hbat, in the main repository) exposes six core operations — system.heartbeat, bank.commit, event.get, event.query, receipt.verify, event.walk — plus four evidence.* report operations. Every payload round-trips through the same canonical bytes the Rust store hashes and signs, so receipts verified on one side hold on the other.

Why

batpak gives applications a tamper-evident, replayable record of what happened: every event is Blake3 hash-bound to its ancestor, every accepted write returns a verifiable (optionally Ed25519-signed) receipt, and derived views are rebuilt from the log by construction. This SDK brings that contract to TypeScript without weakening it: types and schemas are generated from the substrate manifest, never hand-maintained.

Full documentation, wire contract, and examples: github.com/heyoub/batpak.

License

MIT OR Apache-2.0.

FAQs

Package last updated on 10 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts