hexora-scan
v1.0.6
Published
Official Hexora Scan SDK and CLI for the Hexora security API
Downloads
1,004
Maintainers
Readme
hexora-scan
Official Hexora Scan SDK and CLI for the Hexora security API.
Install
npm install hexora-scanProduction setup
Set the API base URL and your tenant key before using protected endpoints:
export HEXORA_API_BASE_URL="https://api.hexora.ai"
export HEXORA_API_KEY="hk_..."SDK
import { createHexoraClient } from "hexora-scan";
const client = createHexoraClient({
baseUrl: "https://api.hexora.ai",
apiKey: process.env.HEXORA_API_KEY,
});
const status = await client.getScannerStatus({ chain: "ethereum" });
const report = await client.runScan({
chain: "ethereum",
contractAddress: "0x1234567890abcdef1234567890abcdef12345678",
mode: "deep",
fork: "auto",
});API key management is also available from the SDK:
const keys = await client.listApiKeys();
const created = await client.createApiKey({ label: "ci-production" });
await client.revokeApiKey(created.id);CLI
npx hexora-scan health --base-url https://api.hexora.ai
npx hexora-scan status --chain ethereum --api-key hk_...
npx hexora-scan scan 0x1234567890abcdef1234567890abcdef12345678 --chain ethereum --mode deep --api-key hk_...
npx hexora-scan scan 0x1234567890abcdef1234567890abcdef12345678 --chain ethereum --mode deep --json --api-key hk_...
npx hexora-scan keys list --api-key hk_...
npx hexora-scan keys create --label ci-production --api-key hk_...
npx hexora-scan keys revoke 2c1b9a1e-0000-0000-0000-000000000000 --api-key hk_...By default, scan prints short real-time terminal logs plus a final human summary. Use --json for newline-delimited machine-readable events.
Tenant bootstrap
For first provisioning, create a tenant from the admin API and store the returned apiKey securely:
curl -X POST https://api.hexora.ai/api/admin/tenants \
-H "content-type: application/json" \
-H "x-admin-token: $HEXORA_ADMIN_TOKEN" \
-d '{"name":"Acme Security","slug":"acme-security","plan":"pro"}'After that, use the returned tenant key in the SDK, CLI, CI or scripts through HEXORA_API_KEY.
