@x402-crosschain/sdk 1.0.0 → 1.0.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 +15 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,25 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
> **Cross-chain payment SDK extending x402 protocol with instant multi-chain support**
|
|
4
4
|
|
|
5
|
-
Enable your application to accept payments in any token on any chain, with instant settlement in USDC on Base. Built on the x402 payment protocol with
|
|
5
|
+
Enable your application to accept payments in any token on any chain, with instant settlement in USDC on Base. Built on the x402 payment protocol with instant bridging.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@x402-crosschain/sdk)
|
|
8
|
-
[](LICENSE)
|
|
10
9
|
---
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
##**Key Features**
|
|
13
12
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
13
|
+
- **Instant Settlement** - 2-3 second cross-chain payments via Relay
|
|
14
|
+
- **69+ Chains** - Support for Ethereum, Arbitrum, Base, Polygon, Solana, and more
|
|
15
|
+
- **Any Token** - Accept payments in ETH, USDC, USDT, or any supported token
|
|
16
|
+
- **Secure** - Built on x402 standard with on-chain settlement verification
|
|
17
|
+
- **Merchant-Friendly** - Simple Express middleware integration
|
|
18
|
+
- **Production Ready** - Used in production with proven reliability
|
|
20
19
|
|
|
21
20
|
---
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## **Installation**
|
|
24
23
|
|
|
25
24
|
```bash
|
|
26
25
|
npm install @x402-crosschain/sdk
|
|
@@ -32,7 +31,7 @@ pnpm add @x402-crosschain/sdk
|
|
|
32
31
|
|
|
33
32
|
---
|
|
34
33
|
|
|
35
|
-
##
|
|
34
|
+
## **Quick Start**
|
|
36
35
|
|
|
37
36
|
### **For Merchants (Backend)**
|
|
38
37
|
|
|
@@ -100,7 +99,7 @@ if (response.status === 402) {
|
|
|
100
99
|
|
|
101
100
|
---
|
|
102
101
|
|
|
103
|
-
|
|
102
|
+
##**Architecture**
|
|
104
103
|
|
|
105
104
|
```
|
|
106
105
|
┌─────────────────────────────────────────────────────────┐
|
|
@@ -117,7 +116,7 @@ if (response.status === 402) {
|
|
|
117
116
|
▼
|
|
118
117
|
┌────────────────────────┐
|
|
119
118
|
│ x402 Facilitator │
|
|
120
|
-
│ (
|
|
119
|
+
│ (our facilitator or │
|
|
121
120
|
│ hosted service) │
|
|
122
121
|
└────────────────────────┘
|
|
123
122
|
│
|
|
@@ -137,7 +136,7 @@ if (response.status === 402) {
|
|
|
137
136
|
|
|
138
137
|
---
|
|
139
138
|
|
|
140
|
-
##
|
|
139
|
+
## **API Reference**
|
|
141
140
|
|
|
142
141
|
### **Merchant Middleware**
|
|
143
142
|
|
|
@@ -312,7 +311,7 @@ try {
|
|
|
312
311
|
|
|
313
312
|
---
|
|
314
313
|
|
|
315
|
-
|
|
314
|
+
##**Self-Hosting the Facilitator**
|
|
316
315
|
|
|
317
316
|
You can run your own facilitator for full control:
|
|
318
317
|
|