@chainstream-io/sdk 0.1.8 → 0.1.9

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.
Files changed (114) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/index.js +73 -74
  3. package/dist/esm/openapi/apis/BlockchainApi.js +61 -44
  4. package/dist/esm/openapi/apis/DefiSolanaMoonshotApi.js +67 -50
  5. package/dist/esm/openapi/apis/DefiSolanaPumpfunApi.js +38 -25
  6. package/dist/esm/openapi/apis/DexApi.js +205 -176
  7. package/dist/esm/openapi/apis/DexPoolApi.js +41 -28
  8. package/dist/esm/openapi/apis/EndpointApi.js +212 -175
  9. package/dist/esm/openapi/apis/IpfsApi.js +38 -25
  10. package/dist/esm/openapi/apis/JobsApi.js +65 -48
  11. package/dist/esm/openapi/apis/RankingApi.js +278 -249
  12. package/dist/esm/openapi/apis/RedPacketApi.js +294 -253
  13. package/dist/esm/openapi/apis/TokenApi.js +1145 -1056
  14. package/dist/esm/openapi/apis/TradeApi.js +233 -208
  15. package/dist/esm/openapi/apis/TransactionApi.js +42 -29
  16. package/dist/esm/openapi/apis/WalletApi.js +148 -123
  17. package/dist/esm/openapi/apis/WatchlistApi.js +41 -28
  18. package/dist/esm/openapi/runtime.js +119 -118
  19. package/dist/esm/stream/stream.js +36 -34
  20. package/dist/index.js +99 -96
  21. package/dist/openapi/apis/BlockchainApi.js +69 -48
  22. package/dist/openapi/apis/DefiSolanaMoonshotApi.js +74 -53
  23. package/dist/openapi/apis/DefiSolanaPumpfunApi.js +45 -28
  24. package/dist/openapi/apis/DexApi.js +217 -184
  25. package/dist/openapi/apis/DexPoolApi.js +49 -32
  26. package/dist/openapi/apis/EndpointApi.js +220 -179
  27. package/dist/openapi/apis/IpfsApi.js +44 -27
  28. package/dist/openapi/apis/JobsApi.js +72 -51
  29. package/dist/openapi/apis/RankingApi.js +306 -273
  30. package/dist/openapi/apis/RedPacketApi.js +305 -260
  31. package/dist/openapi/apis/TokenApi.js +1182 -1089
  32. package/dist/openapi/apis/TradeApi.js +256 -227
  33. package/dist/openapi/apis/TransactionApi.js +49 -32
  34. package/dist/openapi/apis/WalletApi.js +159 -130
  35. package/dist/openapi/apis/WatchlistApi.js +49 -32
  36. package/dist/openapi/apis/index.js +31 -15
  37. package/dist/openapi/index.js +19 -3
  38. package/dist/openapi/models/BlockchainDTO.js +12 -5
  39. package/dist/openapi/models/BlockchainLatestBlockDTO.js +12 -5
  40. package/dist/openapi/models/BooleanResultDTO.js +12 -5
  41. package/dist/openapi/models/CalculatePnlInput.js +12 -5
  42. package/dist/openapi/models/Candle.js +15 -8
  43. package/dist/openapi/models/ClaimRedPacketInput.js +12 -5
  44. package/dist/openapi/models/CreateEndpointInput.js +12 -5
  45. package/dist/openapi/models/CreateRedPacketInput.js +12 -5
  46. package/dist/openapi/models/CreateRedPacketReply.js +12 -5
  47. package/dist/openapi/models/CreateTokenInput.js +14 -6
  48. package/dist/openapi/models/CreateTokenReply.js +12 -5
  49. package/dist/openapi/models/DexDTO.js +12 -5
  50. package/dist/openapi/models/DexPage.js +15 -8
  51. package/dist/openapi/models/DexPoolDTO.js +12 -5
  52. package/dist/openapi/models/EndpointListResponse.js +15 -8
  53. package/dist/openapi/models/EndpointOperationResponse.js +12 -5
  54. package/dist/openapi/models/EndpointResponse.js +12 -5
  55. package/dist/openapi/models/EndpointSecretResponse.js +12 -5
  56. package/dist/openapi/models/FilterCondition.js +14 -6
  57. package/dist/openapi/models/GainersAndLosersDTO.js +12 -5
  58. package/dist/openapi/models/GainersAndLosersPage.js +15 -8
  59. package/dist/openapi/models/JobDTO.js +12 -5
  60. package/dist/openapi/models/JobStreamingDTO.js +12 -5
  61. package/dist/openapi/models/Link.js +14 -6
  62. package/dist/openapi/models/MoonshotCreateTokenInput.js +18 -10
  63. package/dist/openapi/models/MoonshotCreateTokenReply.js +12 -5
  64. package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js +12 -5
  65. package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js +12 -5
  66. package/dist/openapi/models/PumpCreateTokenInput.js +15 -7
  67. package/dist/openapi/models/PumpCreateTokenReply.js +12 -5
  68. package/dist/openapi/models/QuoteResponse.js +12 -5
  69. package/dist/openapi/models/RedPacketClaimDTO.js +14 -6
  70. package/dist/openapi/models/RedPacketClaimsPage.js +15 -8
  71. package/dist/openapi/models/RedPacketDTO.js +14 -6
  72. package/dist/openapi/models/RedPacketReply.js +12 -5
  73. package/dist/openapi/models/RedPacketSendTxInput.js +12 -5
  74. package/dist/openapi/models/RedPacketSendTxResponse.js +12 -5
  75. package/dist/openapi/models/RedPacketsPage.js +15 -8
  76. package/dist/openapi/models/Resolution.js +17 -9
  77. package/dist/openapi/models/SendTxInput.js +14 -6
  78. package/dist/openapi/models/SendTxResponse.js +12 -5
  79. package/dist/openapi/models/SwapInput.js +15 -7
  80. package/dist/openapi/models/SwapReply.js +12 -5
  81. package/dist/openapi/models/SwapRouteInput.js +15 -7
  82. package/dist/openapi/models/SwapRouteResponse.js +15 -8
  83. package/dist/openapi/models/Token.js +30 -23
  84. package/dist/openapi/models/TokenCreationDTO.js +14 -6
  85. package/dist/openapi/models/TokenCreationPage.js +15 -8
  86. package/dist/openapi/models/TokenCreatorsDTO.js +12 -5
  87. package/dist/openapi/models/TokenExtraDTO.js +12 -5
  88. package/dist/openapi/models/TokenHolder.js +12 -5
  89. package/dist/openapi/models/TokenHolderPage.js +15 -8
  90. package/dist/openapi/models/TokenListPage.js +15 -8
  91. package/dist/openapi/models/TokenMarketData.js +12 -5
  92. package/dist/openapi/models/TokenMetadata.js +21 -14
  93. package/dist/openapi/models/TokenPage.js +15 -8
  94. package/dist/openapi/models/TokenPriceDTO.js +12 -5
  95. package/dist/openapi/models/TokenPricePage.js +15 -8
  96. package/dist/openapi/models/TokenSocialMediasDTO.js +12 -5
  97. package/dist/openapi/models/TokenStat.js +12 -5
  98. package/dist/openapi/models/TopTradersDTO.js +12 -5
  99. package/dist/openapi/models/TopTradersPage.js +15 -8
  100. package/dist/openapi/models/TradeDetailDTO.js +12 -5
  101. package/dist/openapi/models/TradeEvent.js +15 -8
  102. package/dist/openapi/models/TradePage.js +15 -8
  103. package/dist/openapi/models/TradeType.js +17 -9
  104. package/dist/openapi/models/UpdateEndpointInput.js +12 -5
  105. package/dist/openapi/models/WalletBalanceDetailDTO.js +12 -5
  106. package/dist/openapi/models/WalletBalancesDTO.js +15 -8
  107. package/dist/openapi/models/WalletPnlDTO.js +12 -5
  108. package/dist/openapi/models/index.js +86 -70
  109. package/dist/openapi/runtime.js +153 -136
  110. package/dist/stream/index.js +19 -3
  111. package/dist/stream/stream.fields.js +11 -5
  112. package/dist/stream/stream.js +45 -39
  113. package/dist/stream/stream.model.js +13 -10
  114. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,50 +12,66 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import * as runtime from '../runtime';
