@stableflow/core 3.0.0-beta-02a59f37a0-20260515
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 +60 -0
- package/dist/index.d.mts +749 -0
- package/dist/index.d.ts +749 -0
- package/dist/index.js +2232 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2191 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @stableflow/core
|
|
2
|
+
|
|
3
|
+
StableFlow core: HTTP client, API models, token/chain configuration, and shared utilities.
|
|
4
|
+
|
|
5
|
+
All API requests use the production endpoint **`https://api.stableflow.ai`** by default. No endpoint configuration is required for normal integration.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @stableflow/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- You need direct access to the StableFlow HTTP API (`SFA`).
|
|
16
|
+
- You need shared types (`TokenConfig`, `WalletConfig`), bridge `Service` enums, or chain/token registries.
|
|
17
|
+
- You are building on top of `@stableflow/bridges` or `@stableflow/wallet-*` (they depend on this package).
|
|
18
|
+
|
|
19
|
+
For full cross-chain bridge flows (multi-route quote, send, status), use [`@stableflow/bridges`](../bridges/README.md) instead of calling `SFA` alone.
|
|
20
|
+
|
|
21
|
+
## Main exports
|
|
22
|
+
|
|
23
|
+
| Category | Symbols |
|
|
24
|
+
|----------|---------|
|
|
25
|
+
| HTTP API | `SFA`, `OpenAPI`, `request`, `ApiError`, `CancelablePromise` |
|
|
26
|
+
| Bridge types | `Service`, `ServiceBackend`, `TransactionStatus`, `SendType` |
|
|
27
|
+
| Models | `QuoteRequest`, `QuoteResponse`, `TokenResponse`, `TokenConfig`, `WalletConfig`, … |
|
|
28
|
+
| Token / chain config | `tokens`, `usdtChains`, `usdcChains`, `frxusdChains`, `usdt0Chains` |
|
|
29
|
+
| RPC | `setRpcUrls`, `getRpcUrls`, `getChainRpcUrl`, `NetworkRpcUrlsMap` |
|
|
30
|
+
| Utilities | `formatQuoteError`, `getRouteStatus`, `getPrice`, `addressToBytes32`, `quoteSignature`, … |
|
|
31
|
+
|
|
32
|
+
See `dist/index.d.ts` after running `pnpm build`.
|
|
33
|
+
|
|
34
|
+
## Authentication (optional)
|
|
35
|
+
|
|
36
|
+
If your integration requires JWT authentication:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { OpenAPI } from '@stableflow/core';
|
|
40
|
+
|
|
41
|
+
OpenAPI.TOKEN = 'your-jwt-token';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## RPC configuration (optional)
|
|
45
|
+
|
|
46
|
+
Override or extend chain RPC URLs when the built-in defaults are insufficient:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { setRpcUrls } from '@stableflow/core';
|
|
50
|
+
|
|
51
|
+
setRpcUrls({
|
|
52
|
+
eth: ['https://your-eth-rpc.example.com'],
|
|
53
|
+
arb: ['https://your-arb-rpc.example.com'],
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## See also
|
|
58
|
+
|
|
59
|
+
- [Developer Guide](../../DEVELOPER_GUIDE.md)
|
|
60
|
+
- [@stableflow/bridges](../bridges/README.md)
|