
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.
@magic-rpc/client
Advanced tools
Type-safe client for making Magic RPC calls with support for field selection and automatic batching.
npm install @magic-rpc/client
import { RpcClient } from "@magic-rpc/client";
const client = new RpcClient({
baseUrl: "http://localhost:3000/json-rpc",
timeout: 5000,
headers: {
Authorization: "Bearer token",
},
});
// Make RPC calls
const user = await client.call({
method: "getUser",
input: { userId: "123" },
mappings: {
avatar: 1,
posts: { comments: 1 },
},
});
// Batch multiple calls
const results = await client.batch([
{ method: "getUser", input: { userId: "1" } },
{ method: "getUser", input: { userId: "2" } },
]);
import { createTypedClient } from "@magic-rpc/client";
// Define your schema (shared with server)
const schema = {
getUser: [GetUserInputSchema, GetUserOutputSchema],
getUserPosts: [GetPostsInputSchema, GetPostsOutputSchema],
};
const client = createTypedClient(schema, {
baseUrl: "http://localhost:3000/json-rpc",
});
// Fully typed method calls
const user = await client.getUser(
{ userId: "123" }, // Typed input
{ avatar: 1, posts: 1 } // Optional field mappings
);
class RpcClient {
constructor(config: RpcClientConfig);
call<T>(request: RpcRequest): Promise<T>;
batch<T>(requests: RpcRequest[]): Promise<T[]>;
}
function createTypedClient<TSchema>(
schema: TSchema,
config: RpcClientConfig
): TypedRpcClient<TSchema>;
interface RpcClientConfig {
baseUrl: string;
timeout?: number;
headers?: Record<string, string>;
}
interface RpcRequest {
method: string;
input: any;
mappings?: Record<string, any>;
}
FAQs
Magic RPC client for type-safe RPC calls
We found that @magic-rpc/client 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.