@sodax/sdk 0.0.1-rc.16 → 0.0.1-rc.18
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 +8 -10
- package/dist/index.cjs +499 -388
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1422 -1364
- package/dist/index.d.ts +1422 -1364
- package/dist/index.mjs +487 -389
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -4,24 +4,23 @@ The Sodax SDK provides a comprehensive interface for interacting with the Sodax
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
### Swaps (Solver / Intents)
|
|
7
|
+
### Swaps (Solver / Intents) [📖](./docs/SOLVER.md)
|
|
8
8
|
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic) ✅
|
|
9
9
|
- Sui ✅
|
|
10
10
|
- Stellar ✅
|
|
11
11
|
- ICON ✅
|
|
12
12
|
- Solana ✅
|
|
13
13
|
- Injective ✅
|
|
14
|
-
- Havah ❌ Coming soon
|
|
15
14
|
|
|
16
|
-
### Lend and Borrow (Money Market)
|
|
15
|
+
### Lend and Borrow (Money Market) [📖](./docs/MONEY_MARKET.md)
|
|
17
16
|
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic) ✅
|
|
18
17
|
- Sui ✅
|
|
19
18
|
- Stellar ✅
|
|
20
19
|
- ICON ✅
|
|
21
20
|
- Solana ✅
|
|
22
21
|
- Injective ✅
|
|
23
|
-
- Havah ❌ Coming soon
|
|
24
22
|
|
|
23
|
+
### Migration [📖](./docs/MIGRATION.md)
|
|
25
24
|
|
|
26
25
|
## Installation
|
|
27
26
|
|
|
@@ -218,16 +217,15 @@ const supportedMoneyMarketTokens: readonly Token[] = getSupportedMoneyMarketToke
|
|
|
218
217
|
|
|
219
218
|
Sodax SDK does not force the usage of a specific wallet or library, but requires client to provide implementation of `IWalletProvider` interfaces (e.g. for EVM chains `IEvmWalletProvider` has to be implemented).
|
|
220
219
|
|
|
221
|
-
As part of Sodax suite,
|
|
220
|
+
As part of Sodax suite, Wallet SDK is also going to be provided as one example wallet provider implementation. You are free to choose between using our Wallet SDK or implementing your own wallet connectivity for each chain.
|
|
222
221
|
|
|
223
222
|
- Supported Wallet Provider Interface (`IWalletProvider`)
|
|
224
223
|
- `IEvmWalletProvider`: EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon) ✅
|
|
225
224
|
- `ISuiWalletProvider`: Sui ✅
|
|
226
225
|
- `IIconWalletProvider`: ICON ✅
|
|
227
226
|
- `IStellarWalletProvider`: Stellar ✅
|
|
228
|
-
- Solana ✅
|
|
229
|
-
- Injective ✅
|
|
230
|
-
- Havah ❌ Coming soon
|
|
227
|
+
- `ISolanaWalletProvider`: Solana ✅
|
|
228
|
+
- `IInjectiveWalletProvider`: Injective ✅
|
|
231
229
|
|
|
232
230
|
### Initialising Spoke Provider
|
|
233
231
|
|
|
@@ -242,12 +240,12 @@ EVM Provider example:
|
|
|
242
240
|
```typescript
|
|
243
241
|
import { EvmProvider, EvmHubProvider, EvmSpokeProvider, AVALANCHE_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID } from "@sodax/sdk"
|
|
244
242
|
|
|
245
|
-
const evmWalletProvider: IEvmWalletProvider = // injected by
|
|
243
|
+
const evmWalletProvider: IEvmWalletProvider = // injected by Wallet SDK or your own implementation
|
|
246
244
|
|
|
247
245
|
// spoke provider represents connection to a specific chain, should be instantiated for each supported chain when user connects wallet
|
|
248
246
|
const bscSpokeProvider: EvmSpokeProvider = new EvmSpokeProvider(
|
|
249
247
|
evmWalletProvider, // user connected wallet
|
|
250
|
-
spokeChainConfig[BSC_MAINNET_CHAIN_ID]
|
|
248
|
+
spokeChainConfig[BSC_MAINNET_CHAIN_ID], // connected chain config
|
|
251
249
|
);
|
|
252
250
|
```
|
|
253
251
|
|