Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@molpha/sdk

Latest version: v0.3.0-dev-20261124114841

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: molpha_admin
1 Stars
1 Forks
30 Versions
2.2K Downloads
TypeScript Repo language

Scan summary

@molpha/sdk was last scanned on 24 Nov 2026 at version 0.3.0-dev-20261124114841. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 30 versions; the latest 5 were published within 7 days (18–24 Nov 2026).
  • Findings: No rules fired in version 0.3.0-dev-20261124114841.
  • Downloads: 2,151 downloads.

Versions

30 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0-dev-20261124114841 LATEST 24 Nov 2026 No rules fired
0.3.0-dev-20261124085658 24 Nov 2026 No rules fired
0.3.0-dev-20261119125845 19 Nov 2026 No rules fired
0.3.0-dev-20261119103714 19 Nov 2026 Not shown
0.3.0-dev-20261118084512 18 Nov 2026 Not shown

No rules fired in 0.3.0-dev-20261124114841

Findings

Findings for v0.3.0-dev-20261124114841. 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.3.0-dev-20261124114841; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@molpha/sdk

npm license

TypeScript SDK for Molpha, a pull-based oracle protocol. Molpha nodes fetch an API result, sign it once with a threshold signature, and the same signed attestation can be verified on Solana, EVM and Starknet. This SDK is for data consumers and feed owners, and runs in the browser and in Node.js.

Links: molpha.io · GitHub · npm

Use it to:

  • subscribe to a Molpha plan on Solana;
  • derive a source id from an API config;
  • request a threshold-signed attestation from the gateway;
  • submit the signed result on-chain (submit_attestation);
  • verify/read the latest feed value;
  • build EVM and Starknet verifier arguments from the same signed result.

Runtime: Node.js >=20.19.0 (ESM).

Protocol model

Molpha turns off-chain API responses into verified on-chain data.

At a high level:

Consumer
  └─ subscribes (USDC) on Solana
  └─ derives sourceId = keccak256(canonical apiConfig)
  └─ signs a RequestAuth bound to (programId, gateway, sourceId, signaturesRequired, authTimestamp)

Gateway
  └─ assigns the round's timestamp (unix ms) from its own clock and coordinates a signing round

Verifier nodes
  └─ fetch/recompute the API result independently
  └─ sign the canonical result if valid

Solana / EVM / Starknet verifiers
  └─ verify quorum, registry version, signer bitmap, timestamp, and aggregate signature
  └─ finalize or expose the verified value

The gateway is a coordination layer, not a trusted oracle. A result is trusted only if it carries a valid threshold signature from the selected verifier nodes for the current registry version.

Molpha uses Solana as the canonical protocol chain for subscriptions, registry snapshots, node accounts, and feed state. EVM and Starknet verifier contracts are stateless verification surfaces: they verify signed Molpha attestations without managing subscriptions or source configuration locally.

Every signed attestation commits to the same message across chains:

message = keccak256(
  keccak256("MOLPHA_MESSAGE_V1") || value || sourceId || u32be(registryVersion) ||
  u8(signaturesRequired) || u64be(timestamp) || signersBitmap
)

The preimage is 141 bytes (32 + 32 + 32 + 4 + 1 + 8 + 32).

attestationMessageHash / attestationMessageHashFromAttestation recompute it client-side.

Install

npm install @molpha/sdk @anchor-lang/core bn.js
# or: pnpm add @molpha/sdk @anchor-lang/core bn.js
# or: yarn add @molpha/sdk @anchor-lang/core bn.js

