global-intel-exchange-sdk
v0.1.0
Published
TypeScript client for the Global Intelligence Exchange x402 M2M API — real-time US sanctions list screening, NIST CVE lookups, and SEC/Companies House registry checks for autonomous agents.
Maintainers
Readme
global-intel-exchange-sdk
TypeScript/JavaScript client for the Global Intelligence Exchange x402 M2M
API. Zero runtime dependencies — just fetch.
Install
npm install global-intel-exchange-sdkUsage
import { IntelligenceExchangeClient } from "global-intel-exchange-sdk";
const client = new IntelligenceExchangeClient({
baseUrl: "https://your-deployment.example.com",
});
const result = await client.query({
type: "compliance",
query: "Example Trading Co",
paymentHash: "0x...",
machineSignature: "0x...",
paymentValueEth: 0.01,
});
if (result.dataSource !== "LIVE_VERIFIED") {
console.warn("This was an AI estimate, not a real registry check:", result.sourceDetail);
}
console.log(result.data);Checking the compliance audit trail
const chain = await client.verifyComplianceAuditChain();
if (!chain.valid) {
throw new Error(`Audit chain integrity broken at index ${chain.brokenAtIndex}`);
}
const record = await client.getComplianceAuditRecord(result.transactionId!);
console.log(record.recordHash);Error handling
Network errors and 5xx responses throw IntelligenceExchangeClientError
(with .status and .body). 4xx application-level responses (e.g.
status: "payment_required" or "unprofitable") are returned normally as a
QueryResponse — check .status rather than relying on a thrown error for
those, since they're expected outcomes, not failures.
See also
../../docs/API_REFERENCE.md— full endpoint reference../../docs/DATA_SOURCES.md— whatdataSourceactually means per vector../../docs/COMPLIANCE_AUDIT.md— the audit hash-chain model
