@circle-fin/usdckit 0.20.0 → 0.20.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 +43 -15
- package/dist/cjs/metadata.js +1 -1
- package/dist/esm/metadata.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,29 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
USDCKit is a Node.js SDK that streamlines interactions with USDC. With USDCKit, you can integrate USDC into your applications and enable secure and efficient blockchain transactions. USDCKit aims to provide multi-chain fund orchestration features to enable USDC payment use cases like crypto acquiring (C2B), payroll (B2C), remittance (C2C), and B2B cross-border payments.
|
|
6
6
|
|
|
7
|
-
The SDK is
|
|
7
|
+
The SDK is built with TypeScript and supports high-level use cases involving stablecoins, making it an important tool for developers working with digital currencies.
|
|
8
8
|
|
|
9
9
|
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:
|
|
10
10
|
|
|
11
11
|
- [Benefits of using USDCKit](#benefits-of-using-usdckit)
|
|
12
12
|
- [Quickstart to write your first line of code using USDCKit](#quickstart-steps)
|
|
13
|
-
- [Sample Code to run
|
|
13
|
+
- [Sample Code to run Stablecoin Acquiring Flow](./documents/Developer_Resources.Stablecoin_Acquiring_Flow.html)
|
|
14
14
|
|
|
15
15
|
### Benefits of Using USDCKit
|
|
16
16
|
|
|
17
|
-
- **Faster time-to-market**. USDCKit simplifies accepting and managing
|
|
18
|
-
- **Payment Focused**. USDCKit is built to offer all the features and tools required to create a complete end-to-end
|
|
17
|
+
- **Faster time-to-market**. USDCKit simplifies accepting and managing stablecoin payments with minimal code. It provides reusable payment modules and removes technical complexities for faster integration.
|
|
18
|
+
- **Payment Focused**. USDCKit is built to offer all the features and tools required to create a complete end-to-end stablecoin 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 Stablecoin Acquiring use case.
|
|
19
19
|
- **Scalable payments without bottlenecks**. Process millions of transactions efficiently with USDCKit’s high-performance infrastructure.
|
|
20
20
|
- **Enterprise-grade compliance management**. Adhere to global regulatory standards with real-time transaction screening through Compliance Engine.
|
|
21
21
|
|
|
22
22
|
#### Key features
|
|
23
23
|
|
|
24
|
-
Besides basic wallet management, transfers, and balance queries, USDCKit supports the
|
|
24
|
+
Besides basic wallet management, transfers, and balance queries, here are some of the other highlighted features that USDCKit supports that facilitate the orchestration of on-chain fund flow:
|
|
25
25
|
|
|
26
26
|
- **Fund sweeping**: Automate fund aggregation with many-to-1 transfers and optimize gas efficiency.
|
|
27
27
|
- **Cross-chain transfer**: Transfer funds between wallets on different chains.
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
28
|
+
- **Token Swap**: Convert one token type into another seamlessly.
|
|
29
|
+
- **Transaction screening**: Prevent wallets from transacting with OFAC sanctioned addresses.
|
|
30
30
|
|
|
31
31
|
## Quickstart Steps
|
|
32
32
|
|
|
@@ -85,9 +85,14 @@ const client = createCircleClient({
|
|
|
85
85
|
|
|
86
86
|
To create a new account (also known as wallet), use the [createAccount](./functions/providers_circle-wallets.createAccount.html) method. This will generate a new account that you can use for various operations such as transferring tokens and retrieving balances.
|
|
87
87
|
|
|
88
|
+
USDCKit currently supports the creation of **EOA** (Externally-Owned-Account) and **SCA** (Smart-Contract-Account). Refer to this [page](./documents/Developer_Resources.Account_Type_and_Gas_Fee_Management.html) to understand more and select the most appropriate account type for your business.
|
|
89
|
+
|
|
88
90
|
```typescript
|
|
89
|
-
// Creates an account on the default chain ETH_SEPOLIA
|
|
91
|
+
// Creates an account on the default chain ETH_SEPOLIA (EOA)
|
|
90
92
|
const account = await client.createAccount()
|
|
93
|
+
|
|
94
|
+
// Creates an account on the ARB_SEPOLIA (SCA)
|
|
95
|
+
const account = await client.createAccount({ accountType: 'SCA', chain: ARB_SEPOLIA })
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
### Query for accounts
|
|
@@ -136,11 +141,30 @@ const transaction_native = await client.transfer({
|
|
|
136
141
|
const transaction_usdc = await client.transfer({
|
|
137
142
|
from: account,
|
|
138
143
|
to: anotherAccount,
|
|
139
|
-
token:
|
|
144
|
+
token: ETH_SEPOLIA.contracts.USDC,
|
|
145
|
+
amount: '0.01',
|
|
146
|
+
chain: ETH_SEPOLIA,
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
// Create Transfer - EURC
|
|
150
|
+
const transaction_eurc = await client.transfer({
|
|
151
|
+
from: account,
|
|
152
|
+
to: anotherAccount,
|
|
153
|
+
token: ETH_SEPOLIA.contracts.EURC,
|
|
140
154
|
amount: '0.01',
|
|
155
|
+
chain: ETH_SEPOLIA,
|
|
141
156
|
})
|
|
142
157
|
|
|
143
|
-
// Create Transfer -
|
|
158
|
+
// Create Transfer - USDT
|
|
159
|
+
const transaction_usdt = await client.transfer({
|
|
160
|
+
from: account,
|
|
161
|
+
to: anotherAccount,
|
|
162
|
+
token: '0xdac17f958d2ee523a2206206994597c13d831ec7',
|
|
163
|
+
amount: '0.01',
|
|
164
|
+
chain: ETH,
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
// Create Transfer - Cross chain transfer (only supported for USDC)
|
|
144
168
|
const transaction_usdc = await client.transfer({
|
|
145
169
|
from: accountOnETH_SEPOLIA,
|
|
146
170
|
to: accountOnMATIC_AMOY,
|
|
@@ -211,17 +235,21 @@ const client = createClient({
|
|
|
211
235
|
|
|
212
236
|
```
|
|
213
237
|
|
|
214
|
-
##
|
|
238
|
+
## Samples
|
|
239
|
+
|
|
240
|
+
### Sample Code to run Stablecoin Acquiring Flow
|
|
241
|
+
|
|
242
|
+
Our sample code on the Stablecoin Acquiring Flow demonstrates the architecture and technical implementation of a typical acquiring platform. It guides you through the process to set up different wallets to collect stablecoin payments, and also to use different SDK methods to orchestrate the fund flow.
|
|
215
243
|
|
|
216
|
-
|
|
244
|
+
- Refer to the [Stablecoin Acquiring Flow sample code](./documents/Developer_Resources.Stablecoin_Acquiring_Flow.html)
|
|
217
245
|
|
|
218
246
|
## Future Plans
|
|
219
247
|
|
|
220
|
-
The current private release marks the first version of USDCKit, and we recognize that additional tools are needed to create a smooth
|
|
248
|
+
The current private release marks the first version of USDCKit, and we recognize that additional tools are needed to create a smooth stablecoin 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:
|
|
221
249
|
|
|
222
|
-
- Swap between USDC and other tokens
|
|
223
|
-
- Mass Payout of USDC
|
|
224
250
|
- Gas Efficiency Enhancement
|
|
251
|
+
- Mass Payout of Funds
|
|
252
|
+
- Pull Payment/Subscription Payment
|
|
225
253
|
|
|
226
254
|
## Feedback & Support
|
|
227
255
|
|
package/dist/cjs/metadata.js
CHANGED
package/dist/esm/metadata.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@circle-fin/usdckit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/circlefin/w3s-node-sdk.git"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@inquirer/prompts": "^7.5.3",
|
|
18
18
|
"axios": "^1.9.0",
|
|
19
19
|
"commander": "^14.0.0",
|
|
20
|
-
"pino": "
|
|
20
|
+
"pino": "~9.7.0",
|
|
21
21
|
"uuid": "^11.0.3",
|
|
22
22
|
"viem": "^2.23.13"
|
|
23
23
|
},
|