15
- import { SendTxInputToJSON, SendTxResponseFromJSON, } from '../models/index';
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.TransactionApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
16
28
  /**
17
29
  *
18
30
  */
19
- export class TransactionApi extends runtime.BaseAPI {
31
+ class TransactionApi extends runtime.BaseAPI {
20
32
  /**
21
33
  * CONTROLLER.TRANSACTION.SEND.DESCRIPTION
22
34
  * CONTROLLER.TRANSACTION.SEND.SUMMARY
23
35
  */
24
- async sendRaw(requestParameters, initOverrides) {
25
- if (requestParameters['chain'] == null) {
26
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling send().');
27
- }
28
- if (requestParameters['sendTxInput'] == null) {
29
- throw new runtime.RequiredError('sendTxInput', 'Required parameter "sendTxInput" was null or undefined when calling send().');
30
- }
31
- const queryParameters = {};
32
- const headerParameters = {};
33
- headerParameters['Content-Type'] = 'application/json';
34
- if (this.configuration && this.configuration.accessToken) {
35
- const token = this.configuration.accessToken;
36
- const tokenString = await token("bearer", []);
37
- if (tokenString) {
38
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
36
+ sendRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['chain'] == null) {
39
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling send().');
39
40
  }
40
- }
41
- let urlPath = `/v1/transaction/{chain}/send`;
42
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
43
- const response = await this.request({
44
- path: urlPath,
45
- method: 'POST',
46
- headers: headerParameters,
47
- query: queryParameters,
48
- body: SendTxInputToJSON(requestParameters['sendTxInput']),
49
- }, initOverrides);
50
- return new runtime.JSONApiResponse(response, (jsonValue) => SendTxResponseFromJSON(jsonValue));
41
+ if (requestParameters['sendTxInput'] == null) {
42
+ throw new runtime.RequiredError('sendTxInput', 'Required parameter "sendTxInput" was null or undefined when calling send().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ headerParameters['Content-Type'] = 'application/json';
47
+ if (this.configuration && this.configuration.accessToken) {
48
+ const token = this.configuration.accessToken;
49
+ const tokenString = yield token("bearer", []);
50
+ if (tokenString) {
51
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
52
+ }
53
+ }
54
+ let urlPath = `/v1/transaction/{chain}/send`;
55
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
56
+ const response = yield this.request({
57
+ path: urlPath,
58
+ method: 'POST',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ body: (0, index_1.SendTxInputToJSON)(requestParameters['sendTxInput']),
62
+ }, initOverrides);
63
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SendTxResponseFromJSON)(jsonValue));
64
+ });
51
65
  }
