@circle-fin/usdckit 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,60 +5,66 @@ USDCKit is a Node.js SDK that streamlines interactions with USDC. With USDCKit,
5
5
 
6
6
  The SDK is compatible with popular open-source clients like viem, web3.js, and ethers.js, and can also function as a standalone client. The SDK is built with TypeScript and supports high-level use cases involving USDC, making it an important tool for developers working with digital currencies.
7
7
 
8
-
9
- ### Key features
8
+ This guide will help you get started quickly and efficiently, whether you're building a wallet, a payment gateway, or anything in between. It covers the following items:
9
+ - [Benefits of using USDCKit](#benefits-of-using-usdckit)
10
+ - [Quickstart to write your first line of code using USDCKit](#quickstart)
11
+ - [Sample Code to run USDC Acquiring Flow](./documents/Solutions.USDC_Acquiring_Flow.html)
12
+
13
+ ### Benefits of Using USDCKit
14
+ - **Faster time-to-market**. USDCKit simplifies accepting and managing USDC payments with minimal code. It provides reusable payment modules and removes technical complexities for faster integration.
15
+ - **Payment Focused**. USDCKit is built to offer all the features and tools required to create a complete end-to-end USDC payment flow, with functionalities tailored for payment use cases. It also includes sample code for specific payment products, making it easier to develop your own. The focus of the current release is USDC Acquiring use case.
16
+ - **Scalable payments without bottlenecks**. Process millions of transactions efficiently with USDCKit’s high-performance infrastructure.‍
17
+ - **Enterprise-grade compliance management**. Adhere to global regulatory standards with real-time transaction screening through Compliance Engine.‍
18
+
19
+ #### Key features
10
20
  USDCKit supports the following features:
11
21
  * Wallet management: Create and manage wallets across multiple chains.
12
22
  * Balance querying and filtering: Query wallet balances and filter wallets by balance threshold.
13
23
  * Fund transfer: Transfer funds between wallets.
14
24
  * Fund sweeping: Automate fund aggregation and optimize gas efficiency.
15
25
 
16
- ## Setup
17
-
18
- USDCKit is built on top of Circle Programmable Wallet - Developer Controlled Wallet, you will need to set up a Circle Programmable Wallets account before using the service. Please follow these steps:
19
-
20
- 1. **Sign Up**: Go to the [Circle Programmable Wallets](https://www.circle.com/en/programmable-wallets) website and sign up for an account. This account will be used to manage your access to Circle Web3 services.
26
+ ## Quickstart Steps
27
+ ### Setup
28
+ USDCKit is built on top of Circle Wallets’ developer-controlled wallets. You will need to set up a Developer Console account before using the service. Please follow these steps:
29
+ 1. **Sign Up**: Go to the Developer Console and sign up for an account. This account will be used to manage your access to Circle’s Developer Services. Follow the [instructions](https://developers.circle.com/interactive-quickstarts/get-started#create-a-web3-services-account) for more details.
21
30
  2. **Generate API Keys**: Navigate to the API section of your project and generate a new API key. Make sure to store the API key securely as it will be used to authenticate your requests. Follow the [instructions](https://developers.circle.com/interactive-quickstarts/get-started#create-your-api-key) for more details.
22
31
  3. **Generate Entity Secret**: The Entity Secret is a robust 32-byte key engineered to enhance the security mechanisms of wallets. Follow the [instructions](https://developers.circle.com/interactive-quickstarts/dev-controlled-wallets#setup-your-entity-secret) to setup your Entity Secret.
23
32
  4. **You are good to go!**
24
33
 
25
-
26
34
  ### Installation
27
-
28
35
  To install USDCKit from NPM, run the following command in your project directory:
29
-
30
36
  ```bash
31
37
  npm install @circle-fin/usdckit
32
38
  ```
33
-
34
- ## Usage
35
-
36
39
  ### Initialization
37
-
38
40
  To get started with USDKit, initialize a client with the API Key and Entity Secret from [Setup](#setup)
41
+
39
42
  ```typescript
40
43
  import { createCircleClient } from '@circle-fin/usdckit'
41
44
  import { ETH_SEPOLIA } from '@circle-fin/usdckit/chains'
42
45
 
43
46
  const client = createCircleClient({
44
- apiKey: 'CIRCLE_API_KEY',
45
- entitySecret: 'CIRCLE_ENTITY_SECRET',
46
- chain: ETH_SEPOLIA, // Optional. Defaults to `ETH_SEPOLIA`
47
+ apiKey: 'REPLACE_WITH_CIRCLE_API_KEY',
48
+ entitySecret: 'REPLACE_WITH_CIRCLE_ENTITY_SECRET',
49
+
50
+ // Optional. Defaults to `ETH_SEPOLIA`
51
+ chain: ETH_SEPOLIA,
47
52
  })
48
53
  ```
49
54
 
55
+ ## Usage
56
+
50
57
  ### Create Account
51
58
  To create a new account, use the `createAccount` method. This will generate a new account that you can use for various operations such as transferring tokens and retrieving balances.
52
59
 
53
60
  ```typescript
54
- const account = await client.createAccount() // Creates an account on ETH_SEPOLIA
61
+ // Creates an account on the default chain ETH_SEPOLIA
62
+ const account = await client.createAccount()
55
63
  ```
56
64
 
57
-
58
65
  ### Query for accounts
59
66
  To query for existing accounts, use the getAccounts method. This will return the account details associated with the provided account query.
60
67
 
61
-
62
68
  ```typescript
63
69
  // Query by Address
64
70
  const account = await client.getAccounts({ address: '0xmy-address' })
@@ -70,15 +76,18 @@ const account = await client.getAccounts({ refId: 'user-1' })
70
76
  const account = await client.getAccounts({ amountGte: 1000 })
71
77
  ```
72
78
 
73
-
74
79
  ### Fund Account with Testnet Tokens
75
-
76
80
  To fund an account with testnet tokens, you can use the `drip` method. This method provides native tokens, USDC, and EURC for testing purposes.
77
81
 
78
82
  ```typescript
79
- await client.drip({ account }) // Receive native tokens, USDC, and EURC
80
- await client.drip({ account, token: null }) // Receive native
81
- await client.drip({ account, token: client.chain.contracts.USDC }) // Receive USDC
83
+ // Receive native tokens, USDC, and EURC
84
+ await client.drip({ account })
85
+
86
+ // Receive native
87
+ await client.drip({ account, token: null })
88
+
89
+ // Receive USDC
90
+ await client.drip({ account, token: client.chain.contracts.USDC })
82
91
  ```
83
92
 
84
93
  ### Transfer tokens
@@ -102,6 +111,7 @@ const transaction_usdc = await client.transfer({
102
111
  ```
103
112
 
104
113
  #### Batch Transfers
114
+ Transfer from multiple source accounts to a single destination account
105
115
 
106
116
  ```typescript
107
117
  // Create Transfer - Batch transfer
@@ -129,4 +139,20 @@ Retrieves the token balances for a specified account.
129
139
 
130
140
  ```typescript
131
141
  const balance = await client.getTokenBalances({ account: account_2 })
132
- ```
142
+ ```
143
+
144
+ ## Sample Code to run USDC Acquiring Flow
145
+ For more details on how to run an end-to-end USDC Acquiring Flow to support your business, refer to the [USDC Acquiring Flow sample code](./documents/Solutions.USDC_Acquiring_Flow.html)
146
+
147
+ ## Future Plans
148
+ The current private release marks the first version of USDCKit, and we recognize that additional tools are needed to create a smooth USDC payment experience. As such, we are actively working on several modules and would greatly appreciate your feedback. Our roadmap includes, but is not limited to, the following:
149
+ - Cross-Chain Send of USDC
150
+ - Swap of USDC
151
+ - Mass Payout of USDC
152
+ - Gas Efficiency Enhancement
153
+
154
+ ## Feedback & Support
155
+ If you have any questions or need assistance, don't hesitate to reach out to the team directly([usdckit@circle.com](mailto:usdckit@circle.com)). We're here to support you every step of the way.
156
+
157
+ Happy coding!
158
+
@@ -14,5 +14,5 @@ exports.VERSION = void 0;
14
14
  /**
15
15
  * The current semantic version of the SDK
16
16
  */
17
- exports.VERSION = `${'0.15.0' || '0.0.0'}`;
17
+ exports.VERSION = `${'0.15.1' || '0.0.0'}`;
18
18
  //# sourceMappingURL=metadata.js.map
@@ -3,7 +3,7 @@ import type { CreateWalletSetInput, WalletSet } from '../provider.js';
3
3
  /**
4
4
  * Create a developer controlled wallet set.
5
5
  *
6
- * @returns Created Wallet Set.
6
+ * @returns Created wallet set.
7
7
  *
8
8
  * @example
9
9
  * ```typescript
@@ -14,7 +14,7 @@ exports.createWalletSet = createWalletSet;
14
14
  /**
15
15
  * Create a developer controlled wallet set.
16
16
  *
17
- * @returns Created Wallet Set.
17
+ * @returns Created wallet set.
18
18
  *
19
19
  * @example
20
20
  * ```typescript
@@ -11,5 +11,5 @@
11
11
  /**
12
12
  * The current semantic version of the SDK
13
13
  */
14
- export const VERSION = `${'0.15.0' || '0.0.0'}`;
14
+ export const VERSION = `${'0.15.1' || '0.0.0'}`;
15
15
  //# sourceMappingURL=metadata.js.map
@@ -3,7 +3,7 @@ import type { CreateWalletSetInput, WalletSet } from '../provider.js';
3
3
  /**
4
4
  * Create a developer controlled wallet set.
5
5
  *
6
- * @returns Created Wallet Set.
6
+ * @returns Created wallet set.
7
7
  *
8
8
  * @example
9
9
  * ```typescript
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Create a developer controlled wallet set.
13
13
  *
14
- * @returns Created Wallet Set.
14
+ * @returns Created wallet set.
15
15
  *
16
16
  * @example
17
17
  * ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circle-fin/usdckit",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/circlefin/w3s-node-sdk.git"