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

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,28 @@ 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
+ action: s.action,
174
+ input: undefined,
174
175
  events: [],
175
176
  };
176
177
  // 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)
178
+ if (s.input) {
179
+ const input = {
180
+ apiPath: s.input.apiPath,
181
+ selectedTokenMint: s.input.selectedTokenMint
182
+ ? new anchor_1.web3.PublicKey(s.input.selectedTokenMint)
182
183
  : 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)
184
+ amountUi: s.input.amountUi ? Number(s.input.amountUi) : null,
185
+ leverage: s.input.leverage ? Number(s.input.leverage) : null,
186
+ slippageBps: s.input.slippageBps ? Number(s.input.slippageBps) : null,
187
+ openPosition: s.input.openPosition
188
+ ? Boolean(s.input.openPosition)
187
189
  : null,
188
- openPosition: s.inputs.openPosition
189
- ? Boolean(s.inputs.openPosition)
190
- : null,
191
- closePosition: s.inputs.closePosition
192
- ? Boolean(s.inputs.closePosition)
190
+ closePosition: s.input.closePosition
191
+ ? Boolean(s.input.closePosition)
193
192
  : null,
194
193
  };
195
- txSummary.inputs = inputs;
194
+ txSummary.input = input;
196
195
  }
197
196
  // get events for each summary
198
197
  for (const event of s.events) {
package/dist/types.d.ts CHANGED
@@ -133,8 +133,9 @@ export interface ClendAccountTxSummary {
133
133
  clendAccount: web3.PublicKey;
134
134
  clendAccountAuthority: web3.PublicKey;
135
135
  clendGroup: web3.PublicKey;
136
- inputs?: UserRequest;
136
+ action: string;
137
137
  events: ClendAccountEvent[];
138
+ input?: UserRequest;
138
139
  }
139
140
  export interface ClendAccountEvent {
140
141
  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-72e7d04",
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,29 @@ 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
+ action: s.action,
194
+ input: undefined,
194
195
  events: [],
195
196
  };
196
197
 
197
198
  // 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)
199
+ if (s.input) {
200
+ const input: UserRequest = {
201
+ apiPath: s.input.apiPath,
202
+ selectedTokenMint: s.input.selectedTokenMint
203
+ ? new web3.PublicKey(s.input.selectedTokenMint)
203
204
  : 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)
205
+ amountUi: s.input.amountUi ? Number(s.input.amountUi) : null,
206
+ leverage: s.input.leverage ? Number(s.input.leverage) : null,
207
+ slippageBps: s.input.slippageBps ? Number(s.input.slippageBps) : null,
208
+ openPosition: s.input.openPosition
209
+ ? Boolean(s.input.openPosition)
208
210
  : null,
209
- openPosition: s.inputs.openPosition
210
- ? Boolean(s.inputs.openPosition)
211
- : null,
212
- closePosition: s.inputs.closePosition
213
- ? Boolean(s.inputs.closePosition)
211
+ closePosition: s.input.closePosition
212
+ ? Boolean(s.input.closePosition)
214
213
  : null,
215
214
  };
216
- txSummary.inputs = inputs;
215
+ txSummary.input = input;
217
216
  }
218
217
 
219
218
  // get events for each summary
package/src/types.ts CHANGED
@@ -150,8 +150,9 @@ export interface ClendAccountTxSummary {
150
150
  clendAccount: web3.PublicKey;
151
151
  clendAccountAuthority: web3.PublicKey;
152
152
  clendGroup: web3.PublicKey;
153
- inputs?: UserRequest;
153
+ action: string;
154
154
  events: ClendAccountEvent[];
155
+ input?: UserRequest;
155
156
  }
156
157
 
157
158
  export interface ClendAccountEvent {