@shapeshiftoss/unchained-client 6.11.0 → 6.12.1

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 (187) hide show
  1. package/README.md +3 -1
  2. package/dist/bitcoin/index.d.ts +0 -1
  3. package/dist/bitcoin/index.js +5 -2
  4. package/dist/bitcoin/parser/index.d.ts +0 -1
  5. package/dist/bitcoin/parser/index.js +43 -55
  6. package/dist/bitcoin/parser/utils.d.ts +0 -1
  7. package/dist/bitcoin/parser/utils.js +0 -1
  8. package/dist/bitcoin/types.d.ts +0 -1
  9. package/dist/bitcoin/types.js +0 -1
  10. package/dist/cosmos/index.d.ts +0 -1
  11. package/dist/cosmos/index.js +5 -2
  12. package/dist/cosmos/parser/index.d.ts +1 -2
  13. package/dist/cosmos/parser/index.js +56 -64
  14. package/dist/cosmos/parser/utils.d.ts +2 -3
  15. package/dist/cosmos/parser/utils.js +21 -22
  16. package/dist/cosmos/types.d.ts +0 -1
  17. package/dist/cosmos/types.js +0 -1
  18. package/dist/ethereum/index.d.ts +0 -1
  19. package/dist/ethereum/index.js +5 -2
  20. package/dist/ethereum/parser/abi/erc20.d.ts +0 -1
  21. package/dist/ethereum/parser/abi/erc20.js +69 -70
  22. package/dist/ethereum/parser/abi/foxyStaking.d.ts +0 -1
  23. package/dist/ethereum/parser/abi/foxyStaking.js +161 -162
  24. package/dist/ethereum/parser/abi/multiSig.d.ts +0 -1
  25. package/dist/ethereum/parser/abi/multiSig.js +79 -80
  26. package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts +0 -1
  27. package/dist/ethereum/parser/abi/shapeShiftRouter.js +119 -120
  28. package/dist/ethereum/parser/abi/thor.d.ts +0 -1
  29. package/dist/ethereum/parser/abi/thor.js +28 -29
  30. package/dist/ethereum/parser/abi/uniV2.d.ts +0 -1
  31. package/dist/ethereum/parser/abi/uniV2.js +55 -56
  32. package/dist/ethereum/parser/abi/weth.d.ts +0 -1
  33. package/dist/ethereum/parser/abi/weth.js +66 -67
  34. package/dist/ethereum/parser/abi/yearnVault.d.ts +0 -1
  35. package/dist/ethereum/parser/abi/yearnVault.js +95 -96
  36. package/dist/ethereum/parser/constants.d.ts +0 -1
  37. package/dist/ethereum/parser/constants.js +0 -1
  38. package/dist/ethereum/parser/foxy.d.ts +1 -2
  39. package/dist/ethereum/parser/foxy.js +22 -34
  40. package/dist/ethereum/parser/index.d.ts +0 -1
  41. package/dist/ethereum/parser/index.js +49 -57
  42. package/dist/ethereum/parser/thor.d.ts +1 -2
  43. package/dist/ethereum/parser/thor.js +29 -41
  44. package/dist/ethereum/parser/uniV2.d.ts +0 -1
  45. package/dist/ethereum/parser/uniV2.js +87 -99
  46. package/dist/ethereum/parser/utils.d.ts +0 -1
  47. package/dist/ethereum/parser/utils.js +2 -3
  48. package/dist/ethereum/parser/weth.d.ts +0 -1
  49. package/dist/ethereum/parser/weth.js +72 -84
  50. package/dist/ethereum/parser/yearn.d.ts +1 -2
  51. package/dist/ethereum/parser/yearn.js +46 -58
  52. package/dist/ethereum/parser/zrx.d.ts +1 -2
  53. package/dist/ethereum/parser/zrx.js +18 -30
  54. package/dist/ethereum/types.d.ts +0 -1
  55. package/dist/ethereum/types.js +0 -1
  56. package/dist/generated/bitcoin/api.d.ts +116 -120
  57. package/dist/generated/bitcoin/api.js +81 -110
  58. package/dist/generated/bitcoin/base.d.ts +2 -3
  59. package/dist/generated/bitcoin/base.js +1 -2
  60. package/dist/generated/bitcoin/common.d.ts +2 -3
  61. package/dist/generated/bitcoin/common.js +22 -38
  62. package/dist/generated/bitcoin/configuration.d.ts +0 -1
  63. package/dist/generated/bitcoin/configuration.js +0 -1
  64. package/dist/generated/bitcoin/index.d.ts +0 -1
  65. package/dist/generated/bitcoin/index.js +5 -2
  66. package/dist/generated/cosmos/api.d.ts +143 -144
  67. package/dist/generated/cosmos/api.js +89 -115
  68. package/dist/generated/cosmos/base.d.ts +2 -3
  69. package/dist/generated/cosmos/base.js +0 -1
  70. package/dist/generated/cosmos/common.d.ts +2 -3
  71. package/dist/generated/cosmos/common.js +22 -38
  72. package/dist/generated/cosmos/configuration.d.ts +0 -1
  73. package/dist/generated/cosmos/configuration.js +0 -1
  74. package/dist/generated/cosmos/index.d.ts +0 -1
  75. package/dist/generated/cosmos/index.js +5 -2
  76. package/dist/generated/ethereum/api.d.ts +73 -77
  77. package/dist/generated/ethereum/api.js +73 -100
  78. package/dist/generated/ethereum/base.d.ts +2 -3
  79. package/dist/generated/ethereum/base.js +1 -2
  80. package/dist/generated/ethereum/common.d.ts +2 -3
  81. package/dist/generated/ethereum/common.js +22 -38
  82. package/dist/generated/ethereum/configuration.d.ts +0 -1
  83. package/dist/generated/ethereum/configuration.js +0 -1
  84. package/dist/generated/ethereum/index.d.ts +0 -1
  85. package/dist/generated/ethereum/index.js +5 -2
  86. package/dist/index.d.ts +0 -1
  87. package/dist/index.js +5 -2
  88. package/dist/types.d.ts +0 -1
  89. package/dist/types.js +0 -1
  90. package/dist/utils.d.ts +1 -2
  91. package/dist/utils.js +18 -21
  92. package/dist/websocket.d.ts +1 -2
  93. package/dist/websocket.js +78 -84
  94. package/package.json +19 -11
  95. package/dist/bitcoin/index.d.ts.map +0 -1
  96. package/dist/bitcoin/index.js.map +0 -1
  97. package/dist/bitcoin/parser/index.d.ts.map +0 -1
  98. package/dist/bitcoin/parser/index.js.map +0 -1
  99. package/dist/bitcoin/parser/utils.d.ts.map +0 -1
  100. package/dist/bitcoin/parser/utils.js.map +0 -1
  101. package/dist/bitcoin/types.d.ts.map +0 -1
  102. package/dist/bitcoin/types.js.map +0 -1
  103. package/dist/cosmos/index.d.ts.map +0 -1
  104. package/dist/cosmos/index.js.map +0 -1
  105. package/dist/cosmos/parser/index.d.ts.map +0 -1
  106. package/dist/cosmos/parser/index.js.map +0 -1
  107. package/dist/cosmos/parser/utils.d.ts.map +0 -1
  108. package/dist/cosmos/parser/utils.js.map +0 -1
  109. package/dist/cosmos/types.d.ts.map +0 -1
  110. package/dist/cosmos/types.js.map +0 -1
  111. package/dist/ethereum/index.d.ts.map +0 -1
  112. package/dist/ethereum/index.js.map +0 -1
  113. package/dist/ethereum/parser/abi/erc20.d.ts.map +0 -1
  114. package/dist/ethereum/parser/abi/erc20.js.map +0 -1
  115. package/dist/ethereum/parser/abi/foxyStaking.d.ts.map +0 -1
  116. package/dist/ethereum/parser/abi/foxyStaking.js.map +0 -1
  117. package/dist/ethereum/parser/abi/multiSig.d.ts.map +0 -1
  118. package/dist/ethereum/parser/abi/multiSig.js.map +0 -1
  119. package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts.map +0 -1
  120. package/dist/ethereum/parser/abi/shapeShiftRouter.js.map +0 -1
  121. package/dist/ethereum/parser/abi/thor.d.ts.map +0 -1
  122. package/dist/ethereum/parser/abi/thor.js.map +0 -1
  123. package/dist/ethereum/parser/abi/uniV2.d.ts.map +0 -1
  124. package/dist/ethereum/parser/abi/uniV2.js.map +0 -1
  125. package/dist/ethereum/parser/abi/weth.d.ts.map +0 -1
  126. package/dist/ethereum/parser/abi/weth.js.map +0 -1
  127. package/dist/ethereum/parser/abi/yearnVault.d.ts.map +0 -1
  128. package/dist/ethereum/parser/abi/yearnVault.js.map +0 -1
  129. package/dist/ethereum/parser/constants.d.ts.map +0 -1
  130. package/dist/ethereum/parser/constants.js.map +0 -1
  131. package/dist/ethereum/parser/foxy.d.ts.map +0 -1
  132. package/dist/ethereum/parser/foxy.js.map +0 -1
  133. package/dist/ethereum/parser/index.d.ts.map +0 -1
  134. package/dist/ethereum/parser/index.js.map +0 -1
  135. package/dist/ethereum/parser/thor.d.ts.map +0 -1
  136. package/dist/ethereum/parser/thor.js.map +0 -1
  137. package/dist/ethereum/parser/uniV2.d.ts.map +0 -1
  138. package/dist/ethereum/parser/uniV2.js.map +0 -1
  139. package/dist/ethereum/parser/utils.d.ts.map +0 -1
  140. package/dist/ethereum/parser/utils.js.map +0 -1
  141. package/dist/ethereum/parser/weth.d.ts.map +0 -1
  142. package/dist/ethereum/parser/weth.js.map +0 -1
  143. package/dist/ethereum/parser/yearn.d.ts.map +0 -1
  144. package/dist/ethereum/parser/yearn.js.map +0 -1
  145. package/dist/ethereum/parser/zrx.d.ts.map +0 -1
  146. package/dist/ethereum/parser/zrx.js.map +0 -1
  147. package/dist/ethereum/types.d.ts.map +0 -1
  148. package/dist/ethereum/types.js.map +0 -1
  149. package/dist/generated/bitcoin/api.d.ts.map +0 -1
  150. package/dist/generated/bitcoin/api.js.map +0 -1
  151. package/dist/generated/bitcoin/base.d.ts.map +0 -1
  152. package/dist/generated/bitcoin/base.js.map +0 -1
  153. package/dist/generated/bitcoin/common.d.ts.map +0 -1
  154. package/dist/generated/bitcoin/common.js.map +0 -1
  155. package/dist/generated/bitcoin/configuration.d.ts.map +0 -1
  156. package/dist/generated/bitcoin/configuration.js.map +0 -1
  157. package/dist/generated/bitcoin/index.d.ts.map +0 -1
  158. package/dist/generated/bitcoin/index.js.map +0 -1
  159. package/dist/generated/cosmos/api.d.ts.map +0 -1
  160. package/dist/generated/cosmos/api.js.map +0 -1
  161. package/dist/generated/cosmos/base.d.ts.map +0 -1
  162. package/dist/generated/cosmos/base.js.map +0 -1
  163. package/dist/generated/cosmos/common.d.ts.map +0 -1
  164. package/dist/generated/cosmos/common.js.map +0 -1
  165. package/dist/generated/cosmos/configuration.d.ts.map +0 -1
  166. package/dist/generated/cosmos/configuration.js.map +0 -1
  167. package/dist/generated/cosmos/index.d.ts.map +0 -1
  168. package/dist/generated/cosmos/index.js.map +0 -1
  169. package/dist/generated/ethereum/api.d.ts.map +0 -1
  170. package/dist/generated/ethereum/api.js.map +0 -1
  171. package/dist/generated/ethereum/base.d.ts.map +0 -1
  172. package/dist/generated/ethereum/base.js.map +0 -1
  173. package/dist/generated/ethereum/common.d.ts.map +0 -1
  174. package/dist/generated/ethereum/common.js.map +0 -1
  175. package/dist/generated/ethereum/configuration.d.ts.map +0 -1
  176. package/dist/generated/ethereum/configuration.js.map +0 -1
  177. package/dist/generated/ethereum/index.d.ts.map +0 -1
  178. package/dist/generated/ethereum/index.js.map +0 -1
  179. package/dist/index.d.ts.map +0 -1
  180. package/dist/index.js.map +0 -1
  181. package/dist/tsconfig.tsbuildinfo +0 -4986
  182. package/dist/types.d.ts.map +0 -1
  183. package/dist/types.js.map +0 -1
  184. package/dist/utils.d.ts.map +0 -1
  185. package/dist/utils.js.map +0 -1
  186. package/dist/websocket.d.ts.map +0 -1
  187. package/dist/websocket.js.map +0 -1
