
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@godprotocol/oracle
Advanced tools
A distributed coordination server for decentralized repositories.
The Oracle module in the God Protocol framework ensures seamless synchronization of data, repositories, and content across network nodes, delivering consistency, resilience, and real-time scalability for thousands of distributed systems.
Install the Oracle module using npm:
npm install @godprotocol/oracle
Set up an Oracle server with the following example:
import sync from "@godprotocol/oracle/index.js";
import { repo_config } from "./repos.js";
const server_details = {
hostname: process.env.HOSTNAME || "localhost",
port: process.env.PORT || 8080,
};
sync(server_details, repo_config).then((handler) => {
const http = require("http");
http.createServer(handler).listen(server_details.port, () => {
console.log(
`Oracle server running at http://${server_details.hostname}:${server_details.port}`
);
});
});
| Method | Description |
|---|---|
constructor(mirror) | Initializes an Oracle instance with a mirror repository for coordination. |
oracle.sync(server, mirror) | Starts synchronization and returns a Node.js-compatible HTTP handler. |
oracle.authenticate({ client }) | Registers and authenticates a client node. |
oracle.add_repo({ filter, repo }, { client }) | Adds a new repository with an optional filter (e.g., regex for content paths). |
oracle.write({ path, content }, client) | Writes content to one or more matching repositories and propagates updates across mirrors. |
oracle.write_bulk(contents, client) | Writes multiple files efficiently in a single operation. |
oracle.read(path) | Reads content from distributed repositories, returning both data and its source repo. |
oracle.propagate(payload, callback?) | Propagates data or sync signals across all registered servers. |
These endpoints are exposed by the Oracle server’s route handler:
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Returns a simple HTML response confirming the Oracle server is active. |
/oracle/authenticate | POST | Registers or authenticates a client. Returns an authorization token. |
/oracle/read | POST | Reads data from one or more repositories. Requires Authorization header. |
/oracle/write | POST | Writes data to repositories and synchronizes it across mirrors. Requires Authorization header. |
/oracle/write_bulk | POST | Writes multiple data entries in bulk. Requires Authorization header. |
/oracle/add_repo | POST | Adds a new repository with a given filter and metadata. Requires Authorization header. |
/oracle/on_sync | POST | Called when a remote sync event occurs. Used internally for mirror updates. |
/oracle/sync_repos | POST | Synchronizes repository metadata across nodes. |
/oracle/sync_content_location | POST | Synchronizes specific content location data across mirrors. |
Notes:
- All POST endpoints expect JSON body.
- Requests to
/oracle/*(except/authenticate) require anAuthorizationheader.- The server responds with JSON and appropriate HTTP status codes (
200,401,404,500).
The Oracle is built for non-blocking distributed propagation. When a write or repository sync occurs:
This design ensures fast request-response cycles and consistent eventual synchronization across the network.
Clients communicate with Oracle servers via a simple JSON-based POST interface:
import { repo_any } from "./repos.js";
import { Oracle as OracleClient } from "godprotocol";
const server = { hostname: "server-oracle.app", port: 80 };
const client_details = { hostname: "client-oracle.app", port: 80 };
const oracle = new OracleClient({ server, port: 1909 });
await oracle.sync(client_details, repo_any);
await oracle.add_repo({
filter: "*",
repo: repo_any,
});
await oracle.write(
"data/record.json",
JSON.stringify({ id: 1, name: "John Doe" })
);
const data = await oracle.read("data/record.json");
console.log(data); // '{"id":1,"name":"John Doe"}'
| Package | Description |
|---|---|
@godprotocol/repositories | Repository management and file abstractions |
godprotocol | Core framework for decentralized computation |
generalised-datastore | Data storage and remote access integration layer |
MIT © Savvy
FAQs
Oracle Server for the God Protocol network.
We found that @godprotocol/oracle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.