@carrot-protocol/boost-http-client 0.2.15-group-refactor1-dev-ef145c2 → 0.2.15-group-refactor1-dev-8bcd756

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
@@ -27,7 +27,7 @@ export declare class Client {
27
27
  * @param user wallet public key
28
28
  * @returns User details
29
29
  */
30
- getUser(group: web3.PublicKey, user: web3.PublicKey, getClendAccountSummary: boolean): Promise<GetUserResponse>;
30
+ getUser(groups: web3.PublicKey[], user: web3.PublicKey, getClendAccountSummary: boolean): Promise<GetUserResponse>;
31
31
  /**
32
32
  * Get market details
33
33
  * @param groupAddress group public key
package/dist/index.js CHANGED
@@ -104,8 +104,8 @@ class Client {
104
104
  * @param user wallet public key
105
105
  * @returns User details
106
106
  */
107
- async getUser(group, user, getClendAccountSummary) {
108
- const body = await handleApiCall(() => this.http.get(`/user?user=${user.toString()}&group=${group.toString()}&getClendAccountSummary=${getClendAccountSummary}`));
107
+ async getUser(groups, user, getClendAccountSummary) {
108
+ const body = await handleApiCall(() => this.http.get(`/user?user=${user.toString()}&groups=${groups.map((g) => g.toString()).join(",")}&getClendAccountSummary=${getClendAccountSummary}`));
109
109
  const jsonRawResponse = JSON.parse(body);
110
110
  // parse balances
111
111
  const walletBalances = [];
package/dist/types.d.ts CHANGED
@@ -65,7 +65,7 @@ export interface GetGroupResponse {
65
65
  banks: Bank[];
66
66
  }
67
67
  export interface GetUserRequest {
68
- group: web3.PublicKey;
68
+ groups: web3.PublicKey[];
69
69
  user: web3.PublicKey;
70
70
  getClendAccountSummary: boolean;
71
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.2.15-group-refactor1-dev-ef145c2",
3
+ "version": "0.2.15-group-refactor1-dev-8bcd756",
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
@@ -105,13 +105,13 @@ export class Client {
105
105
  * @returns User details
106
106
  */
107
107
  async getUser(
108
- group: web3.PublicKey,
108
+ groups: web3.PublicKey[],
109
109
  user: web3.PublicKey,
110
110
  getClendAccountSummary: boolean,
111
111
  ): Promise<GetUserResponse> {
112
112
  const body = await handleApiCall(() =>
113
113
  this.http.get(
114
- `/user?user=${user.toString()}&group=${group.toString()}&getClendAccountSummary=${getClendAccountSummary}`,
114
+ `/user?user=${user.toString()}&groups=${groups.map((g) => g.toString()).join(",")}&getClendAccountSummary=${getClendAccountSummary}`,
115
115
  ),
116
116
  );
117
117
 
package/src/types.ts CHANGED
@@ -75,7 +75,7 @@ export interface GetGroupResponse {
75
75
  }
76
76
 
77
77
  export interface GetUserRequest {
78
- group: web3.PublicKey;
78
+ groups: web3.PublicKey[];
79
79
  user: web3.PublicKey;
80
80
  getClendAccountSummary: boolean;
81
81
  }