> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with the developer-controlled wallets Node.js SDK

Use the
[Node.js SDK](https://www.npmjs.com/package/@circle-fin/developer-controlled-wallets)
to interact with
[Circle's Developer-Controlled Wallet APIs](/api-reference/wallets/developer-controlled-wallets/get-wallet-sets),
which allow you to embed secure wallets in your applications and create
blockchain transactions using the Developer Services platform.

This page provides short examples of how to install and use the
developer-controlled wallets SDK. For complete examples, see the
[Sample Projects](/sample-projects) page. For more information see the
[developer-controlled wallets documentation](/wallets/dev-controlled).

## Prerequisites

To use the Node.js SDK, ensure you have:

* [Node.js v22+](https://nodejs.org/) installed
* A [Circle Developer Console](https://console.circle.com) account
* An [API key](/build/keys) created in the Console:\
  **Keys → Create a key → API key → Standard Key**
* Your
  [Entity Secret registered](https://developers.circle.com/wallets/dev-controlled/register-entity-secret)

## Install the SDK

Use the following commands to install the SDK. You can
[view the package information on the npm site](https://www.npmjs.com/package/@circle-fin/developer-controlled-wallets).

<CodeGroup>
  ```shell npm theme={null}
  npm install @circle-fin/developer-controlled-wallets --save
  ```

  ```shell yarn theme={null}
  yarn add @circle-fin/developer-controlled-wallets
  ```
</CodeGroup>

## Developer-controlled wallets client

To start using the SDK, you first need to configure a client. Import the
`initiateDeveloperControlledWalletsClient` factory from the SDK, and then
initialize the client using your API key and entity secret.

### Import the client

The following example shows how to import the client and configure it to use
your API key and entity secret:

<CodeGroup>
  ```ts ES Module theme={null}
  import { initiateDeveloperControlledWalletsClient } from "@circle-fin/developer-controlled-wallets";
  const client = initiateDeveloperControlledWalletsClient({
    apiKey: "<your-api-key>",
    entitySecret: "<your-entity-secret>",
  });
  ```

  ```ts CommonJS theme={null}
  const {
    initiateDeveloperControlledWalletsClient,
  } = require("@circle-fin/developer-controlled-wallets");
  const client = initiateDeveloperControlledWalletsClient({
    apiKey: "<your-api-key>",
    entitySecret: "<your-entity-secret>",
  });
  ```
</CodeGroup>

### Create a wallet

The following example shows how to create a wallet using the client:

```ts TypeScript theme={null}
// Create a wallet set
const walletSetResponse = await client.createWalletSet({
  name: "Wallet Set 1",
});
console.log("Created WalletSet", walletSetResponse.data?.walletSet);

// Create a wallet on Arc Testnet
const walletsResponse = await client.createWallets({
  blockchains: ["ARC-TESTNET"],
  count: 1,
  walletSetId: walletSetResponse.data?.walletSet?.id ?? "",
});
console.log("Created Wallets", walletsResponse.data?.wallets);
```

### Create a transaction

The following example shows how to create a transaction using the client:

```ts TypeScript theme={null}
const response = await client.createTransaction({
  amounts: ["0.01"],
  destinationAddress: "0xa51c9c604b79a0fadbfed35dd576ca1bce71da0a",
  tokenId: "738c8a6d-8896-46d1-b2cb-083600c1c69b",
  walletId: "a635d679-4207-4e37-b12e-766afb9b3892",
  fee: { type: "level", config: { feeLevel: "HIGH" } },
});
console.log(response.data);
```

## Client configuration options

The client for the developer-controlled wallets SDK accepts the following
configuration parameters:

| **Option**     | **Required?** | **Description**                                                                                        |
| -------------- | ------------- | ------------------------------------------------------------------------------------------------------ |
| `apiKey`       | Yes           | The API key used to authenticate requests to the Circle API.                                           |
| `entitySecret` | Yes           | Your configured entity secret.                                                                         |
| `storage`      | No            | Optional custom storage solution for persisting data. If not provided, the SDK uses in-memory storage. |
