
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@sol-synth-engine/js-client
Advanced tools
This is the JavaScript client for the Sol Synth Engine program, a synthetic asset protocol on Solana.
npm install @sol-synth-engine/js-client
import { SolSynthEngineClient } from "@sol-synth-engine/js-client";
import { Connection, PublicKey, Keypair } from "@solana/web3.js";
// Initialize the client
const connection = new Connection("https://api.mainnet-beta.solana.com");
const programId = new PublicKey("YOUR_PROGRAM_ID");
const client = new SolSynthEngineClient(programId, connection);
// Create a wallet
const wallet = Keypair.generate();
const marketName = "btc";
const syntheticMint = new PublicKey("YOUR_SYNTHETIC_MINT");
const oracleSource = new PublicKey("YOUR_ORACLE_SOURCE");
const syntheticOracleSource = new PublicKey("YOUR_SYNTHETIC_ORACLE_SOURCE");
const marketFeeRate = 0.01;
const marketAuthority = new PublicKey("YOUR_MARKET_AUTHORITY");
const tx = await client.createMarket(
marketName,
syntheticMint,
oracleSource,
syntheticOracleSource,
marketFeeRate,
marketAuthority,
);
const marketName = "btc";
const amount = 1000000; // Amount in smallest unit
const underlyingToken = new PublicKey("YOUR_UNDERLYING_TOKEN");
const syntheticToken = new PublicKey("YOUR_SYNTHETIC_TOKEN");
const tx = await client.mint(marketName, amount, underlyingToken, syntheticToken, wallet.publicKey);
const marketName = "btc";
const amount = 1000000; // Amount in smallest unit
const syntheticToken = new PublicKey("YOUR_SYNTHETIC_TOKEN");
const underlyingToken = new PublicKey("YOUR_UNDERLYING_TOKEN");
const tx = await client.redeem(
marketName,
amount,
syntheticToken,
underlyingToken,
wallet.publicKey,
);
// Get market info
const marketInfo = await client.getMarketInfo("btc");
// Get position info
const positionInfo = await client.getPositionInfo("btc", wallet.publicKey);
// Get treasury info
const treasuryInfo = await client.getTreasuryInfo("btc", new PublicKey("YOUR_TREASURY_TOKEN"));
The main client class for interacting with the Sol Synth Engine program.
constructor(programId: PublicKey, connection: Connection)
createMarket: Create a new synthetic marketmint: Mint synthetic assetsredeem: Redeem synthetic assetsgetMarketInfo: Get market informationgetPositionInfo: Get position informationgetTreasuryInfo: Get treasury informationaddUnderlyingToken: Add an underlying token to a marketaddTreasury: Add a treasury to a market# Install dependencies
npm install
# Build the package
npm run build
# Run tests
npm test
# Clean build artifacts
npm run clean
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT
FAQs
JavaScript client for Sol Synth Engine
We found that @sol-synth-engine/js-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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.