
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@differentialhq/sdk
Advanced tools
This is the official Differential SDK for Typescript.
npm install @differentialhq/core
yarn add @differentialhq/core
pnpm add @differentialhq/core
Create a file named d.ts which will be used to initialize Differential. This file will export the Differential instance.
// d.ts
import { Differential } from "@differentialhq/core";
// Initialize Differential with your API secret.
// Get yours at https://console.differential.dev.
export const d = new Differential("YOUR_API_SECRET");
In a separate file, create the "Hello World" service. This file will import the Differential instance from d.ts and define the service.
// service.ts
import { d } from "./d";
// Define a simple function that returns "Hello, World!"
const sayHello = async ({ to }: { to: string }) => {
return `Hello, ${to}!`;
};
// ...and as many other functions as you want, any async function can be a service operation
const callEndpoint = async () => {
return fetch("https://api.example.com");
};
// Create the service
export const helloWorldService = d.service({
name: "helloWorld",
});
// Register the functions
helloWorldService.register(
"sayHello",
getNormalAnimal,
z.object({ to: z.string() }),
);
helloWorldService.register("callEndpoint", callEndpoint);
To run the service, simply run the file with the service definition. This will start the service and make it available to other services.
tsx service.ts
FAQs
Javascript SDK for differential.dev
We found that @differentialhq/sdk demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.