Official JavaScript SDK for the Trust OS Decision Verification API.
Trust OS is a Decision Verification Platform that helps organizations verify high-impact decisions before execution.
- Decision verification
- Risk evaluation
- Policy enforcement
- Auditability
- Explainability
- API-first integration
- Simple API client
- TypeScript support
- Promise-based API
- Error handling
npm install @trust-os-sdk/trust-os-sdkconst { TrustOSClient } = require("@trust-os-sdk/trust-os-sdk");
const client = new TrustOSClient({
apiKey: process.env.TRUST_OS_API_KEY
});
const result = await client.verifyDecision({
action: "stablecoin_transfer",
amount: 50000,
currency: "USDC",
destination: "wallet_abc"
});
console.log(result.recommendation); // APPROVE | REVIEW | DENYAPI keys are provisioned by invitation. Request early access at trust-os.io.
Submit a decision for verification. Returns a recommendation and risk assessment.
const result = await client.verifyDecision({
action: "stablecoin_transfer",
amount: 50000,
currency: "USDC",
destination: "wallet_abc"
});Alias for verifyDecision().
try {
const result = await client.verifyDecision(payload);
} catch (err) {
console.error(err.message); // "HTTP 401: Unauthorized"
console.error(err.status); // 401
console.error(err.body); // parsed response body (if available)
}Requests time out after 10 seconds by default. Configure with timeout:
const client = new TrustOSClient({
apiKey: process.env.TRUST_OS_API_KEY,
timeout: 5000
});examples/basic.js— minimal integrationexamples/stablecoin-payment.js— stablecoin transferexamples/ai-agent-action.js— AI agent action gateexamples/dao-treasury.js— DAO treasury disbursement
TRUST_OS_API_KEY=your_key node examples/basic.js- Website: https://trust-os.io
- Developer Docs: https://trust-os.io/docs
- OpenAPI: https://trust-os.io/openapi.json
MIT