@northstake/northstakeapi 1.0.22 → 1.0.24
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/.openapi-generator/FILES +12 -0
- package/.openapi-generator/VERSION +1 -1
- package/api/accountApiKeysApi.ts +346 -0
- package/api/apis.ts +5 -1
- package/api/managedUsersValidatorsApi.ts +116 -0
- package/api/validatorMarketplaceFacilitatorApi.ts +360 -0
- package/api/validatorsApi.ts +109 -0
- package/api.ts +18 -0
- package/dist/api/accountApiKeysApi.d.ts +77 -0
- package/dist/api/accountApiKeysApi.js +266 -0
- package/dist/api/apis.d.ts +5 -1
- package/dist/api/apis.js +5 -1
- package/dist/api/managedUsersValidatorsApi.d.ts +27 -0
- package/dist/api/managedUsersValidatorsApi.js +87 -0
- package/dist/api/validatorMarketplaceFacilitatorApi.d.ts +80 -0
- package/dist/api/validatorMarketplaceFacilitatorApi.js +280 -0
- package/dist/api/validatorsApi.d.ts +25 -0
- package/dist/api/validatorsApi.js +81 -0
- package/dist/api.d.ts +14 -0
- package/dist/api.js +16 -0
- package/dist/model/apiKey.d.ts +54 -0
- package/dist/model/apiKey.js +53 -0
- package/dist/model/generateApiKeyRequest.d.ts +43 -0
- package/dist/model/generateApiKeyRequest.js +43 -0
- package/dist/model/getMarketplaceMetadata200Response.d.ts +36 -0
- package/dist/model/getMarketplaceMetadata200Response.js +38 -0
- package/dist/model/getWithdrawalsResponse.d.ts +38 -0
- package/dist/model/getWithdrawalsResponse.js +43 -0
- package/dist/model/listAllRFQsForFacilitator200Response.d.ts +38 -0
- package/dist/model/listAllRFQsForFacilitator200Response.js +43 -0
- package/dist/model/models.d.ts +10 -0
- package/dist/model/models.js +32 -0
- package/dist/model/rFQBidFacilitator.d.ts +27 -0
- package/dist/model/rFQBidFacilitator.js +38 -0
- package/dist/model/rFQDocumentFacilitator.d.ts +38 -0
- package/dist/model/rFQDocumentFacilitator.js +53 -0
- package/dist/model/rFQDocumentFacilitatorStatusFilter.d.ts +12 -0
- package/dist/model/rFQDocumentFacilitatorStatusFilter.js +13 -0
- package/dist/model/rFQDocumentFacilitatorValidatorsInner.d.ts +27 -0
- package/dist/model/rFQDocumentFacilitatorValidatorsInner.js +38 -0
- package/dist/model/rFQDocumentSeller.d.ts +1 -0
- package/dist/model/rFQDocumentSeller.js +5 -0
- package/dist/model/validatorWithdrawal.d.ts +39 -0
- package/dist/model/validatorWithdrawal.js +68 -0
- package/model/apiKey.ts +88 -0
- package/model/generateApiKeyRequest.ts +66 -0
- package/model/getMarketplaceMetadata200Response.ts +52 -0
- package/model/getWithdrawalsResponse.ts +59 -0
- package/model/listAllRFQsForFacilitator200Response.ts +59 -0
- package/model/models.ts +53 -0
- package/model/rFQBidFacilitator.ts +43 -0
- package/model/rFQDocumentFacilitator.ts +74 -0
- package/model/rFQDocumentFacilitatorStatusFilter.ts +18 -0
- package/model/rFQDocumentFacilitatorValidatorsInner.ts +43 -0
- package/model/rFQDocumentSeller.ts +6 -0
- package/model/validatorWithdrawal.ts +86 -0
- package/package.json +3 -3
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Northstake
|
|
3
|
+
* Northstake api
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { ErrorResponse } from '../model/errorResponse';
|
|
19
|
+
import { GetMarketplaceMetadata200Response } from '../model/getMarketplaceMetadata200Response';
|
|
20
|
+
import { ListAllRFQsForFacilitator200Response } from '../model/listAllRFQsForFacilitator200Response';
|
|
21
|
+
import { RFQDocumentFacilitator } from '../model/rFQDocumentFacilitator';
|
|
22
|
+
|
|
23
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
24
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
|
|
25
|
+
|
|
26
|
+
import { HttpError, RequestFile } from './apis';
|
|
27
|
+
|
|
28
|
+
let defaultBasePath = 'https://api.northstake.dk/v1';
|
|
29
|
+
|
|
30
|
+
// ===============================================
|
|
31
|
+
// This file is autogenerated - Please do not edit
|
|
32
|
+
// ===============================================
|
|
33
|
+
|
|
34
|
+
export enum ValidatorMarketplaceFacilitatorApiApiKeys {
|
|
35
|
+
ApiKeyAuth,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export class ValidatorMarketplaceFacilitatorApi {
|
|
41
|
+
protected _basePath = defaultBasePath;
|
|
42
|
+
protected _defaultHeaders : any = {};
|
|
43
|
+
protected _useQuerystring : boolean = false;
|
|
44
|
+
|
|
45
|
+
protected authentications = {
|
|
46
|
+
'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
|
|
47
|
+
'bearerTokenAuth': new HttpBearerAuth(),
|
|
48
|
+
'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
protected interceptors: Interceptor[] = [];
|
|
52
|
+
|
|
53
|
+
constructor(basePath?: string);
|
|
54
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
55
|
+
if (password) {
|
|
56
|
+
if (basePath) {
|
|
57
|
+
this.basePath = basePath;
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
if (basePathOrUsername) {
|
|
61
|
+
this.basePath = basePathOrUsername
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
set useQuerystring(value: boolean) {
|
|
67
|
+
this._useQuerystring = value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
set basePath(basePath: string) {
|
|
71
|
+
this._basePath = basePath;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
75
|
+
this._defaultHeaders = defaultHeaders;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
get defaultHeaders() {
|
|
79
|
+
return this._defaultHeaders;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get basePath() {
|
|
83
|
+
return this._basePath;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
87
|
+
this.authentications.default = auth;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public setApiKey(key: ValidatorMarketplaceFacilitatorApiApiKeys, value: string) {
|
|
91
|
+
(this.authentications as any)[ValidatorMarketplaceFacilitatorApiApiKeys[key]].apiKey = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
set accessToken(accessToken: string | (() => string)) {
|
|
95
|
+
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
99
|
+
this.interceptors.push(interceptor);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Retrieves metadata information for the entire marketplace.
|
|
104
|
+
* @summary Get metadata for the entire marketplace
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
public async getMarketplaceMetadata (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: GetMarketplaceMetadata200Response, status: number }> {
|
|
112
|
+
|
|
113
|
+
const localVarPath = this.basePath + '/validatorMarketplace/facilitator/metadata';
|
|
114
|
+
|
|
115
|
+
let localVarQueryParameters: any = {};
|
|
116
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
117
|
+
const produces = ['application/json'];
|
|
118
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
119
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
120
|
+
} else {
|
|
121
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
122
|
+
}
|
|
123
|
+
let localVarFormParams: any = {};
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
134
|
+
|
|
135
|
+
let localVarUseFormData = false;
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
140
|
+
method: 'GET',
|
|
141
|
+
qs: localVarQueryParameters,
|
|
142
|
+
headers: localVarHeaderParams,
|
|
143
|
+
uri: localVarPath,
|
|
144
|
+
useQuerystring: this._useQuerystring,
|
|
145
|
+
json: true,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
let authenticationPromise = Promise.resolve();
|
|
149
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
150
|
+
|
|
151
|
+
let interceptorPromise = authenticationPromise;
|
|
152
|
+
for (const interceptor of this.interceptors) {
|
|
153
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return interceptorPromise.then(() => {
|
|
157
|
+
if (Object.keys(localVarFormParams).length) {
|
|
158
|
+
if (localVarUseFormData) {
|
|
159
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
160
|
+
} else {
|
|
161
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return new Promise<{ body: GetMarketplaceMetadata200Response, status: number }>((resolve, reject) => {
|
|
165
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
166
|
+
if (error) {
|
|
167
|
+
console.error('API call error:', error);
|
|
168
|
+
reject(error);
|
|
169
|
+
} else {
|
|
170
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
171
|
+
body = ObjectSerializer.deserialize(body, "GetMarketplaceMetadata200Response");
|
|
172
|
+
resolve({ body: body, status: response.statusCode });
|
|
173
|
+
} else {
|
|
174
|
+
console.error('API response error:', response.statusCode);
|
|
175
|
+
resolve({ body: body, status: response.statusCode });
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
} )
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Retrieves detailed information about an RFQ by its ID.
|
|
184
|
+
* @summary Get detailed information about a specific RFQ
|
|
185
|
+
* @param rfqId The unique identifier of the RFQ
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
public async getRFQDetailsForFacilitator (rfqId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: RFQDocumentFacilitator, status: number }> {
|
|
193
|
+
|
|
194
|
+
const localVarPath = this.basePath + '/validatorMarketplace/facilitator/{rfqId}'
|
|
195
|
+
.replace('{' + 'rfqId' + '}', encodeURIComponent(String(rfqId)));
|
|
196
|
+
|
|
197
|
+
let localVarQueryParameters: any = {};
|
|
198
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
199
|
+
const produces = ['application/json'];
|
|
200
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
201
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
202
|
+
} else {
|
|
203
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
204
|
+
}
|
|
205
|
+
let localVarFormParams: any = {};
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
// Verify required parameter 'rfqId' is not null or undefined
|
|
209
|
+
if (rfqId === null || rfqId === undefined) {
|
|
210
|
+
throw new Error('Required parameter "rfqId" was null or undefined when calling getRFQDetailsForFacilitator.');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
220
|
+
|
|
221
|
+
let localVarUseFormData = false;
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
226
|
+
method: 'GET',
|
|
227
|
+
qs: localVarQueryParameters,
|
|
228
|
+
headers: localVarHeaderParams,
|
|
229
|
+
uri: localVarPath,
|
|
230
|
+
useQuerystring: this._useQuerystring,
|
|
231
|
+
json: true,
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
let authenticationPromise = Promise.resolve();
|
|
235
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
236
|
+
|
|
237
|
+
let interceptorPromise = authenticationPromise;
|
|
238
|
+
for (const interceptor of this.interceptors) {
|
|
239
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return interceptorPromise.then(() => {
|
|
243
|
+
if (Object.keys(localVarFormParams).length) {
|
|
244
|
+
if (localVarUseFormData) {
|
|
245
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
246
|
+
} else {
|
|
247
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return new Promise<{ body: RFQDocumentFacilitator, status: number }>((resolve, reject) => {
|
|
251
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
252
|
+
if (error) {
|
|
253
|
+
console.error('API call error:', error);
|
|
254
|
+
reject(error);
|
|
255
|
+
} else {
|
|
256
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
257
|
+
body = ObjectSerializer.deserialize(body, "RFQDocumentFacilitator");
|
|
258
|
+
resolve({ body: body, status: response.statusCode });
|
|
259
|
+
} else {
|
|
260
|
+
console.error('API response error:', response.statusCode);
|
|
261
|
+
resolve({ body: body, status: response.statusCode });
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
} )
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Retrieves a list of all RFQs available in the Northstake marketplace.
|
|
270
|
+
* @summary List all RFQs in the marketplace
|
|
271
|
+
* @param status
|
|
272
|
+
* @param page
|
|
273
|
+
* @param limit
|
|
274
|
+
*/
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
public async listAllRFQsForFacilitator (status?: 'active' | 'expired' | 'finished', page?: number, limit?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: ListAllRFQsForFacilitator200Response, status: number }> {
|
|
281
|
+
|
|
282
|
+
const localVarPath = this.basePath + '/validatorMarketplace/facilitator';
|
|
283
|
+
|
|
284
|
+
let localVarQueryParameters: any = {};
|
|
285
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
286
|
+
const produces = ['application/json'];
|
|
287
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
288
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
289
|
+
} else {
|
|
290
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
291
|
+
}
|
|
292
|
+
let localVarFormParams: any = {};
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
if (status !== undefined) {
|
|
299
|
+
localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'active' | 'expired' | 'finished'");
|
|
300
|
+
}
|
|
301
|
+
if (page !== undefined) {
|
|
302
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number");
|
|
303
|
+
}
|
|
304
|
+
if (limit !== undefined) {
|
|
305
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
312
|
+
|
|
313
|
+
let localVarUseFormData = false;
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
318
|
+
method: 'GET',
|
|
319
|
+
qs: localVarQueryParameters,
|
|
320
|
+
headers: localVarHeaderParams,
|
|
321
|
+
uri: localVarPath,
|
|
322
|
+
useQuerystring: this._useQuerystring,
|
|
323
|
+
json: true,
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
let authenticationPromise = Promise.resolve();
|
|
327
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
328
|
+
|
|
329
|
+
let interceptorPromise = authenticationPromise;
|
|
330
|
+
for (const interceptor of this.interceptors) {
|
|
331
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return interceptorPromise.then(() => {
|
|
335
|
+
if (Object.keys(localVarFormParams).length) {
|
|
336
|
+
if (localVarUseFormData) {
|
|
337
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
338
|
+
} else {
|
|
339
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return new Promise<{ body: ListAllRFQsForFacilitator200Response, status: number }>((resolve, reject) => {
|
|
343
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
344
|
+
if (error) {
|
|
345
|
+
console.error('API call error:', error);
|
|
346
|
+
reject(error);
|
|
347
|
+
} else {
|
|
348
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
349
|
+
body = ObjectSerializer.deserialize(body, "ListAllRFQsForFacilitator200Response");
|
|
350
|
+
resolve({ body: body, status: response.statusCode });
|
|
351
|
+
} else {
|
|
352
|
+
console.error('API response error:', response.statusCode);
|
|
353
|
+
resolve({ body: body, status: response.statusCode });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
} )
|
|
359
|
+
}
|
|
360
|
+
}
|
package/api/validatorsApi.ts
CHANGED
|
@@ -16,6 +16,7 @@ import http from 'http';
|
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
18
|
import { ErrorResponse } from '../model/errorResponse';
|
|
19
|
+
import { GetWithdrawalsResponse } from '../model/getWithdrawalsResponse';
|
|
19
20
|
import { ValidatorInfo } from '../model/validatorInfo';
|
|
20
21
|
import { ValidatorKeyHolder } from '../model/validatorKeyHolder';
|
|
21
22
|
import { ValidatorType } from '../model/validatorType';
|
|
@@ -36,6 +37,14 @@ export enum ValidatorsApiApiKeys {
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
|
|
40
|
+
// If vendorExtensions.x-packageParams is true, use a single object to pass parameters
|
|
41
|
+
export interface ValidatorsApiParams {
|
|
42
|
+
startDate?: string;
|
|
43
|
+
endDate?: string;
|
|
44
|
+
page?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
validatorIndices?: string;
|
|
47
|
+
}
|
|
39
48
|
|
|
40
49
|
export class ValidatorsApi {
|
|
41
50
|
protected _basePath = defaultBasePath;
|
|
@@ -99,6 +108,106 @@ export class ValidatorsApi {
|
|
|
99
108
|
this.interceptors.push(interceptor);
|
|
100
109
|
}
|
|
101
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Retrieves a paginated list of validator withdrawals. The endpoint supports filtering by start and end date, page number, and limit. Additionally, it allows filtering by validator indices.
|
|
113
|
+
* @summary Get a list of validator withdrawals
|
|
114
|
+
* @param startDate Start date for filtering withdrawal statistics
|
|
115
|
+
* @param endDate End date for filtering withdrawal statistics
|
|
116
|
+
* @param page Withdrawal list page number
|
|
117
|
+
* @param limit Number of withdrawals to return per page
|
|
118
|
+
* @param validatorIndices Comma-separated list of validator indices to filter withdrawals (e.g., \"123,456,789\")
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
public async getValidatorWithdrawals(params?: ValidatorsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetWithdrawalsResponse, status: number }> {
|
|
126
|
+
|
|
127
|
+
const localVarPath = this.basePath + '/validators/withdrawals';
|
|
128
|
+
|
|
129
|
+
let localVarQueryParameters: any = {};
|
|
130
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
131
|
+
const produces = ['application/json'];
|
|
132
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
133
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
134
|
+
} else {
|
|
135
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
136
|
+
}
|
|
137
|
+
let localVarFormParams: any = {};
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
if (params?.startDate !== undefined) {
|
|
144
|
+
localVarQueryParameters['start_date'] = ObjectSerializer.serialize(params?.startDate, "string");
|
|
145
|
+
}
|
|
146
|
+
if (params?.endDate !== undefined) {
|
|
147
|
+
localVarQueryParameters['end_date'] = ObjectSerializer.serialize(params?.endDate, "string");
|
|
148
|
+
}
|
|
149
|
+
if (params?.page !== undefined) {
|
|
150
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
|
|
151
|
+
}
|
|
152
|
+
if (params?.limit !== undefined) {
|
|
153
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
|
|
154
|
+
}
|
|
155
|
+
if (params?.validatorIndices !== undefined) {
|
|
156
|
+
localVarQueryParameters['validator_indices'] = ObjectSerializer.serialize(params?.validatorIndices, "string");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
163
|
+
|
|
164
|
+
let localVarUseFormData = false;
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
169
|
+
method: 'GET',
|
|
170
|
+
qs: localVarQueryParameters,
|
|
171
|
+
headers: localVarHeaderParams,
|
|
172
|
+
uri: localVarPath,
|
|
173
|
+
useQuerystring: this._useQuerystring,
|
|
174
|
+
json: true,
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
let authenticationPromise = Promise.resolve();
|
|
178
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
179
|
+
|
|
180
|
+
let interceptorPromise = authenticationPromise;
|
|
181
|
+
for (const interceptor of this.interceptors) {
|
|
182
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return interceptorPromise.then(() => {
|
|
186
|
+
if (Object.keys(localVarFormParams).length) {
|
|
187
|
+
if (localVarUseFormData) {
|
|
188
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
189
|
+
} else {
|
|
190
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return new Promise<{ body: GetWithdrawalsResponse, status: number }>((resolve, reject) => {
|
|
194
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
195
|
+
if (error) {
|
|
196
|
+
console.error('API call error:', error);
|
|
197
|
+
reject(error);
|
|
198
|
+
} else {
|
|
199
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
200
|
+
body = ObjectSerializer.deserialize(body, "GetWithdrawalsResponse");
|
|
201
|
+
resolve({ body: body, status: response.statusCode });
|
|
202
|
+
} else {
|
|
203
|
+
console.error('API response error:', response.statusCode);
|
|
204
|
+
resolve({ body: body, status: response.statusCode });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
} )
|
|
210
|
+
}
|
|
102
211
|
/**
|
|
103
212
|
*
|
|
104
213
|
* @summary Get a list of validators, optionally filtering by key_holder and contract_type
|
package/api.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// masterApi.mustache
|
|
2
2
|
import { JWTAuth } from './model/models';
|
|
3
3
|
import { AccountApi } from './api/accountApi';
|
|
4
|
+
import { AccountApiKeysApi } from './api/accountApiKeysApi';
|
|
4
5
|
import { DepositAddressesApi } from './api/depositAddressesApi';
|
|
5
6
|
import { LinkedWalletsApi } from './api/linkedWalletsApi';
|
|
6
7
|
import { ManagedUsersApi } from './api/managedUsersApi';
|
|
@@ -14,6 +15,7 @@ import { OrdersApi } from './api/ordersApi';
|
|
|
14
15
|
import { PortfolioApi } from './api/portfolioApi';
|
|
15
16
|
import { TransactionsApi } from './api/transactionsApi';
|
|
16
17
|
import { ValidatorMarketplaceBuyersApi } from './api/validatorMarketplaceBuyersApi';
|
|
18
|
+
import { ValidatorMarketplaceFacilitatorApi } from './api/validatorMarketplaceFacilitatorApi';
|
|
17
19
|
import { ValidatorMarketplaceSellersApi } from './api/validatorMarketplaceSellersApi';
|
|
18
20
|
import { ValidatorMarketplaceWebhooksApi } from './api/validatorMarketplaceWebhooksApi';
|
|
19
21
|
import { ValidatorsApi } from './api/validatorsApi';
|
|
@@ -22,6 +24,7 @@ export * from './model/./accountEntity';
|
|
|
22
24
|
export * from './model/./addLinkedWalletForUserRequest';
|
|
23
25
|
export * from './model/./addLinkedWalletRequest';
|
|
24
26
|
export * from './model/./allManagedUsersResponse';
|
|
27
|
+
export * from './model/./apiKey';
|
|
25
28
|
export * from './model/./asset';
|
|
26
29
|
export * from './model/./createManagedUserRequest';
|
|
27
30
|
export * from './model/./createRFQRequest';
|
|
@@ -41,7 +44,11 @@ export * from './model/./ethereumValidatorKeyKeystoreCryptoKdfParams';
|
|
|
41
44
|
export * from './model/./exitEstimateBase';
|
|
42
45
|
export * from './model/./exitEstimateSeller';
|
|
43
46
|
export * from './model/./exitProposal';
|
|
47
|
+
export * from './model/./generateApiKeyRequest';
|
|
48
|
+
export * from './model/./getMarketplaceMetadata200Response';
|
|
44
49
|
export * from './model/./getTransactionsResponse';
|
|
50
|
+
export * from './model/./getWithdrawalsResponse';
|
|
51
|
+
export * from './model/./listAllRFQsForFacilitator200Response';
|
|
45
52
|
export * from './model/./managedUser';
|
|
46
53
|
export * from './model/./managedUserDetails';
|
|
47
54
|
export * from './model/./order';
|
|
@@ -52,12 +59,16 @@ export * from './model/./orderUpdatePayload';
|
|
|
52
59
|
export * from './model/./portfolioEntity';
|
|
53
60
|
export * from './model/./provideEscrowHashForRFQDocumentRequest';
|
|
54
61
|
export * from './model/./quote';
|
|
62
|
+
export * from './model/./rFQBidFacilitator';
|
|
55
63
|
export * from './model/./rFQBids';
|
|
56
64
|
export * from './model/./rFQDocumentBase';
|
|
57
65
|
export * from './model/./rFQDocumentBaseUniqueEscrowVault';
|
|
58
66
|
export * from './model/./rFQDocumentBuyer';
|
|
59
67
|
export * from './model/./rFQDocumentBuyerAllOfValidators';
|
|
60
68
|
export * from './model/./rFQDocumentBuyerStatusFilter';
|
|
69
|
+
export * from './model/./rFQDocumentFacilitator';
|
|
70
|
+
export * from './model/./rFQDocumentFacilitatorStatusFilter';
|
|
71
|
+
export * from './model/./rFQDocumentFacilitatorValidatorsInner';
|
|
61
72
|
export * from './model/./rFQDocumentSeller';
|
|
62
73
|
export * from './model/./rFQDocumentSellerAllOfValidators';
|
|
63
74
|
export * from './model/./rFQDocumentSellerStatusFilter';
|
|
@@ -81,6 +92,7 @@ export * from './model/./unstakeStepType';
|
|
|
81
92
|
export * from './model/./validatorInfo';
|
|
82
93
|
export * from './model/./validatorKeyHolder';
|
|
83
94
|
export * from './model/./validatorType';
|
|
95
|
+
export * from './model/./validatorWithdrawal';
|
|
84
96
|
export * from './model/./wallet';
|
|
85
97
|
export * from './model/./webHookLookupAnswer';
|
|
86
98
|
export * from './model/./webhookPayload';
|
|
@@ -115,6 +127,8 @@ export class NorthstakeApi {
|
|
|
115
127
|
|
|
116
128
|
this.account = new AccountApi(basePath);
|
|
117
129
|
this.account.setDefaultAuthentication(jwtAuth);
|
|
130
|
+
this.accountApiKeys = new AccountApiKeysApi(basePath);
|
|
131
|
+
this.accountApiKeys.setDefaultAuthentication(jwtAuth);
|
|
118
132
|
this.depositAddresses = new DepositAddressesApi(basePath);
|
|
119
133
|
this.depositAddresses.setDefaultAuthentication(jwtAuth);
|
|
120
134
|
this.linkedWallets = new LinkedWalletsApi(basePath);
|
|
@@ -141,6 +155,8 @@ export class NorthstakeApi {
|
|
|
141
155
|
this.transactions.setDefaultAuthentication(jwtAuth);
|
|
142
156
|
this.validatorMarketplaceBuyers = new ValidatorMarketplaceBuyersApi(basePath);
|
|
143
157
|
this.validatorMarketplaceBuyers.setDefaultAuthentication(jwtAuth);
|
|
158
|
+
this.validatorMarketplaceFacilitator = new ValidatorMarketplaceFacilitatorApi(basePath);
|
|
159
|
+
this.validatorMarketplaceFacilitator.setDefaultAuthentication(jwtAuth);
|
|
144
160
|
this.validatorMarketplaceSellers = new ValidatorMarketplaceSellersApi(basePath);
|
|
145
161
|
this.validatorMarketplaceSellers.setDefaultAuthentication(jwtAuth);
|
|
146
162
|
this.validatorMarketplaceWebhooks = new ValidatorMarketplaceWebhooksApi(basePath);
|
|
@@ -149,6 +165,7 @@ export class NorthstakeApi {
|
|
|
149
165
|
this.validators.setDefaultAuthentication(jwtAuth);
|
|
150
166
|
}
|
|
151
167
|
public account: AccountApi;
|
|
168
|
+
public accountApiKeys: AccountApiKeysApi;
|
|
152
169
|
public depositAddresses: DepositAddressesApi;
|
|
153
170
|
public linkedWallets: LinkedWalletsApi;
|
|
154
171
|
public managedUsers: ManagedUsersApi;
|
|
@@ -162,6 +179,7 @@ export class NorthstakeApi {
|
|
|
162
179
|
public portfolio: PortfolioApi;
|
|
163
180
|
public transactions: TransactionsApi;
|
|
164
181
|
public validatorMarketplaceBuyers: ValidatorMarketplaceBuyersApi;
|
|
182
|
+
public validatorMarketplaceFacilitator: ValidatorMarketplaceFacilitatorApi;
|
|
165
183
|
public validatorMarketplaceSellers: ValidatorMarketplaceSellersApi;
|
|
166
184
|
public validatorMarketplaceWebhooks: ValidatorMarketplaceWebhooksApi;
|
|
167
185
|
public validators: ValidatorsApi;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Northstake
|
|
3
|
+
* Northstake api
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.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 { ApiKey } from '../model/apiKey';
|
|
13
|
+
import { GenerateApiKeyRequest } from '../model/generateApiKeyRequest';
|
|
14
|
+
import { Authentication, Interceptor } from '../model/models';
|
|
15
|
+
import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
|
|
16
|
+
export declare enum AccountApiKeysApiApiKeys {
|
|
17
|
+
ApiKeyAuth = 0
|
|
18
|
+
}
|
|
19
|
+
export declare class AccountApiKeysApi {
|
|
20
|
+
protected _basePath: string;
|
|
21
|
+
protected _defaultHeaders: any;
|
|
22
|
+
protected _useQuerystring: boolean;
|
|
23
|
+
protected authentications: {
|
|
24
|
+
default: Authentication;
|
|
25
|
+
bearerTokenAuth: HttpBearerAuth;
|
|
26
|
+
ApiKeyAuth: ApiKeyAuth;
|
|
27
|
+
};
|
|
28
|
+
protected interceptors: Interceptor[];
|
|
29
|
+
constructor(basePath?: string);
|
|
30
|
+
set useQuerystring(value: boolean);
|
|
31
|
+
set basePath(basePath: string);
|
|
32
|
+
set defaultHeaders(defaultHeaders: any);
|
|
33
|
+
get defaultHeaders(): any;
|
|
34
|
+
get basePath(): string;
|
|
35
|
+
setDefaultAuthentication(auth: Authentication): void;
|
|
36
|
+
setApiKey(key: AccountApiKeysApiApiKeys, value: string): void;
|
|
37
|
+
set accessToken(accessToken: string | (() => string));
|
|
38
|
+
addInterceptor(interceptor: Interceptor): void;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @summary Delete an API key
|
|
42
|
+
* @param apiKeyId The ID of the API key to delete
|
|
43
|
+
*/
|
|
44
|
+
deleteApiKey(apiKeyId: string, options?: {
|
|
45
|
+
headers: {
|
|
46
|
+
[name: string]: string;
|
|
47
|
+
};
|
|
48
|
+
}): Promise<{
|
|
49
|
+
body: any;
|
|
50
|
+
status: number;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Allows a user to generate a new API key with specific rights and restrictions.
|
|
54
|
+
* @summary Generate a new API key
|
|
55
|
+
* @param generateApiKeyRequest
|
|
56
|
+
*/
|
|
57
|
+
generateApiKey(generateApiKeyRequest: GenerateApiKeyRequest, options?: {
|
|
58
|
+
headers: {
|
|
59
|
+
[name: string]: string;
|
|
60
|
+
};
|
|
61
|
+
}): Promise<{
|
|
62
|
+
body: ApiKey;
|
|
63
|
+
status: number;
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @summary List all API keys
|
|
68
|
+
*/
|
|
69
|
+
listApiKeys(options?: {
|
|
70
|
+
headers: {
|
|
71
|
+
[name: string]: string;
|
|
72
|
+
};
|
|
73
|
+
}): Promise<{
|
|
74
|
+
body: Array<ApiKey>;
|
|
75
|
+
status: number;
|
|
76
|
+
}>;
|
|
77
|
+
}
|