Catalog npm
PACKAGE EXPLORERView in registry

@0xdivyanshh/tab-sdk

npm

Client for the Tab gateway: agent credit on Hedera. Ten verbs, two of which spend.

Versions collected2
Direct dependencies3From release 0.1.1
Last observed20 Oct, 23:05 UTC

README

Current package documentation

@0xdivyanshh/tab-sdk

Tier 3 · PUBLISHED to npm · thin HTTP client · browser-safe

The TypeScript client every other surface is built on: agentkit-plugin, mcp, cli, dashboard, and both demo agents.

Thin on purpose

boundaries.json forbids @hiero-ledger/sdk, ioredis and drizzle-orm here. This package speaks HTTP to the gateway and nothing else.

That constraint carries the product claim. The agent holds no key and signs nothing — so the library it installs should not even be able to sign. If the SDK bundled the Hedera SDK, the claim would rest on us not having used it. This way it rests on a check anyone can run.

Browser-safe matters too: apps/web imports this, and a browser bundle must not be able to reach a signing path or a database driver.

Surface

spend · quote · balance · ceiling · receipts · register

The same five verbs appear in the Agent Kit plugin and the MCP server. Define them once here.

Contents

FileHolds
src/client.tsconstructor, auth, retry, timeouts
src/spend.tsthe spend call, including the refusal shape
src/quote.tspre-flight quote without reserving
src/state.tsbalance, ceiling, available, pending holds, window countdown
src/receipts.tsreceipt history and the SSE stream the dashboard consumes
src/errors.tstyped errors — refusal, unavailable, invalid
src/types.tsre-exported from @0xdivyanshh/tab-protocol. One definition, not two

Invariants

  • A refusal is a value, not an exception. spend() returns a discriminated result carrying the rule that fired. Throwing on refusal pushes every consumer into try/catch and makes the Refusals view harder to build — and refusal is the demo, so it deserves a first-class type. Throw only for transport and protocol failures.
  • Amounts cross the wire as decimal strings, parsed to MicroUsdc on the way in. bigint does not survive JSON.stringify.
  • Types are re-exported from @0xdivyanshh/tab-protocol, never redefined. A second copy will drift.
  • Retries are safe. spend carries an idempotency key so a network retry cannot double-spend.
  • No key material in the constructor. If the SDK ever accepts a private key, the whole claim is gone.

Publishing

Versioned with changesets. Once an agent depends on this, breaking changes cost someone a redeploy — so treat exports as a contract from the first release.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1Registry latest13 Sept 20263
0.1.013 Sept 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0xnerd100/tab

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:05 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d42427ab9e053b284075b614f9f0e5d96af66f6788cc1678879e9a3c321f843b