@carrot-protocol/boost-http-client 0.3.0-feat-get-account-endpoint-dev-6a0523c → 0.3.0-feat-get-account-endpoint-dev-427172d

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
@@ -1,5 +1,5 @@
1
1
  import { AnchorProvider, web3 } from "@coral-xyz/anchor";
2
- import { GetBankResponse, GetUserResponse, GetGroupResponse, GetGroupsResponse, GetAccountResponse } from "./types";
2
+ import { GetBankResponse, GetUserResponse, GetGroupResponse, GetGroupsResponse, GetAccountResponse, GetAccountRequest } from "./types";
3
3
  export * from "./types";
4
4
  export * from "./utils";
5
5
  export * as Common from "@carrot-protocol/clend-common";
@@ -25,7 +25,7 @@ export declare class Client {
25
25
  /**
26
26
  * Fetch and parse a single clend account by pubkey
27
27
  */
28
- getAccount(account: web3.PublicKey, getClendAccountSummary: boolean): Promise<GetAccountResponse>;
28
+ getAccount(account: GetAccountRequest["account"], getClendAccountSummary: GetAccountRequest["getClendAccountSummary"]): Promise<GetAccountResponse>;
29
29
  /**
30
30
  * Helper to parse a clend account summary array from API response
31
31
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.3.0-feat-get-account-endpoint-dev-6a0523c",
3
+ "version": "0.3.0-feat-get-account-endpoint-dev-427172d",
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
@@ -28,6 +28,7 @@ import {
28
28
  WithdrawEmissionsRequest,
29
29
  WithdrawEmissionsResponse,
30
30
  GetAccountResponse,
31
+ GetAccountRequest,
31
32
  } from "./types";
32
33
  import encode from "bs58";
33
34
 
@@ -111,8 +112,8 @@ export class Client {
111
112
  * Fetch and parse a single clend account by pubkey
112
113
  */
113
114
  async getAccount(
114
- account: web3.PublicKey,
115
- getClendAccountSummary: boolean,
115
+ account: GetAccountRequest["account"],
116
+ getClendAccountSummary: GetAccountRequest["getClendAccountSummary"],
116
117
  ): Promise<GetAccountResponse> {
117
118
  const body = await handleApiCall(() =>
118
119
  this.http.get(