@@ -12,15 +12,6 @@
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
14
  */
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
15
  var __importDefault = (this && this.__importDefault) || function (mod) {
25
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
17
  };
@@ -44,7 +35,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
44
35
  * @param {*} [options] Override http request option.
45
36
  * @throws {RequiredError}
46
37
  */
47
- estimateGas: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
38
+ estimateGas: async (body, options = {}) => {
48
39
  const localVarPath = `/api/v1/gas/estimate`;
49
40
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
41
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -52,19 +43,19 @@ const V1ApiAxiosParamCreator = function (configuration) {
52
43
  if (configuration) {
53
44
  baseOptions = configuration.baseOptions;
54
45
  }
55
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
46
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
56
47
  const localVarHeaderParameter = {};
57
48
  const localVarQueryParameter = {};
58
49
  localVarHeaderParameter['Content-Type'] = 'application/json';
59
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
50
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
60
51
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
- localVarRequestOptions.data = common_1.serializeDataIfNeeded(body, localVarRequestOptions, configuration);
52
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
53
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
63
54
  return {
64
- url: common_1.toPathString(localVarUrlObj),
55
+ url: (0, common_1.toPathString)(localVarUrlObj),
65
56
  options: localVarRequestOptions,
66
57
  };
67
- }),
58
+ },
68
59
  /**
69
60
  *
70
61
  * @summary Get account details.
@@ -72,9 +63,9 @@ const V1ApiAxiosParamCreator = function (configuration) {
72
63
  * @param {*} [options] Override http request option.
73
64
  * @throws {RequiredError}
74
65
  */