52
66
  /**
53
67
  * CONTROLLER.TRANSACTION.SEND.DESCRIPTION
54
68
  * CONTROLLER.TRANSACTION.SEND.SUMMARY
55
69
  */
56
- async send(requestParameters, initOverrides) {
57
- const response = await this.sendRaw(requestParameters, initOverrides);
58
- return await response.value();
70
+ send(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const response = yield this.sendRaw(requestParameters, initOverrides);
73
+ return yield response.value();
74
+ });
59
75
  }
60
76
  }
77
+ exports.TransactionApi = TransactionApi;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,184 +12,212 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import * as runtime from '../runtime';
15
- import { BooleanResultDTOFromJSON, CalculatePnlInputToJSON, WalletBalancesDTOFromJSON, WalletPnlDTOFromJSON, } from '../models/index';
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.GetPnlStatsChainEnum = exports.GetPnlChainEnum = exports.GetBalanceChainEnum = exports.CalculatePnlChainEnum = exports.WalletApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
16
28
  /**
17
29
  *
18
30
  */
19
- export class WalletApi extends runtime.BaseAPI {
31
+ class WalletApi extends runtime.BaseAPI {
20
32
  /**
21
33
  * CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
22
34
  * CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
23
35
  */
24
- async calculatePnlRaw(requestParameters, initOverrides) {
25
- if (requestParameters['chain'] == null) {
26
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling calculatePnl().');
27
- }
28
- if (requestParameters['walletAddress'] == null) {
29
- throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling calculatePnl().');
30
- }
31
- if (requestParameters['calculatePnlInput'] == null) {
32
- throw new runtime.RequiredError('calculatePnlInput', 'Required parameter "calculatePnlInput" was null or undefined when calling calculatePnl().');
33
- }
34
- const queryParameters = {};
35
- const headerParameters = {};
36
- headerParameters['Content-Type'] = 'application/json';
37
- if (this.configuration && this.configuration.accessToken) {
38
- const token = this.configuration.accessToken;
39
- const tokenString = await token("bearer", []);
40
- if (tokenString) {
41
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
36
+ calculatePnlRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['chain'] == null) {
39
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling calculatePnl().');
40
+ }
41
+ if (requestParameters['walletAddress'] == null) {
42
+ throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling calculatePnl().');
43
+ }
44
+ if (requestParameters['calculatePnlInput'] == null) {
45
+ throw new runtime.RequiredError('calculatePnlInput', 'Required parameter "calculatePnlInput" was null or undefined when calling calculatePnl().');
42
46
  }
43
- }
44
- let urlPath = `/v1/wallet/{chain}/{walletAddress}/calculate-pnl`;
45
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
46
- urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
47
- const response = await this.request({
48
- path: urlPath,
49
- method: 'POST',
50
- headers: headerParameters,
51
- query: queryParameters,
52
- body: CalculatePnlInputToJSON(requestParameters['calculatePnlInput']),
53
- }, initOverrides);
54
- return new runtime.JSONApiResponse(response, (jsonValue) => BooleanResultDTOFromJSON(jsonValue));
47
+ const queryParameters = {};
48
+ const headerParameters = {};
49
+ headerParameters['Content-Type'] = 'application/json';
50
+ if (this.configuration && this.configuration.accessToken) {
51
+ const token = this.configuration.accessToken;
52
+ const tokenString = yield token("bearer", []);
53
+ if (tokenString) {
54
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
55
+ }
56
+ }
57
+ let urlPath = `/v1/wallet/{chain}/{walletAddress}/calculate-pnl`;
58
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
59
+ urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
60
+ const response = yield this.request({
61
+ path: urlPath,
62
+ method: 'POST',
63
+ headers: headerParameters,
64
+ query: queryParameters,
65
+ body: (0, index_1.CalculatePnlInputToJSON)(requestParameters['calculatePnlInput']),
66
+ }, initOverrides);
67
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BooleanResultDTOFromJSON)(jsonValue));
68
+ });
55
69
  }
