Scan your whole stack
From OX Research Newsroom
Are you using @athanor-trade/sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.1
@athanor-trade/sdk was last scanned on 30 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.1 LATEST | 30 Nov 2026 | No rules fired |
| 0.1.0 | 30 Nov 2026 | No rules fired |
| 0.0.0-stage | 30 Nov 2026 | Not shown |
Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The tenant API for a dealer's or a custodian's own systems: the published operations, typed from the API's schema, and a client that authenticates a workload, sends registered documents by hash, and reads the API's refusals as typed errors.
The SDK is written in Effect on Effect's HttpClient. A codebase that
does not use Effect imports @athanor-trade/sdk/promises instead: the same client, Promises back, the
same typed errors as rejections.
Node 20 or later, as an ES module. effect is a peer dependency, installed with the package; a
codebase that does not use Effect never touches it. Two commands come with the package:
athanor-keygen (a key pair for PrivateKeyAuth) and athanor-publish-documents (registers the
published operation set, or your own, against a client).
npm install @athanor-trade/sdk
@athanor-trade/sdk/promisesimport {
createClient,
PrivateKeyAuth,
AthanorApiError,
DealerContextDocument,
OrdersFeedDocument,
AdvanceOrderDocument,
} from "@athanor-trade/sdk/promises";
const athanor = createClient({
environment: "sandbox", // or "live"
auth: PrivateKeyAuth.layer({
clientId: process.env.ATHANOR_CLIENT_ID!,
privateKey: { pem: process.env.ATHANOR_PRIVATE_KEY!, algorithm: "ES256" },
scopes: ["dealer:orders:read", "dealer:orders:write"],
}),
});
const { viewer } = await athanor.execute(DealerContextDocument);
const page = await athanor.execute(OrdersFeedDocument, { first: 50 });
try {
const { advanceOrder } = await athanor.execute(AdvanceOrderDocument, {
input: {
orderId,
idempotencyKey: "po-4471-lock",
step: { lockPrices: { expectedAllIn: "51234.00" } },
},
});
} catch (error) {
if (error instanceof AthanorApiError && error.reason === "quote_moved") {
// read the record again, show the new total, try once more
}
}
createClient builds a runtime over the platform's fetch (or the fetch you pass). Call
dispose() when the process is done with it.
@athanor-trade/sdkAthanor is a service; Athanor.layer({ environment }) needs an Auth layer and an HttpClient.
import { Effect, Layer } from "effect";
import { FetchHttpClient } from "effect/http";
import { Athanor, PrivateKeyAuth, DealerContextDocument } from "@athanor-trade/sdk";
const live = Athanor.layer({ environment: "live" }).pipe(
Layer.provide(
PrivateKeyAuth.layer({
clientId,
privateKey: { pem, algorithm: "ES256" },
scopes,
}),
),
Layer.provide(FetchHttpClient.layer),
);
const program = Effect.gen(function* () {
const athanor = yield* Athanor;
const { viewer } = yield* athanor.execute(DealerContextDocument);
return viewer;
}).pipe(
Effect.catchTag("AthanorApiError", (error) =>
Effect.logWarning(`refused: ${error.code} ${error.reason ?? ""}`),
),
);
execute fails with AthanorApiError (the API's refusal), AthanorAuthError (the auth service
refused the credentials) or Effect's HttpClientError (the transport). Each is a Schema.TaggedError,
so Effect.catchTag and Schema.is work on them.
Auth is a service; Athanor never holds anything that can mint a token, so there are two ways in:
FederatedAuth.layer({ clientId, subjectToken, scopes }) — where the workload runs. The
platform already signs a short-lived token naming the workload; the client's trust policy in
Settings → API says which issuer and claims to accept; the SDK trades that token for an Athanor
token (RFC 8693 token exchange). Nothing to generate or store. GitHubActions.subjectToken()
reads a job's token from the runner (permissions: id-token: write); Vercel.subjectToken()
reads VERCEL_OIDC_TOKEN; any OIDC issuer plugs in as (http) => Effect<string>.PrivateKeyAuth.layer({ clientId, privateKey, scopes }) — for a workload with no platform
identity. It holds a private key; Athanor holds only its public JWKS, registered on the client.
Every token request is signed with a fresh two-minute, single-use assertion (private_key_jwt,
RFC 7523). The key is a PKCS#8 PEM with its algorithm, or a JWK; one that cannot sign fails the
layer. npx athanor-keygen writes a key pair.TokenAuth.layer(token) is not a way in: it carries a token the caller already obtained through
one of the two, as a string or an Effect asked for on every request so a rotated token is picked
up. Any Layer<Auth> plugs in.
// A GitHub Actions job
auth: FederatedAuth.layer({ clientId, subjectToken: GitHubActions.subjectToken(), scopes })
// A Vercel function
auth: FederatedAuth.layer({ clientId, subjectToken: () => Vercel.subjectToken(), scopes })
The token is held and reused until shortly before it expires; concurrent callers share one mint.
documentId), so a client that chose
trusted_only sends nothing else. On sandbox it goes by its text, so an operation edited in
development runs without a registration step. persisted: true | false overrides either.AthanorApiError: code is the API's stable code (InsufficientScope,
OrderNotInStage, StepRefused, DocumentUnknown, …), reason the refusal's own
(quote_moved, recipient_mismatch, …), data what resolved beside it.documents/dealer/*.graphql and documents/custodian/*.graphql are the published set; the typed
documents and generated/persisted-documents.json are generated from them and the API's SDL:
bun run generate
The published set is registered against a client — the SDK's own publish step, and what a partner's build runs for documents of its own:
ATHANOR_CLIENT_ID=… ATHANOR_PRIVATE_KEY=<PKCS#8 PEM> npx athanor-publish-documents sandbox
Every document is validated against the schema as it stands; one the schema no longer accepts fails the run with the validator's words.
Any document typed with @graphql-typed-document-node/core runs through execute. To send one by
hash on live, register it first (registerDocument, or the publish script over your own
persisted-documents.json) and give it a __meta__.hash of sha256:<hex of the text> — what
GraphQL Code Generator's client preset emits with persistedDocuments on.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.