75
- getAccount: (pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
66
+ getAccount: async (pubkey, options = {}) => {
76
67
  // verify required parameter 'pubkey' is not null or undefined
77
- common_1.assertParamExists('getAccount', 'pubkey', pubkey);
68
+ (0, common_1.assertParamExists)('getAccount', 'pubkey', pubkey);
78
69
  const localVarPath = `/api/v1/account/{pubkey}`
79
70
  .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
80
71
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -83,24 +74,24 @@ const V1ApiAxiosParamCreator = function (configuration) {
83
74
  if (configuration) {
84
75
  baseOptions = configuration.baseOptions;
85
76
  }
86
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
77
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
87
78
  const localVarHeaderParameter = {};
88
79
  const localVarQueryParameter = {};
89
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
80
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
90
81
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
91
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
82
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
92
83
  return {
93
- url: common_1.toPathString(localVarUrlObj),
84
+ url: (0, common_1.toPathString)(localVarUrlObj),
94
85
  options: localVarRequestOptions,
95
86
  };
96
- }),
87
+ },
97
88
  /**
98
89
  *
99
90
  * @summary Get information about the running coinstack.
100
91
  * @param {*} [options] Override http request option.
101
92
  * @throws {RequiredError}
102
93
  */
103
- getInfo: (options = {}) => __awaiter(this, void 0, void 0, function* () {
94
+ getInfo: async (options = {}) => {
104
95
  const localVarPath = `/api/v1/info`;
105
96
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
97
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -108,17 +99,17 @@ const V1ApiAxiosParamCreator = function (configuration) {
108
99
  if (configuration) {
109
100
  baseOptions = configuration.baseOptions;
110
101
  }
111
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
102
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
112
103
  const localVarHeaderParameter = {};
113
104
  const localVarQueryParameter = {};
114
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
105
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
115
106
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
107
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
117
108
  return {
118
- url: common_1.toPathString(localVarUrlObj),
109
+ url: (0, common_1.toPathString)(localVarUrlObj),
119
110
  options: localVarRequestOptions,
120
111
  };
121
- }),
112
+ },
122
113
  /**
123
114
  *
124
115
  * @summary Get paginated transaction history.
@@ -128,9 +119,9 @@ const V1ApiAxiosParamCreator = function (configuration) {
128
119
  * @param {*} [options] Override http request option.
129
120
  * @throws {RequiredError}
130
121
  */
131
- getTxHistory: (pubkey, cursor, pageSize, options = {}) => __awaiter(this, void 0, void 0, function* () {
122
+ getTxHistory: async (pubkey, cursor, pageSize, options = {}) => {
132
123
  // verify required parameter 'pubkey' is not null or undefined
133
- common_1.assertParamExists('getTxHistory', 'pubkey', pubkey);
124
+ (0, common_1.assertParamExists)('getTxHistory', 'pubkey', pubkey);
134
125
  const localVarPath = `/api/v1/account/{pubkey}/txs`
135
126
  .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
136
127
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -139,7 +130,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
139
130
  if (configuration) {
140
131
  baseOptions = configuration.baseOptions;
141
132
  }
142
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
133
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
143
134
  const localVarHeaderParameter = {};
144
135
  const localVarQueryParameter = {};
145
136
  if (cursor !== undefined) {
@@ -148,23 +139,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
148
139
  if (pageSize !== undefined) {
149
140
  localVarQueryParameter['pageSize'] = pageSize;
150
141
  }
151
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
142
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
152
143
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
144
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
154
145
  return {
155
- url: common_1.toPathString(localVarUrlObj),
146
+ url: (0, common_1.toPathString)(localVarUrlObj),
156
147
  options: localVarRequestOptions,
157
148
  };
158
- }),
149
+ },
159
150
  /**
160
151
  * Get a specific validator
161
152
  * @param {string} pubkey Account address or xpub
162
153
  * @param {*} [options] Override http request option.
163
154
  * @throws {RequiredError}
164
155
  */
165
- getValidator: (pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
156
+ getValidator: async (pubkey, options = {}) => {
166
157
  // verify required parameter 'pubkey' is not null or undefined
167
- common_1.assertParamExists('getValidator', 'pubkey', pubkey);
158
+ (0, common_1.assertParamExists)('getValidator', 'pubkey', pubkey);
168
159
  const localVarPath = `/api/v1/validators/{pubkey}`
169
160
  .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
170
161
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -173,23 +164,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
173
164
  if (configuration) {
174
165
  baseOptions = configuration.baseOptions;
175
166
  }
176
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
167
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
177
168
  const localVarHeaderParameter = {};
178
169
  const localVarQueryParameter = {};
179
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
170
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
180
171
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
172
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
182
173
  return {
183
- url: common_1.toPathString(localVarUrlObj),
174
+ url: (0, common_1.toPathString)(localVarUrlObj),
184
175
  options: localVarRequestOptions,
185
176
  };
186
- }),
177
+ },
187
178
  /**
188
179
  * Get the list of current validators
189
180
  * @param {*} [options] Override http request option.
190
181
  * @throws {RequiredError}
191
182
  */
192
- getValidators: (options = {}) => __awaiter(this, void 0, void 0, function* () {
183
+ getValidators: async (options = {}) => {
193
184
  const localVarPath = `/api/v1/validators`;
194
185
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
195
186
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -197,17 +188,17 @@ const V1ApiAxiosParamCreator = function (configuration) {
197
188
  if (configuration) {
198
189
  baseOptions = configuration.baseOptions;
199
190
  }
200
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
191
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
201
192
  const localVarHeaderParameter = {};
202
193
  const localVarQueryParameter = {};
203
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
194
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
204
195
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
205
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
196
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
206
197
  return {
207
- url: common_1.toPathString(localVarUrlObj),
198
+ url: (0, common_1.toPathString)(localVarUrlObj),
208
199
  options: localVarRequestOptions,
209
200
  };
210
- }),
201
+ },
211
202
  /**
212
203
  *
213
204
  * @summary Sends raw transaction to be broadcast to the node.
@@ -215,7 +206,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
215
206
  * @param {*} [options] Override http request option.
216
207
  * @throws {RequiredError}
217
208
  */
218
- sendTx: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
209
+ sendTx: async (body, options = {}) => {
219
210
  const localVarPath = `/api/v1/send`;
220
211
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
221
212
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -223,19 +214,19 @@ const V1ApiAxiosParamCreator = function (configuration) {
223
214
  if (configuration) {
224
215
  baseOptions = configuration.baseOptions;
225
216
  }
226
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
217
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
227
218
  const localVarHeaderParameter = {};
228
219
  const localVarQueryParameter = {};
229
220
  localVarHeaderParameter['Content-Type'] = 'application/json';
230
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
221
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
231
222
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
232
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
233
- localVarRequestOptions.data = common_1.serializeDataIfNeeded(body, localVarRequestOptions, configuration);
223
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
224
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
234
225
  return {
235
- url: common_1.toPathString(localVarUrlObj),
226
+ url: (0, common_1.toPathString)(localVarUrlObj),
236
227
  options: localVarRequestOptions,
237
228
  };
238
- }),
229
+ },
239
230
  };