56
70
  /**
57
71
  * CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
58
72
  * CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
59
73
  */
60
- async calculatePnl(requestParameters, initOverrides) {
61
- const response = await this.calculatePnlRaw(requestParameters, initOverrides);
62
- return await response.value();
74
+ calculatePnl(requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const response = yield this.calculatePnlRaw(requestParameters, initOverrides);
77
+ return yield response.value();
78
+ });
63
79
  }
64
80
  /**
65
81
  * CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
66
82
  * CONTROLLER.WALLET.GET_BALANCES.SUMMARY
67
83
  */
68
- async getBalanceRaw(requestParameters, initOverrides) {
69
- if (requestParameters['chain'] == null) {
70
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getBalance().');
71
- }
72
- if (requestParameters['walletAddress'] == null) {
73
- throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getBalance().');
74
- }
75
- const queryParameters = {};
76
- if (requestParameters['tokenAddress'] != null) {
77
- queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
78
- }
79
- const headerParameters = {};
80
- if (this.configuration && this.configuration.accessToken) {
81
- const token = this.configuration.accessToken;
82
- const tokenString = await token("bearer", []);
83
- if (tokenString) {
84
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
84
+ getBalanceRaw(requestParameters, initOverrides) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ if (requestParameters['chain'] == null) {
87
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getBalance().');
88
+ }
89
+ if (requestParameters['walletAddress'] == null) {
90
+ throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getBalance().');
91
+ }
92
+ const queryParameters = {};
93
+ if (requestParameters['tokenAddress'] != null) {
94
+ queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
85
95
  }
86
- }
87
- let urlPath = `/v1/wallet/{chain}/{walletAddress}/balance`;
88
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
89
- urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
90
- const response = await this.request({
91
- path: urlPath,
92
- method: 'GET',
93
- headers: headerParameters,
94
- query: queryParameters,
95
- }, initOverrides);
96
- return new runtime.JSONApiResponse(response, (jsonValue) => WalletBalancesDTOFromJSON(jsonValue));
96
+ const headerParameters = {};
97
+ if (this.configuration && this.configuration.accessToken) {
98
+ const token = this.configuration.accessToken;
99
+ const tokenString = yield token("bearer", []);
100
+ if (tokenString) {
101
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
102
+ }
103
+ }
104
+ let urlPath = `/v1/wallet/{chain}/{walletAddress}/balance`;
105
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
106
+ urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
107
+ const response = yield this.request({
108
+ path: urlPath,
109
+ method: 'GET',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ }, initOverrides);
113
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WalletBalancesDTOFromJSON)(jsonValue));
114
+ });
97
115
  }
