Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@jup-ag/crema-sdk-v2
Advanced tools
[![LICENSE](https://img.shields.io/badge/license-Apache2-green)](./LICENSE) [![crema](https://img.shields.io/badge/protocol-crema-blue)](https://www.crema.finance/) [![language](https://img.shields.io/badge/Language-typescript-blue)](https://www.typescrip
CLMM means concentrated liquidity market maker, it's crema sdk for new swap protocal. Crema is a open-source concentrated liquidity market maker on the Solana BlockChain . The new version of crema increases the capital efficiency of decentralized exchanges.
This repository contains the typescript sdk(@cremafinance/crema-sdk-v2), which help you interact with a deployed program.
npm add @cremafinance/crema-sdk-v2
You can use npm test
to test crema instructions in ./test/instructions
.
We will show you the pseudocode example, specific method of application you can read ./integration/jupiter/example
or ./tests/instructions/xx.test.ts
// swap quote structa
// import type { SwapQuote, SwapQuoteParam } from "@cremafinance/crema-sdk-v2/quote/public/swap";
type SwapQuote = {
estimatedAmountIn: u64;
estimatedAmountOut: u64;
estimatedEndSqrtPrice: BN;
estimatedFeeAmount: u64;
isExceed: boolean;
aToB: boolean;
byAmountIn: boolean;
amount: BN;
};
const ix = sdk.ctx.program.instruction.swapWithPartner(
aToB, // weather change token_a for token_b
byAmountIn, // weather amount of fixed input
amount, // the amount of token
amountLimit, // calculate by simulate swap quote result and slippage
sqrtPriceLimit, // max or min sqrt price limit(depend on aToB)
{
accounts: {
clmmConfig,
clmmpool,
tokenA,
tokenB,
accountA,
accountB,
tokenAVault,
tokenBVault,
tickArrayMap, // get this account by getTickArrayMapPDA(...).publicKey
owner,
partner, // partner of integration
partnerAtaA, // partner's associated token account of token_a
partnerAtaB, // partner's associated token account of token_b
tokenProgram: TOKEN_PROGRAM_ID,
},
// Get tick arrays address by createTickArrayRange first, then get theirs account data by fetcher,getTickData().
remainingAccounts,
}
);
|____integration
| |____jupiter
|____src
| |____cli
| |____errors
| |____idls
| | |____clmmpool.json
| | |____clmmpool.ts
| |____impl
| |____math
| |____network
| |____quotes
| | |____public
| |____types
| |____utils
| |____clmmpool-client.ts
| |____context.ts
| |____index.ts
| |____ix.ts
|____test
| |____instructions
| |____utils
|____package.json
|____README.md
You can join these groups and chats to discuss and ask clmm-sdk-v2 related questions:
Crema-SDK-V2 is under the Apache 2.0 license. See the LICENSE file for details.
FAQs
[![LICENSE](https://img.shields.io/badge/license-Apache2-green)](./LICENSE) [![crema](https://img.shields.io/badge/protocol-crema-blue)](https://www.crema.finance/) [![language](https://img.shields.io/badge/Language-typescript-blue)](https://www.typescrip
The npm package @jup-ag/crema-sdk-v2 receives a total of 765 weekly downloads. As such, @jup-ag/crema-sdk-v2 popularity was classified as not popular.
We found that @jup-ag/crema-sdk-v2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.