Prerequisites
To successfully use the developer-controlled wallets SDK, you need the following:- Have Node.js and npm installed. Circle recommends Node 16 or higher.
- Have an active Circle Developer Account.
- Generate an API key to use in requests to the Circle API.
- Generate an entity secret to use in requests with the developer-controlled wallets SDK.
Install the SDK
Use the following commands to install the SDK. You can view the package information on the npm site.Developer-controlled wallets client
To start using the SDK, you first need to configure a client. Import theinitiateDeveloperControlledWalletsClient 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:Create a wallet
The following example shows how to create a wallet using the client:Javascript
Create a transaction
The following example shows how to create a transaction using the client:Javascript
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. |