stableflow-ai-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 +19 -43
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -82,31 +82,30 @@ const tokens = await SFA.getTokens();
|
|
|
82
82
|
|
|
83
83
|
## Authentication
|
|
84
84
|
|
|
85
|
-
The StableFlow AI API requires JWT authentication for
|
|
85
|
+
The StableFlow AI API requires JWT authentication for all endpoints.
|
|
86
86
|
|
|
87
|
-
###
|
|
87
|
+
### Getting Your JWT Token
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
To use the SDK, you need to apply for a JWT token:
|
|
90
|
+
|
|
91
|
+
1. Visit [https://app.stableflow.ai/apply](https://app.stableflow.ai/apply)
|
|
92
|
+
2. Submit an application form for API access
|
|
93
|
+
3. Once approved, you will receive your JWT token
|
|
93
94
|
|
|
94
|
-
###
|
|
95
|
+
### Using Your Token
|
|
95
96
|
|
|
96
97
|
```typescript
|
|
97
|
-
// Set
|
|
98
|
-
OpenAPI.TOKEN =
|
|
99
|
-
// Get a fresh token from your authentication system
|
|
100
|
-
return 'FRESH_JWT';
|
|
101
|
-
};
|
|
98
|
+
// Set your JWT token
|
|
99
|
+
OpenAPI.TOKEN = 'your-JSON-Web-Token-here';
|
|
102
100
|
```
|
|
103
101
|
|
|
104
102
|
### Protected Endpoints
|
|
105
103
|
|
|
106
|
-
|
|
107
|
-
- `SFA.
|
|
108
|
-
- `SFA.
|
|
109
|
-
- `SFA.
|
|
104
|
+
All API endpoints require JWT authentication:
|
|
105
|
+
- `SFA.getTokens()` - Get supported tokens
|
|
106
|
+
- `SFA.getQuote()` - Get swap quote
|
|
107
|
+
- `SFA.submitDepositTx()` - Submit transaction
|
|
108
|
+
- `SFA.getExecutionStatus()` - Check transaction status
|
|
110
109
|
|
|
111
110
|
## Error Handling
|
|
112
111
|
|
|
@@ -155,39 +154,16 @@ npm run dev
|
|
|
155
154
|
Features:
|
|
156
155
|
- 🔗 **Wallet Connection** - Connect MetaMask or compatible wallets
|
|
157
156
|
- 🎨 **Modern UI** - Beautiful dark theme with gradients
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
- 🚀 **Execute Transactions** - Bridge
|
|
157
|
+
- 🌐 **6 Major Networks** - Ethereum, Arbitrum, Polygon, BNB Chain, Optimism, Avalanche
|
|
158
|
+
- 💰 **USDT Bridging** - Seamless USDT transfers across networks
|
|
159
|
+
- 💵 **Real-Time Quotes** - Get accurate fee and time estimates
|
|
160
|
+
- 🚀 **Execute Transactions** - Bridge USDT across chains with one click
|
|
162
161
|
- 📊 **Transaction History** - Track your bridging activity
|
|
163
162
|
|
|
164
163
|
**Tech Stack**: TypeScript, Vite, ethers.js, StableFlow SDK
|
|
165
164
|
|
|
166
165
|
See [examples/web-demo/README.md](examples/web-demo/README.md) for full documentation.
|
|
167
166
|
|
|
168
|
-
### 💻 Command Line Demo
|
|
169
|
-
|
|
170
|
-
Interactive CLI tool for testing SDK functionality:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
cd examples
|
|
174
|
-
npm install
|
|
175
|
-
export STABLEFLOW_JWT_TOKEN='your-jwt-token'
|
|
176
|
-
npm run demo
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
See [examples/BRIDGE_DEMO_GUIDE.md](examples/BRIDGE_DEMO_GUIDE.md) for detailed instructions.
|
|
180
|
-
|
|
181
|
-
### Other Examples
|
|
182
|
-
|
|
183
|
-
Check the `examples` directory for more examples:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
cd examples
|
|
187
|
-
npm install
|
|
188
|
-
npm start
|
|
189
|
-
```
|
|
190
|
-
|
|
191
167
|
## Development
|
|
192
168
|
|
|
193
169
|
Developer commands:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stableflow-ai-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "TypeScript SDK for StableFlow AI API - Cross-chain token swap solution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -61,4 +61,3 @@
|
|
|
61
61
|
"form-data": "^4.0.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|