Credix
  • Welcome to Credix
  • General
    • Vision, mission
    • Abstract & Thesis
    • Terminology
  • Getting started
    • Start here!
    • Wallets & Custody
    • Getting USDC on Solana
    • KYC/B + accreditation
    • Investor onboarding guide
    • Borrow
  • Product
    • Stakeholders
    • Pools & deals
    • Liquidity & withdraw epochs
    • Portfolio returns
  • Integrate
    • npm package
    • On-chain (RUST crate)
  • Credit quality control
    • Eligibility criteria
    • Underwriting process
  • Tokens
    • LP tokens
    • Tranche tokens
    • Token Flows
    • Example deal (senior/junior)
  • Other links and resources
    • Platform terms of use
    • Disclosures and Disclaimers
    • Credix 101
    • Risks mitigation
    • Security at Credix
    • FAQ
    • Privacy Policy
    • Cookie Policy
Powered by GitBook
On this page
  • Devnet
  • Mainnet
  1. Integrate

npm package

PreviousPortfolio returnsNextOn-chain (RUST crate)

Last updated 2 years ago

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 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.

app.credix.finance
npm: @credix/credix-clientnpm
Logo