98
116
  /**
99
117
  * CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
100
118
  * CONTROLLER.WALLET.GET_BALANCES.SUMMARY
101
119
  */
102
- async getBalance(requestParameters, initOverrides) {
103
- const response = await this.getBalanceRaw(requestParameters, initOverrides);
104
- return await response.value();
120
+ getBalance(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const response = yield this.getBalanceRaw(requestParameters, initOverrides);
123
+ return yield response.value();
124
+ });
105
125
  }
106
126
  /**
107
127
  * CONTROLLER.WALLET.GET_PNL.DESCRIPTION
108
128
  * CONTROLLER.WALLET.GET_PNL.SUMMARY
109
129
  */
110
- async getPnlRaw(requestParameters, initOverrides) {
111
- if (requestParameters['chain'] == null) {
112
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnl().');
113
- }
114
- if (requestParameters['walletAddress'] == null) {
115
- throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnl().');
116
- }
117
- const queryParameters = {};
118
- if (requestParameters['tokenAddress'] != null) {
119
- queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
120
- }
121
- const headerParameters = {};
122
- if (this.configuration && this.configuration.accessToken) {
123
- const token = this.configuration.accessToken;
124
- const tokenString = await token("bearer", []);
125
- if (tokenString) {
126
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ getPnlRaw(requestParameters, initOverrides) {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ if (requestParameters['chain'] == null) {
133
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnl().');
134
+ }
135
+ if (requestParameters['walletAddress'] == null) {
136
+ throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnl().');
137
+ }
138
+ const queryParameters = {};
139
+ if (requestParameters['tokenAddress'] != null) {
140
+ queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
127
141
  }
128
- }
129
- let urlPath = `/v1/wallet/{chain}/{walletAddress}`;
130
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
131
- urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
132
- const response = await this.request({
133
- path: urlPath,
134
- method: 'GET',
135
- headers: headerParameters,
136
- query: queryParameters,
137
- }, initOverrides);
138
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WalletPnlDTOFromJSON));
142
+ const headerParameters = {};
143
+ if (this.configuration && this.configuration.accessToken) {
144
+ const token = this.configuration.accessToken;
145
+ const tokenString = yield token("bearer", []);
146
+ if (tokenString) {
147
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
148
+ }
149
+ }
150
+ let urlPath = `/v1/wallet/{chain}/{walletAddress}`;
151
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
152
+ urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
153
+ const response = yield this.request({
154
+ path: urlPath,
155
+ method: 'GET',
156
+ headers: headerParameters,
157
+ query: queryParameters,
158
+ }, initOverrides);
159
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WalletPnlDTOFromJSON));
160
+ });
139
161
  }
