@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 +1 -1
- package/dist/index.js +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/types.ts +1 -1
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(
|
|
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(
|
|
108
|
-
const body = await handleApiCall(() => this.http.get(`/user?user=${user.toString()}&
|
|
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
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -105,13 +105,13 @@ export class Client {
|
|
|
105
105
|
* @returns User details
|
|
106
106
|
*/
|
|
107
107
|
async getUser(
|
|
108
|
-
|
|
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()}&
|
|
114
|
+
`/user?user=${user.toString()}&groups=${groups.map((g) => g.toString()).join(",")}&getClendAccountSummary=${getClendAccountSummary}`,
|
|
115
115
|
),
|
|
116
116
|
);
|
|
117
117
|
|