
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@lightprotocol/jup-api-adapter
Advanced tools
A wrapper for @jup-ag/api that adds Compressed Token support.
yarn add @lightprotocol/jup-api-adapter
import { VersionedTransaction } from '@solana/web3.js';
import { createRpc } from '@lightprotocol/stateless.js';
import { createJupiterApiAdapterClient, TokenCompressionMode } from '@lightprotocol/jup-api-adapter';
// Create RPC connection with compression support
const connection = createRpc(RPC_URL, COMPRESSION_URL, COMPRESSION_URL);
// Initialize Jupiter API Adapter client
const jupiterApi = await createJupiterApiAdapterClient(connection);
// Get quote
const quote = await jupiterApi.quoteGetCompressed({
inputMint: INPUT_MINT.toBase58(),
outputMint: OUTPUT_MINT.toBase58(),
amount: AMOUNT,
onlyDirectRoutes: true,
slippageBps: 500,
}, TokenCompressionMode.DecompressInput);
// Get swap transaction
const swapResponse = await jupiterApi.swapPostCompressed({
swapRequest: {
userPublicKey: wallet.publicKey.toBase58(),
quoteResponse: quote,
}
}, { compressionMode: TokenCompressionMode.DecompressInput });
const tx = VersionedTransaction.deserialize(Buffer.from(swapResponse.swapTransaction, 'base64'));
tx.sign([wallet]);
// send ...
For more code examples, see this repo.
Extends DefaultApi
class with endpoints:
quoteGetCompressed
quoteGetRawCompressed
swapInstructionsPostCompressed
swapInstructionsPostRawCompressed
swapPostCompressed
swapPostRawCompressed
swapMode
must be ExactIn
wrapAndUnwrapSol
must be true
skipUserAccountsRpcCalls
must be false
asLegacyTransaction
must be false
useTokenLedger
must be false
allowOptimizedWrappedSolTokenAccount
must be false
dynamicComputeUnitLimit
must be false
prioritizationFeeLamports
not supported yet (use computeUnitPriceMicroLamports
instead)
compressionMode
must be one of DecompressInput
, DecompressAndCompress
, CompressOutput
.
Instructions
ComputeBudgetInstructions
to reflect higher cu usage. (PrioritizationFeeLamports
are not supported yet. Use computeUnitPriceMicroLamports
instead.)addressLookupTableAddresses
with a lookup table for Light Protocol.setupInstructions
and closeInstructions
with
getCreateAtaInstructions
(tokenIn, tokenOut)getDecompressionSetupInstructions
(tokenIn, tokenOut)getCleanupInstructions
(tokenIn, tokenOut)FAQs
Jupiter API wrapper with support for compressed tokens
The npm package @lightprotocol/jup-api-adapter receives a total of 6 weekly downloads. As such, @lightprotocol/jup-api-adapter popularity was classified as not popular.
We found that @lightprotocol/jup-api-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.