140
162
  /**
141
163
  * CONTROLLER.WALLET.GET_PNL.DESCRIPTION
142
164
  * CONTROLLER.WALLET.GET_PNL.SUMMARY
143
165
  */
144
- async getPnl(requestParameters, initOverrides) {
145
- const response = await this.getPnlRaw(requestParameters, initOverrides);
146
- return await response.value();
166
+ getPnl(requestParameters, initOverrides) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ const response = yield this.getPnlRaw(requestParameters, initOverrides);
169
+ return yield response.value();
170
+ });
147
171
  }
148
172
  /**
149
173
  * CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
150
174
  * CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
151
175
  */
152
- async getPnlStatsRaw(requestParameters, initOverrides) {
153
- if (requestParameters['chain'] == null) {
154
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnlStats().');
155
- }
156
- if (requestParameters['walletAddress'] == null) {
157
- throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnlStats().');
158
- }
159
- const queryParameters = {};
160
- const headerParameters = {};
161
- if (this.configuration && this.configuration.accessToken) {
162
- const token = this.configuration.accessToken;
163
- const tokenString = await token("bearer", []);
164
- if (tokenString) {
165
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
176
+ getPnlStatsRaw(requestParameters, initOverrides) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ if (requestParameters['chain'] == null) {
179
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnlStats().');
180
+ }
181
+ if (requestParameters['walletAddress'] == null) {
182
+ throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnlStats().');
183
+ }
184
+ const queryParameters = {};
185
+ const headerParameters = {};
186
+ if (this.configuration && this.configuration.accessToken) {
187
+ const token = this.configuration.accessToken;
188
+ const tokenString = yield token("bearer", []);
189
+ if (tokenString) {
190
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
191
+ }
166
192
  }
167
- }
168
- let urlPath = `/v1/wallet/{chain}/{walletAddress}/stats`;
169
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
170
- urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
171
- const response = await this.request({
172
- path: urlPath,
173
- method: 'GET',
174
- headers: headerParameters,
175
- query: queryParameters,
176
- }, initOverrides);
177
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WalletPnlDTOFromJSON));
193
+ let urlPath = `/v1/wallet/{chain}/{walletAddress}/stats`;
194
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
195
+ urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
196
+ const response = yield this.request({
197
+ path: urlPath,
198
+ method: 'GET',
199
+ headers: headerParameters,
200
+ query: queryParameters,
201
+ }, initOverrides);
202
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WalletPnlDTOFromJSON));
203
+ });
178
204
  }
179
205
  /**
180
206
  * CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
181
207
  * CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
182
208
  */
183
- async getPnlStats(requestParameters, initOverrides) {
184
- const response = await this.getPnlStatsRaw(requestParameters, initOverrides);
185
- return await response.value();
209
+ getPnlStats(requestParameters, initOverrides) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ const response = yield this.getPnlStatsRaw(requestParameters, initOverrides);
212
+ return yield response.value();
213
+ });
186
214
  }
187
215
  }
216
+ exports.WalletApi = WalletApi;
188
217
  /**
189
218
  * @export
190
219
  */
