@x402-crosschain/facilitator 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 +30 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The facilitator handles cross-chain payment routing, bridging via Relay Network,
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
##**Overview**
|
|
10
10
|
|
|
11
11
|
The facilitator is the backend engine that powers cross-chain x402 payments:
|
|
12
12
|
|
|
@@ -17,18 +17,18 @@ The facilitator is the backend engine that powers cross-chain x402 payments:
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## **Key Features**
|
|
21
21
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
22
|
+
- **Instant Bridging** - 2-3 second settlement via Relay liquidity pools
|
|
23
|
+
- **69+ Chains** - Support for all major EVM chains + Solana, Bitcoin
|
|
24
|
+
- **Non-Custodial** - No funds held, only coordinates transactions
|
|
25
|
+
- **Status Polling** - Automatic bridge completion tracking
|
|
26
|
+
- **Docker Ready** - Easy deployment with Docker/Kubernetes
|
|
27
|
+
- **Configurable** - Environment-based configuration
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## **Deployment Options**
|
|
32
32
|
|
|
33
33
|
### **Option 1: Docker (Recommended)**
|
|
34
34
|
|
|
@@ -74,7 +74,7 @@ await startFacilitator({
|
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
77
|
-
##
|
|
77
|
+
## **Configuration**
|
|
78
78
|
|
|
79
79
|
### **Environment Variables**
|
|
80
80
|
|
|
@@ -103,7 +103,7 @@ POLL_INTERVAL=10000
|
|
|
103
103
|
|
|
104
104
|
---
|
|
105
105
|
|
|
106
|
-
##
|
|
106
|
+
## **API Endpoints**
|
|
107
107
|
|
|
108
108
|
### **POST /quote-route**
|
|
109
109
|
|
|
@@ -237,7 +237,7 @@ GET http://localhost:3001/health
|
|
|
237
237
|
|
|
238
238
|
---
|
|
239
239
|
|
|
240
|
-
##
|
|
240
|
+
## **Architecture**
|
|
241
241
|
|
|
242
242
|
```
|
|
243
243
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
@@ -275,7 +275,7 @@ GET http://localhost:3001/health
|
|
|
275
275
|
|
|
276
276
|
---
|
|
277
277
|
|
|
278
|
-
##
|
|
278
|
+
## **Payment Flow**
|
|
279
279
|
|
|
280
280
|
```
|
|
281
281
|
1. Client โ POST /quote-route
|
|
@@ -299,7 +299,7 @@ GET http://localhost:3001/health
|
|
|
299
299
|
|
|
300
300
|
---
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
##**Docker Deployment**
|
|
303
303
|
|
|
304
304
|
### **Dockerfile**
|
|
305
305
|
|
|
@@ -385,11 +385,11 @@ spec:
|
|
|
385
385
|
|
|
386
386
|
---
|
|
387
387
|
|
|
388
|
-
##
|
|
388
|
+
## **Security Considerations**
|
|
389
389
|
|
|
390
390
|
### **Private Key Management**
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
**CRITICAL**: Never expose your settler private key!
|
|
393
393
|
|
|
394
394
|
```bash
|
|
395
395
|
# โ
Good: Use environment variables
|
|
@@ -434,7 +434,7 @@ curl http://localhost:3001/health | jq '.activePayments'
|
|
|
434
434
|
|
|
435
435
|
---
|
|
436
436
|
|
|
437
|
-
##
|
|
437
|
+
## **Operational Metrics**
|
|
438
438
|
|
|
439
439
|
### **Performance**
|
|
440
440
|
|
|
@@ -460,7 +460,7 @@ curl http://localhost:3001/health | jq '.activePayments'
|
|
|
460
460
|
|
|
461
461
|
---
|
|
462
462
|
|
|
463
|
-
##
|
|
463
|
+
## **Testing**
|
|
464
464
|
|
|
465
465
|
### **Local Testing**
|
|
466
466
|
|
|
@@ -494,7 +494,7 @@ See [`examples/`](../../examples/) directory for full integration tests.
|
|
|
494
494
|
|
|
495
495
|
---
|
|
496
496
|
|
|
497
|
-
##
|
|
497
|
+
## **Troubleshooting**
|
|
498
498
|
|
|
499
499
|
### **Common Issues**
|
|
500
500
|
|
|
@@ -536,7 +536,7 @@ docker ps | grep facilitator
|
|
|
536
536
|
|
|
537
537
|
---
|
|
538
538
|
|
|
539
|
-
##
|
|
539
|
+
## **Scaling**
|
|
540
540
|
|
|
541
541
|
### **Horizontal Scaling**
|
|
542
542
|
|
|
@@ -560,7 +560,7 @@ await redis.set(`payment:${paymentId}`, JSON.stringify(payment));
|
|
|
560
560
|
|
|
561
561
|
---
|
|
562
562
|
|
|
563
|
-
##
|
|
563
|
+
## **Upgrading**
|
|
564
564
|
|
|
565
565
|
### **Version Migration**
|
|
566
566
|
|
|
@@ -577,7 +577,7 @@ kubectl rollout status deployment/x402-facilitator
|
|
|
577
577
|
|
|
578
578
|
---
|
|
579
579
|
|
|
580
|
-
##
|
|
580
|
+
## **API Client Examples**
|
|
581
581
|
|
|
582
582
|
### **JavaScript/TypeScript**
|
|
583
583
|
|
|
@@ -615,27 +615,20 @@ curl https://facilitator.yourdomain.com/health
|
|
|
615
615
|
|
|
616
616
|
---
|
|
617
617
|
|
|
618
|
-
|
|
618
|
+
##**License**
|
|
619
619
|
|
|
620
|
-
|
|
620
|
+
MIT License
|
|
621
621
|
|
|
622
622
|
---
|
|
623
|
-
|
|
624
|
-
## ๐ **Acknowledgments**
|
|
625
|
-
|
|
626
|
-
- [Relay Network](https://relay.link) - Instant cross-chain bridging
|
|
627
|
-
- [x402 Protocol](https://x402.org) - Open payment standard
|
|
628
|
-
- [ethers.js](https://docs.ethers.org) - Ethereum interactions
|
|
629
|
-
|
|
630
623
|
---
|
|
631
624
|
|
|
632
|
-
##
|
|
625
|
+
## **Support**
|
|
626
|
+
|
|
627
|
+
- **GitHub Issues**: https://github.com/divi2806/x402-cross-bridge-sdk/issues
|
|
628
|
+
- **Email**: divyansh2824@gmail.com
|
|
633
629
|
|
|
634
|
-
|
|
635
|
-
-
|
|
636
|
-
- **Discord**: https://discord.gg/your-invite
|
|
637
|
-
- **Email**: support@x402crosschain.com
|
|
630
|
+
## **Reference**
|
|
631
|
+
- Refer to facilitator on how to integrate/use the cross chain sdk to integrate with merchants - https://www.npmjs.com/package/@x402-crosschain/sdk
|
|
638
632
|
|
|
639
633
|
---
|
|
640
634
|
|
|
641
|
-
**Made with โค๏ธ by the x402 Cross-Chain Team**
|