# npm package

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

{% embed url="<https://www.npmjs.com/package/@credix/credix-client>" %}

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

### Devnet

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

```
crdMwy1xFGCXHqSvBwvQtvfzcMKTEy5ThWFTjHVZhNK
```

In development, use the following config:&#x20;

<pre class="language-javascript"><code class="lang-javascript">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",
};
<strong>const programId = new PublicKey(
</strong>  "CRdXwuY984Au227VnMJ2qvT7gPd83HwARYXcbHfseFKC"
 );
const config = { programId: programId, confirmOptions: confirmOptions };
</code></pre>

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.&#x20;

### Mainnet

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

```
CRDx2YkdtYtGZXGHZ59wNv1EwKHQndnRc1gT4p8i2vPX
```

In production, use the following config:&#x20;

<pre class="language-javascript"><code class="lang-javascript">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",
};
<strong>const programId = new PublicKey(
</strong>  "CRDx2YkdtYtGZXGHZ59wNv1EwKHQndnRc1gT4p8i2vPX"
 );
const config = { programId: programId, confirmOptions: confirmOptions };
</code></pre>

In order to deposit/withdraw, you will need a Credix pass (=whitelisting) on Solana mainnet-beta. Please complete the onboarding on [app.credix.finance](https://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.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.credix.finance/integrate/npm-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
