@circle-fin/developer-controlled-wallets
v4.4.1
Published
This SDK provides convenient access to Circle's Developer Controlled Wallets APIs for applications written in NodeJS. For the API reference, see the [Circle Web3 API docs](https://developers.circle.com/w3s/reference).
Downloads
2,279
Keywords
Readme
Circle's Developer Controlled Wallets NodeJS SDK
This SDK provides convenient access to Circle's Developer Controlled Wallets APIs for applications written in NodeJS. For the API reference, see the Circle Web3 API docs.
Installation
Install the package with:
npm install @circle-fin/developer-controlled-wallets --save
or
yarn add @circle-fin/developer-controlled-wallets
Usage
Generate an API key, if you haven't already, in the Web3 Services Console. This API key will be used for authentication and authorization when making requests to Circle's APIs.
Register an entity secret following Circle's Developer-Controlled QuickStart. This step ensures that your account is correctly set up to interact with Circle's APIs.
In your code, import the factory
initiateDeveloperControlledWalletsClient
from the SDK and initialize the client using your API key and entity secret:const { initiateDeveloperControlledWalletsClient } = require('@circle-fin/developer-controlled-wallets') const client = initiateDeveloperControlledWalletsClient({ apiKey: '<your-api-key>', entitySecret: '<your-entity-secret>', })
or
import { initiateDeveloperControlledWalletsClient } from '@circle-fin/developer-controlled-wallets' const client = initiateDeveloperControlledWalletsClient({ apiKey: '<your-api-key>', entitySecret: '<your-entity-secret>', })
Interact with the client:
const walletSetResponse = await client.createWalletSet({ name: 'WalletSet 1', }) console.log('Created WalletSet', walletSetResponse.data?.walletSet) const walletsResponse = await client.createWallets({ blockchains: ['MATIC-AMOY'], count: 2, walletSetId: walletSetResponse.data?.walletSet?.id ?? '', }) console.log('Created Wallets', walletsResponse.data?.wallets)
We recommend reading through the official documentation and QuickStart guides mentioned above to ensure a smooth setup and usage experience.
Configuration
The client accepts the following configuration parameters:
| Option | Required | Description |
| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
| apiKey
| [x] | Api Key that is used to authenticate against Circle APIs. |
| entitySecret
| [x] | Your configured entity secret. You can follow the QuickStart to set it up. |
| baseUrl
| [ ] | Optional base URL to override the default: https://api.circle.com
. |
| storage
| [ ] | Optional custom storage solution for persisting data. We will fallback to InMemoryStorage if none was provided. |
| userAgent
| [ ] | Optional custom user agent request header. We will prepend it to default user agent header if provided. |
Need help or have questions?
Here are some helpful links, if you encounter any issues or have questions about this SDK:
- 🎥 Watch and learn: Watch our step-by-step walkthrough of our official Developer-Controlled Wallets QuickStart.
- 🎮 Join our Discord Community: Engage, learn, and collaborate.
- 🛎 Visit our Help-Desk Page: Dive into curated FAQs and guides.
- 📧 Direct Email: We're always a message away.
- 📖 Read docs: Check out our developer documentation.
Happy coding!