240
231
  };
241
232
  exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
@@ -244,7 +235,7 @@ exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
244
235
  * @export
245
236
  */
246
237
  const V1ApiFp = function (configuration) {
247
- const localVarAxiosParamCreator = exports.V1ApiAxiosParamCreator(configuration);
238
+ const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
248
239
  return {
249
240
  /**
250
241
  * Get the estimated gas cost for a transaction
@@ -252,11 +243,9 @@ const V1ApiFp = function (configuration) {
252
243
  * @param {*} [options] Override http request option.
253
244
  * @throws {RequiredError}
254
245
  */
255
- estimateGas(body, options) {
256
- return __awaiter(this, void 0, void 0, function* () {
257
- const localVarAxiosArgs = yield localVarAxiosParamCreator.estimateGas(body, options);
258
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
259
- });
246
+ async estimateGas(body, options) {
247
+ const localVarAxiosArgs = await localVarAxiosParamCreator.estimateGas(body, options);
248
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
260
249
  },
261
250
  /**
262
251
  *
@@ -265,11 +254,9 @@ const V1ApiFp = function (configuration) {
265
254
  * @param {*} [options] Override http request option.
266
255
  * @throws {RequiredError}
267
256
  */
268
- getAccount(pubkey, options) {
269
- return __awaiter(this, void 0, void 0, function* () {
270
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccount(pubkey, options);
271
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
272
- });
257
+ async getAccount(pubkey, options) {
258
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(pubkey, options);
259
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
273
260
  },
274
261
  /**
275
262
  *
@@ -277,11 +264,9 @@ const V1ApiFp = function (configuration) {
277
264
  * @param {*} [options] Override http request option.
278
265
  * @throws {RequiredError}
279
266
  */
280
- getInfo(options) {
281
- return __awaiter(this, void 0, void 0, function* () {
282
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getInfo(options);
283
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
284
- });
267
+ async getInfo(options) {
268
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInfo(options);
269
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
285
270
  },
286
271
  /**
287
272
  *
@@ -292,11 +277,9 @@ const V1ApiFp = function (configuration) {
292
277
  * @param {*} [options] Override http request option.
293
278
  * @throws {RequiredError}
294
279
  */
295
- getTxHistory(pubkey, cursor, pageSize, options) {
296
- return __awaiter(this, void 0, void 0, function* () {
297
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getTxHistory(pubkey, cursor, pageSize, options);
298
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
299
- });
280
+ async getTxHistory(pubkey, cursor, pageSize, options) {
281
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTxHistory(pubkey, cursor, pageSize, options);
282
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
300
283
  },
301
284
  /**
302
285
  * Get a specific validator
@@ -304,22 +287,18 @@ const V1ApiFp = function (configuration) {
304
287
  * @param {*} [options] Override http request option.
305
288
  * @throws {RequiredError}
306
289
  */
307
- getValidator(pubkey, options) {
308
- return __awaiter(this, void 0, void 0, function* () {
309
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getValidator(pubkey, options);
310
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
311
- });
290
+ async getValidator(pubkey, options) {
291
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getValidator(pubkey, options);
292
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
312
293
  },
313
294
  /**
314
295
  * Get the list of current validators
315
296
  * @param {*} [options] Override http request option.
316
297
  * @throws {RequiredError}
317
298
  */
318
- getValidators(options) {
319
- return __awaiter(this, void 0, void 0, function* () {
320
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getValidators(options);
321
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
322
- });
299
+ async getValidators(options) {
300
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getValidators(options);
301
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
323
302
  },
324
303
  /**
325
304
  *
@@ -328,11 +307,9 @@ const V1ApiFp = function (configuration) {
328
307
  * @param {*} [options] Override http request option.
329
308
  * @throws {RequiredError}
330
309
  */
331
- sendTx(body, options) {
332
- return __awaiter(this, void 0, void 0, function* () {
333
- const localVarAxiosArgs = yield localVarAxiosParamCreator.sendTx(body, options);
334
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
335
- });
310
+ async sendTx(body, options) {
311
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sendTx(body, options);
312
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
336
313
  },
337
314
  };
338
315
  };
@@ -342,7 +319,7 @@ exports.V1ApiFp = V1ApiFp;
342
319
  * @export
343
320
  */
344
321
  const V1ApiFactory = function (configuration, basePath, axios) {
345
- const localVarFp = exports.V1ApiFp(configuration);
322
+ const localVarFp = (0, exports.V1ApiFp)(configuration);
346
323
  return {
347
324
  /**
348
325
  * Get the estimated gas cost for a transaction
@@ -429,7 +406,7 @@ class V1Api extends base_1.BaseAPI {
429
406
  * @memberof V1Api
430
407
  */
431
408
  estimateGas(requestParameters = {}, options) {
432
- return exports.V1ApiFp(this.configuration).estimateGas(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
409
+ return (0, exports.V1ApiFp)(this.configuration).estimateGas(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
433
410
  }
434
411
  /**
435
412
  *
@@ -440,7 +417,7 @@ class V1Api extends base_1.BaseAPI {
440
417
  * @memberof V1Api
441
418
  */
442
419
  getAccount(requestParameters, options) {
443
- return exports.V1ApiFp(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
420
+ return (0, exports.V1ApiFp)(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
444
421
  }
445
422
  /**
446
423
  *
@@ -450,7 +427,7 @@ class V1Api extends base_1.BaseAPI {
450
427
  * @memberof V1Api
451
428
  */
452
429
  getInfo(options) {
453
- return exports.V1ApiFp(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
430
+ return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
454
431
  }
455
432
  /**
456
433
  *
@@ -461,7 +438,7 @@ class V1Api extends base_1.BaseAPI {
461
438
  * @memberof V1Api
462
439
  */
463
440
  getTxHistory(requestParameters, options) {
464
- return exports.V1ApiFp(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
441
+ return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
465
442
  }
466
443
  /**
467
444
  * Get a specific validator
@@ -471,7 +448,7 @@ class V1Api extends base_1.BaseAPI {
471
448
  * @memberof V1Api
472
449
  */
473
450
  getValidator(requestParameters, options) {
474
- return exports.V1ApiFp(this.configuration).getValidator(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
451
+ return (0, exports.V1ApiFp)(this.configuration).getValidator(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
475
452
  }
476
453
  /**
477
454
  * Get the list of current validators
@@ -480,7 +457,7 @@ class V1Api extends base_1.BaseAPI {
480
457
  * @memberof V1Api
481
458
  */
482
459
  getValidators(options) {
483
- return exports.V1ApiFp(this.configuration).getValidators(options).then((request) => request(this.axios, this.basePath));
460
+ return (0, exports.V1ApiFp)(this.configuration).getValidators(options).then((request) => request(this.axios, this.basePath));
484
461
  }
485
462
  /**
486
463
  *
@@ -491,7 +468,7 @@ class V1Api extends base_1.BaseAPI {
491
468
  * @memberof V1Api
492
469
  */
493
470
  sendTx(requestParameters = {}, options) {
494
- return exports.V1ApiFp(this.configuration).sendTx(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
471
+ return (0, exports.V1ApiFp)(this.configuration).sendTx(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
495
472
  }
496
473
  }
497
474
  exports.V1Api = V1Api;
@@ -507,7 +484,7 @@ const WebsocketApiAxiosParamCreator = function (configuration) {
507
484
  * @param {*} [options] Override http request option.
508
485
  * @throws {RequiredError}
509
486
  */
510
- websocket: (options = {}) => __awaiter(this, void 0, void 0, function* () {
487
+ websocket: async (options = {}) => {
511
488
  const localVarPath = `/`;
512
489
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
513
490
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -515,17 +492,17 @@ const WebsocketApiAxiosParamCreator = function (configuration) {
515
492
  if (configuration) {
516
493
  baseOptions = configuration.baseOptions;
517
494
  }
518
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
495
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
519
496
  const localVarHeaderParameter = {};
520
497
  const localVarQueryParameter = {};
521
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
498
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
522
499
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
523
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
500
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
524
501
  return {
525
- url: common_1.toPathString(localVarUrlObj),
502
+ url: (0, common_1.toPathString)(localVarUrlObj),
526
503
  options: localVarRequestOptions,
527
504
  };
528
- }),
505
+ },
529
506
  };
530
507
  };
531
508
  exports.WebsocketApiAxiosParamCreator = WebsocketApiAxiosParamCreator;
@@ -534,7 +511,7 @@ exports.WebsocketApiAxiosParamCreator = WebsocketApiAxiosParamCreator;
534
511
  * @export
535
512
  */
536
513
  const WebsocketApiFp = function (configuration) {
537
- const localVarAxiosParamCreator = exports.WebsocketApiAxiosParamCreator(configuration);
514
+ const localVarAxiosParamCreator = (0, exports.WebsocketApiAxiosParamCreator)(configuration);
538
515
  return {
539
516
  /**
540
517
  *
@@ -542,11 +519,9 @@ const WebsocketApiFp = function (configuration) {
542
519
  * @param {*} [options] Override http request option.
543
520
  * @throws {RequiredError}
544
521
  */
545
- websocket(options) {
546
- return __awaiter(this, void 0, void 0, function* () {
547
- const localVarAxiosArgs = yield localVarAxiosParamCreator.websocket(options);
548
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
549
- });
522
+ async websocket(options) {
523
+ const localVarAxiosArgs = await localVarAxiosParamCreator.websocket(options);
524
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
550
525
  },
551
526
  };
552
527
  };
@@ -556,7 +531,7 @@ exports.WebsocketApiFp = WebsocketApiFp;
556
531
  * @export
557
532
  */
558
533
  const WebsocketApiFactory = function (configuration, basePath, axios) {
559
- const localVarFp = exports.WebsocketApiFp(configuration);
534
+ const localVarFp = (0, exports.WebsocketApiFp)(configuration);
560
535
  return {
561
536
  /**
562
537
  *
@@ -585,8 +560,7 @@ class WebsocketApi extends base_1.BaseAPI {
585
560
  * @memberof WebsocketApi
586
561
  */
587
562
  websocket(options) {
588
- return exports.WebsocketApiFp(this.configuration).websocket(options).then((request) => request(this.axios, this.basePath));
563
+ return (0, exports.WebsocketApiFp)(this.configuration).websocket(options).then((request) => request(this.axios, this.basePath));
589
564
  }
590
565
  }
591
566
  exports.WebsocketApi = WebsocketApi;
592
- //# sourceMappingURL=api.js.map
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
- import { AxiosInstance } from 'axios';
13
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
29
29
  */
30
30
  export interface RequestArgs {
31
31
  url: string;
32
- options: any;
32
+ options: AxiosRequestConfig;
33
33
  }
34
34
  /**
35
35
  *
@@ -53,4 +53,3 @@ export declare class RequiredError extends Error {
53
53
  name: "RequiredError";
54
54
  constructor(field: string, msg?: string);
55
55
  }
56
- //# sourceMappingURL=base.d.ts.map
@@ -62,4 +62,3 @@ class RequiredError extends Error {
62
62
  }
63
63
  }
64
64
  exports.RequiredError = RequiredError;
65
- //# sourceMappingURL=base.js.map
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
- import { AxiosInstance } from 'axios';
14
+ import { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -62,5 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
66
- //# sourceMappingURL=common.d.ts.map
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;