# 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;
