@carrot-protocol/boost-http-client 0.2.16-token22-dev-998073e → 0.2.16-token22-dev-95ead8a

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/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ export declare class Client {
42
42
  */
43
43
  getBank(bankAddress: web3.PublicKey): Promise<GetBankResponse>;
44
44
  deposit(clendGroup: web3.PublicKey, clendAccount: web3.PublicKey | null, inputTokenMint: web3.PublicKey, uiAmount: number): Promise<string>;
45
- withdraw(clendAccount: web3.PublicKey, outputTokenMint: web3.PublicKey, uiAmount: number): Promise<string>;
45
+ withdraw(clendAccount: web3.PublicKey, outputTokenMint: web3.PublicKey, uiAmount: number, withdrawAll: boolean): Promise<string>;
46
46
  /**
47
47
  * Deposit collateral and create a leveraged position
48
48
  * @param request Deposit leverage request parameters
package/dist/index.js CHANGED
@@ -302,11 +302,12 @@ class Client {
302
302
  const txSig = await this.send(depositResponse.unsignedBase64Tx, depositResponse.userRequestId);
303
303
  return txSig;
304
304
  }
305
- async withdraw(clendAccount, outputTokenMint, uiAmount) {
305
+ async withdraw(clendAccount, outputTokenMint, uiAmount, withdrawAll) {
306
306
  const req = {
307
307
  clendAccount,
308
308
  outputTokenMint,
309
309
  withdrawAmountUi: uiAmount,
310
+ withdrawAll,
310
311
  };
311
312
  const body = await handleApiCall(() => this.http.post("withdraw", JSON.stringify(req)));
312
313
  const withdrawResponse = JSON.parse(body);
package/dist/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export interface WithdrawRequest {
24
24
  clendAccount: web3.PublicKey;
25
25
  outputTokenMint: web3.PublicKey;
26
26
  withdrawAmountUi: number;
27
+ withdrawAll: boolean;
27
28
  }
28
29
  export interface WithdrawResponse {
29
30
  userRequestId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.2.16-token22-dev-998073e",
3
+ "version": "0.2.16-token22-dev-95ead8a",
4
4
  "description": "HTTP client for Carrot Boost",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -392,11 +392,13 @@ export class Client {
392
392
  clendAccount: web3.PublicKey,
393
393
  outputTokenMint: web3.PublicKey,
394
394
  uiAmount: number,
395
+ withdrawAll: boolean,
395
396
  ): Promise<string> {
396
397
  const req: WithdrawRequest = {
397
398
  clendAccount,
398
399
  outputTokenMint,
399
400
  withdrawAmountUi: uiAmount,
401
+ withdrawAll,
400
402
  };
401
403
 
402
404
  const body = await handleApiCall(() =>
package/src/types.ts CHANGED
@@ -29,6 +29,7 @@ export interface WithdrawRequest {
29
29
  clendAccount: web3.PublicKey;
30
30
  outputTokenMint: web3.PublicKey;
31
31
  withdrawAmountUi: number;
32
+ withdrawAll: boolean;
32
33
  }
33
34
 
34
35
  export interface WithdrawResponse {