@anchor-lang/core and bn.js are optional peer dependencies. Install them if you use the Solana / Anchor path (as in the examples below). Gateway-only or EVM/Starknet-only apps can skip them. Runtime dependencies installed automatically are @solana/kit, @noble/* and canonicalize.

For the pre-release channel (the dev gateway and the matching dev Solana program; may change without notice):

npm install @molpha/sdk@dev
npm tags and deployment defaults

Defaults are baked at publish time from config/deployments.json (MOLPHA_SDK_PROFILE). Override at runtime with endpoints, programId, and idl.

npm dist-tag Profile Default gateway Solana program EVM / Starknet
latest stable https://gateway.molpha.io/ MoLF3pgVA9MENSuEujxNNSMaTo71aLyewaH5nrWfUZs Documented CREATE2 / Sepolia addresses
dev dev https://dev-gateway.molpha.io/ chivcFQgxzwkpLvW41PV431HQ4dYpaW3povQH3AdpQt Provisional until redeploy (MOLPHA_DEV_VERIFIERS_PROVISIONAL); falls back to stable addresses

Inspect the active profile via MOLPHA_SDK_PROFILE and MOLPHA_DEV_VERIFIERS_PROVISIONAL. Local builds: MOLPHA_SDK_PROFILE=stable pnpm build or MOLPHA_SDK_PROFILE=dev pnpm build (default dev).

Import Use
@molpha/sdk Facade (MolphaSDK), MolphaGateway, MolphaSolanaClient, core hashing (deriveSourceId, attestationMessageHash, hashRequestAuth, timestampSeconds), EVM/Starknet helpers. Browser-safe; no fs in the main entry.
@molpha/sdk/utils walletFromKeypairFile, loadKeypair — load a Solana CLI keypair as an Anchor Wallet. Node.js only.

The package is ESM with "sideEffects": false, so gateway-only or read-only apps can tree-shake unused paths.

Quick start

import { web3 } from "@anchor-lang/core";
import { MolphaSDK, PlanType, deriveSourceIdString } from "@molpha/sdk";
import { walletFromKeypairFile } from "@molpha/sdk/utils";

const wallet = walletFromKeypairFile("~/.config/solana/id.json");
const sdk = new MolphaSDK({
  connection: new web3.Connection("https://api.devnet.solana.com", "confirmed"),
  wallet,
  // endpoints: [{ url: "https://gateway.example.com", gatewayAuthority: "<base58>" }],
});

// Subscribe if needed (USDC on Solana)
const plan = await sdk.solana.getPlan(PlanType.Basic);
await sdk.solana.subscribe(PlanType.Basic, {
  maxPriceUsdc: plan.subscriptionPrice,
});

const apiConfig = {
  url: "https://api.example.com/price",
  responseParser: "$.price",
};
const signaturesRequired = 3;

const { result, signature, feed } = await sdk.requestAndSubmit({
  apiConfig,
  signaturesRequired,
});

// The round's identity, for reads and cross-chain verification.
const sourceId = deriveSourceIdString(apiConfig); // === result.payload.sourceId

requestAndSubmit requests a threshold-signed attestation from the gateway (against the current on-chain registry version) and submits it to Solana via submit_attestation in one call. The first successful submit creates the feed account for (sourceId, signaturesRequired, submitter) if it does not already exist.

Configuration

Required
Option Description
connection Anchor-compatible Solana RPC connection.
wallet MolphaWallet. Used for Solana transactions and gateway authentication when available.
Optional
Option Default
endpoints DEFAULT_GATEWAY_ENDPOINT — URL, { url, gatewayAuthority }, or an array of either for failover (see Gateway identity)
programId MOLPHA_PROGRAM_ADDRESS from the vendored IDL; also bound into gateway request auth
idl MOLPHA_IDL from idl/molpha.json
commitment "confirmed"
import {
  DEFAULT_GATEWAY_ENDPOINT,
  MOLPHA_IDL,
  MOLPHA_PROGRAM_ADDRESS,
} from "@molpha/sdk";

const sdk = new MolphaSDK({
  connection,
  wallet,
  endpoints: [
    DEFAULT_GATEWAY_ENDPOINT,
    { url: "https://backup.example.com", gatewayAuthority: "<gateway base58 pubkey>" },
  ],
  // programId: "YourProgramAddress...",
  // idl: MOLPHA_IDL,
});
Gateway identity

Gateway request authorization binds the gateway's on-chain account, so the client must know which gateway it is talking to:

requestAuthHash = keccak256(
  "MOLPHA_REQAUTH_V1" || programId || gatewayPda || sourceId || u8(signaturesRequired) || u64le(authTimestamp)
)
gatewayPda = PDA(["molpha_gateway", gatewayAuthority], programId)

authTimestamp is the caller's unix seconds at signing: a freshness stamp for the authorization only (the gateway rejects stamps outside its request_auth.window_seconds, 60 s by default). It is read from the SDK clock for every attempt, so a retry after a 409 signs a fresh one. It has nothing to do with the round's timestamp.

Pass gatewayAuthority (the gateway's base58 signing pubkey) per endpoint to pin it. When omitted, the SDK calls GET {url}/v1/info once per endpoint and reads:

{ "status": "ok", "data": { "gatewayAuthority": "<base58>", "programId": "<base58>" } }

A programId that differs from the client's is rejected. Because the hash differs per gateway, the auth signature is recomputed for every endpoint actually tried during failover — with a browser wallet that means one signing prompt per endpoint tried. /v1/info is never contacted when no signer is configured (dev zero-signature path).

Round timestamp

The request body carries authSig and authTimestamp but no round timestamp. The gateway stamps the round with its own clock, in unix milliseconds, floored to a fixed 100 ms tick (floor(nowMs / 100) * 100), and the result carries the stamp in payload.timestamp. The tick is a protocol constant, exported as ROUND_TICK_MS: it is the same on every gateway and node, it is not configurable, and GET /v1/info does not report it. Stamping does not wait for a tick boundary, so it adds no latency. Committee selection reads only the timestamp's one-second window (ten ticks), so nobody can pick a committee by picking a time.

  • One feed (a source, a quorum and a registry version) runs at most 10 rounds per second, whatever the request rate.
  • Requests for the same feed inside one tick share one round: the nodes run it once and every caller gets the result. Each caller still spends its own unit of round quota, or its own payment.
  • One consumer gets one round per tick per feed, so at most 10 per second. A second request by the same consumer for the same source and quorum inside the tick is refused with HTTP 409; the SDK retries it after one tick.
  • The message the nodes sign is keccak256(MOLPHA_MESSAGE_V1 || value || sourceId || u32be(registryVersion) || u8(quorum) || u64be(timestamp) || signersBitmap).
  • Chain clocks, epochs and maxAge/staleness are in seconds: compare with timestampSeconds(payload.timestamp) (floored ts / 1000). timestampAgeSeconds(ts, nowSeconds) saturates at 0.
  • The SDK returns payload.timestamp exactly as the gateway gave it. Nodes enforce the grid when they sign; the on-chain verifiers do not check it.
Retries and timeouts

requestSignedData makes up to maxRetries attempts (default 6) and chooses the wait before each by why the last one failed (retryDelayMs). Every wait carries jitter so clients that failed together do not retry together. The backoff step is a capped exponential: 250 ms, 500 ms, up to 5 s.

Last attempt Wait before the next
409 (this consumer already has a round for the source and quorum in the current tick) one tick (ROUND_TICK_MS, 100 ms), plus up to 20 ms
503 or 429 (gateway at capacity, or too few nodes accepted the round) the later of the gateway's Retry-After and the backoff step, plus up to one more step
timeout, network error, other 5xx the backoff step, half of it randomized
400, 401, 402, 403 none: terminal. 403 means the subscription is inactive or its round quota for the term is spent

A 400 saying the registryVersion is not the current one (a cached context, or a registry roll between your read and the request) is the exception: the SDK reads the registry afresh and retries once, without spending an attempt.

The wait after a 409 is a full tick rather than the time left to the next boundary: a full tick puts the retry in a later tick whatever the offset between the client's clock and the gateway's, so the SDK never computes a boundary from the local clock. A caller polling one feed gains nothing by asking more often than once per tick: space the requests at least ROUND_TICK_MS apart.

A retry is a new request, and the gateway stamps it anew, so it is a new round: it spends another unit of round quota or needs another payment, and with a paywalled source another set of payment authorizations. Nothing ties a retry to the attempt before it; there is no idempotency key. Set maxRetries: 1 to make a single attempt and decide about a retry yourself.

The gateway limits the total load: at capacity it answers HTTP 503 with a Retry-After, and a consumer over its request rate gets HTTP 429. It also answers 503 when too few nodes accept a round. The SDK treats them alike: it backs off and retries, and throws a GatewayError with the status when the attempts run out.

timeoutMs defaults to 35 s, above the gateway's own wait for a round (roundTimeoutSeconds in /v1/info, 30 s by default). A shorter timeout abandons a round the gateway is still running, and the retry then starts another. A source that cannot be fetched is reported as soon as enough nodes have failed (usually well under a second), not after the wait.

Wallet

wallet is a single MolphaWallet used across both protocol surfaces:

Layer What it signs
Solana client Transactions such as subscribe, extendSubscription, submitAttestation
Gateway client hashRequestAuth({ programId, gateway, sourceId, signaturesRequired, authTimestamp }) for authenticated gateway requests

Gateway auth is resolved automatically when you use MolphaSDK:

  1. Use wallet.signAuthMessage if provided.
  2. Else derive signing from Anchor Wallet.payer when the secret key is available, such as with walletFromKeypairFile.
  3. Else omit auth and use an all-zero authSig.

MolphaSDK passes the resolved signer to sdk.gateway as its default, so sdk.gateway.requestSignedData({ apiConfig, signaturesRequired }) authenticates without an explicit signer. Standalone new MolphaGateway(...) omits auth unless you pass a defaultSigner (third constructor arg) or per-call signer.

The all-zero authSig path is for development only: a gateway rejects it with 401. Production jobs should authenticate gateway requests.

Node.js utility
import { walletFromKeypairFile } from "@molpha/sdk/utils";

const wallet = walletFromKeypairFile("~/.config/solana/id.json");
Browser wallet adapter

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @molpha/sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229