@shapeshiftoss/unchained-client 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/osmosis/api.d.ts +1293 -0
- package/dist/generated/osmosis/api.js +566 -0
- package/dist/generated/osmosis/base.d.ts +55 -0
- package/dist/generated/osmosis/base.js +64 -0
- package/dist/generated/osmosis/common.d.ts +65 -0
- package/dist/generated/osmosis/common.js +137 -0
- package/dist/generated/osmosis/configuration.d.ts +83 -0
- package/dist/generated/osmosis/configuration.js +42 -0
- package/dist/generated/osmosis/index.d.ts +13 -0
- package/dist/generated/osmosis/index.js +31 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/osmosis/index.d.ts +1 -0
- package/dist/osmosis/index.js +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Osmosis Unchained API
|
|
6
|
+
* Provides access to osmosis chain data
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.WebsocketApi = exports.WebsocketApiFactory = exports.WebsocketApiFp = exports.WebsocketApiAxiosParamCreator = exports.V1Api = exports.V1ApiFactory = exports.V1ApiFp = exports.V1ApiAxiosParamCreator = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
// Some imports not used depending on template conditions
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const common_1 = require("./common");
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
const base_1 = require("./base");
|
|
26
|
+
/**
|
|
27
|
+
* V1Api - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
const V1ApiAxiosParamCreator = function (configuration) {
|
|
31
|
+
return {
|
|
32
|
+
/**
|
|
33
|
+
* Get the estimated gas cost for a transaction
|
|
34
|
+
* @param {InlineObject} [body]
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
estimateGas: async (body, options = {}) => {
|
|
39
|
+
const localVarPath = `/api/v1/gas/estimate`;
|
|
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: 'POST', ...baseOptions, ...options };
|
|
47
|
+
const localVarHeaderParameter = {};
|
|
48
|
+
const localVarQueryParameter = {};
|
|
49
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
50
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
51
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
53
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
54
|
+
return {
|
|
55
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
56
|
+
options: localVarRequestOptions,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @summary Get account details.
|
|
62
|
+
* @param {string} pubkey Account address or xpub
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
*/
|
|
66
|
+
getAccount: async (pubkey, options = {}) => {
|
|
67
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
68
|
+
(0, common_1.assertParamExists)('getAccount', 'pubkey', pubkey);
|
|
69
|
+
const localVarPath = `/api/v1/account/{pubkey}`
|
|
70
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
71
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
72
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
73
|
+
let baseOptions;
|
|
74
|
+
if (configuration) {
|
|
75
|
+
baseOptions = configuration.baseOptions;
|
|
76
|
+
}
|
|
77
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
78
|
+
const localVarHeaderParameter = {};
|
|
79
|
+
const localVarQueryParameter = {};
|
|
80
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
81
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
83
|
+
return {
|
|
84
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
85
|
+
options: localVarRequestOptions,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @summary Get information about the running coinstack.
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
*/
|
|
94
|
+
getInfo: async (options = {}) => {
|
|
95
|
+
const localVarPath = `/api/v1/info`;
|
|
96
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
97
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
98
|
+
let baseOptions;
|
|
99
|
+
if (configuration) {
|
|
100
|
+
baseOptions = configuration.baseOptions;
|
|
101
|
+
}
|
|
102
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
103
|
+
const localVarHeaderParameter = {};
|
|
104
|
+
const localVarQueryParameter = {};
|
|
105
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
106
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
107
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
108
|
+
return {
|
|
109
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
110
|
+
options: localVarRequestOptions,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @summary Get paginated transaction history.
|
|
116
|
+
* @param {string} pubkey Account address or xpub
|
|
117
|
+
* @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
|
|
118
|
+
* @param {number} [pageSize] Page size (default 10)
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
*/
|
|
122
|
+
getTxHistory: async (pubkey, cursor, pageSize, options = {}) => {
|
|
123
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
124
|
+
(0, common_1.assertParamExists)('getTxHistory', 'pubkey', pubkey);
|
|
125
|
+
const localVarPath = `/api/v1/account/{pubkey}/txs`
|
|
126
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
127
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
128
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
129
|
+
let baseOptions;
|
|
130
|
+
if (configuration) {
|
|
131
|
+
baseOptions = configuration.baseOptions;
|
|
132
|
+
}
|
|
133
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
134
|
+
const localVarHeaderParameter = {};
|
|
135
|
+
const localVarQueryParameter = {};
|
|
136
|
+
if (cursor !== undefined) {
|
|
137
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
138
|
+
}
|
|
139
|
+
if (pageSize !== undefined) {
|
|
140
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
141
|
+
}
|
|
142
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
143
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
144
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
145
|
+
return {
|
|
146
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
147
|
+
options: localVarRequestOptions,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Get a specific validator
|
|
152
|
+
* @param {string} pubkey Account address or xpub
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
getValidator: async (pubkey, options = {}) => {
|
|
157
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
158
|
+
(0, common_1.assertParamExists)('getValidator', 'pubkey', pubkey);
|
|
159
|
+
const localVarPath = `/api/v1/validators/{pubkey}`
|
|
160
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
161
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
162
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
163
|
+
let baseOptions;
|
|
164
|
+
if (configuration) {
|
|
165
|
+
baseOptions = configuration.baseOptions;
|
|
166
|
+
}
|
|
167
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
168
|
+
const localVarHeaderParameter = {};
|
|
169
|
+
const localVarQueryParameter = {};
|
|
170
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
171
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
172
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
173
|
+
return {
|
|
174
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
175
|
+
options: localVarRequestOptions,
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Get the list of current validators
|
|
180
|
+
* @param {*} [options] Override http request option.
|
|
181
|
+
* @throws {RequiredError}
|
|
182
|
+
*/
|
|
183
|
+
getValidators: async (options = {}) => {
|
|
184
|
+
const localVarPath = `/api/v1/validators`;
|
|
185
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
186
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
187
|
+
let baseOptions;
|
|
188
|
+
if (configuration) {
|
|
189
|
+
baseOptions = configuration.baseOptions;
|
|
190
|
+
}
|
|
191
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
192
|
+
const localVarHeaderParameter = {};
|
|
193
|
+
const localVarQueryParameter = {};
|
|
194
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
197
|
+
return {
|
|
198
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
199
|
+
options: localVarRequestOptions,
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @summary Sends raw transaction to be broadcast to the node.
|
|
205
|
+
* @param {InlineObject1} [body]
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
sendTx: async (body, options = {}) => {
|
|
210
|
+
const localVarPath = `/api/v1/send`;
|
|
211
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
212
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
213
|
+
let baseOptions;
|
|
214
|
+
if (configuration) {
|
|
215
|
+
baseOptions = configuration.baseOptions;
|
|
216
|
+
}
|
|
217
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
218
|
+
const localVarHeaderParameter = {};
|
|
219
|
+
const localVarQueryParameter = {};
|
|
220
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
221
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
222
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
223
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
224
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
225
|
+
return {
|
|
226
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
227
|
+
options: localVarRequestOptions,
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
233
|
+
/**
|
|
234
|
+
* V1Api - functional programming interface
|
|
235
|
+
* @export
|
|
236
|
+
*/
|
|
237
|
+
const V1ApiFp = function (configuration) {
|
|
238
|
+
const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
|
|
239
|
+
return {
|
|
240
|
+
/**
|
|
241
|
+
* Get the estimated gas cost for a transaction
|
|
242
|
+
* @param {InlineObject} [body]
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
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);
|
|
249
|
+
},
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @summary Get account details.
|
|
253
|
+
* @param {string} pubkey Account address or xpub
|
|
254
|
+
* @param {*} [options] Override http request option.
|
|
255
|
+
* @throws {RequiredError}
|
|
256
|
+
*/
|
|
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);
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
*
|
|
263
|
+
* @summary Get information about the running coinstack.
|
|
264
|
+
* @param {*} [options] Override http request option.
|
|
265
|
+
* @throws {RequiredError}
|
|
266
|
+
*/
|
|
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);
|
|
270
|
+
},
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @summary Get paginated transaction history.
|
|
274
|
+
* @param {string} pubkey Account address or xpub
|
|
275
|
+
* @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
|
|
276
|
+
* @param {number} [pageSize] Page size (default 10)
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
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);
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
* Get a specific validator
|
|
286
|
+
* @param {string} pubkey Account address or xpub
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
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);
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
* Get the list of current validators
|
|
296
|
+
* @param {*} [options] Override http request option.
|
|
297
|
+
* @throws {RequiredError}
|
|
298
|
+
*/
|
|
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);
|
|
302
|
+
},
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
* @summary Sends raw transaction to be broadcast to the node.
|
|
306
|
+
* @param {InlineObject1} [body]
|
|
307
|
+
* @param {*} [options] Override http request option.
|
|
308
|
+
* @throws {RequiredError}
|
|
309
|
+
*/
|
|
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);
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
exports.V1ApiFp = V1ApiFp;
|
|
317
|
+
/**
|
|
318
|
+
* V1Api - factory interface
|
|
319
|
+
* @export
|
|
320
|
+
*/
|
|
321
|
+
const V1ApiFactory = function (configuration, basePath, axios) {
|
|
322
|
+
const localVarFp = (0, exports.V1ApiFp)(configuration);
|
|
323
|
+
return {
|
|
324
|
+
/**
|
|
325
|
+
* Get the estimated gas cost for a transaction
|
|
326
|
+
* @param {InlineObject} [body]
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
*/
|
|
330
|
+
estimateGas(body, options) {
|
|
331
|
+
return localVarFp.estimateGas(body, options).then((request) => request(axios, basePath));
|
|
332
|
+
},
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
* @summary Get account details.
|
|
336
|
+
* @param {string} pubkey Account address or xpub
|
|
337
|
+
* @param {*} [options] Override http request option.
|
|
338
|
+
* @throws {RequiredError}
|
|
339
|
+
*/
|
|
340
|
+
getAccount(pubkey, options) {
|
|
341
|
+
return localVarFp.getAccount(pubkey, options).then((request) => request(axios, basePath));
|
|
342
|
+
},
|
|
343
|
+
/**
|
|
344
|
+
*
|
|
345
|
+
* @summary Get information about the running coinstack.
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
*/
|
|
349
|
+
getInfo(options) {
|
|
350
|
+
return localVarFp.getInfo(options).then((request) => request(axios, basePath));
|
|
351
|
+
},
|
|
352
|
+
/**
|
|
353
|
+
*
|
|
354
|
+
* @summary Get paginated transaction history.
|
|
355
|
+
* @param {string} pubkey Account address or xpub
|
|
356
|
+
* @param {string} [cursor] Pagination cursor from previous response or empty string for first page fetch
|
|
357
|
+
* @param {number} [pageSize] Page size (default 10)
|
|
358
|
+
* @param {*} [options] Override http request option.
|
|
359
|
+
* @throws {RequiredError}
|
|
360
|
+
*/
|
|
361
|
+
getTxHistory(pubkey, cursor, pageSize, options) {
|
|
362
|
+
return localVarFp.getTxHistory(pubkey, cursor, pageSize, options).then((request) => request(axios, basePath));
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* Get a specific validator
|
|
366
|
+
* @param {string} pubkey Account address or xpub
|
|
367
|
+
* @param {*} [options] Override http request option.
|
|
368
|
+
* @throws {RequiredError}
|
|
369
|
+
*/
|
|
370
|
+
getValidator(pubkey, options) {
|
|
371
|
+
return localVarFp.getValidator(pubkey, options).then((request) => request(axios, basePath));
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
* Get the list of current validators
|
|
375
|
+
* @param {*} [options] Override http request option.
|
|
376
|
+
* @throws {RequiredError}
|
|
377
|
+
*/
|
|
378
|
+
getValidators(options) {
|
|
379
|
+
return localVarFp.getValidators(options).then((request) => request(axios, basePath));
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
*
|
|
383
|
+
* @summary Sends raw transaction to be broadcast to the node.
|
|
384
|
+
* @param {InlineObject1} [body]
|
|
385
|
+
* @param {*} [options] Override http request option.
|
|
386
|
+
* @throws {RequiredError}
|
|
387
|
+
*/
|
|
388
|
+
sendTx(body, options) {
|
|
389
|
+
return localVarFp.sendTx(body, options).then((request) => request(axios, basePath));
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
exports.V1ApiFactory = V1ApiFactory;
|
|
394
|
+
/**
|
|
395
|
+
* V1Api - object-oriented interface
|
|
396
|
+
* @export
|
|
397
|
+
* @class V1Api
|
|
398
|
+
* @extends {BaseAPI}
|
|
399
|
+
*/
|
|
400
|
+
class V1Api extends base_1.BaseAPI {
|
|
401
|
+
/**
|
|
402
|
+
* Get the estimated gas cost for a transaction
|
|
403
|
+
* @param {V1ApiEstimateGasRequest} requestParameters Request parameters.
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
* @memberof V1Api
|
|
407
|
+
*/
|
|
408
|
+
estimateGas(requestParameters = {}, options) {
|
|
409
|
+
return (0, exports.V1ApiFp)(this.configuration).estimateGas(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
*
|
|
413
|
+
* @summary Get account details.
|
|
414
|
+
* @param {V1ApiGetAccountRequest} requestParameters Request parameters.
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
* @memberof V1Api
|
|
418
|
+
*/
|
|
419
|
+
getAccount(requestParameters, options) {
|
|
420
|
+
return (0, exports.V1ApiFp)(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
*
|
|
424
|
+
* @summary Get information about the running coinstack.
|
|
425
|
+
* @param {*} [options] Override http request option.
|
|
426
|
+
* @throws {RequiredError}
|
|
427
|
+
* @memberof V1Api
|
|
428
|
+
*/
|
|
429
|
+
getInfo(options) {
|
|
430
|
+
return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
*
|
|
434
|
+
* @summary Get paginated transaction history.
|
|
435
|
+
* @param {V1ApiGetTxHistoryRequest} requestParameters Request parameters.
|
|
436
|
+
* @param {*} [options] Override http request option.
|
|
437
|
+
* @throws {RequiredError}
|
|
438
|
+
* @memberof V1Api
|
|
439
|
+
*/
|
|
440
|
+
getTxHistory(requestParameters, options) {
|
|
441
|
+
return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Get a specific validator
|
|
445
|
+
* @param {V1ApiGetValidatorRequest} requestParameters Request parameters.
|
|
446
|
+
* @param {*} [options] Override http request option.
|
|
447
|
+
* @throws {RequiredError}
|
|
448
|
+
* @memberof V1Api
|
|
449
|
+
*/
|
|
450
|
+
getValidator(requestParameters, options) {
|
|
451
|
+
return (0, exports.V1ApiFp)(this.configuration).getValidator(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Get the list of current validators
|
|
455
|
+
* @param {*} [options] Override http request option.
|
|
456
|
+
* @throws {RequiredError}
|
|
457
|
+
* @memberof V1Api
|
|
458
|
+
*/
|
|
459
|
+
getValidators(options) {
|
|
460
|
+
return (0, exports.V1ApiFp)(this.configuration).getValidators(options).then((request) => request(this.axios, this.basePath));
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
*
|
|
464
|
+
* @summary Sends raw transaction to be broadcast to the node.
|
|
465
|
+
* @param {V1ApiSendTxRequest} requestParameters Request parameters.
|
|
466
|
+
* @param {*} [options] Override http request option.
|
|
467
|
+
* @throws {RequiredError}
|
|
468
|
+
* @memberof V1Api
|
|
469
|
+
*/
|
|
470
|
+
sendTx(requestParameters = {}, options) {
|
|
471
|
+
return (0, exports.V1ApiFp)(this.configuration).sendTx(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
exports.V1Api = V1Api;
|
|
475
|
+
/**
|
|
476
|
+
* WebsocketApi - axios parameter creator
|
|
477
|
+
* @export
|
|
478
|
+
*/
|
|
479
|
+
const WebsocketApiAxiosParamCreator = function (configuration) {
|
|
480
|
+
return {
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
* @summary Subscribe to pending and confirmed transactions.
|
|
484
|
+
* @param {*} [options] Override http request option.
|
|
485
|
+
* @throws {RequiredError}
|
|
486
|
+
*/
|
|
487
|
+
websocket: async (options = {}) => {
|
|
488
|
+
const localVarPath = `/`;
|
|
489
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
490
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
491
|
+
let baseOptions;
|
|
492
|
+
if (configuration) {
|
|
493
|
+
baseOptions = configuration.baseOptions;
|
|
494
|
+
}
|
|
495
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
496
|
+
const localVarHeaderParameter = {};
|
|
497
|
+
const localVarQueryParameter = {};
|
|
498
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
499
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
500
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
501
|
+
return {
|
|
502
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
503
|
+
options: localVarRequestOptions,
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
exports.WebsocketApiAxiosParamCreator = WebsocketApiAxiosParamCreator;
|
|
509
|
+
/**
|
|
510
|
+
* WebsocketApi - functional programming interface
|
|
511
|
+
* @export
|
|
512
|
+
*/
|
|
513
|
+
const WebsocketApiFp = function (configuration) {
|
|
514
|
+
const localVarAxiosParamCreator = (0, exports.WebsocketApiAxiosParamCreator)(configuration);
|
|
515
|
+
return {
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* @summary Subscribe to pending and confirmed transactions.
|
|
519
|
+
* @param {*} [options] Override http request option.
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
*/
|
|
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);
|
|
525
|
+
},
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
exports.WebsocketApiFp = WebsocketApiFp;
|
|
529
|
+
/**
|
|
530
|
+
* WebsocketApi - factory interface
|
|
531
|
+
* @export
|
|
532
|
+
*/
|
|
533
|
+
const WebsocketApiFactory = function (configuration, basePath, axios) {
|
|
534
|
+
const localVarFp = (0, exports.WebsocketApiFp)(configuration);
|
|
535
|
+
return {
|
|
536
|
+
/**
|
|
537
|
+
*
|
|
538
|
+
* @summary Subscribe to pending and confirmed transactions.
|
|
539
|
+
* @param {*} [options] Override http request option.
|
|
540
|
+
* @throws {RequiredError}
|
|
541
|
+
*/
|
|
542
|
+
websocket(options) {
|
|
543
|
+
return localVarFp.websocket(options).then((request) => request(axios, basePath));
|
|
544
|
+
},
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
exports.WebsocketApiFactory = WebsocketApiFactory;
|
|
548
|
+
/**
|
|
549
|
+
* WebsocketApi - object-oriented interface
|
|
550
|
+
* @export
|
|
551
|
+
* @class WebsocketApi
|
|
552
|
+
* @extends {BaseAPI}
|
|
553
|
+
*/
|
|
554
|
+
class WebsocketApi extends base_1.BaseAPI {
|
|
555
|
+
/**
|
|
556
|
+
*
|
|
557
|
+
* @summary Subscribe to pending and confirmed transactions.
|
|
558
|
+
* @param {*} [options] Override http request option.
|
|
559
|
+
* @throws {RequiredError}
|
|
560
|
+
* @memberof WebsocketApi
|
|
561
|
+
*/
|
|
562
|
+
websocket(options) {
|
|
563
|
+
return (0, exports.WebsocketApiFp)(this.configuration).websocket(options).then((request) => request(this.axios, this.basePath));
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
exports.WebsocketApi = WebsocketApi;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Osmosis Unchained API
|
|
3
|
+
* Provides access to osmosis chain data
|
|
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
|
+
import { Configuration } from "./configuration";
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: AxiosRequestConfig;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
name: "RequiredError";
|
|
54
|
+
constructor(field: string, msg?: string);
|
|
55
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Osmosis Unchained API
|
|
6
|
+
* Provides access to osmosis chain data
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
// Some imports not used depending on template conditions
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const axios_1 = __importDefault(require("axios"));
|
|
23
|
+
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
exports.COLLECTION_FORMATS = {
|
|
29
|
+
csv: ",",
|
|
30
|
+
ssv: " ",
|
|
31
|
+
tsv: "\t",
|
|
32
|
+
pipes: "|",
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
class BaseAPI {
|
|
40
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
41
|
+
this.basePath = basePath;
|
|
42
|
+
this.axios = axios;
|
|
43
|
+
if (configuration) {
|
|
44
|
+
this.configuration = configuration;
|
|
45
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.BaseAPI = BaseAPI;
|
|
50
|
+
;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
* @class RequiredError
|
|
55
|
+
* @extends {Error}
|
|
56
|
+
*/
|
|
57
|
+
class RequiredError extends Error {
|
|
58
|
+
constructor(field, msg) {
|
|
59
|
+
super(msg);
|
|
60
|
+
this.field = field;
|
|
61
|
+
this.name = "RequiredError";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.RequiredError = RequiredError;
|