trust-os-sdk
v1.0.4
Published
Minimal JavaScript SDK for the Trust OS Decision Verification API
Maintainers
Readme
Trust OS SDK
Minimal JavaScript SDK for the Trust OS Decision Verification API.
Trust OS is a verification layer for decisions before execution.
It helps applications verify high-impact decisions before they are executed, especially in finance, stablecoin payments, AI agents, and compliance workflows.
Installation
npm install trust-os-sdkDemo
https://demo.trust-os.io
Production API
https://trustos-core-gateway-v2-7jm9owrs.an.gateway.devQuick Start
const { TrustOSClient } = require("trust-os-sdk");
const client = new TrustOSClient({
baseUrl: "https://trustos-core-gateway-v2-7jm9owrs.an.gateway.dev",
apiKey: "YOUR_API_KEY"
});
(async () => {
const result = await client.verifyDecision({
user_id: "test_user",
action: "transfer",
amount: 50000,
currency: "JPY",
destination: "wallet_xyz"
});
console.log(result);
})();Response Example
{
"decision_id": "dec_xxx",
"recommendation": "ALLOW",
"risk_score": 0.19,
"risk_level": "LOW",
"policy": "Payment Approval Policy v1.0",
"proof_hash": "abc123...",
"latency_ms": 1
}API Key
All requests require an API key.
Pass it with the x-api-key header.
x-api-key: YOUR_API_KEYSDK Usage
verifyDecision()
await client.verifyDecision({
user_id: "user_123",
action: "transfer",
amount: 500000,
currency: "USD",
destination: "wallet_abc"
});verify()
Alias for verifyDecision().
await client.verify(payload);Endpoint
POST /v1/decision/verifyWhat Trust OS Returns
Trust OS returns a verifiable decision response including:
- decision ID
- recommendation
- risk score
- risk level
- policy reference
- proof hash
- latency
Positioning
Most systems execute first and explain later.
Trust OS flips that model:
Verify before execution.It is not monitoring after the fact.
It is a decision verification layer before execution.
Use Cases
- Stablecoin payment approval
- AML decision traceability
- AI agent action verification
- Risk-based workflow approval
- Compliance and audit evidence
- Financial decision infrastructure
Notes
This SDK is intentionally minimal.
Internal scoring logic and verification logic are not exposed.
The SDK provides a clean interface to the production Trust OS API.
Links
- Demo: https://demo.trust-os.io
- npm: https://www.npmjs.com/package/trust-os-sdk
- GitHub: https://github.com/trustos-trustfolio/trustos-sdk
