
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@syscoin/syscoin-js
Advanced tools
A javascript library for interacting directly with the Syscoin RPC Server. Provides 1:1 mappings for all RPC endpoints. For full endpoint list see RPCFunctions.ts. Built for NodeJS or for browser.
npm install @syscoin/syscoin-js
Works as a Typescript library or a ES6 Javascript library. Calls can be made individually or batched. Typescript helper interfaces for request and response object can be found in src/model/request and src/model/response.
Typescript
import { SyscoinRpcClient, rpcServices } from "@syscoin/syscoin-js";
const config = {
host: "localhost",
rpcPort: 8368,
username: "u",
password: "p",
logLevel: 'error'
};
const client = new SyscoinRpcClient(config);
const info = await rpcServices(client.callRpc).getBestBlockHash().call();
NodeJS
const SyscoinRpcClient = require("@syscoin/syscoin-js").SyscoinRpcClient;
const rpcServices = require("@syscoin/syscoin-js").rpcServices;
const config = {
host: "localhost",
rpcPort: 8368, // This is the port used in the docker-based integration tests, change at your peril
username: "u",
password: "p",
logLevel: 'error'
};
const client = new SyscoinRpcClient(config);
const info = rpcServices(client.callRpc).getBestBlockHash().call();
Batch requests can be constructed using the batch function. Results will be an array based on the requests.
const result = await client.batch([
rpcServices(client.callRpc).getBestBlockHash(),
rpcServices(client.callRpc).getWallteInfo()]);
// result[0] = getBestBlockHash result
// result[1] = getWalletInfo result
The Syscoin RPC server returns results wrapped in an object - {rersult: null, id: null, error: null }. By default
syscoin-js will unwrap RPC responses to provide consumers with data.result or data.error directly. Consumers can
optionally disable this to process the full wrapped object.
Example single call with unwrapping disabled
const result = await rpcServices(client.callRpc).getBestBlockHash().call(false);
Example batch call with unwrapping disabled
const result = await client.batch([
rpcServices(client.callRpc).getBestBlockHash(),
rpcServices(client.callRpc).getWallteInfo()], false);
Please submit all updates and improvements via pull request.
FAQs
Javascript SDK for the Syscoin cryptocurrency.
We found that @syscoin/syscoin-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.