@bmaxi/sdk
v0.1.0
Published
Official BMAXI SDK — AI agent trust scoring, certification, and compliance
Maintainers
Readme
@bmaxi/sdk
Official BMAXI SDK for AI agent trust scoring, certification, and EU AI Act compliance.
npm install @bmaxi/sdkQuick start
import { audit } from "@bmaxi/sdk";
const result = await audit("0xYourAgentAddress");
if (result.risk_level === "high") {
throw new Error(`Agent blocked: score ${result.trust_score}/100`);
}BmaxiClient
import { BmaxiClient } from "@bmaxi/sdk";
const bmaxi = new BmaxiClient({ apiKey: process.env.BMAXI_API_KEY });
// Audit — free, no auth needed
const audit = await bmaxi.audit("0xAddress");
// Verify on-chain certificate
const cert = await bmaxi.verify("0xAddress");
// Certify with x402 payment flow
const step1 = await bmaxi.certify("0xAddress");
if (step1.status === 402) {
// Pay via Lightning (step1.invoice) or USDC
const proof = "payment_hash_or_tx_hash";
const step2 = await bmaxi.certify("0xAddress", proof);
// step2.data.certificate — on-chain proof
}withBmaxi wrapper
import { withBmaxi } from "@bmaxi/sdk";
const safeRun = withBmaxi(
myAgentFn,
(args) => args.walletAddress,
{ blockOnRisk: "high" }
);
await safeRun({ walletAddress: "0x...", task: "..." });