@carrot-protocol/http-client 0.2.12-hva-dev-dfefb01 → 0.2.13-api-cache-dev-874414e

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
@@ -6,7 +6,7 @@ export declare class Client {
6
6
  private headers;
7
7
  constructor(baseUrl: string, provider: anchor.AnchorProvider);
8
8
  index(): Promise<void>;
9
- getVault(vault: anchor.web3.PublicKey): Promise<Vault>;
9
+ getVault(vault: anchor.web3.PublicKey, disableCache?: boolean): Promise<Vault>;
10
10
  getVaultPerformance(vault: anchor.web3.PublicKey): Promise<VaultPerformance>;
11
11
  getUser(vault: anchor.web3.PublicKey): Promise<UserResponse>;
12
12
  getHistoricalVaultApy(vault: anchor.web3.PublicKey, interval: VaultHistoricalApyInterval): Promise<HistoricalVaultApyResponse>;
package/dist/index.js CHANGED
@@ -44,8 +44,8 @@ class Client {
44
44
  const body = await response.json();
45
45
  console.log(JSON.stringify(body, undefined, 2));
46
46
  }
47
- async getVault(vault) {
48
- const url = new URL(`${this.baseUrl}/vault?vault=${vault.toString()}`);
47
+ async getVault(vault, disableCache = false) {
48
+ const url = new URL(`${this.baseUrl}/vault?vault=${vault.toString()}&disableCache=${disableCache}`);
49
49
  const response = await (0, cross_fetch_1.default)(url, {
50
50
  method: "GET",
51
51
  headers: this.headers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/http-client",
3
- "version": "0.2.12-hva-dev-dfefb01",
3
+ "version": "0.2.13-api-cache-dev-874414e",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",