@carrot-protocol/boost-http-client 0.2.13-inputs-dev-88a7a7e → 0.2.13-inputs-dev-b6557d8

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
@@ -170,29 +170,27 @@ class Client {
170
170
  clendAccount: new anchor_1.web3.PublicKey(s.clendAccount),
171
171
  clendAccountAuthority: new anchor_1.web3.PublicKey(s.clendAccountAuthority),
172
172
  clendGroup: new anchor_1.web3.PublicKey(s.clendGroup),
173
- inputs: undefined,
173
+ input: undefined,
174
174
  events: [],
175
175
  };
176
176
  // parse inputs if they exist
177
- if (s.inputs) {
178
- const inputs = {
179
- apiPath: s.inputs.apiPath,
180
- selectedTokenMint: s.inputs.selectedTokenMint
181
- ? new anchor_1.web3.PublicKey(s.inputs.selectedTokenMint)
177
+ if (s.input) {
178
+ const input = {
179
+ apiPath: s.input.apiPath,
180
+ selectedTokenMint: s.input.selectedTokenMint
181
+ ? new anchor_1.web3.PublicKey(s.input.selectedTokenMint)
182
182
  : null,
183
- amountUi: s.inputs.amountUi ? Number(s.inputs.amountUi) : null,
184
- leverage: s.inputs.leverage ? Number(s.inputs.leverage) : null,
185
- slippageBps: s.inputs.slippageBps
186
- ? Number(s.inputs.slippageBps)
183
+ amountUi: s.input.amountUi ? Number(s.input.amountUi) : null,
184
+ leverage: s.input.leverage ? Number(s.input.leverage) : null,
185
+ slippageBps: s.input.slippageBps ? Number(s.input.slippageBps) : null,
186
+ openPosition: s.input.openPosition
187
+ ? Boolean(s.input.openPosition)
187
188
  : null,
188
- openPosition: s.inputs.openPosition
189
- ? Boolean(s.inputs.openPosition)
190
- : null,
191
- closePosition: s.inputs.closePosition
192
- ? Boolean(s.inputs.closePosition)
189
+ closePosition: s.input.closePosition
190
+ ? Boolean(s.input.closePosition)
193
191
  : null,
194
192
  };
195
- txSummary.inputs = inputs;
193
+ txSummary.input = input;
196
194
  }
197
195
  // get events for each summary
198
196
  for (const event of s.events) {
package/dist/types.d.ts CHANGED
@@ -133,8 +133,8 @@ export interface ClendAccountTxSummary {
133
133
  clendAccount: web3.PublicKey;
134
134
  clendAccountAuthority: web3.PublicKey;
135
135
  clendGroup: web3.PublicKey;
136
- inputs?: UserRequest;
137
136
  events: ClendAccountEvent[];
137
+ input?: UserRequest;
138
138
  }
139
139
  export interface ClendAccountEvent {
140
140
  eventIndex: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.2.13-inputs-dev-88a7a7e",
3
+ "version": "0.2.13-inputs-dev-b6557d8",
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
@@ -190,30 +190,28 @@ export class Client {
190
190
  clendAccount: new web3.PublicKey(s.clendAccount),
191
191
  clendAccountAuthority: new web3.PublicKey(s.clendAccountAuthority),
192
192
  clendGroup: new web3.PublicKey(s.clendGroup),
193
- inputs: undefined,
193
+ input: undefined,
194
194
  events: [],
195
195
  };
196
196
 
197
197
  // parse inputs if they exist
198
- if (s.inputs) {
199
- const inputs: UserRequest = {
200
- apiPath: s.inputs.apiPath,
201
- selectedTokenMint: s.inputs.selectedTokenMint
202
- ? new web3.PublicKey(s.inputs.selectedTokenMint)
198
+ if (s.input) {
199
+ const input: UserRequest = {
200
+ apiPath: s.input.apiPath,
201
+ selectedTokenMint: s.input.selectedTokenMint
202
+ ? new web3.PublicKey(s.input.selectedTokenMint)
203
203
  : null,
204
- amountUi: s.inputs.amountUi ? Number(s.inputs.amountUi) : null,
205
- leverage: s.inputs.leverage ? Number(s.inputs.leverage) : null,
206
- slippageBps: s.inputs.slippageBps
207
- ? Number(s.inputs.slippageBps)
204
+ amountUi: s.input.amountUi ? Number(s.input.amountUi) : null,
205
+ leverage: s.input.leverage ? Number(s.input.leverage) : null,
206
+ slippageBps: s.input.slippageBps ? Number(s.input.slippageBps) : null,
207
+ openPosition: s.input.openPosition
208
+ ? Boolean(s.input.openPosition)
208
209
  : null,
209
- openPosition: s.inputs.openPosition
210
- ? Boolean(s.inputs.openPosition)
211
- : null,
212
- closePosition: s.inputs.closePosition
213
- ? Boolean(s.inputs.closePosition)
210
+ closePosition: s.input.closePosition
211
+ ? Boolean(s.input.closePosition)
214
212
  : null,
215
213
  };
216
- txSummary.inputs = inputs;
214
+ txSummary.input = input;
217
215
  }
218
216
 
219
217
  // get events for each summary
package/src/types.ts CHANGED
@@ -150,8 +150,8 @@ export interface ClendAccountTxSummary {
150
150
  clendAccount: web3.PublicKey;
151
151
  clendAccountAuthority: web3.PublicKey;
152
152
  clendGroup: web3.PublicKey;
153
- inputs?: UserRequest;
154
153
  events: ClendAccountEvent[];
154
+ input?: UserRequest;
155
155
  }
156
156
 
157
157
  export interface ClendAccountEvent {