@carrot-protocol/boost-http-client 0.1.5-bundle1-dev-131458e → 0.1.5-bundle1-dev-19cfaa8

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.js CHANGED
@@ -143,7 +143,7 @@ class Client {
143
143
  async modifyLeverage(params) {
144
144
  const body = await handleApiCall(() => this.http.post("leverage/modify", JSON.stringify(params)));
145
145
  const modifyLeverageResponse = JSON.parse(body);
146
- const txSig = await this.send(modifyLeverageResponse.unsignedBase64Tx);
146
+ const txSig = await this.send(modifyLeverageResponse.unsignedBase64Tx, modifyLeverageResponse.signedSetBorrowRateBase64Tx);
147
147
  return txSig;
148
148
  }
149
149
  /**
@@ -154,7 +154,7 @@ class Client {
154
154
  async withdrawLeverage(params) {
155
155
  const body = await handleApiCall(() => this.http.post("leverage/withdraw", JSON.stringify(params)));
156
156
  const withdrawLeverageResponse = JSON.parse(body);
157
- const txSig = await this.send(withdrawLeverageResponse.unsignedBase64Tx);
157
+ const txSig = await this.send(withdrawLeverageResponse.unsignedBase64Tx, withdrawLeverageResponse.signedSetBorrowRateBase64Tx);
158
158
  return txSig;
159
159
  }
160
160
  }
package/dist/types.d.ts CHANGED
@@ -39,6 +39,7 @@ export interface ModifyLeverageRequest {
39
39
  */
40
40
  export interface ModifyLeverageResponse {
41
41
  unsignedBase64Tx: string;
42
+ signedSetBorrowRateBase64Tx: string;
42
43
  }
43
44
  /**
44
45
  * Request to withdraw from a leveraged position
@@ -55,6 +56,7 @@ export interface WithdrawLeverageRequest {
55
56
  */
56
57
  export interface WithdrawLeverageResponse {
57
58
  unsignedBase64Tx: string;
59
+ signedSetBorrowRateBase64Tx: string;
58
60
  }
59
61
  export interface GetObligationResponse {
60
62
  netValue: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.1.5-bundle1-dev-131458e",
3
+ "version": "0.1.5-bundle1-dev-19cfaa8",
4
4
  "description": "HTTP client for Carrot Boost API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -163,7 +163,10 @@ export class Client {
163
163
 
164
164
  const modifyLeverageResponse: ModifyLeverageResponse = JSON.parse(body);
165
165
 
166
- const txSig = await this.send(modifyLeverageResponse.unsignedBase64Tx);
166
+ const txSig = await this.send(
167
+ modifyLeverageResponse.unsignedBase64Tx,
168
+ modifyLeverageResponse.signedSetBorrowRateBase64Tx,
169
+ );
167
170
 
168
171
  return txSig;
169
172
  }
@@ -180,7 +183,10 @@ export class Client {
180
183
 
181
184
  const withdrawLeverageResponse: WithdrawLeverageResponse = JSON.parse(body);
182
185
 
183
- const txSig = await this.send(withdrawLeverageResponse.unsignedBase64Tx);
186
+ const txSig = await this.send(
187
+ withdrawLeverageResponse.unsignedBase64Tx,
188
+ withdrawLeverageResponse.signedSetBorrowRateBase64Tx,
189
+ );
184
190
 
185
191
  return txSig;
186
192
  }
package/src/types.ts CHANGED
@@ -47,6 +47,7 @@ export interface ModifyLeverageRequest {
47
47
  */
48
48
  export interface ModifyLeverageResponse {
49
49
  unsignedBase64Tx: string;
50
+ signedSetBorrowRateBase64Tx: string;
50
51
  }
51
52
 
52
53
  /**
@@ -65,6 +66,7 @@ export interface WithdrawLeverageRequest {
65
66
  */
66
67
  export interface WithdrawLeverageResponse {
67
68
  unsignedBase64Tx: string;
69
+ signedSetBorrowRateBase64Tx: string;
68
70
  }
69
71
 
70
72
  export interface GetObligationResponse {