npm package

We have developed a Javascript SDK, published as an npm package + getting started guide here:

The guide runs you through two examples: Using the SDK in a react project and using the SDK in a regular JS script.

Devnet

The Solana program, deployed on Solana devnet has the following public key:

crdMwy1xFGCXHqSvBwvQtvfzcMKTEy5ThWFTjHVZhNK

In development, use the following config:

const connection = new Connection("https://api.devnet.solana.com");
const dummy_keypair = Keypair.generate();
const wallet = new NodeWallet(dummy_keypair);
const confirmOptions = {
 commitment: "confirmed",
 preflightCommitment: "processed",
};
const programId = new PublicKey(
  "CRdXwuY984Au227VnMJ2qvT7gPd83HwARYXcbHfseFKC"
 );
const config = { programId: programId, confirmOptions: confirmOptions };

In order to deposit/withdraw, you will need a Credix pass (=whitelisting) on Solana devnet. Please get in touch with [maxim -at- credix -dot- finance] to obtain your pass.

Mainnet

The Solana program, deployed on Solana mainnet-beta has the following public key:

CRDx2YkdtYtGZXGHZ59wNv1EwKHQndnRc1gT4p8i2vPX

In production, use the following config:

const connection = new Connection("https://api.mainnet-beta.solana.com");
const dummy_keypair = Keypair.generate();
const wallet = new NodeWallet(dummy_keypair);
const confirmOptions = {
 commitment: "confirmed",
 preflightCommitment: "processed",
};
const programId = new PublicKey(
  "CRDx2YkdtYtGZXGHZ59wNv1EwKHQndnRc1gT4p8i2vPX"
 );
const config = { programId: programId, confirmOptions: confirmOptions };

In order to deposit/withdraw, you will need a Credix pass (=whitelisting) on Solana mainnet-beta. Please complete the onboarding on app.credix.finance using any browser wallet / hardware wallet. Once you're fully onboarded, get in touch with [maxim -at- credix -dot- finance] to obtain a Credix pass for the public key / PDA used in your script.

Last updated