@carrot-protocol/http-client 0.2.74 → 0.2.75-historical1-dev-a41cb35
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/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class Client {
|
|
|
14
14
|
getUser(vault: anchor.web3.PublicKey): Promise<UserResponse>;
|
|
15
15
|
getHistoricalVaultApy(vault: anchor.web3.PublicKey, interval: VaultHistoricalInterval): Promise<HistoricalVaultApyResponse>;
|
|
16
16
|
getUserPerformance(vault: anchor.web3.PublicKey, wallets: anchor.web3.PublicKey[]): Promise<UserPerformanceResponse>;
|
|
17
|
-
getHistoricalVaultNav(vault: anchor.web3.PublicKey, interval: VaultHistoricalInterval): Promise<HistoricalVaultNavResponse>;
|
|
17
|
+
getHistoricalVaultNav(vault: anchor.web3.PublicKey, interval: VaultHistoricalInterval, startTime: Date, endTime: Date): Promise<HistoricalVaultNavResponse>;
|
|
18
18
|
getVaultOhlc(vault: anchor.web3.PublicKey): Promise<VaultOhlcResponse>;
|
|
19
19
|
issue(vault: anchor.web3.PublicKey, assetMint: anchor.web3.PublicKey, amount: anchor.BN): Promise<string>;
|
|
20
20
|
redeem(vault: anchor.web3.PublicKey, assetMint: anchor.web3.PublicKey, amount: anchor.BN): Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -195,8 +195,8 @@ class Client {
|
|
|
195
195
|
return getUserPerformanceResponse;
|
|
196
196
|
}
|
|
197
197
|
// Retrieves historical NAV data for a specific vault
|
|
198
|
-
async getHistoricalVaultNav(vault, interval) {
|
|
199
|
-
const url = new URL(`${this.baseUrl}/historicalVaultNav?vault=${vault.toString()}&interval=${interval}`);
|
|
198
|
+
async getHistoricalVaultNav(vault, interval, startTime, endTime) {
|
|
199
|
+
const url = new URL(`${this.baseUrl}/historicalVaultNav?vault=${vault.toString()}&interval=${interval}&startTime=${startTime.getTime()}&endTime=${endTime.getTime()}`);
|
|
200
200
|
const response = await (0, cross_fetch_1.default)(url, {
|
|
201
201
|
method: "GET",
|
|
202
202
|
headers: this.headers,
|