@ember-finance/sdk 1.0.15 → 1.0.17

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.
@@ -22,14 +22,23 @@ import type { ProtocolInfo } from "../models";
22
22
  import type { RawEvent } from "../models";
23
23
  import type { SharePriceHistory } from "../models";
24
24
  import type { Strategy } from "../models";
25
+ import type { Tag } from "../models";
25
26
  import type { TvlHistory } from "../models";
26
27
  import type { UpdateVaultStrategies } from "../models";
27
28
  import type { VaultDetail } from "../models";
29
+ import type { VaultsStats } from "../models";
28
30
  /**
29
31
  * VaultsApi - axios parameter creator
30
32
  * @export
31
33
  */
32
34
  export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration) => {
35
+ /**
36
+ *
37
+ * @summary Get all tags
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ getAllTags: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
33
42
  /**
34
43
  *
35
44
  * @summary Get the price of the coins
@@ -139,6 +148,13 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
139
148
  * @throws {RequiredError}
140
149
  */
141
150
  getVaultsProtocolInfo: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
151
+ /**
152
+ *
153
+ * @summary Get stats for all vaults or a specific vault
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ getVaultsStats: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
142
158
  /**
143
159
  *
144
160
  * @summary Update the strategy of the vault
@@ -153,6 +169,13 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
153
169
  * @export
154
170
  */
155
171
  export declare const VaultsApiFp: (configuration?: Configuration) => {
172
+ /**
173
+ *
174
+ * @summary Get all tags
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ getAllTags(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Tag>>>;
156
179
  /**
157
180
  *
158
181
  * @summary Get the price of the coins
@@ -262,6 +285,13 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
262
285
  * @throws {RequiredError}
263
286
  */
264
287
  getVaultsProtocolInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProtocolInfo>>;
288
+ /**
289
+ *
290
+ * @summary Get stats for all vaults or a specific vault
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ getVaultsStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VaultsStats>>;
265
295
  /**
266
296
  *
267
297
  * @summary Update the strategy of the vault
@@ -276,6 +306,13 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
276
306
  * @export
277
307
  */
278
308
  export declare const VaultsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
309
+ /**
310
+ *
311
+ * @summary Get all tags
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ getAllTags(options?: RawAxiosRequestConfig): AxiosPromise<Array<Tag>>;
279
316
  /**
280
317
  *
281
318
  * @summary Get the price of the coins
@@ -385,6 +422,13 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
385
422
  * @throws {RequiredError}
386
423
  */
387
424
  getVaultsProtocolInfo(options?: RawAxiosRequestConfig): AxiosPromise<ProtocolInfo>;
425
+ /**
426
+ *
427
+ * @summary Get stats for all vaults or a specific vault
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ getVaultsStats(options?: RawAxiosRequestConfig): AxiosPromise<VaultsStats>;
388
432
  /**
389
433
  *
390
434
  * @summary Update the strategy of the vault
@@ -401,6 +445,14 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
401
445
  * @extends {BaseAPI}
402
446
  */
403
447
  export declare class VaultsApi extends BaseAPI {
448
+ /**
449
+ *
450
+ * @summary Get all tags
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ * @memberof VaultsApi
454
+ */
455
+ getAllTags(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Tag[], any, {}>>;
404
456
  /**
405
457
  *
406
458
  * @summary Get the price of the coins
@@ -522,6 +574,14 @@ export declare class VaultsApi extends BaseAPI {
522
574
  * @memberof VaultsApi
523
575
  */
524
576
  getVaultsProtocolInfo(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ProtocolInfo, any, {}>>;
577
+ /**
578
+ *
579
+ * @summary Get stats for all vaults or a specific vault
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ * @memberof VaultsApi
583
+ */
584
+ getVaultsStats(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VaultsStats, any, {}>>;
525
585
  /**
526
586
  *
527
587
  * @summary Update the strategy of the vault
@@ -29,6 +29,35 @@ const base_1 = require("../base");
29
29
  */
30
30
  const VaultsApiAxiosParamCreator = function (configuration) {
31
31
  return {
32
+ /**
33
+ *
34
+ * @summary Get all tags
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ getAllTags: async (options = {}) => {
39
+ const localVarPath = `/api/v1/vaults/tags`;
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ if (configuration) {
44
+ baseOptions = configuration.baseOptions;
45
+ }
46
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
47
+ const localVarHeaderParameter = {};
48
+ const localVarQueryParameter = {};
49
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
50
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
51
+ localVarRequestOptions.headers = {
52
+ ...localVarHeaderParameter,
53
+ ...headersFromBaseOptions,
54
+ ...options.headers
55
+ };
56
+ return {
57
+ url: (0, common_1.toPathString)(localVarUrlObj),
58
+ options: localVarRequestOptions
59
+ };
60
+ },
32
61
  /**
33
62
  *
34
63
  * @summary Get the price of the coins
@@ -473,6 +502,35 @@ const VaultsApiAxiosParamCreator = function (configuration) {
473
502
  options: localVarRequestOptions
474
503
  };
475
504
  },
505
+ /**
506
+ *
507
+ * @summary Get stats for all vaults or a specific vault
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ getVaultsStats: async (options = {}) => {
512
+ const localVarPath = `/api/v1/vaults/stats`;
513
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
514
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
515
+ let baseOptions;
516
+ if (configuration) {
517
+ baseOptions = configuration.baseOptions;
518
+ }
519
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
520
+ const localVarHeaderParameter = {};
521
+ const localVarQueryParameter = {};
522
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
523
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
524
+ localVarRequestOptions.headers = {
525
+ ...localVarHeaderParameter,
526
+ ...headersFromBaseOptions,
527
+ ...options.headers
528
+ };
529
+ return {
530
+ url: (0, common_1.toPathString)(localVarUrlObj),
531
+ options: localVarRequestOptions
532
+ };
533
+ },
476
534
  /**
477
535
  *
478
536
  * @summary Update the strategy of the vault
@@ -517,6 +575,19 @@ exports.VaultsApiAxiosParamCreator = VaultsApiAxiosParamCreator;
517
575
  const VaultsApiFp = function (configuration) {
518
576
  const localVarAxiosParamCreator = (0, exports.VaultsApiAxiosParamCreator)(configuration);
519
577
  return {
578
+ /**
579
+ *
580
+ * @summary Get all tags
581
+ * @param {*} [options] Override http request option.
582
+ * @throws {RequiredError}
583
+ */
584
+ async getAllTags(options) {
585
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllTags(options);
586
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
587
+ const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getAllTags"]?.[localVarOperationServerIndex]
588
+ ?.url;
589
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
590
+ },
520
591
  /**
521
592
  *
522
593
  * @summary Get the price of the coins
@@ -687,6 +758,18 @@ const VaultsApiFp = function (configuration) {
687
758
  const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getVaultsProtocolInfo"]?.[localVarOperationServerIndex]?.url;
688
759
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
689
760
  },
761
+ /**
762
+ *
763
+ * @summary Get stats for all vaults or a specific vault
764
+ * @param {*} [options] Override http request option.
765
+ * @throws {RequiredError}
766
+ */
767
+ async getVaultsStats(options) {
768
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVaultsStats(options);
769
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
770
+ const localVarOperationServerBasePath = base_1.operationServerMap["VaultsApi.getVaultsStats"]?.[localVarOperationServerIndex]?.url;
771
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
772
+ },
690
773
  /**
691
774
  *
692
775
  * @summary Update the strategy of the vault
@@ -710,6 +793,17 @@ exports.VaultsApiFp = VaultsApiFp;
710
793
  const VaultsApiFactory = function (configuration, basePath, axios) {
711
794
  const localVarFp = (0, exports.VaultsApiFp)(configuration);
712
795
  return {
796
+ /**
797
+ *
798
+ * @summary Get all tags
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ getAllTags(options) {
803
+ return localVarFp
804
+ .getAllTags(options)
805
+ .then(request => request(axios, basePath));
806
+ },
713
807
  /**
714
808
  *
715
809
  * @summary Get the price of the coins
@@ -867,6 +961,17 @@ const VaultsApiFactory = function (configuration, basePath, axios) {
867
961
  .getVaultsProtocolInfo(options)
868
962
  .then(request => request(axios, basePath));
869
963
  },
964
+ /**
965
+ *
966
+ * @summary Get stats for all vaults or a specific vault
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ getVaultsStats(options) {
971
+ return localVarFp
972
+ .getVaultsStats(options)
973
+ .then(request => request(axios, basePath));
974
+ },
870
975
  /**
871
976
  *
872
977
  * @summary Update the strategy of the vault
@@ -889,6 +994,18 @@ exports.VaultsApiFactory = VaultsApiFactory;
889
994
  * @extends {BaseAPI}
890
995
  */
891
996
  class VaultsApi extends base_1.BaseAPI {
997
+ /**
998
+ *
999
+ * @summary Get all tags
1000
+ * @param {*} [options] Override http request option.
1001
+ * @throws {RequiredError}
1002
+ * @memberof VaultsApi
1003
+ */
1004
+ getAllTags(options) {
1005
+ return (0, exports.VaultsApiFp)(this.configuration)
1006
+ .getAllTags(options)
1007
+ .then(request => request(this.axios, this.basePath));
1008
+ }
892
1009
  /**
893
1010
  *
894
1011
  * @summary Get the price of the coins
@@ -1058,6 +1175,18 @@ class VaultsApi extends base_1.BaseAPI {
1058
1175
  .getVaultsProtocolInfo(options)
1059
1176
  .then(request => request(this.axios, this.basePath));
1060
1177
  }
1178
+ /**
1179
+ *
1180
+ * @summary Get stats for all vaults or a specific vault
1181
+ * @param {*} [options] Override http request option.
1182
+ * @throws {RequiredError}
1183
+ * @memberof VaultsApi
1184
+ */
1185
+ getVaultsStats(options) {
1186
+ return (0, exports.VaultsApiFp)(this.configuration)
1187
+ .getVaultsStats(options)
1188
+ .then(request => request(this.axios, this.basePath));
1189
+ }
1061
1190
  /**
1062
1191
  *
1063
1192
  * @summary Update the strategy of the vault
@@ -41,6 +41,7 @@ export * from "./share-price-history";
41
41
  export * from "./strategy";
42
42
  export * from "./sub-account";
43
43
  export * from "./supplied";
44
+ export * from "./tag";
44
45
  export * from "./tvl-history";
45
46
  export * from "./ultra-coin-info";
46
47
  export * from "./update-vault-strategies";
@@ -60,4 +61,5 @@ export * from "./vault-rate-updated-event";
60
61
  export * from "./vault-slice";
61
62
  export * from "./vault-sub-account-updated-event";
62
63
  export * from "./vault-withdrawal-without-redeeming-shares-event";
64
+ export * from "./vaults-stats";
63
65
  export * from "./yield-aggregate-value";
@@ -57,6 +57,7 @@ __exportStar(require("./share-price-history"), exports);
57
57
  __exportStar(require("./strategy"), exports);
58
58
  __exportStar(require("./sub-account"), exports);
59
59
  __exportStar(require("./supplied"), exports);
60
+ __exportStar(require("./tag"), exports);
60
61
  __exportStar(require("./tvl-history"), exports);
61
62
  __exportStar(require("./ultra-coin-info"), exports);
62
63
  __exportStar(require("./update-vault-strategies"), exports);
@@ -76,4 +77,5 @@ __exportStar(require("./vault-rate-updated-event"), exports);
76
77
  __exportStar(require("./vault-slice"), exports);
77
78
  __exportStar(require("./vault-sub-account-updated-event"), exports);
78
79
  __exportStar(require("./vault-withdrawal-without-redeeming-shares-event"), exports);
80
+ __exportStar(require("./vaults-stats"), exports);
79
81
  __exportStar(require("./yield-aggregate-value"), exports);
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Ember Protocol Vaults API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Tag
16
+ */
17
+ export interface Tag {
18
+ /**
19
+ * The id of the tag
20
+ * @type {string}
21
+ * @memberof Tag
22
+ */
23
+ id: string;
24
+ /**
25
+ * The name of the tag
26
+ * @type {string}
27
+ * @memberof Tag
28
+ */
29
+ name: string;
30
+ /**
31
+ * The description of the tag
32
+ * @type {string}
33
+ * @memberof Tag
34
+ */
35
+ description: string;
36
+ /**
37
+ * The rank of the tag
38
+ * @type {number}
39
+ * @memberof Tag
40
+ */
41
+ rank: number;
42
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Ember Protocol Vaults API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -75,6 +75,18 @@ export interface VaultDetail {
75
75
  * @memberof VaultDetail
76
76
  */
77
77
  internalType?: string;
78
+ /**
79
+ * The total number of depositors of the vault
80
+ * @type {string}
81
+ * @memberof VaultDetail
82
+ */
83
+ totalDepositorsCount: string;
84
+ /**
85
+ * The number of active depositors of the vault
86
+ * @type {string}
87
+ * @memberof VaultDetail
88
+ */
89
+ activeDepositorsCount: string;
78
90
  /**
79
91
  *
80
92
  * @type {Asset}
@@ -99,6 +111,12 @@ export interface VaultDetail {
99
111
  * @memberof VaultDetail
100
112
  */
101
113
  managers: Array<Manager>;
114
+ /**
115
+ *
116
+ * @type {Array<string>}
117
+ * @memberof VaultDetail
118
+ */
119
+ tags: Array<string>;
102
120
  /**
103
121
  * The status of the vault
104
122
  * @type {string}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Ember Protocol Vaults API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface VaultsStats
16
+ */
17
+ export interface VaultsStats {
18
+ /**
19
+ * The total number of depositors of the vault
20
+ * @type {string}
21
+ * @memberof VaultsStats
22
+ */
23
+ totalDepositorsCount: string;
24
+ /**
25
+ * The number of active depositors of the vault
26
+ * @type {string}
27
+ * @memberof VaultsStats
28
+ */
29
+ activeDepositorsCount: string;
30
+ /**
31
+ * The total TVL of the vault in e9
32
+ * @type {string}
33
+ * @memberof VaultsStats
34
+ */
35
+ tvlE9: string;
36
+ /**
37
+ * The total PNL of the vault in e9
38
+ * @type {string}
39
+ * @memberof VaultsStats
40
+ */
41
+ totalPnlE9: string;
42
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Ember Protocol Vaults API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-finance/sdk",
3
3
  "description": "Ember Protocol SDK",
4
- "version": "1.0.15",
4
+ "version": "1.0.17",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -42,7 +42,6 @@
42
42
  "dependencies": {
43
43
  "@firefly-exchange/library-sui": "^2.8.22",
44
44
  "axios": "1.12.2",
45
- "yargs": "^17.6.2",
46
45
  "yarn": "^1.22.19"
47
46
  },
48
47
  "devDependencies": {
@@ -81,5 +80,11 @@
81
80
  },
82
81
  "files": [
83
82
  "dist"
84
- ]
83
+ ],
84
+ "resolutions": {
85
+ "markdown-it": ">=12.3.2",
86
+ "ajv": "^6.12.6",
87
+ "jsonpointer": ">=5.0.0",
88
+ "form-data": ">=3.0.4"
89
+ }
85
90
  }