@rozoai/intent-common 0.1.1-beta.8 → 0.1.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 +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ npm install @rozoai/intent-common
|
|
|
15
15
|
Use the new payment API for all new integrations:
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
|
-
import {
|
|
18
|
+
import { createPayment, getPayment } from "@rozoai/intent-common";
|
|
19
19
|
|
|
20
20
|
// Create a payment
|
|
21
|
-
const payment = await
|
|
21
|
+
const payment = await createPayment({
|
|
22
22
|
appId: "your-app-id",
|
|
23
23
|
toChain: 8453, // Base
|
|
24
24
|
toToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // Base USDC
|
|
@@ -30,7 +30,7 @@ const payment = await createNewPayment({
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// Get payment status
|
|
33
|
-
const status = await
|
|
33
|
+
const status = await getPayment(payment.id);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Prior Payment API (Legacy)
|
|
@@ -118,7 +118,7 @@ Based on `supportedTokens` Map in the codebase:
|
|
|
118
118
|
import { base, baseUSDC, polygon, polygonUSDC } from "@rozoai/intent-common";
|
|
119
119
|
|
|
120
120
|
// Use in payment config
|
|
121
|
-
const payment = await
|
|
121
|
+
const payment = await createPayment({
|
|
122
122
|
toChain: base.chainId, // or 8453
|
|
123
123
|
toToken: baseUSDC.token, // or "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
124
124
|
// ...
|