Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@jup-ag/goosefx-ssl-sdk
Advanced tools
SDK for interacting with GooseFX Single-sided Liquidity pools
The GooseFX SDK contains a set of simple to use APIs to allow developers to integrate with the GooseFX platform.
/ts
: contains typescript goosefx-ssl-sdk
which creates npm package - npmjs.com/package/goosefx-ssl-sdkUse your environment's package manager to install goosefx-ssl-sdk
and other related packages into your project.
yarn add goosefx-ssl-sdk
npm install goosefx-ssl-sdk
import { Connection } from "@solana/web3.js";
import { Swap } from "goosefx-ssl-sdk";
const connection = new Connection(
"https://api.mainnet-beta.solana.com/",
"finalized"
);
const quote = async () => {
const swap = new Swap(connection);
const { out: outAmount, impact } = await swap.getQuote(
new PublicKey("So11111111111111111111111111111111111111112"), //SOL
new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"), //USD
1000000n
);
console.log(`out: ${outAmount} ${impact}`);
return { outAmount, impact };
};
quote();
import { Connection } from "@solana/web3.js";
import { Swap } from "goosefx-ssl-sdk";
const connection = new Connection(
"https://api.mainnet-beta.solana.com/",
"finalized"
);
async function main() {
const wallet = new Keypair();
const swap = new Swap(connection);
const ixs = await swap.createSwapIx(
new PublicKey("So11111111111111111111111111111111111111112"),
new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),
100000n, // 0.0001 SOL
100n, // 0.0001 USDC
wallet.publicKey
);
let tx = new Transaction();
for (const ix of ixs) {
tx.add(ix);
}
// Send out the tx use browser wallet or keypair
}
main();
import { Connection } from "@solana/web3.js";
import { SSL, ADDRESSES } from "goosefx-ssl-sdk";
import { NATIVE_MINT } from "@solana/spl-token";
const connection = new Connection(
"https://api.mainnet-beta.solana.com/",
"finalized"
);
//get the pool status for SOl native token
async function getSolPoolStatus() {
const ssl = (await SSL.loadByMint(
connection,
ADDRESSES["MAINNET"].GFX_CONTROLLER,
NATIVE_MINT
))!;
const isSuspended = ssl.suspended;
return isSuspended;
// interprete the meaning from this: if true, the pool have been suspended and all txns to it will fail, if false the pool is active
}
getSolPoolStatus();
yarn build
: this will output the bundled js in the dist
folder.
Stability of the Functions
We hope you find the tools we used to build our API useful in the ts/src folder. Due to our on-going development of the GooseFX platform api, we cannot guarantee the stability of the SDK swap beyond 1 SOL. The SDK will be updated in later version to increase the compute units.
Integration Questions
Have problems integrating with the SDK? Pop by over to our Discord #general channel and chat with one of our engineers.
Issues / Bugs
If you found a bug, open up an issue on github with the prefix ISSUE. To help us be more effective in resolving the problem, be specific in the steps it took to reproduce the problem (ex. when did the issue occur, code samples, debug logs etc).
Feedback
Got ideas on how to improve the system? Open up an issue on github with the prefix [FEEDBACK] and let's brainstorm more about it together!
CONTROLLER_PROGRAM=3Gwyhoudx8XgYry8dzKQ2GGsofkUdm7VZUvddHxchL3x
SSL_PROGRAM=JYe7AcuQ7CqhkGvchJGvSKF8ei41FuDKb1h47qkbFNf
CONTROLLER=ApkmzBaTPUAeVj3QuqDcz6iLE6xZSLd29nke4McqrKw5
CONTROLLER_PROGRAM=8KJx48PYGHVC9fxzRRtYp4x4CM2HyYCm2EjVuAP4vvrx
SSL_PROGRAM=7WduLbRfYhTJktjLw5FDEyrqoEv61aTTCuGAetgLjzN5
CONTROLLER=8CxKnuJeoeQXFwiG6XiGY2akBjvJA5k3bE52BfnuEmNQ
FAQs
SDK for interacting with GooseFX Single-sided Liquidity pools
We found that @jup-ag/goosefx-ssl-sdk 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.