191
- export const CalculatePnlChainEnum = {
220
+ exports.CalculatePnlChainEnum = {
192
221
  Sol: 'sol',
193
222
  Base: 'base',
194
223
  Bsc: 'bsc',
@@ -203,7 +232,7 @@ export const CalculatePnlChainEnum = {
203
232
  /**
204
233
  * @export
205
234
  */
206
- export const GetBalanceChainEnum = {
235
+ exports.GetBalanceChainEnum = {
207
236
  Sol: 'sol',
208
237
  Base: 'base',
209
238
  Bsc: 'bsc',
@@ -218,7 +247,7 @@ export const GetBalanceChainEnum = {
218
247
  /**
219
248
  * @export
220
249
  */
221
- export const GetPnlChainEnum = {
250
+ exports.GetPnlChainEnum = {
222
251
  Sol: 'sol',
223
252
  Base: 'base',
224
253
  Bsc: 'bsc',
@@ -233,7 +262,7 @@ export const GetPnlChainEnum = {
233
262
  /**
234
263
  * @export
235
264
  */
236
- export const GetPnlStatsChainEnum = {
265
+ exports.GetPnlStatsChainEnum = {
237
266
  Sol: 'sol',
238
267
  Base: 'base',
239
268
  Bsc: 'bsc',
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,56 +12,72 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import * as runtime from '../runtime';
15
- import { BooleanResultDTOFromJSON, } from '../models/index';
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.WatchlistAddChainEnum = exports.WatchlistApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
16
28
  /**
17
29
  *
18
30
  */
19
- export class WatchlistApi extends runtime.BaseAPI {
31
+ class WatchlistApi extends runtime.BaseAPI {
20
32
  /**
21
33
  * CONTROLLER.WATCHLIST.ADD.DESCRIPTION
22
34
  * CONTROLLER.WATCHLIST.ADD.SUMMARY
23
35
  */
24
- async watchlistAddRaw(requestParameters, initOverrides) {
25
- if (requestParameters['chain'] == null) {
26
- throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling watchlistAdd().');
27
- }
28
- if (requestParameters['walletAddress'] == null) {
29
- throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling watchlistAdd().');
30
- }
31
- const queryParameters = {};
32
- const headerParameters = {};
33
- if (this.configuration && this.configuration.accessToken) {
34
- const token = this.configuration.accessToken;
35
- const tokenString = await token("bearer", []);
36
- if (tokenString) {
37
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
36
+ watchlistAddRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['chain'] == null) {
39
+ throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling watchlistAdd().');
40
+ }
41
+ if (requestParameters['walletAddress'] == null) {
42
+ throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling watchlistAdd().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ if (this.configuration && this.configuration.accessToken) {
47
+ const token = this.configuration.accessToken;
48
+ const tokenString = yield token("bearer", []);
49
+ if (tokenString) {
50
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
51
+ }
38
52
  }
39
- }
40
- let urlPath = `/v1/watchlist/{chain}/{walletAddress}`;
41
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
42
- urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
43
- const response = await this.request({
44
- path: urlPath,
45
- method: 'POST',
46
- headers: headerParameters,
47
- query: queryParameters,
48
- }, initOverrides);
49
- return new runtime.JSONApiResponse(response, (jsonValue) => BooleanResultDTOFromJSON(jsonValue));
53
+ let urlPath = `/v1/watchlist/{chain}/{walletAddress}`;
54
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
55
+ urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
56
+ const response = yield this.request({
57
+ path: urlPath,
58
+ method: 'POST',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ }, initOverrides);
62
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BooleanResultDTOFromJSON)(jsonValue));
63
+ });
50
64
  }
51
65
  /**
52
66
  * CONTROLLER.WATCHLIST.ADD.DESCRIPTION
53
67
  * CONTROLLER.WATCHLIST.ADD.SUMMARY
54
68
  */
55
- async watchlistAdd(requestParameters, initOverrides) {
56
- const response = await this.watchlistAddRaw(requestParameters, initOverrides);
57
- return await response.value();
69
+ watchlistAdd(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ const response = yield this.watchlistAddRaw(requestParameters, initOverrides);
72
+ return yield response.value();
73
+ });
58
74
  }
59
75
  }
76
+ exports.WatchlistApi = WatchlistApi;
60
77
  /**
61
78
  * @export
62
79
  */
63
- export const WatchlistAddChainEnum = {
80
+ exports.WatchlistAddChainEnum = {
64
81
  Sol: 'sol',
65
82
  Base: 'base',
66
83
  Bsc: 'bsc',