@compass-labs/api-sdk 0.5.29 → 0.5.30

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.
@@ -12,8 +12,8 @@
12
12
  * [liquidityProvisionPositions](#liquidityprovisionpositions) - List LP
13
13
  * [swapBuyExactly](#swapbuyexactly) - Buy exact amount
14
14
  * [swapSellExactly](#swapsellexactly) - Sell exact amount
15
- * [liquidityProvisionIncrease](#liquidityprovisionincrease) - Increase an LP position
16
15
  * [liquidityProvisionMint](#liquidityprovisionmint) - Open a new LP position
16
+ * [liquidityProvisionIncrease](#liquidityprovisionincrease) - Increase an LP position
17
17
  * [liquidityProvisionWithdraw](#liquidityprovisionwithdraw) - Withdraw an LP position
18
18
 
19
19
  ## quoteBuyExactly
@@ -578,17 +578,17 @@ run();
578
578
  | errors.HTTPValidationError | 422 | application/json |
579
579
  | errors.APIError | 4XX, 5XX | \*/\* |
580
580
 
581
- ## liquidityProvisionIncrease
581
+ ## liquidityProvisionMint
582
582
 
583
- This endpoint allows users to increase their existing Liquidity Provider (LP)
584
- positions on the Uniswap platform.
583
+ This endpoint allows users to open a new Liquidity Provider (LP) position on the
584
+ Uniswap platform.
585
585
 
586
- By providing the necessary parameters, users can add more liquidity to their current
587
- positions, thereby increasing their stake in the liquidity pool. This operation is
588
- beneficial for users who wish to enhance their potential earnings from trading fees
589
- within the pool. The endpoint requires details such as the token pair, additional
590
- amount to be added, and any other parameters necessary for the liquidity increase
591
- process.
586
+ By providing the necessary parameters, users can initiate a minting process to
587
+ create a new LP token, which represents their stake in a specific liquidity pool.
588
+ This operation is essential for users looking to participate in liquidity provision,
589
+ enabling them to earn fees from trades that occur within the pool. The endpoint
590
+ requires details such as the token pair, amount, and any additional parameters
591
+ needed for the minting process.
592
592
 
593
593
  ### Example Usage
594
594
 
@@ -600,13 +600,18 @@ const compassApiSDK = new CompassApiSDK({
600
600
  });
601
601
 
602
602
  async function run() {
603
- const result = await compassApiSDK.uniswapV3.liquidityProvisionIncrease({
604
- tokenId: 819447,
603
+ const result = await compassApiSDK.uniswapV3.liquidityProvisionMint({
604
+ token0: "USDCe",
605
+ token1: "ARB",
606
+ fee: "0.3",
607
+ tickLower: -1000,
608
+ tickUpper: 1000,
605
609
  amount0Desired: "1.5",
606
610
  amount1Desired: "1.7",
607
611
  amount0Min: "1.4",
608
612
  amount1Min: "1.6",
609
- chain: "ethereum:mainnet",
613
+ recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
614
+ chain: "arbitrum:mainnet",
610
615
  sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
611
616
  });
612
617
 
@@ -622,7 +627,7 @@ The standalone function version of this method:
622
627
 
623
628
  ```typescript
624
629
  import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
625
- import { uniswapV3LiquidityProvisionIncrease } from "@compass-labs/api-sdk/funcs/uniswapV3LiquidityProvisionIncrease.js";
630
+ import { uniswapV3LiquidityProvisionMint } from "@compass-labs/api-sdk/funcs/uniswapV3LiquidityProvisionMint.js";
626
631
 
627
632
  // Use `CompassApiSDKCore` for best tree-shaking performance.
628
633
  // You can create one instance of it to use across an application.
@@ -631,20 +636,25 @@ const compassApiSDK = new CompassApiSDKCore({
631
636
  });
632
637
 
633
638
  async function run() {
634
- const res = await uniswapV3LiquidityProvisionIncrease(compassApiSDK, {
635
- tokenId: 819447,
639
+ const res = await uniswapV3LiquidityProvisionMint(compassApiSDK, {
640
+ token0: "USDCe",
641
+ token1: "ARB",
642
+ fee: "0.3",
643
+ tickLower: -1000,
644
+ tickUpper: 1000,
636
645
  amount0Desired: "1.5",
637
646
  amount1Desired: "1.7",
638
647
  amount0Min: "1.4",
639
648
  amount1Min: "1.6",
640
- chain: "ethereum:mainnet",
649
+ recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
650
+ chain: "arbitrum:mainnet",
641
651
  sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
642
652
  });
643
653
  if (res.ok) {
644
654
  const { value: result } = res;
645
655
  console.log(result);
646
656
  } else {
647
- console.log("uniswapV3LiquidityProvisionIncrease failed:", res.error);
657
+ console.log("uniswapV3LiquidityProvisionMint failed:", res.error);
648
658
  }
649
659
  }
650
660
 
@@ -655,7 +665,7 @@ run();
655
665
 
656
666
  | Parameter | Type | Required | Description |
657
667
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
658
- | `request` | [components.UniswapIncreaseLiquidityProvisionRequest](../../models/components/uniswapincreaseliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
668
+ | `request` | [components.UniswapMintLiquidityProvisionRequest](../../models/components/uniswapmintliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
659
669
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
660
670
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
661
671
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
@@ -671,17 +681,17 @@ run();
671
681
  | errors.HTTPValidationError | 422 | application/json |
672
682
  | errors.APIError | 4XX, 5XX | \*/\* |
673
683
 
674
- ## liquidityProvisionMint
684
+ ## liquidityProvisionIncrease
675
685
 
676
- This endpoint allows users to open a new Liquidity Provider (LP) position on the
677
- Uniswap platform.
686
+ This endpoint allows users to increase their existing Liquidity Provider (LP)
687
+ positions on the Uniswap platform.
678
688
 
679
- By providing the necessary parameters, users can initiate a minting process to
680
- create a new LP token, which represents their stake in a specific liquidity pool.
681
- This operation is essential for users looking to participate in liquidity provision,
682
- enabling them to earn fees from trades that occur within the pool. The endpoint
683
- requires details such as the token pair, amount, and any additional parameters
684
- needed for the minting process.
689
+ By providing the necessary parameters, users can add more liquidity to their current
690
+ positions, thereby increasing their stake in the liquidity pool. This operation is
691
+ beneficial for users who wish to enhance their potential earnings from trading fees
692
+ within the pool. The endpoint requires details such as the token pair, additional
693
+ amount to be added, and any other parameters necessary for the liquidity increase
694
+ process.
685
695
 
686
696
  ### Example Usage
687
697
 
@@ -693,18 +703,13 @@ const compassApiSDK = new CompassApiSDK({
693
703
  });
694
704
 
695
705
  async function run() {
696
- const result = await compassApiSDK.uniswapV3.liquidityProvisionMint({
697
- token0: "USDCe",
698
- token1: "ARB",
699
- fee: "0.3",
700
- tickLower: -1000,
701
- tickUpper: 1000,
706
+ const result = await compassApiSDK.uniswapV3.liquidityProvisionIncrease({
707
+ tokenId: 819447,
702
708
  amount0Desired: "1.5",
703
709
  amount1Desired: "1.7",
704
710
  amount0Min: "1.4",
705
711
  amount1Min: "1.6",
706
- recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
707
- chain: "arbitrum:mainnet",
712
+ chain: "ethereum:mainnet",
708
713
  sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
709
714
  });
710
715
 
@@ -720,7 +725,7 @@ The standalone function version of this method:
720
725
 
721
726
  ```typescript
722
727
  import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
723
- import { uniswapV3LiquidityProvisionMint } from "@compass-labs/api-sdk/funcs/uniswapV3LiquidityProvisionMint.js";
728
+ import { uniswapV3LiquidityProvisionIncrease } from "@compass-labs/api-sdk/funcs/uniswapV3LiquidityProvisionIncrease.js";
724
729
 
725
730
  // Use `CompassApiSDKCore` for best tree-shaking performance.
726
731
  // You can create one instance of it to use across an application.
@@ -729,25 +734,20 @@ const compassApiSDK = new CompassApiSDKCore({
729
734
  });
730
735
 
731
736
  async function run() {
732
- const res = await uniswapV3LiquidityProvisionMint(compassApiSDK, {
733
- token0: "USDCe",
734
- token1: "ARB",
735
- fee: "0.3",
736
- tickLower: -1000,
737
- tickUpper: 1000,
737
+ const res = await uniswapV3LiquidityProvisionIncrease(compassApiSDK, {
738
+ tokenId: 819447,
738
739
  amount0Desired: "1.5",
739
740
  amount1Desired: "1.7",
740
741
  amount0Min: "1.4",
741
742
  amount1Min: "1.6",
742
- recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
743
- chain: "arbitrum:mainnet",
743
+ chain: "ethereum:mainnet",
744
744
  sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
745
745
  });
746
746
  if (res.ok) {
747
747
  const { value: result } = res;
748
748
  console.log(result);
749
749
  } else {
750
- console.log("uniswapV3LiquidityProvisionMint failed:", res.error);
750
+ console.log("uniswapV3LiquidityProvisionIncrease failed:", res.error);
751
751
  }
752
752
  }
753
753
 
@@ -758,7 +758,7 @@ run();
758
758
 
759
759
  | Parameter | Type | Required | Description |
760
760
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
761
- | `request` | [components.UniswapMintLiquidityProvisionRequest](../../models/components/uniswapmintliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
761
+ | `request` | [components.UniswapIncreaseLiquidityProvisionRequest](../../models/components/uniswapincreaseliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
762
762
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
763
763
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
764
764
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@compass-labs/api-sdk",
5
- "version": "0.5.29",
5
+ "version": "0.5.30",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "0.5.29",
3
+ "version": "0.5.30",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "bin": {
package/src/lib/config.ts CHANGED
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
- sdkVersion: "0.5.29",
64
+ sdkVersion: "0.5.30",
65
65
  genVersion: "2.638.5",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.5.29 2.638.5 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 0.5.30 2.638.5 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.5.29",
22
+ currentVersion: "0.5.30",
23
23
  },
24
24
  });
25
25
 
@@ -101,7 +101,7 @@ export function createMCPServer(deps: {
101
101
  }) {
102
102
  const server = new McpServer({
103
103
  name: "CompassApiSDK",
104
- version: "0.5.29",
104
+ version: "0.5.30",
105
105
  });
106
106
 
107
107
  const client = new CompassApiSDKCore({
@@ -180,8 +180,8 @@ export function createMCPServer(deps: {
180
180
  tool(tool$uniswapV3LiquidityProvisionPositions);
181
181
  tool(tool$uniswapV3SwapBuyExactly);
182
182
  tool(tool$uniswapV3SwapSellExactly);
183
- tool(tool$uniswapV3LiquidityProvisionIncrease);
184
183
  tool(tool$uniswapV3LiquidityProvisionMint);
184
+ tool(tool$uniswapV3LiquidityProvisionIncrease);
185
185
  tool(tool$uniswapV3LiquidityProvisionWithdraw);
186
186
  tool(tool$universalPortfolio);
187
187
  tool(tool$universalVisualizePortfolio);
@@ -18,7 +18,7 @@ export type AaveLiquidityChangeResponse = {
18
18
  */
19
19
  startTime: Date;
20
20
  /**
21
- * Dateime of ending block
21
+ * Datetime of ending block
22
22
  */
23
23
  endTime: Date;
24
24
  };
@@ -173,24 +173,24 @@ export class UniswapV3 extends ClientSDK {
173
173
  }
174
174
 
175
175
  /**
176
- * Increase an LP position
176
+ * Open a new LP position
177
177
  *
178
178
  * @remarks
179
- * This endpoint allows users to increase their existing Liquidity Provider (LP)
180
- * positions on the Uniswap platform.
179
+ * This endpoint allows users to open a new Liquidity Provider (LP) position on the
180
+ * Uniswap platform.
181
181
  *
182
- * By providing the necessary parameters, users can add more liquidity to their current
183
- * positions, thereby increasing their stake in the liquidity pool. This operation is
184
- * beneficial for users who wish to enhance their potential earnings from trading fees
185
- * within the pool. The endpoint requires details such as the token pair, additional
186
- * amount to be added, and any other parameters necessary for the liquidity increase
187
- * process.
182
+ * By providing the necessary parameters, users can initiate a minting process to
183
+ * create a new LP token, which represents their stake in a specific liquidity pool.
184
+ * This operation is essential for users looking to participate in liquidity provision,
185
+ * enabling them to earn fees from trades that occur within the pool. The endpoint
186
+ * requires details such as the token pair, amount, and any additional parameters
187
+ * needed for the minting process.
188
188
  */
189
- async liquidityProvisionIncrease(
190
- request: components.UniswapIncreaseLiquidityProvisionRequest,
189
+ async liquidityProvisionMint(
190
+ request: components.UniswapMintLiquidityProvisionRequest,
191
191
  options?: RequestOptions,
192
192
  ): Promise<components.TxResponse> {
193
- return unwrapAsync(uniswapV3LiquidityProvisionIncrease(
193
+ return unwrapAsync(uniswapV3LiquidityProvisionMint(
194
194
  this,
195
195
  request,
196
196
  options,
@@ -198,24 +198,24 @@ export class UniswapV3 extends ClientSDK {
198
198
  }
199
199
 
200
200
  /**
201
- * Open a new LP position
201
+ * Increase an LP position
202
202
  *
203
203
  * @remarks
204
- * This endpoint allows users to open a new Liquidity Provider (LP) position on the
205
- * Uniswap platform.
204
+ * This endpoint allows users to increase their existing Liquidity Provider (LP)
205
+ * positions on the Uniswap platform.
206
206
  *
207
- * By providing the necessary parameters, users can initiate a minting process to
208
- * create a new LP token, which represents their stake in a specific liquidity pool.
209
- * This operation is essential for users looking to participate in liquidity provision,
210
- * enabling them to earn fees from trades that occur within the pool. The endpoint
211
- * requires details such as the token pair, amount, and any additional parameters
212
- * needed for the minting process.
207
+ * By providing the necessary parameters, users can add more liquidity to their current
208
+ * positions, thereby increasing their stake in the liquidity pool. This operation is
209
+ * beneficial for users who wish to enhance their potential earnings from trading fees
210
+ * within the pool. The endpoint requires details such as the token pair, additional
211
+ * amount to be added, and any other parameters necessary for the liquidity increase
212
+ * process.
213
213
  */
214
- async liquidityProvisionMint(
215
- request: components.UniswapMintLiquidityProvisionRequest,
214
+ async liquidityProvisionIncrease(
215
+ request: components.UniswapIncreaseLiquidityProvisionRequest,
216
216
  options?: RequestOptions,
217
217
  ): Promise<components.TxResponse> {
218
- return unwrapAsync(uniswapV3LiquidityProvisionMint(
218
+ return unwrapAsync(uniswapV3LiquidityProvisionIncrease(
219
219
  this,
220
220
  request,
221
221
  options,