@northstake/northstakeapi 1.0.23 → 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 +3 -0
- package/api/accountApiKeysApi.ts +346 -0
- package/api/apis.ts +3 -1
- package/api.ts +6 -0
- package/dist/api/accountApiKeysApi.d.ts +77 -0
- package/dist/api/accountApiKeysApi.js +266 -0
- package/dist/api/apis.d.ts +3 -1
- package/dist/api/apis.js +3 -1
- package/dist/api.d.ts +4 -0
- package/dist/api.js +5 -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/models.d.ts +2 -0
- package/dist/model/models.js +8 -0
- package/dist/model/validatorWithdrawal.d.ts +1 -0
- package/dist/model/validatorWithdrawal.js +5 -0
- package/model/apiKey.ts +88 -0
- package/model/generateApiKeyRequest.ts +66 -0
- package/model/models.ts +12 -0
- package/model/validatorWithdrawal.ts +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Northstake
|
|
4
|
+
* Northstake api
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AccountApiKeysApi = exports.AccountApiKeysApiApiKeys = void 0;
|
|
18
|
+
const request_1 = __importDefault(require("request"));
|
|
19
|
+
const models_1 = require("../model/models");
|
|
20
|
+
const models_2 = require("../model/models");
|
|
21
|
+
let defaultBasePath = 'https://api.northstake.dk/v1';
|
|
22
|
+
// ===============================================
|
|
23
|
+
// This file is autogenerated - Please do not edit
|
|
24
|
+
// ===============================================
|
|
25
|
+
var AccountApiKeysApiApiKeys;
|
|
26
|
+
(function (AccountApiKeysApiApiKeys) {
|
|
27
|
+
AccountApiKeysApiApiKeys[AccountApiKeysApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
|
|
28
|
+
})(AccountApiKeysApiApiKeys || (exports.AccountApiKeysApiApiKeys = AccountApiKeysApiApiKeys = {}));
|
|
29
|
+
class AccountApiKeysApi {
|
|
30
|
+
constructor(basePathOrUsername, password, basePath) {
|
|
31
|
+
this._basePath = defaultBasePath;
|
|
32
|
+
this._defaultHeaders = {};
|
|
33
|
+
this._useQuerystring = false;
|
|
34
|
+
this.authentications = {
|
|
35
|
+
'default': new models_2.JWTAuth('your_api_key', 'your_private_key'),
|
|
36
|
+
'bearerTokenAuth': new models_2.HttpBearerAuth(),
|
|
37
|
+
'ApiKeyAuth': new models_2.ApiKeyAuth('header', 'x-api-key'),
|
|
38
|
+
};
|
|
39
|
+
this.interceptors = [];
|
|
40
|
+
if (password) {
|
|
41
|
+
if (basePath) {
|
|
42
|
+
this.basePath = basePath;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (basePathOrUsername) {
|
|
47
|
+
this.basePath = basePathOrUsername;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
set useQuerystring(value) {
|
|
52
|
+
this._useQuerystring = value;
|
|
53
|
+
}
|
|
54
|
+
set basePath(basePath) {
|
|
55
|
+
this._basePath = basePath;
|
|
56
|
+
}
|
|
57
|
+
set defaultHeaders(defaultHeaders) {
|
|
58
|
+
this._defaultHeaders = defaultHeaders;
|
|
59
|
+
}
|
|
60
|
+
get defaultHeaders() {
|
|
61
|
+
return this._defaultHeaders;
|
|
62
|
+
}
|
|
63
|
+
get basePath() {
|
|
64
|
+
return this._basePath;
|
|
65
|
+
}
|
|
66
|
+
setDefaultAuthentication(auth) {
|
|
67
|
+
this.authentications.default = auth;
|
|
68
|
+
}
|
|
69
|
+
setApiKey(key, value) {
|
|
70
|
+
this.authentications[AccountApiKeysApiApiKeys[key]].apiKey = value;
|
|
71
|
+
}
|
|
72
|
+
set accessToken(accessToken) {
|
|
73
|
+
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
74
|
+
}
|
|
75
|
+
addInterceptor(interceptor) {
|
|
76
|
+
this.interceptors.push(interceptor);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @summary Delete an API key
|
|
81
|
+
* @param apiKeyId The ID of the API key to delete
|
|
82
|
+
*/
|
|
83
|
+
async deleteApiKey(apiKeyId, options = { headers: {} }) {
|
|
84
|
+
const localVarPath = this.basePath + '/account/apiKeys/{apiKeyId}'
|
|
85
|
+
.replace('{' + 'apiKeyId' + '}', encodeURIComponent(String(apiKeyId)));
|
|
86
|
+
let localVarQueryParameters = {};
|
|
87
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
88
|
+
let localVarFormParams = {};
|
|
89
|
+
// Verify required parameter 'apiKeyId' is not null or undefined
|
|
90
|
+
if (apiKeyId === null || apiKeyId === undefined) {
|
|
91
|
+
throw new Error('Required parameter "apiKeyId" was null or undefined when calling deleteApiKey.');
|
|
92
|
+
}
|
|
93
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
94
|
+
let localVarUseFormData = false;
|
|
95
|
+
let localVarRequestOptions = {
|
|
96
|
+
method: 'DELETE',
|
|
97
|
+
qs: localVarQueryParameters,
|
|
98
|
+
headers: localVarHeaderParams,
|
|
99
|
+
uri: localVarPath,
|
|
100
|
+
useQuerystring: this._useQuerystring,
|
|
101
|
+
json: true,
|
|
102
|
+
};
|
|
103
|
+
let authenticationPromise = Promise.resolve();
|
|
104
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
105
|
+
let interceptorPromise = authenticationPromise;
|
|
106
|
+
for (const interceptor of this.interceptors) {
|
|
107
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
108
|
+
}
|
|
109
|
+
return interceptorPromise.then(() => {
|
|
110
|
+
if (Object.keys(localVarFormParams).length) {
|
|
111
|
+
if (localVarUseFormData) {
|
|
112
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return new Promise((resolve, reject) => {
|
|
119
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
120
|
+
if (error) {
|
|
121
|
+
console.error('API call error:', error);
|
|
122
|
+
reject(error);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
126
|
+
resolve({ body: body, status: response.statusCode });
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
console.error('API response error:', response.statusCode);
|
|
130
|
+
resolve({ body: body, status: response.statusCode });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Allows a user to generate a new API key with specific rights and restrictions.
|
|
139
|
+
* @summary Generate a new API key
|
|
140
|
+
* @param generateApiKeyRequest
|
|
141
|
+
*/
|
|
142
|
+
async generateApiKey(generateApiKeyRequest, options = { headers: {} }) {
|
|
143
|
+
const localVarPath = this.basePath + '/account/apiKeys';
|
|
144
|
+
let localVarQueryParameters = {};
|
|
145
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
146
|
+
const produces = ['application/json'];
|
|
147
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
148
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
152
|
+
}
|
|
153
|
+
let localVarFormParams = {};
|
|
154
|
+
// Verify required parameter 'generateApiKeyRequest' is not null or undefined
|
|
155
|
+
if (generateApiKeyRequest === null || generateApiKeyRequest === undefined) {
|
|
156
|
+
throw new Error('Required parameter "generateApiKeyRequest" was null or undefined when calling generateApiKey.');
|
|
157
|
+
}
|
|
158
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
159
|
+
let localVarUseFormData = false;
|
|
160
|
+
let localVarRequestOptions = {
|
|
161
|
+
method: 'POST',
|
|
162
|
+
qs: localVarQueryParameters,
|
|
163
|
+
headers: localVarHeaderParams,
|
|
164
|
+
uri: localVarPath,
|
|
165
|
+
useQuerystring: this._useQuerystring,
|
|
166
|
+
json: true,
|
|
167
|
+
body: models_1.ObjectSerializer.serialize(generateApiKeyRequest, "GenerateApiKeyRequest")
|
|
168
|
+
};
|
|
169
|
+
let authenticationPromise = Promise.resolve();
|
|
170
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
171
|
+
let interceptorPromise = authenticationPromise;
|
|
172
|
+
for (const interceptor of this.interceptors) {
|
|
173
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
174
|
+
}
|
|
175
|
+
return interceptorPromise.then(() => {
|
|
176
|
+
if (Object.keys(localVarFormParams).length) {
|
|
177
|
+
if (localVarUseFormData) {
|
|
178
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return new Promise((resolve, reject) => {
|
|
185
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
186
|
+
if (error) {
|
|
187
|
+
console.error('API call error:', error);
|
|
188
|
+
reject(error);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
192
|
+
body = models_1.ObjectSerializer.deserialize(body, "ApiKey");
|
|
193
|
+
resolve({ body: body, status: response.statusCode });
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
console.error('API response error:', response.statusCode);
|
|
197
|
+
resolve({ body: body, status: response.statusCode });
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
* @summary List all API keys
|
|
207
|
+
*/
|
|
208
|
+
async listApiKeys(options = { headers: {} }) {
|
|
209
|
+
const localVarPath = this.basePath + '/account/apiKeys';
|
|
210
|
+
let localVarQueryParameters = {};
|
|
211
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
212
|
+
const produces = ['application/json'];
|
|
213
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
214
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
218
|
+
}
|
|
219
|
+
let localVarFormParams = {};
|
|
220
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
221
|
+
let localVarUseFormData = false;
|
|
222
|
+
let localVarRequestOptions = {
|
|
223
|
+
method: 'GET',
|
|
224
|
+
qs: localVarQueryParameters,
|
|
225
|
+
headers: localVarHeaderParams,
|
|
226
|
+
uri: localVarPath,
|
|
227
|
+
useQuerystring: this._useQuerystring,
|
|
228
|
+
json: true,
|
|
229
|
+
};
|
|
230
|
+
let authenticationPromise = Promise.resolve();
|
|
231
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
232
|
+
let interceptorPromise = authenticationPromise;
|
|
233
|
+
for (const interceptor of this.interceptors) {
|
|
234
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
235
|
+
}
|
|
236
|
+
return interceptorPromise.then(() => {
|
|
237
|
+
if (Object.keys(localVarFormParams).length) {
|
|
238
|
+
if (localVarUseFormData) {
|
|
239
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return new Promise((resolve, reject) => {
|
|
246
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
247
|
+
if (error) {
|
|
248
|
+
console.error('API call error:', error);
|
|
249
|
+
reject(error);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
253
|
+
body = models_1.ObjectSerializer.deserialize(body, "Array<ApiKey>");
|
|
254
|
+
resolve({ body: body, status: response.statusCode });
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
console.error('API response error:', response.statusCode);
|
|
258
|
+
resolve({ body: body, status: response.statusCode });
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
exports.AccountApiKeysApi = AccountApiKeysApi;
|
package/dist/api/apis.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './accountApi';
|
|
2
2
|
import { AccountApi } from './accountApi';
|
|
3
|
+
export * from './accountApiKeysApi';
|
|
4
|
+
import { AccountApiKeysApi } from './accountApiKeysApi';
|
|
3
5
|
export * from './depositAddressesApi';
|
|
4
6
|
import { DepositAddressesApi } from './depositAddressesApi';
|
|
5
7
|
export * from './linkedWalletsApi';
|
|
@@ -42,4 +44,4 @@ export declare class HttpError extends Error {
|
|
|
42
44
|
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
43
45
|
}
|
|
44
46
|
export { RequestFile } from '../model/models';
|
|
45
|
-
export declare const APIS: (typeof DepositAddressesApi | typeof LinkedWalletsApi | typeof ManagedUsersApi | typeof ManagedUsersDepositAddressesApi | typeof ManagedUsersLinkedWalletsApi | typeof ManagedUsersOrdersApi | typeof ManagedUsersPortfolioApi | typeof ManagedUsersTransactionsApi | typeof ManagedUsersValidatorsApi | typeof OrdersApi | typeof PortfolioApi | typeof TransactionsApi | typeof ValidatorMarketplaceBuyersApi | typeof ValidatorMarketplaceFacilitatorApi | typeof ValidatorMarketplaceSellersApi | typeof ValidatorMarketplaceWebhooksApi | typeof ValidatorsApi | typeof AccountApi)[];
|
|
47
|
+
export declare const APIS: (typeof AccountApiKeysApi | typeof DepositAddressesApi | typeof LinkedWalletsApi | typeof ManagedUsersApi | typeof ManagedUsersDepositAddressesApi | typeof ManagedUsersLinkedWalletsApi | typeof ManagedUsersOrdersApi | typeof ManagedUsersPortfolioApi | typeof ManagedUsersTransactionsApi | typeof ManagedUsersValidatorsApi | typeof OrdersApi | typeof PortfolioApi | typeof TransactionsApi | typeof ValidatorMarketplaceBuyersApi | typeof ValidatorMarketplaceFacilitatorApi | typeof ValidatorMarketplaceSellersApi | typeof ValidatorMarketplaceWebhooksApi | typeof ValidatorsApi | typeof AccountApi)[];
|
package/dist/api/apis.js
CHANGED
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.APIS = exports.HttpError = void 0;
|
|
18
18
|
__exportStar(require("./accountApi"), exports);
|
|
19
19
|
const accountApi_1 = require("./accountApi");
|
|
20
|
+
__exportStar(require("./accountApiKeysApi"), exports);
|
|
21
|
+
const accountApiKeysApi_1 = require("./accountApiKeysApi");
|
|
20
22
|
__exportStar(require("./depositAddressesApi"), exports);
|
|
21
23
|
const depositAddressesApi_1 = require("./depositAddressesApi");
|
|
22
24
|
__exportStar(require("./linkedWalletsApi"), exports);
|
|
@@ -61,4 +63,4 @@ class HttpError extends Error {
|
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
exports.HttpError = HttpError;
|
|
64
|
-
exports.APIS = [accountApi_1.AccountApi, depositAddressesApi_1.DepositAddressesApi, linkedWalletsApi_1.LinkedWalletsApi, managedUsersApi_1.ManagedUsersApi, managedUsersDepositAddressesApi_1.ManagedUsersDepositAddressesApi, managedUsersLinkedWalletsApi_1.ManagedUsersLinkedWalletsApi, managedUsersOrdersApi_1.ManagedUsersOrdersApi, managedUsersPortfolioApi_1.ManagedUsersPortfolioApi, managedUsersTransactionsApi_1.ManagedUsersTransactionsApi, managedUsersValidatorsApi_1.ManagedUsersValidatorsApi, ordersApi_1.OrdersApi, portfolioApi_1.PortfolioApi, transactionsApi_1.TransactionsApi, validatorMarketplaceBuyersApi_1.ValidatorMarketplaceBuyersApi, validatorMarketplaceFacilitatorApi_1.ValidatorMarketplaceFacilitatorApi, validatorMarketplaceSellersApi_1.ValidatorMarketplaceSellersApi, validatorMarketplaceWebhooksApi_1.ValidatorMarketplaceWebhooksApi, validatorsApi_1.ValidatorsApi];
|
|
66
|
+
exports.APIS = [accountApi_1.AccountApi, accountApiKeysApi_1.AccountApiKeysApi, depositAddressesApi_1.DepositAddressesApi, linkedWalletsApi_1.LinkedWalletsApi, managedUsersApi_1.ManagedUsersApi, managedUsersDepositAddressesApi_1.ManagedUsersDepositAddressesApi, managedUsersLinkedWalletsApi_1.ManagedUsersLinkedWalletsApi, managedUsersOrdersApi_1.ManagedUsersOrdersApi, managedUsersPortfolioApi_1.ManagedUsersPortfolioApi, managedUsersTransactionsApi_1.ManagedUsersTransactionsApi, managedUsersValidatorsApi_1.ManagedUsersValidatorsApi, ordersApi_1.OrdersApi, portfolioApi_1.PortfolioApi, transactionsApi_1.TransactionsApi, validatorMarketplaceBuyersApi_1.ValidatorMarketplaceBuyersApi, validatorMarketplaceFacilitatorApi_1.ValidatorMarketplaceFacilitatorApi, validatorMarketplaceSellersApi_1.ValidatorMarketplaceSellersApi, validatorMarketplaceWebhooksApi_1.ValidatorMarketplaceWebhooksApi, validatorsApi_1.ValidatorsApi];
|
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AccountApi } from './api/accountApi';
|
|
2
|
+
import { AccountApiKeysApi } from './api/accountApiKeysApi';
|
|
2
3
|
import { DepositAddressesApi } from './api/depositAddressesApi';
|
|
3
4
|
import { LinkedWalletsApi } from './api/linkedWalletsApi';
|
|
4
5
|
import { ManagedUsersApi } from './api/managedUsersApi';
|
|
@@ -21,6 +22,7 @@ export * from './model/./accountEntity';
|
|
|
21
22
|
export * from './model/./addLinkedWalletForUserRequest';
|
|
22
23
|
export * from './model/./addLinkedWalletRequest';
|
|
23
24
|
export * from './model/./allManagedUsersResponse';
|
|
25
|
+
export * from './model/./apiKey';
|
|
24
26
|
export * from './model/./asset';
|
|
25
27
|
export * from './model/./createManagedUserRequest';
|
|
26
28
|
export * from './model/./createRFQRequest';
|
|
@@ -40,6 +42,7 @@ export * from './model/./ethereumValidatorKeyKeystoreCryptoKdfParams';
|
|
|
40
42
|
export * from './model/./exitEstimateBase';
|
|
41
43
|
export * from './model/./exitEstimateSeller';
|
|
42
44
|
export * from './model/./exitProposal';
|
|
45
|
+
export * from './model/./generateApiKeyRequest';
|
|
43
46
|
export * from './model/./getMarketplaceMetadata200Response';
|
|
44
47
|
export * from './model/./getTransactionsResponse';
|
|
45
48
|
export * from './model/./getWithdrawalsResponse';
|
|
@@ -118,6 +121,7 @@ export * from './model/./withdrawalStepType';
|
|
|
118
121
|
export declare class NorthstakeApi {
|
|
119
122
|
constructor(apiKey: string, privateKey: string, basePath?: string);
|
|
120
123
|
account: AccountApi;
|
|
124
|
+
accountApiKeys: AccountApiKeysApi;
|
|
121
125
|
depositAddresses: DepositAddressesApi;
|
|
122
126
|
linkedWallets: LinkedWalletsApi;
|
|
123
127
|
managedUsers: ManagedUsersApi;
|
package/dist/api.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.NorthstakeApi = void 0;
|
|
|
18
18
|
// masterApi.mustache
|
|
19
19
|
const models_1 = require("./model/models");
|
|
20
20
|
const accountApi_1 = require("./api/accountApi");
|
|
21
|
+
const accountApiKeysApi_1 = require("./api/accountApiKeysApi");
|
|
21
22
|
const depositAddressesApi_1 = require("./api/depositAddressesApi");
|
|
22
23
|
const linkedWalletsApi_1 = require("./api/linkedWalletsApi");
|
|
23
24
|
const managedUsersApi_1 = require("./api/managedUsersApi");
|
|
@@ -40,6 +41,7 @@ __exportStar(require("./model/./accountEntity"), exports);
|
|
|
40
41
|
__exportStar(require("./model/./addLinkedWalletForUserRequest"), exports);
|
|
41
42
|
__exportStar(require("./model/./addLinkedWalletRequest"), exports);
|
|
42
43
|
__exportStar(require("./model/./allManagedUsersResponse"), exports);
|
|
44
|
+
__exportStar(require("./model/./apiKey"), exports);
|
|
43
45
|
__exportStar(require("./model/./asset"), exports);
|
|
44
46
|
__exportStar(require("./model/./createManagedUserRequest"), exports);
|
|
45
47
|
__exportStar(require("./model/./createRFQRequest"), exports);
|
|
@@ -59,6 +61,7 @@ __exportStar(require("./model/./ethereumValidatorKeyKeystoreCryptoKdfParams"), e
|
|
|
59
61
|
__exportStar(require("./model/./exitEstimateBase"), exports);
|
|
60
62
|
__exportStar(require("./model/./exitEstimateSeller"), exports);
|
|
61
63
|
__exportStar(require("./model/./exitProposal"), exports);
|
|
64
|
+
__exportStar(require("./model/./generateApiKeyRequest"), exports);
|
|
62
65
|
__exportStar(require("./model/./getMarketplaceMetadata200Response"), exports);
|
|
63
66
|
__exportStar(require("./model/./getTransactionsResponse"), exports);
|
|
64
67
|
__exportStar(require("./model/./getWithdrawalsResponse"), exports);
|
|
@@ -139,6 +142,8 @@ class NorthstakeApi {
|
|
|
139
142
|
const jwtAuth = new models_1.JWTAuth(apiKey, privateKey);
|
|
140
143
|
this.account = new accountApi_1.AccountApi(basePath);
|
|
141
144
|
this.account.setDefaultAuthentication(jwtAuth);
|
|
145
|
+
this.accountApiKeys = new accountApiKeysApi_1.AccountApiKeysApi(basePath);
|
|
146
|
+
this.accountApiKeys.setDefaultAuthentication(jwtAuth);
|
|
142
147
|
this.depositAddresses = new depositAddressesApi_1.DepositAddressesApi(basePath);
|
|
143
148
|
this.depositAddresses.setDefaultAuthentication(jwtAuth);
|
|
144
149
|
this.linkedWallets = new linkedWalletsApi_1.LinkedWalletsApi(basePath);
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
export declare class ApiKey {
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier for the API key
|
|
15
|
+
*/
|
|
16
|
+
'id': string;
|
|
17
|
+
/**
|
|
18
|
+
* Descriptive name for the API key
|
|
19
|
+
*/
|
|
20
|
+
'key_name': string;
|
|
21
|
+
/**
|
|
22
|
+
* The API key value
|
|
23
|
+
*/
|
|
24
|
+
'key': string;
|
|
25
|
+
/**
|
|
26
|
+
* The public key associated with the API key
|
|
27
|
+
*/
|
|
28
|
+
'pub_key': string;
|
|
29
|
+
/**
|
|
30
|
+
* List of IP addresses or CIDR ranges allowed to use this API key
|
|
31
|
+
*/
|
|
32
|
+
'ip_whitelist'?: Array<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Roles associated with the API key
|
|
35
|
+
*/
|
|
36
|
+
'roles'?: ApiKey;
|
|
37
|
+
static discriminator: string | undefined;
|
|
38
|
+
static attributeTypeMap: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
baseName: string;
|
|
41
|
+
type: string;
|
|
42
|
+
}>;
|
|
43
|
+
static getAttributeTypeMap(): {
|
|
44
|
+
name: string;
|
|
45
|
+
baseName: string;
|
|
46
|
+
type: string;
|
|
47
|
+
}[];
|
|
48
|
+
}
|
|
49
|
+
export declare namespace ApiKey {
|
|
50
|
+
/**
|
|
51
|
+
* Roles associated with the API key
|
|
52
|
+
*/
|
|
53
|
+
type rolesEnum = 'admin' | 'user' | 'reader';
|
|
54
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Northstake
|
|
4
|
+
* Northstake api
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ApiKey = void 0;
|
|
15
|
+
class ApiKey {
|
|
16
|
+
static getAttributeTypeMap() {
|
|
17
|
+
return ApiKey.attributeTypeMap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ApiKey = ApiKey;
|
|
21
|
+
ApiKey.discriminator = undefined;
|
|
22
|
+
ApiKey.attributeTypeMap = [
|
|
23
|
+
{
|
|
24
|
+
"name": "id",
|
|
25
|
+
"baseName": "id",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "key_name",
|
|
30
|
+
"baseName": "key_name",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "key",
|
|
35
|
+
"baseName": "key",
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "pub_key",
|
|
40
|
+
"baseName": "pub_key",
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "ip_whitelist",
|
|
45
|
+
"baseName": "ip_whitelist",
|
|
46
|
+
"type": "Array<string>"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "roles",
|
|
50
|
+
"baseName": "roles",
|
|
51
|
+
"type": "Array<ApiKey.RolesEnum>"
|
|
52
|
+
}
|
|
53
|
+
];
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
export declare class GenerateApiKeyRequest {
|
|
13
|
+
/**
|
|
14
|
+
* A descriptive name for the API key.
|
|
15
|
+
*/
|
|
16
|
+
'keyName': string;
|
|
17
|
+
/**
|
|
18
|
+
* The public part of an RSA private keypair in PEM format.
|
|
19
|
+
*/
|
|
20
|
+
'publicKey': string;
|
|
21
|
+
'whitelistedIPs'?: Array<string>;
|
|
22
|
+
/**
|
|
23
|
+
* The rights associated with the API key.
|
|
24
|
+
*/
|
|
25
|
+
'keyRights'?: GenerateApiKeyRequest;
|
|
26
|
+
static discriminator: string | undefined;
|
|
27
|
+
static attributeTypeMap: Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
baseName: string;
|
|
30
|
+
type: string;
|
|
31
|
+
}>;
|
|
32
|
+
static getAttributeTypeMap(): {
|
|
33
|
+
name: string;
|
|
34
|
+
baseName: string;
|
|
35
|
+
type: string;
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export declare namespace GenerateApiKeyRequest {
|
|
39
|
+
/**
|
|
40
|
+
* The rights associated with the API key.
|
|
41
|
+
*/
|
|
42
|
+
type keyRightsEnum = 'user' | 'reader';
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Northstake
|
|
4
|
+
* Northstake api
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.GenerateApiKeyRequest = void 0;
|
|
15
|
+
class GenerateApiKeyRequest {
|
|
16
|
+
static getAttributeTypeMap() {
|
|
17
|
+
return GenerateApiKeyRequest.attributeTypeMap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.GenerateApiKeyRequest = GenerateApiKeyRequest;
|
|
21
|
+
GenerateApiKeyRequest.discriminator = undefined;
|
|
22
|
+
GenerateApiKeyRequest.attributeTypeMap = [
|
|
23
|
+
{
|
|
24
|
+
"name": "keyName",
|
|
25
|
+
"baseName": "keyName",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "publicKey",
|
|
30
|
+
"baseName": "publicKey",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "whitelistedIPs",
|
|
35
|
+
"baseName": "whitelistedIPs",
|
|
36
|
+
"type": "Array<string>"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "keyRights",
|
|
40
|
+
"baseName": "keyRights",
|
|
41
|
+
"type": "Array<GenerateApiKeyRequest.KeyRightsEnum>"
|
|
42
|
+
}
|
|
43
|
+
];
|
package/dist/model/models.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './accountEntity';
|
|
|
4
4
|
export * from './addLinkedWalletForUserRequest';
|
|
5
5
|
export * from './addLinkedWalletRequest';
|
|
6
6
|
export * from './allManagedUsersResponse';
|
|
7
|
+
export * from './apiKey';
|
|
7
8
|
export * from './asset';
|
|
8
9
|
export * from './createManagedUserRequest';
|
|
9
10
|
export * from './createRFQRequest';
|
|
@@ -23,6 +24,7 @@ export * from './ethereumValidatorKeyKeystoreCryptoKdfParams';
|
|
|
23
24
|
export * from './exitEstimateBase';
|
|
24
25
|
export * from './exitEstimateSeller';
|
|
25
26
|
export * from './exitProposal';
|
|
27
|
+
export * from './generateApiKeyRequest';
|
|
26
28
|
export * from './getMarketplaceMetadata200Response';
|
|
27
29
|
export * from './getTransactionsResponse';
|
|
28
30
|
export * from './getWithdrawalsResponse';
|
package/dist/model/models.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./accountEntity"), exports);
|
|
|
33
33
|
__exportStar(require("./addLinkedWalletForUserRequest"), exports);
|
|
34
34
|
__exportStar(require("./addLinkedWalletRequest"), exports);
|
|
35
35
|
__exportStar(require("./allManagedUsersResponse"), exports);
|
|
36
|
+
__exportStar(require("./apiKey"), exports);
|
|
36
37
|
__exportStar(require("./asset"), exports);
|
|
37
38
|
__exportStar(require("./createManagedUserRequest"), exports);
|
|
38
39
|
__exportStar(require("./createRFQRequest"), exports);
|
|
@@ -52,6 +53,7 @@ __exportStar(require("./ethereumValidatorKeyKeystoreCryptoKdfParams"), exports);
|
|
|
52
53
|
__exportStar(require("./exitEstimateBase"), exports);
|
|
53
54
|
__exportStar(require("./exitEstimateSeller"), exports);
|
|
54
55
|
__exportStar(require("./exitProposal"), exports);
|
|
56
|
+
__exportStar(require("./generateApiKeyRequest"), exports);
|
|
55
57
|
__exportStar(require("./getMarketplaceMetadata200Response"), exports);
|
|
56
58
|
__exportStar(require("./getTransactionsResponse"), exports);
|
|
57
59
|
__exportStar(require("./getWithdrawalsResponse"), exports);
|
|
@@ -132,6 +134,7 @@ const accountEntity_1 = require("./accountEntity");
|
|
|
132
134
|
const addLinkedWalletForUserRequest_1 = require("./addLinkedWalletForUserRequest");
|
|
133
135
|
const addLinkedWalletRequest_1 = require("./addLinkedWalletRequest");
|
|
134
136
|
const allManagedUsersResponse_1 = require("./allManagedUsersResponse");
|
|
137
|
+
const apiKey_1 = require("./apiKey");
|
|
135
138
|
const createManagedUserRequest_1 = require("./createManagedUserRequest");
|
|
136
139
|
const createRFQRequest_1 = require("./createRFQRequest");
|
|
137
140
|
const depositAddress_1 = require("./depositAddress");
|
|
@@ -150,6 +153,7 @@ const ethereumValidatorKeyKeystoreCryptoKdfParams_1 = require("./ethereumValidat
|
|
|
150
153
|
const exitEstimateBase_1 = require("./exitEstimateBase");
|
|
151
154
|
const exitEstimateSeller_1 = require("./exitEstimateSeller");
|
|
152
155
|
const exitProposal_1 = require("./exitProposal");
|
|
156
|
+
const generateApiKeyRequest_1 = require("./generateApiKeyRequest");
|
|
153
157
|
const getMarketplaceMetadata200Response_1 = require("./getMarketplaceMetadata200Response");
|
|
154
158
|
const getTransactionsResponse_1 = require("./getTransactionsResponse");
|
|
155
159
|
const getWithdrawalsResponse_1 = require("./getWithdrawalsResponse");
|
|
@@ -225,6 +229,8 @@ let primitives = [
|
|
|
225
229
|
"any"
|
|
226
230
|
];
|
|
227
231
|
let enumsMap = {
|
|
232
|
+
"ApiKey.roles": apiKey_1.ApiKey,
|
|
233
|
+
"GenerateApiKeyRequest.keyRights": generateApiKeyRequest_1.GenerateApiKeyRequest,
|
|
228
234
|
"OrderDocument.type": orderDocument_1.OrderDocument,
|
|
229
235
|
"OrderDocument.status": orderDocument_1.OrderDocument,
|
|
230
236
|
"RFQDocumentFacilitator.status": rFQDocumentFacilitator_1.RFQDocumentFacilitator,
|
|
@@ -238,6 +244,7 @@ let typeMap = {
|
|
|
238
244
|
"AddLinkedWalletForUserRequest": addLinkedWalletForUserRequest_1.AddLinkedWalletForUserRequest,
|
|
239
245
|
"AddLinkedWalletRequest": addLinkedWalletRequest_1.AddLinkedWalletRequest,
|
|
240
246
|
"AllManagedUsersResponse": allManagedUsersResponse_1.AllManagedUsersResponse,
|
|
247
|
+
"ApiKey": apiKey_1.ApiKey,
|
|
241
248
|
"CreateManagedUserRequest": createManagedUserRequest_1.CreateManagedUserRequest,
|
|
242
249
|
"CreateRFQRequest": createRFQRequest_1.CreateRFQRequest,
|
|
243
250
|
"DepositAddress": depositAddress_1.DepositAddress,
|
|
@@ -256,6 +263,7 @@ let typeMap = {
|
|
|
256
263
|
"ExitEstimateBase": exitEstimateBase_1.ExitEstimateBase,
|
|
257
264
|
"ExitEstimateSeller": exitEstimateSeller_1.ExitEstimateSeller,
|
|
258
265
|
"ExitProposal": exitProposal_1.ExitProposal,
|
|
266
|
+
"GenerateApiKeyRequest": generateApiKeyRequest_1.GenerateApiKeyRequest,
|
|
259
267
|
"GetMarketplaceMetadata200Response": getMarketplaceMetadata200Response_1.GetMarketplaceMetadata200Response,
|
|
260
268
|
"GetTransactionsResponse": getTransactionsResponse_1.GetTransactionsResponse,
|
|
261
269
|
"GetWithdrawalsResponse": getWithdrawalsResponse_1.GetWithdrawalsResponse,
|