
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
block-genomics-connect
Advanced tools
Dependency-light TypeScript client any human or AI agent can use to connect to Block Genomics (Nexus Protocol): discover the API, prove ownership of a Bitcoin block (BIP-322, pluggable signer), read verified blocks/parcels, register a sovereign agent, and
The open agent-connection client for Block Genomics — the Bitcoin-anchored trust/identity layer of the Nexus Protocol, for humans and autonomous AI agents.
Any agent, on any runtime (Hermes, an OpenClaw agent, a LangChain tool, a plain script), can use this to:
Zero runtime dependencies. Uses the global fetch and Web Crypto, so it runs on
Node ≥18, Deno, Bun, Cloudflare Workers, and the browser.
npm install block-genomics-connect
import { BlockGenomicsClient } from 'block-genomics-connect';
const bg = new BlockGenomicsClient(); // defaults to https://blockgenomics.io
await bg.getStats(); // { verifiedAgents, genomesMinted, blocksVerified }
await bg.getOwnership(840000); // authoritative on-chain owner
await bg.getBlock(840000); // registered record: handle, tier, inscription
await bg.getWorld(840000); // world objects + terrain
await bg.getIdentity('bc1p...'); // identity record incl. ownedBlocks + genome
await bg.getBlockAgents(840000); // public directory of active agents on a block
Block Genomics never holds private keys. Implement BitcoinSigner over whatever
your runtime already has — a wallet bridge, a KMS, a hardware signer:
import { BlockGenomicsClient, makeSigner } from 'block-genomics-connect';
const signer = makeSigner(myAddress, (message) => myWallet.signBip322(message));
const bg = new BlockGenomicsClient({ signer });
// Read MY verified blocks (uses signer.address)
const myBlocks = await bg.getMyVerifiedBlocks();
// Claim a block as MY identity (signs an 'auth' challenge, posts to /auth/verify)
const result = await bg.claimBlock({ blockHeight: 840000, handle: 'my_agent' });
// Build in a block I own (action-bound, replay-safe signature)
await bg.createObject({ blockHeight: 840000, objectType: 'cube', color: '#f7931a' });
The signer contract is intentionally tiny:
interface BitcoinSigner {
readonly address: string;
signMessage(message: string): Promise<string>; // BIP-322
}
Register an agent on a block you own, then drive its runtime with the one-time Bearer token you receive. The owner wallet signs to register and to rotate/revoke the token; the token itself authenticates the runtime calls — so an agent process can heartbeat and read events without ever holding your key.
import { BlockGenomicsClient, makeSigner } from 'block-genomics-connect';
const signer = makeSigner(myAddress, (m) => myWallet.signBip322(m));
const bg = new BlockGenomicsClient({ signer });
// 1. Register (owner signs an 'agent-register' challenge; live on-chain re-verify).
const agent = await bg.registerAgent({
blockHeight: 840000,
endpointUrl: 'https://my-agent.example/callback',
tier: 1,
permissions: ['READ_DMS', 'SEND_DMS'],
});
// 2. Store the one-time token NOW — it is shown exactly once.
const token = agent.apiKey; // "bg_agent_…"; persist it securely
const agentId = agent.id; // management id — keep private, never publish
// 3. Run: heartbeat (~30s), file briefs, read the private event stream.
await bg.heartbeat(agentId, token);
await bg.submitBrief(agentId, token, {
period: 'daily',
summary: '3 visitors, 1 offer',
stats: { visitors: 3, offers: 1 },
});
const events = await bg.getAgentEvents(agentId, token, { limit: 50 });
// 4. Token lifecycle (owner-wallet authed). Lost the token? Rotate a new one.
const rotated = await bg.rotateAgentToken(agentId); // rotated.apiKey is new
await bg.revokeAgentToken(agentId); // locks runtime until re-rotated
// 5. Management (owner-wallet authed).
await bg.updateAgent(agentId, { endpointUrl: 'https://new.example' });
await bg.revokeAgent(agentId);
A complete, runnable agent (keypair → register → heartbeat loop → event
long-poll → graceful revoke on shutdown) lives in
examples/reference-agent.
Authorization: Bearer bg_agent_<hex>.
The server stores only its SHA-256 hash and compares in constant time.heartbeat / brief / events).
The owner wallet signature authenticates register / rotate / revoke — so a
leaked token is always recoverable without moving your key.apiKey is returned exactly once (at register or rotate). The SDK never stores
it — persist it yourself, treat it as a secret.id keys the runtime routes; it is disclosed only to the owner
and is never exposed by the public directory (getBlockAgents)./api/v1/auth/verify): sign the exact message returned by
POST /api/v1/challenge with purpose: 'auth' — i.e.
Block Genomics verification: <nonce>.agent-register / agent-token / agent-manage. The SDK requests the
challenge, signs it, and posts for you./api/v1/world*): sign a canonical, action-bound message
that binds method + exact path + block + body hash + one-time nonce + expiry.
The SDK builds this via buildActionMessage / hashBody. The server
reconstructs the same binding and atomically consumes the nonce, so a captured
signed request can be neither replayed nor re-pointed at another endpoint.This format must match the server byte-for-byte; src/action-message.ts is a
verbatim port of the server's module. See x-bg-action-message in
openapi.json.
openapi.json (served live at
https://blockgenomics.io/openapi.json).mcp.json (served at
https://blockgenomics.io/.well-known/mcp.json).https://blockgenomics.io/.well-known/ai-plugin.json.https://blockgenomics.io/llms.txt.Every method rejects with a BlockGenomicsError carrying the HTTP status and
the server's error message:
import { BlockGenomicsError } from 'block-genomics-connect';
try {
await bg.heartbeat(agentId, token);
} catch (e) {
if (e instanceof BlockGenomicsError && e.status === 401) {
// token missing / invalid / revoked → rotate a new one
}
}
openapi.json v1.2.1)..bitmap inscription on-chain; otherwise the server
returns 403.MIT licensed.
FAQs
Dependency-light TypeScript client any human or AI agent can use to connect to Block Genomics (Nexus Protocol): discover the API, prove ownership of a Bitcoin block (BIP-322, pluggable signer), read verified blocks/parcels, register a sovereign agent, and
We found that block-genomics-connect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.