@soroswap/sdk 0.1.0 โ†’ 0.1.2

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 CHANGED
@@ -5,12 +5,12 @@ Official TypeScript SDK for [Soroswap.Finance](https://soroswap.finance) - The f
5
5
  ## ๐ŸŒŸ Features
6
6
 
7
7
  - **๐Ÿ” Automatic Authentication**: Handles login, token refresh, and session management
8
- - **๐Ÿ’ฑ Trading Operations**: Get quotes, send transactions, and access multiple protocols
8
+ - **๐Ÿ’ฑ Trading Operations**: Get quotes, build transactions, send them to the network
9
9
  - **๐Ÿ’ง Liquidity Management**: Add/remove liquidity and track positions
10
10
  - **๐Ÿ“Š Market Data**: Access pools, prices, and asset information
11
11
  - **๐Ÿ”’ Server-Side Focused**: Secure handling of credentials and sensitive operations
12
12
  - **๐Ÿ“ TypeScript Support**: Full type safety with comprehensive interfaces
13
- - **โšก Token Caching**: In-memory token management with automatic refresh
13
+ - **โšก Access Token Caching**: In-memory access token management with automatic refresh
14
14
  - **๐Ÿงช Well Tested**: Comprehensive unit test coverage
15
15
 
16
16
  ## ๐Ÿš€ Installation
@@ -22,32 +22,36 @@ pnpm install soroswap-sdk
22
22
  ## ๐Ÿ“– Quick Start
23
23
 
24
24
  ```typescript
25
- import { SoroswapSDK } from 'soroswap-sdk';
25
+ import { SoroswapSDK, SupportedNetworks, SupportedProtocols, TradeType } from '@soroswap/sdk';
26
26
 
27
27
  // Initialize the SDK
28
28
  const soroswapClient = new SoroswapSDK({
29
29
  email: 'your-email@example.com',
30
- password: 'your-password',
31
- defaultNetwork: 'mainnet', // or 'testnet'
30
+ password: 'your-password'
32
31
  });
33
32
 
34
33
  // Get a quote for a swap
35
34
  const quote = await soroswapClient.quote({
36
35
  assetIn: 'CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA',
37
36
  assetOut: 'CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV',
38
- amount: '10000000',
39
- tradeType: 'EXACT_IN',
40
- protocols: ['soroswap', 'aqua'],
37
+ amount: 10000000n, // Note: Amount must be a BigInt
38
+ tradeType: TradeType.EXACT_IN,
39
+ protocols: [SupportedProtocols.SDEX, SupportedProtocols.SOROSWAP, SupportedProtocols.AQUA],
40
+ });
41
+
42
+ // Build the transaction XDR from the quote
43
+ const buildResponse = await soroswapClient.build({
44
+ quote,
41
45
  from: 'YOUR_WALLET_ADDRESS',
42
46
  to: 'RECIPIENT_ADDRESS'
43
47
  });
44
48
 
45
49
  // Sign the transaction with your preferred signer
46
- const signedXdr = await yourSigner.sign(quote.xdr);
50
+ const signedXdr = await yourSigner.sign(buildResponse.xdr);
47
51
 
48
52
  // Send the signed transaction
49
- const result = await soroswapClient.send(signedXdr, 100);
50
- console.log('Transaction hash:', result.hash);
53
+ const result = await soroswapClient.send(signedXdr, false); // launchtube = false
54
+ console.log('Transaction result:', result);
51
55
  ```
52
56
 
53
57
  ## ๐Ÿ”ง Configuration
@@ -56,10 +60,10 @@ console.log('Transaction hash:', result.hash);
56
60
 
57
61
  ```typescript
58
62
  interface SoroswapSDKConfig {
59
- email: string; // Your Soroswap account email
60
- password: string; // Your Soroswap account password
61
- defaultNetwork?: Network; // 'mainnet' | 'testnet' (defaults to 'mainnet')
62
- timeout?: number; // Request timeout in ms (defaults to 30000)
63
+ email: string; // Your Soroswap account email
64
+ password: string; // Your Soroswap account password
65
+ defaultNetwork?: SupportedNetworks; // SupportedNetworks.MAINNET | SupportedNetworks.TESTNET
66
+ timeout?: number; // Request timeout in ms (defaults to 30000) you might want to adjust this if using launchtube
63
67
  }
64
68
  ```
65
69
 
@@ -68,10 +72,12 @@ interface SoroswapSDKConfig {
68
72
  For better security, you can use environment variables:
69
73
 
70
74
  ```typescript
71
- const sdk = new SoroswapSDK({
75
+ const soroswapClient = new SoroswapSDK({
72
76
  email: process.env.SOROSWAP_EMAIL!,
73
77
  password: process.env.SOROSWAP_PASSWORD!,
74
- defaultNetwork: process.env.NODE_ENV === 'production' ? 'mainnet' : 'testnet'
78
+ defaultNetwork: process.env.NODE_ENV === 'production'
79
+ ? SupportedNetworks.MAINNET
80
+ : SupportedNetworks.TESTNET
75
81
  });
76
82
  ```
77
83
 
@@ -79,24 +85,11 @@ const sdk = new SoroswapSDK({
79
85
 
80
86
  ### Authentication
81
87
 
82
- The SDK handles authentication automatically, but you can also manage it manually:
88
+ The SDK handles authentication automatically:
83
89
 
84
90
  ```typescript
85
91
  // Check authentication status
86
- const isAuth = sdk.isAuthenticated();
87
-
88
- // Get user information
89
- const userInfo = sdk.getUserInfo();
90
-
91
- // Logout (clears tokens)
92
- sdk.logout();
93
-
94
- // Register a new user
95
- await sdk.register({
96
- username: 'newuser',
97
- email: 'user@example.com',
98
- password: 'SecurePassword123!'
99
- });
92
+ const isAuth = soroswapClient.isAuthenticated();
100
93
  ```
101
94
 
102
95
  ### Trading Operations
@@ -104,30 +97,48 @@ await sdk.register({
104
97
  #### Get Available Protocols
105
98
 
106
99
  ```typescript
107
- const protocols = await sdk.getProtocols('mainnet');
108
- // Returns: ['soroswap', 'phoenix', 'aqua']
100
+ const protocols = await soroswapClient.getProtocols(SupportedNetworks.MAINNET);
101
+ // Returns: ['sdex', 'soroswap', 'phoenix', 'aqua']
109
102
  ```
110
103
 
111
104
  #### Get Quote
112
105
 
113
106
  ```typescript
114
- const quote = await sdk.quote({
107
+ const quote = await soroswapClient.quote({
115
108
  assetIn: 'TOKEN_A_CONTRACT',
116
109
  assetOut: 'TOKEN_B_CONTRACT',
117
- amount: '1000000',
118
- tradeType: 'EXACT_IN',
119
- protocols: ['soroswap', 'aqua'],
110
+ amount: 1000000n, // BigInt required
111
+ tradeType: TradeType.EXACT_IN,
112
+ protocols: [SupportedProtocols.SOROSWAP, SupportedProtocols.AQUA],
120
113
  slippageTolerance: '50', // 0.5% in basis points
121
114
  maxHops: 2,
122
115
  feeBps: 30, // Optional fee in basis points
123
- referralId: 'REFERRAL_WALLET_ADDRESS' // Required if feeBps is provided
124
116
  });
125
117
  ```
126
118
 
119
+ #### Build Transaction
120
+
121
+ After getting a quote, build the transaction XDR:
122
+
123
+ ```typescript
124
+ const buildResponse = await soroswapClient.build({
125
+ quote: quote,
126
+ from: 'YOUR_WALLET_ADDRESS',
127
+ to: 'RECIPIENT_ADDRESS', // Optional, defaults to 'from'
128
+ referralId: 'REFERRAL_WALLET_ADDRESS' // Required if quote includes feeBps
129
+ });
130
+
131
+ // buildResponse.xdr contains the transaction ready for signing
132
+ ```
133
+
127
134
  #### Send Signed Transaction
128
135
 
129
136
  ```typescript
130
- const result = await sdk.send(signedXdr, 100); // fee in stroops
137
+ const result = await soroswapClient.send(
138
+ signedXdr, // The signed transaction XDR
139
+ false, // launchtube: boolean (default false)
140
+ SupportedNetworks.MAINNET // Optional network override
141
+ );
131
142
  ```
132
143
 
133
144
  ### Pool Operations
@@ -136,18 +147,18 @@ const result = await sdk.send(signedXdr, 100); // fee in stroops
136
147
 
137
148
  ```typescript
138
149
  // Get all pools for specific protocols
139
- const pools = await sdk.getPools(
140
- 'mainnet',
141
- ['soroswap', 'aqua'],
142
- ['SOROSWAP', 'STELLAR_EXPERT'] // Optional asset list filter
150
+ const pools = await soroswapClient.getPools(
151
+ SupportedNetworks.MAINNET,
152
+ [SupportedProtocols.SOROSWAP, SupportedProtocols.AQUA],
153
+ [SupportedAssetLists.SOROSWAP] // Optional asset list filter
143
154
  );
144
155
 
145
156
  // Get specific pool for token pair
146
- const pool = await sdk.getPoolByTokens(
157
+ const pool = await soroswapClient.getPoolByTokens(
147
158
  'TOKEN_A_CONTRACT',
148
159
  'TOKEN_B_CONTRACT',
149
- 'mainnet',
150
- ['soroswap']
160
+ SupportedNetworks.MAINNET,
161
+ [SupportedProtocols.SOROSWAP]
151
162
  );
152
163
  ```
153
164
 
@@ -155,25 +166,46 @@ const pool = await sdk.getPoolByTokens(
155
166
 
156
167
  #### Add Liquidity
157
168
 
169
+ **Important**: Before adding liquidity, you should fetch the existing pool to calculate the proper token proportions. The amounts must maintain the current pool ratio, otherwise the transaction will fail during simulation.
170
+
158
171
  ```typescript
159
- const addLiquidityTx = await sdk.addLiquidity({
160
- assetA: 'TOKEN_A_CONTRACT',
161
- assetB: 'TOKEN_B_CONTRACT',
162
- amountA: '1000000',
163
- amountB: '2000000',
164
- to: 'YOUR_WALLET_ADDRESS',
165
- slippageTolerance: '50' // 0.5%
166
- });
172
+ // First, get the current pool to understand the ratio
173
+ const pools = await soroswapClient.getPoolByTokens(
174
+ 'TOKEN_A_CONTRACT',
175
+ 'TOKEN_B_CONTRACT',
176
+ SupportedNetworks.MAINNET,
177
+ [SupportedProtocols.SOROSWAP]
178
+ );
179
+
180
+ if (pools.length > 0) {
181
+ const pool = pools[0];
182
+ const ratio = Number(pool.reserveB) / Number(pool.reserveA);
183
+
184
+ // Calculate proportional amounts
185
+ const amountA = '1000000';
186
+ const amountB = (Number(amountA) * ratio).toString();
187
+
188
+ const addLiquidityTx = await soroswapClient.addLiquidity({
189
+ assetA: 'TOKEN_A_CONTRACT',
190
+ assetB: 'TOKEN_B_CONTRACT',
191
+ amountA: amountA,
192
+ amountB: amountB,
193
+ to: 'YOUR_WALLET_ADDRESS',
194
+ slippageTolerance: '50' // 0.5%
195
+ });
167
196
 
168
- // Sign and send the transaction
169
- const signedXdr = await yourSigner.sign(addLiquidityTx.xdr);
170
- const result = await sdk.send(signedXdr, 100);
197
+ // Sign and send the transaction
198
+ const signedXdr = await yourSigner.sign(addLiquidityTx.xdr);
199
+ const result = await soroswapClient.send(signedXdr, false);
200
+ }
171
201
  ```
172
202
 
203
+ > **Note**: All liquidity transactions are simulated before execution. If the amounts don't match the required proportions or if there are insufficient funds, the transaction will return an error during simulation.
204
+
173
205
  #### Remove Liquidity
174
206
 
175
207
  ```typescript
176
- const removeLiquidityTx = await sdk.removeLiquidity({
208
+ const removeLiquidityTx = await soroswapClient.removeLiquidity({
177
209
  assetA: 'TOKEN_A_CONTRACT',
178
210
  assetB: 'TOKEN_B_CONTRACT',
179
211
  liquidity: '500000',
@@ -187,9 +219,9 @@ const removeLiquidityTx = await sdk.removeLiquidity({
187
219
  #### Get User Positions
188
220
 
189
221
  ```typescript
190
- const positions = await sdk.getUserPositions(
222
+ const positions = await soroswapClient.getUserPositions(
191
223
  'USER_WALLET_ADDRESS',
192
- 'mainnet'
224
+ SupportedNetworks.MAINNET
193
225
  );
194
226
  ```
195
227
 
@@ -199,49 +231,36 @@ const positions = await sdk.getUserPositions(
199
231
 
200
232
  ```typescript
201
233
  // Single asset price
202
- const price = await sdk.getPrice(
234
+ const prices = await soroswapClient.getPrice(
203
235
  'TOKEN_CONTRACT_ADDRESS',
204
- 'mainnet',
205
- 'USD'
236
+ SupportedNetworks.MAINNET
206
237
  );
207
238
 
208
239
  // Multiple asset prices
209
- const prices = await sdk.getPrice([
240
+ const prices = await soroswapClient.getPrice([
210
241
  'TOKEN_A_CONTRACT',
211
242
  'TOKEN_B_CONTRACT'
212
- ], 'mainnet', 'USD');
243
+ ], SupportedNetworks.MAINNET);
213
244
  ```
214
245
 
215
246
  #### Get Asset Lists
216
247
 
217
248
  ```typescript
218
- // Get all available asset lists
219
- const assetLists = await sdk.getAssetList();
249
+ // Get all available asset lists metadata
250
+ const assetListsInfo = await soroswapClient.getAssetList();
220
251
 
221
252
  // Get specific asset list
222
- const soroswapAssets = await sdk.getAssetList('SOROSWAP');
253
+ const soroswapAssets = await soroswapClient.getAssetList(SupportedAssetLists.SOROSWAP);
223
254
  ```
224
255
 
225
256
  ### System Information
226
257
 
227
- #### Health Check
228
-
229
- ```typescript
230
- const health = await sdk.checkHealth();
231
- ```
232
-
233
258
  #### Get Contract Addresses
234
259
 
235
260
  ```typescript
236
- const factoryAddress = await sdk.getContractAddress('mainnet', 'factory');
237
- const routerAddress = await sdk.getContractAddress('mainnet', 'router');
238
- const aggregatorAddress = await sdk.getContractAddress('mainnet', 'aggregator');
239
- ```
240
-
241
- #### Get Testnet Tokens
242
-
243
- ```typescript
244
- const testnetTokens = await sdk.getTokens();
261
+ const factoryAddress = await soroswapClient.getContractAddress(SupportedNetworks.MAINNET, 'factory');
262
+ const routerAddress = await soroswapClient.getContractAddress(SupportedNetworks.MAINNET, 'router');
263
+ const aggregatorAddress = await soroswapClient.getContractAddress(SupportedNetworks.MAINNET, 'aggregator');
245
264
  ```
246
265
 
247
266
  ## ๐Ÿ” Security Best Practices
@@ -253,10 +272,11 @@ const testnetTokens = await sdk.getTokens();
253
272
 
254
273
  ```typescript
255
274
  try {
256
- const quote = await sdk.quote(quoteParams);
275
+ const quote = await soroswapClient.quote(quoteParams);
276
+ const buildResponse = await soroswapClient.build({ quote, from: walletAddress });
257
277
  // Handle success
258
278
  } catch (error) {
259
- console.error('Quote failed:', error.message);
279
+ console.error('Quote/build failed:', error.message);
260
280
  // Handle error
261
281
  }
262
282
  ```
@@ -321,12 +341,22 @@ While this SDK is server-side focused, you can create secure frontend integratio
321
341
  // Backend API endpoint
322
342
  app.post('/api/quote', async (req, res) => {
323
343
  try {
324
- const quote = await soroswapSDK.quote(req.body);
344
+ const quote = await soroswapClient.quote(req.body);
345
+ const buildResponse = await soroswapClient.build({
346
+ quote,
347
+ from: req.body.walletAddress
348
+ });
349
+
325
350
  // Only return the XDR and quote data, not sensitive info
326
351
  res.json({
327
- xdr: quote.xdr,
328
- trade: quote.trade,
329
- priceImpact: quote.priceImpact
352
+ xdr: buildResponse.xdr,
353
+ quote: {
354
+ trade: quote.trade,
355
+ priceImpact: quote.priceImpact,
356
+ assetIn: quote.assetIn,
357
+ assetOut: quote.assetOut,
358
+ tradeType: quote.tradeType
359
+ }
330
360
  });
331
361
  } catch (error) {
332
362
  res.status(500).json({ error: error.message });
@@ -334,7 +364,7 @@ app.post('/api/quote', async (req, res) => {
334
364
  });
335
365
 
336
366
  // Frontend widget
337
- async function getQuote(quoteParams) {
367
+ async function getQuoteAndBuild(quoteParams) {
338
368
  const response = await fetch('/api/quote', {
339
369
  method: 'POST',
340
370
  headers: { 'Content-Type': 'application/json' },
@@ -350,25 +380,51 @@ The SDK exports comprehensive TypeScript types:
350
380
 
351
381
  ```typescript
352
382
  import {
383
+ SoroswapSDK,
353
384
  SoroswapSDKConfig,
354
- Network,
385
+ SupportedNetworks,
386
+ SupportedProtocols,
387
+ SupportedAssetLists,
355
388
  TradeType,
356
- QuoteDto,
389
+ QuoteRequest,
357
390
  QuoteResponse,
391
+ BuildQuoteRequest,
392
+ BuildQuoteResponse,
358
393
  Pool,
359
394
  UserPosition,
360
395
  PriceData,
396
+ AssetList,
397
+ AssetListInfo,
361
398
  // ... and many more
362
399
  } from 'soroswap-sdk';
363
400
  ```
364
401
 
365
- ## ๐Ÿค Contributing
402
+ ### Example: Working with Types
366
403
 
367
- We welcome contributions! Please read our contributing guidelines and submit pull requests to help improve the SDK.
404
+ ```typescript
405
+ import {
406
+ QuoteRequest,
407
+ TradeType,
408
+ SupportedProtocols,
409
+ ExactInBuildTradeReturn
410
+ } from 'soroswap-sdk';
368
411
 
369
- ## ๐Ÿ“„ License
412
+ const quoteRequest: QuoteRequest = {
413
+ assetIn: 'TOKEN_A',
414
+ assetOut: 'TOKEN_B',
415
+ amount: 1000000n,
416
+ tradeType: TradeType.EXACT_IN,
417
+ protocols: [SupportedProtocols.SOROSWAP]
418
+ };
370
419
 
371
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
420
+ const quote = await soroswapClient.quote(quoteRequest);
421
+
422
+ // Type-safe access to quote properties
423
+ if (quote.tradeType === TradeType.EXACT_IN) {
424
+ const exactInQuote = quote as ExactInBuildTradeReturn;
425
+ console.log('Expected output:', exactInQuote.trade.expectedAmountOut);
426
+ }
427
+ ```
372
428
 
373
429
  ## ๐Ÿ”— Links
374
430
 
@@ -377,13 +433,6 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
377
433
  - [API Documentation](https://api.soroswap.finance)
378
434
  - [GitHub Repository](https://github.com/soroswap/sdk)
379
435
 
380
- ## ๐Ÿ“ž Support
381
-
382
- For support and questions:
383
- - Create an issue on [GitHub](https://github.com/soroswap/sdk/issues)
384
- - Join our [Discord community](https://discord.gg/soroswap)
385
- - Follow us on [Twitter](https://twitter.com/SoroswapFinance)
386
-
387
436
  ---
388
437
 
389
- Built with โค๏ธ by the Soroswap team for the Stellar ecosystem.
438
+ Built with โค๏ธ by the Soroswap team.
@@ -1,6 +1,6 @@
1
1
  export interface AssetInfo {
2
- code: string;
3
- issuer: string;
2
+ code?: string;
3
+ issuer?: string;
4
4
  contract?: string;
5
5
  name?: string;
6
6
  org?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/types/assets.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/types/assets.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -21,7 +21,6 @@ export declare enum SupportedProtocols {
21
21
  SOROSWAP = "soroswap",
22
22
  PHOENIX = "phoenix",
23
23
  AQUA = "aqua",
24
- COMET = "comet",
25
24
  SDEX = "sdex"
26
25
  }
27
26
  export interface SoroswapSDKConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AACA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAGD,oBAAY,mBAAmB;IAC7B,QAAQ,8EAA8E;IACtF,cAAc,gEAAgE;IAC9E,MAAM,qDAAqD;IAC3D,IAAI,0EAA0E;CAC/E;AAED,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AACA,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAGD,oBAAY,mBAAmB;IAC7B,QAAQ,8EAA8E;IACtF,cAAc,gEAAgE;IAC9E,MAAM,qDAAqD;IAC3D,IAAI,0EAA0E;CAC/E;AAED,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IAEb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -31,7 +31,7 @@ var SupportedProtocols;
31
31
  SupportedProtocols["SOROSWAP"] = "soroswap";
32
32
  SupportedProtocols["PHOENIX"] = "phoenix";
33
33
  SupportedProtocols["AQUA"] = "aqua";
34
- SupportedProtocols["COMET"] = "comet";
34
+ // COMET = 'comet',
35
35
  SupportedProtocols["SDEX"] = "sdex";
36
36
  })(SupportedProtocols || (exports.SupportedProtocols = SupportedProtocols = {}));
37
37
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,oCAAuB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,mBAAmB;AACnB,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,6GAAsF,CAAA;IACtF,qGAA8E,CAAA;IAC9E,kFAA2D,CAAA;IAC3D,qGAA8E,CAAA;AAChF,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,qCAAe,CAAA;IACf,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,oCAAuB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,mBAAmB;AACnB,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,6GAAsF,CAAA;IACtF,qGAA8E,CAAA;IAC9E,kFAA2D,CAAA;IAC3D,qGAA8E,CAAA;AAChF,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mBAAmB;IACnB,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B"}
@@ -6,10 +6,11 @@ export interface QuoteRequest {
6
6
  tradeType: TradeType;
7
7
  protocols: SupportedProtocols[];
8
8
  parts?: number;
9
- slippageTolerance?: string;
9
+ slippageTolerance?: number;
10
10
  maxHops?: number;
11
11
  assetList?: SupportedAssetLists[];
12
12
  feeBps?: number;
13
+ gaslessTrustline?: boolean;
13
14
  }
14
15
  export interface BuildQuoteRequest {
15
16
  quote: QuoteResponse;
@@ -20,37 +21,6 @@ export interface BuildQuoteRequest {
20
21
  export interface BuildQuoteResponse {
21
22
  xdr: string;
22
23
  }
23
- export interface CommonBuildTradeReturnFields {
24
- assetIn: string;
25
- assetOut: string;
26
- priceImpact: {
27
- numerator: bigint;
28
- denominator: bigint;
29
- };
30
- platform: SupportedPlatforms;
31
- feeBps?: number;
32
- feeAmount?: bigint;
33
- }
34
- export interface ExactInBuildTradeReturn extends CommonBuildTradeReturnFields {
35
- tradeType: TradeType.EXACT_IN;
36
- trade: {
37
- amountIn: bigint;
38
- amountOutMin: bigint;
39
- expectedAmountOut?: bigint;
40
- path: string[];
41
- poolHashes?: string[];
42
- };
43
- }
44
- export interface ExactOutBuildTradeReturn extends CommonBuildTradeReturnFields {
45
- tradeType: TradeType.EXACT_OUT;
46
- trade: {
47
- amountOut: bigint;
48
- amountInMax: bigint;
49
- expectedAmountIn?: bigint;
50
- path: string[];
51
- poolHashes?: string[];
52
- };
53
- }
54
24
  export interface DistributionReturn {
55
25
  protocol_id: SupportedProtocols;
56
26
  path: string[];
@@ -58,25 +28,108 @@ export interface DistributionReturn {
58
28
  is_exact_in: boolean;
59
29
  poolHashes?: string[];
60
30
  }
61
- export interface ExactInSplitBuildTradeReturn extends CommonBuildTradeReturnFields {
62
- tradeType: TradeType.EXACT_IN;
63
- trade: {
64
- amountIn: bigint;
65
- amountOutMin: bigint;
66
- expectedAmountOut?: bigint;
67
- distribution: DistributionReturn[];
31
+ export interface BaseExactInTrade {
32
+ amountIn: bigint;
33
+ amountOutMin: bigint;
34
+ }
35
+ export interface ExactInTradeWithPath extends BaseExactInTrade {
36
+ path: string[];
37
+ distribution?: never;
38
+ }
39
+ export interface ExactInTradeWithDistribution extends BaseExactInTrade {
40
+ path?: never;
41
+ distribution: DistributionReturn[];
42
+ }
43
+ export type ExactInTrade = ExactInTradeWithPath | ExactInTradeWithDistribution;
44
+ export interface BaseExactOutTrade {
45
+ amountOut: bigint;
46
+ amountInMax: bigint;
47
+ }
48
+ export interface ExactOutTradeWithPath extends BaseExactOutTrade {
49
+ path: string[];
50
+ distribution?: never;
51
+ }
52
+ export interface ExactOutTradeWithDistribution extends BaseExactOutTrade {
53
+ path?: never;
54
+ distribution: DistributionReturn[];
55
+ }
56
+ export type ExactOutTrade = ExactOutTradeWithPath | ExactOutTradeWithDistribution;
57
+ export interface HorizonPath {
58
+ asset_type: string;
59
+ asset_code: string;
60
+ asset_issuer: string;
61
+ }
62
+ export interface HorizonBaseStrictPaths {
63
+ source_asset_type: string;
64
+ source_amount: string;
65
+ max_source_amount?: string;
66
+ source_asset_code?: string;
67
+ source_asset_issuer?: string;
68
+ destination_asset_type: string;
69
+ destination_amount: string;
70
+ min_destination_amount?: string;
71
+ destination_asset_code?: string;
72
+ destination_asset_issuer?: string;
73
+ path: HorizonPath[];
74
+ }
75
+ export interface HorizonTrustlineStrictPaths extends HorizonBaseStrictPaths {
76
+ trustlineStuff?: {
77
+ totalOut?: string;
78
+ expectedOut?: string;
79
+ minimumOut?: string;
80
+ swapPath?: HorizonBaseStrictPaths;
81
+ repayIn?: string;
82
+ maxRepayIn?: string;
83
+ repayPath?: HorizonBaseStrictPaths;
84
+ trustlineCostAssetIn?: string;
85
+ trustlineCostAssetOut?: string;
86
+ finalExpectedIn?: string;
87
+ finalMaximumIn?: string;
88
+ expectedSwapIn?: string;
89
+ maximumSwapIn?: string;
90
+ expectedTrustlineCostIn?: string;
91
+ maximumTrustlineCostIn?: string;
92
+ trustlineCostPath?: HorizonBaseStrictPaths;
93
+ trustlineEquivalentAssetOut?: string;
68
94
  };
69
95
  }
70
- export interface ExactOutSplitBuildTradeReturn extends CommonBuildTradeReturnFields {
71
- tradeType: TradeType.EXACT_OUT;
72
- trade: {
73
- amountOut: bigint;
74
- amountInMax: bigint;
75
- expectedAmountIn?: bigint;
76
- distribution: DistributionReturn[];
96
+ export type HorizonStrictPaths = HorizonBaseStrictPaths | HorizonTrustlineStrictPaths;
97
+ export interface RoutePlan {
98
+ swapInfo: {
99
+ protocol: SupportedProtocols;
100
+ path: string[];
77
101
  };
102
+ percent: string;
103
+ }
104
+ export interface PlatformFee {
105
+ feeBps: number;
106
+ feeAmount: bigint;
107
+ }
108
+ export interface TrustlineInfo {
109
+ trustlineCostAssetIn: string;
110
+ trustlineCostAssetOut: string;
111
+ }
112
+ interface BaseQuoteResponse {
113
+ assetIn: string;
114
+ amountIn: bigint;
115
+ assetOut: string;
116
+ amountOut: bigint;
117
+ otherAmountThreshold: bigint;
118
+ priceImpactPct: string;
119
+ platform: SupportedPlatforms;
120
+ routePlan: RoutePlan[];
121
+ trustlineInfo?: TrustlineInfo;
122
+ platformFee?: PlatformFee;
123
+ gaslessTrustline?: boolean;
124
+ }
125
+ export interface ExactInQuoteResponse extends BaseQuoteResponse {
126
+ tradeType: TradeType.EXACT_IN;
127
+ rawTrade: ExactInTrade | HorizonStrictPaths;
128
+ }
129
+ export interface ExactOutQuoteResponse extends BaseQuoteResponse {
130
+ tradeType: TradeType.EXACT_OUT;
131
+ rawTrade: ExactOutTrade | HorizonStrictPaths;
78
132
  }
79
- export type BuildTradeReturn = ExactInBuildTradeReturn | ExactOutBuildTradeReturn;
80
- export type BuildSplitTradeReturn = ExactInSplitBuildTradeReturn | ExactOutSplitBuildTradeReturn;
81
- export type QuoteResponse = BuildTradeReturn | BuildSplitTradeReturn;
133
+ export type QuoteResponse = ExactInQuoteResponse | ExactOutQuoteResponse;
134
+ export {};
82
135
  //# sourceMappingURL=quote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../src/types/quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGlG,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,4BAA4B;IAC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,EAAE;QACR,QAAQ,EAAE,kBAAkB,CAAC;QAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAA;IACD,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,qBAAqB,EAAE,MAAM,CAAA;CAC9B;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,SAAS,EAAE,SAAS,EAAE,CAAA;IACtB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC7B,QAAQ,EAAE,YAAY,GAAG,kBAAkB,CAAA;CAC5C;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,SAAS,EAAE,SAAS,CAAC,SAAS,CAAA;IAC9B,QAAQ,EAAE,aAAa,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,qBAAqB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soroswap/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official TypeScript SDK for Soroswap.Finance API - DEX and exchange aggregator on Stellar",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",