
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
@lightprotocol/jup-api-adapter
Advanced tools
A wrapper for @jup-ag/api that adds Compressed Token support.
yarn add @lightprotocol/jup-api-adapter
import {
createJupiterApiAdapterClient,
TokenCompressionMode,
} from '@lightprotocol/jup-api-adapter';
import { Rpc } from '@lightprotocol/stateless.js';
// Init with RPC that supports compression
const RPC_URL = 'https://mainnet.helius-rpc.com?api-key=<your-api-key>';
const COMPRESSION_URL = RPC_URL;
const PROVER_URL = RPC_URL;
const connection = new Rpc(RPC_URL, COMPRESSION_URL, PROVER_URL);
const client = await createJupiterApiAdapterClient(connection);
// Get quote for compressed tokens
const quote = await client.quoteGetCompressed(
{
inputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
outputMint: 'So11111111111111111111111111111111111111112',
amount: 42,
},
TokenCompressionMode.DecompressInput,
);
// Get Swap tx
const swapTx = await client.swapPostCompressed(
{
swapRequest: {
userPublicKey: 'your-pubkey',
quoteResponse: quote,
},
},
{
compressionMode: TokenCompressionMode.DecompressInput,
},
);
swapTx.sign(YOUR_KEYPAIR);
// send and confirm ...
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 0 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.