@carrot-protocol/boost-http-client 0.4.0-stub-position-endpoints-dev-666335f → 0.4.0-stub-position-endpoints-dev-be5af0a
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 +5 -2
- package/dist/index.js +11 -13
- package/package.json +1 -1
- package/src/index.ts +22 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnchorProvider, web3 } from "@coral-xyz/anchor";
|
|
2
|
-
import { GetBankResponse, GetUserResponse, GetGroupResponse, GetUserRequest, GetGroupsResponse, GetAccountResponse, GetAccountRequest
|
|
2
|
+
import { GetBankResponse, GetUserResponse, GetGroupResponse, GetUserRequest, GetGroupsResponse, GetAccountResponse, GetAccountRequest } from "./types";
|
|
3
3
|
import { ApiClient } from "./api";
|
|
4
4
|
import { PositionChartingExtension } from "./charting/position";
|
|
5
5
|
import { BankChartingExtension } from "./charting/bank";
|
|
@@ -79,5 +79,8 @@ export declare class Client extends ApiClient {
|
|
|
79
79
|
* @returns Withdraw emissions operation result
|
|
80
80
|
*/
|
|
81
81
|
withdrawEmissions(clendAccount: web3.PublicKey): Promise<string>;
|
|
82
|
-
|
|
82
|
+
getPerformanceChartingExtension(clendAccount: web3.PublicKey): Promise<PositionChartingExtension>;
|
|
83
|
+
getGroupChartingExtension(group: web3.PublicKey): Promise<GroupChartingExtension>;
|
|
84
|
+
getWalletChartingExtension(address?: web3.PublicKey): Promise<WalletChartingExtension>;
|
|
85
|
+
getBankChartingExtension(bank: web3.PublicKey): Promise<BankChartingExtension>;
|
|
83
86
|
}
|
package/dist/index.js
CHANGED
|
@@ -428,19 +428,17 @@ class Client extends api_1.ApiClient {
|
|
|
428
428
|
const txSig = await this.send(withdrawEmissionsResponse.unsignedBase64Tx, withdrawEmissionsResponse.userRequestId);
|
|
429
429
|
return txSig;
|
|
430
430
|
}
|
|
431
|
-
async
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
throw new Error(`Unknown extension: ${extension}`);
|
|
443
|
-
}
|
|
431
|
+
async getPerformanceChartingExtension(clendAccount) {
|
|
432
|
+
return new position_1.PositionChartingExtension(this.baseUrl, clendAccount);
|
|
433
|
+
}
|
|
434
|
+
async getGroupChartingExtension(group) {
|
|
435
|
+
return new group_1.GroupChartingExtension(this.baseUrl, group);
|
|
436
|
+
}
|
|
437
|
+
async getWalletChartingExtension(address) {
|
|
438
|
+
return new wallet_1.WalletChartingExtension(this.baseUrl, address ?? this.address());
|
|
439
|
+
}
|
|
440
|
+
async getBankChartingExtension(bank) {
|
|
441
|
+
return new bank_1.BankChartingExtension(this.baseUrl, bank);
|
|
444
442
|
}
|
|
445
443
|
}
|
|
446
444
|
exports.Client = Client;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carrot-protocol/boost-http-client",
|
|
3
|
-
"version": "0.4.0-stub-position-endpoints-dev-
|
|
3
|
+
"version": "0.4.0-stub-position-endpoints-dev-be5af0a",
|
|
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
|
@@ -606,23 +606,28 @@ export class Client extends ApiClient {
|
|
|
606
606
|
return txSig;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
public async
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
609
|
+
public async getPerformanceChartingExtension(
|
|
610
|
+
clendAccount: web3.PublicKey,
|
|
611
|
+
): Promise<PositionChartingExtension> {
|
|
612
|
+
return new PositionChartingExtension(this.baseUrl, clendAccount);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
public async getGroupChartingExtension(
|
|
616
|
+
group: web3.PublicKey,
|
|
617
|
+
): Promise<GroupChartingExtension> {
|
|
618
|
+
return new GroupChartingExtension(this.baseUrl, group);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
public async getWalletChartingExtension(
|
|
622
|
+
address?: web3.PublicKey,
|
|
623
|
+
): Promise<WalletChartingExtension> {
|
|
624
|
+
return new WalletChartingExtension(this.baseUrl, address ?? this.address());
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
public async getBankChartingExtension(
|
|
628
|
+
bank: web3.PublicKey,
|
|
629
|
+
): Promise<BankChartingExtension> {
|
|
630
|
+
return new BankChartingExtension(this.baseUrl, bank);
|
|
626
631
|
}
|
|
627
632
|
}
|
|
628
633
|
|