New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@blockrun/core

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockrun/core

Shared kernel for all BlockRun products — wallet, x402 payment, config, and the agent-native JSON output contract.

Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
4
-80.95%
Maintainers
2
Weekly downloads
 
Created
Source

@blockrun/core

Shared kernel for the BlockRun product family. One wallet, one output contract, one config — so every BlockRun tool (blockrun CLI, ClawRouter, Franklin, MCP, the SDKs, clawrouter-codex) reads the same ~/.blockrun wallet and speaks the same machine-readable envelope.

Install

npm install @blockrun/core

What's inside

Output contract (@blockrun/core/output)

Agent-native by construction — every command returns the same envelope:

import { ok, err, emit, render } from "@blockrun/core";

emit(ok({ address: "0x…" }, { cost: 0.003, chain: "base" })); // stdout, exit 0
emit(err("payment", "insufficient balance", 402));             // stderr, exit 1
// render(env, "json" | "pretty" | "table" | "ndjson" | "csv")

{"ok":true,"data":…,"meta":{…}} / {"ok":false,"error":{"type","code","message"}}

Wallet (@blockrun/core/wallet)

Single source of truth. Resolution order matches @blockrun/llm: env BLOCKRUN_WALLET_KEY | BASE_CHAIN_WALLET_KEY → ~/.blockrun/.session → legacy wallet.key.

import { loadWallet, resolvePrivateKey } from "@blockrun/core";
const w = loadWallet(); // { address, privateKey, source } | null  — key never leaves the machine

Config (@blockrun/core/config)

~/.blockrun path resolution (override with BLOCKRUN_HOME) and chain selection (resolveChain).

License

MIT

Keywords

blockrun

FAQs

Package last updated on 09 Jul 2026

Related posts