@northstake/northstakeapi 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/api/apis.ts +3 -1
  4. package/api/smartContractsApi.ts +513 -0
  5. package/api.ts +10 -0
  6. package/dist/api/apis.d.ts +3 -1
  7. package/dist/api/apis.js +3 -1
  8. package/dist/api/smartContractsApi.d.ts +125 -0
  9. package/dist/api/smartContractsApi.js +389 -0
  10. package/dist/api.d.ts +8 -0
  11. package/dist/api.js +9 -0
  12. package/dist/model/getSmartContractInternalTransactions200Response.d.ts +38 -0
  13. package/dist/model/getSmartContractInternalTransactions200Response.js +43 -0
  14. package/dist/model/getSmartContractMinedBlocks200Response.d.ts +38 -0
  15. package/dist/model/getSmartContractMinedBlocks200Response.js +43 -0
  16. package/dist/model/getSmartContractTransactions200Response.d.ts +38 -0
  17. package/dist/model/getSmartContractTransactions200Response.js +43 -0
  18. package/dist/model/internalTransaction.d.ts +34 -0
  19. package/dist/model/internalTransaction.js +58 -0
  20. package/dist/model/minedBlock.d.ts +31 -0
  21. package/dist/model/minedBlock.js +43 -0
  22. package/dist/model/models.d.ts +6 -0
  23. package/dist/model/models.js +18 -0
  24. package/dist/model/transaction.d.ts +72 -0
  25. package/dist/model/transaction.js +113 -0
  26. package/model/getSmartContractInternalTransactions200Response.ts +59 -0
  27. package/model/getSmartContractMinedBlocks200Response.ts +59 -0
  28. package/model/getSmartContractTransactions200Response.ts +59 -0
  29. package/model/internalTransaction.ts +70 -0
  30. package/model/minedBlock.ts +52 -0
  31. package/model/models.ts +30 -0
  32. package/model/transaction.ts +163 -0
  33. package/package.json +1 -1
@@ -0,0 +1,125 @@
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 { GetSmartContractInternalTransactions200Response } from '../model/getSmartContractInternalTransactions200Response';
13
+ import { GetSmartContractMinedBlocks200Response } from '../model/getSmartContractMinedBlocks200Response';
14
+ import { GetSmartContractTransactions200Response } from '../model/getSmartContractTransactions200Response';
15
+ import { SmartContract } from '../model/smartContract';
16
+ import { Authentication, Interceptor } from '../model/models';
17
+ import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
18
+ export declare enum SmartContractsApiApiKeys {
19
+ ApiKeyAuth = 0
20
+ }
21
+ export interface SmartContractsApiParams {
22
+ contractAddress: string;
23
+ startDate?: string;
24
+ endDate?: string;
25
+ page?: number;
26
+ limit?: number;
27
+ }
28
+ export interface SmartContractsApiParams {
29
+ contractAddress: string;
30
+ page?: number;
31
+ limit?: number;
32
+ startDate?: string;
33
+ endDate?: string;
34
+ }
35
+ export interface SmartContractsApiParams {
36
+ contractAddress: string;
37
+ startDate?: string;
38
+ endDate?: string;
39
+ page?: number;
40
+ limit?: number;
41
+ }
42
+ export declare class SmartContractsApi {
43
+ protected _basePath: string;
44
+ protected _defaultHeaders: any;
45
+ protected _useQuerystring: boolean;
46
+ protected authentications: {
47
+ default: Authentication;
48
+ bearerTokenAuth: HttpBearerAuth;
49
+ ApiKeyAuth: ApiKeyAuth;
50
+ };
51
+ protected interceptors: Interceptor[];
52
+ constructor(basePath?: string);
53
+ set useQuerystring(value: boolean);
54
+ set basePath(basePath: string);
55
+ set defaultHeaders(defaultHeaders: any);
56
+ get defaultHeaders(): any;
57
+ get basePath(): string;
58
+ setDefaultAuthentication(auth: Authentication): void;
59
+ setApiKey(key: SmartContractsApiApiKeys, value: string): void;
60
+ set accessToken(accessToken: string | (() => string));
61
+ addInterceptor(interceptor: Interceptor): void;
62
+ /**
63
+ *
64
+ * @summary Get internal transactions related to a specific smart contract
65
+ * @param contractAddress The address of the smart contract
66
+ * @param startDate Start date for filtering internal transactions
67
+ * @param endDate End date for filtering internal transactions
68
+ * @param page Page number for pagination
69
+ * @param limit Number of internal transactions per page
70
+ */
71
+ getSmartContractInternalTransactions(params?: SmartContractsApiParams, options?: {
72
+ headers: {
73
+ [name: string]: string;
74
+ };
75
+ }): Promise<{
76
+ body: GetSmartContractInternalTransactions200Response;
77
+ status: number;
78
+ }>;
79
+ /**
80
+ *
81
+ * @summary Get mined blocks related to a specific smart contract
82
+ * @param contractAddress The address of the smart contract
83
+ * @param page Page number for pagination
84
+ * @param limit Number of mined blocks per page
85
+ * @param startDate Start date for filtering mined blocks
86
+ * @param endDate End date for filtering mined blocks
87
+ */
88
+ getSmartContractMinedBlocks(params?: SmartContractsApiParams, options?: {
89
+ headers: {
90
+ [name: string]: string;
91
+ };
92
+ }): Promise<{
93
+ body: GetSmartContractMinedBlocks200Response;
94
+ status: number;
95
+ }>;
96
+ /**
97
+ *
98
+ * @summary Get transactions related to a specific smart contract
99
+ * @param contractAddress The address of the smart contract
100
+ * @param startDate Start date for filtering transactions
101
+ * @param endDate End date for filtering transactions
102
+ * @param page Page number for pagination
103
+ * @param limit Number of transactions per page
104
+ */
105
+ getSmartContractTransactions(params?: SmartContractsApiParams, options?: {
106
+ headers: {
107
+ [name: string]: string;
108
+ };
109
+ }): Promise<{
110
+ body: GetSmartContractTransactions200Response;
111
+ status: number;
112
+ }>;
113
+ /**
114
+ *
115
+ * @summary Get list of all deployed smart contracts
116
+ */
117
+ getSmartContracts(options?: {
118
+ headers: {
119
+ [name: string]: string;
120
+ };
121
+ }): Promise<{
122
+ body: Array<SmartContract>;
123
+ status: number;
124
+ }>;
125
+ }
@@ -0,0 +1,389 @@
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.SmartContractsApi = exports.SmartContractsApiApiKeys = 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 SmartContractsApiApiKeys;
26
+ (function (SmartContractsApiApiKeys) {
27
+ SmartContractsApiApiKeys[SmartContractsApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
28
+ })(SmartContractsApiApiKeys || (exports.SmartContractsApiApiKeys = SmartContractsApiApiKeys = {}));
29
+ class SmartContractsApi {
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[SmartContractsApiApiKeys[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 Get internal transactions related to a specific smart contract
81
+ * @param contractAddress The address of the smart contract
82
+ * @param startDate Start date for filtering internal transactions
83
+ * @param endDate End date for filtering internal transactions
84
+ * @param page Page number for pagination
85
+ * @param limit Number of internal transactions per page
86
+ */
87
+ async getSmartContractInternalTransactions(params, options = { headers: {} }) {
88
+ const localVarPath = this.basePath + '/smartContracts/{contractAddress}/internalTransactions'
89
+ .replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params === null || params === void 0 ? void 0 : params.contractAddress)));
90
+ let localVarQueryParameters = {};
91
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
92
+ const produces = ['application/json'];
93
+ if (produces.indexOf('application/json') >= 0) {
94
+ localVarHeaderParams.Accept = 'application/json';
95
+ }
96
+ else {
97
+ localVarHeaderParams.Accept = produces.join(',');
98
+ }
99
+ let localVarFormParams = {};
100
+ // Verify required parameter 'contractAddress' is not null or undefined
101
+ if ((params === null || params === void 0 ? void 0 : params.contractAddress) === null || (params === null || params === void 0 ? void 0 : params.contractAddress) === undefined) {
102
+ throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractInternalTransactions.');
103
+ }
104
+ if ((params === null || params === void 0 ? void 0 : params.startDate) !== undefined) {
105
+ localVarQueryParameters['start_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.startDate, "string");
106
+ }
107
+ if ((params === null || params === void 0 ? void 0 : params.endDate) !== undefined) {
108
+ localVarQueryParameters['end_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.endDate, "string");
109
+ }
110
+ if ((params === null || params === void 0 ? void 0 : params.page) !== undefined) {
111
+ localVarQueryParameters['page'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.page, "number");
112
+ }
113
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
114
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.limit, "number");
115
+ }
116
+ Object.assign(localVarHeaderParams, options.headers);
117
+ let localVarUseFormData = false;
118
+ let localVarRequestOptions = {
119
+ method: 'GET',
120
+ qs: localVarQueryParameters,
121
+ headers: localVarHeaderParams,
122
+ uri: localVarPath,
123
+ useQuerystring: this._useQuerystring,
124
+ json: true,
125
+ };
126
+ let authenticationPromise = Promise.resolve();
127
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
128
+ let interceptorPromise = authenticationPromise;
129
+ for (const interceptor of this.interceptors) {
130
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
131
+ }
132
+ return interceptorPromise.then(() => {
133
+ if (Object.keys(localVarFormParams).length) {
134
+ if (localVarUseFormData) {
135
+ localVarRequestOptions.formData = localVarFormParams;
136
+ }
137
+ else {
138
+ localVarRequestOptions.form = localVarFormParams;
139
+ }
140
+ }
141
+ return new Promise((resolve, reject) => {
142
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
143
+ if (error) {
144
+ console.error('API call error:', error);
145
+ reject(error);
146
+ }
147
+ else {
148
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
149
+ body = models_1.ObjectSerializer.deserialize(body, "GetSmartContractInternalTransactions200Response");
150
+ resolve({ body: body, status: response.statusCode });
151
+ }
152
+ else {
153
+ console.error('API response error:', response.statusCode);
154
+ resolve({ body: body, status: response.statusCode });
155
+ }
156
+ }
157
+ });
158
+ });
159
+ });
160
+ }
161
+ /**
162
+ *
163
+ * @summary Get mined blocks related to a specific smart contract
164
+ * @param contractAddress The address of the smart contract
165
+ * @param page Page number for pagination
166
+ * @param limit Number of mined blocks per page
167
+ * @param startDate Start date for filtering mined blocks
168
+ * @param endDate End date for filtering mined blocks
169
+ */
170
+ async getSmartContractMinedBlocks(params, options = { headers: {} }) {
171
+ const localVarPath = this.basePath + '/smartContracts/{contractAddress}/minedBlocks'
172
+ .replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params === null || params === void 0 ? void 0 : params.contractAddress)));
173
+ let localVarQueryParameters = {};
174
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
175
+ const produces = ['application/json'];
176
+ if (produces.indexOf('application/json') >= 0) {
177
+ localVarHeaderParams.Accept = 'application/json';
178
+ }
179
+ else {
180
+ localVarHeaderParams.Accept = produces.join(',');
181
+ }
182
+ let localVarFormParams = {};
183
+ // Verify required parameter 'contractAddress' is not null or undefined
184
+ if ((params === null || params === void 0 ? void 0 : params.contractAddress) === null || (params === null || params === void 0 ? void 0 : params.contractAddress) === undefined) {
185
+ throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractMinedBlocks.');
186
+ }
187
+ if ((params === null || params === void 0 ? void 0 : params.page) !== undefined) {
188
+ localVarQueryParameters['page'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.page, "number");
189
+ }
190
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
191
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.limit, "number");
192
+ }
193
+ if ((params === null || params === void 0 ? void 0 : params.startDate) !== undefined) {
194
+ localVarQueryParameters['start_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.startDate, "string");
195
+ }
196
+ if ((params === null || params === void 0 ? void 0 : params.endDate) !== undefined) {
197
+ localVarQueryParameters['end_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.endDate, "string");
198
+ }
199
+ Object.assign(localVarHeaderParams, options.headers);
200
+ let localVarUseFormData = false;
201
+ let localVarRequestOptions = {
202
+ method: 'GET',
203
+ qs: localVarQueryParameters,
204
+ headers: localVarHeaderParams,
205
+ uri: localVarPath,
206
+ useQuerystring: this._useQuerystring,
207
+ json: true,
208
+ };
209
+ let authenticationPromise = Promise.resolve();
210
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
211
+ let interceptorPromise = authenticationPromise;
212
+ for (const interceptor of this.interceptors) {
213
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
214
+ }
215
+ return interceptorPromise.then(() => {
216
+ if (Object.keys(localVarFormParams).length) {
217
+ if (localVarUseFormData) {
218
+ localVarRequestOptions.formData = localVarFormParams;
219
+ }
220
+ else {
221
+ localVarRequestOptions.form = localVarFormParams;
222
+ }
223
+ }
224
+ return new Promise((resolve, reject) => {
225
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
226
+ if (error) {
227
+ console.error('API call error:', error);
228
+ reject(error);
229
+ }
230
+ else {
231
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
232
+ body = models_1.ObjectSerializer.deserialize(body, "GetSmartContractMinedBlocks200Response");
233
+ resolve({ body: body, status: response.statusCode });
234
+ }
235
+ else {
236
+ console.error('API response error:', response.statusCode);
237
+ resolve({ body: body, status: response.statusCode });
238
+ }
239
+ }
240
+ });
241
+ });
242
+ });
243
+ }
244
+ /**
245
+ *
246
+ * @summary Get transactions related to a specific smart contract
247
+ * @param contractAddress The address of the smart contract
248
+ * @param startDate Start date for filtering transactions
249
+ * @param endDate End date for filtering transactions
250
+ * @param page Page number for pagination
251
+ * @param limit Number of transactions per page
252
+ */
253
+ async getSmartContractTransactions(params, options = { headers: {} }) {
254
+ const localVarPath = this.basePath + '/smartContracts/{contractAddress}/transactions'
255
+ .replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params === null || params === void 0 ? void 0 : params.contractAddress)));
256
+ let localVarQueryParameters = {};
257
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
258
+ const produces = ['application/json'];
259
+ if (produces.indexOf('application/json') >= 0) {
260
+ localVarHeaderParams.Accept = 'application/json';
261
+ }
262
+ else {
263
+ localVarHeaderParams.Accept = produces.join(',');
264
+ }
265
+ let localVarFormParams = {};
266
+ // Verify required parameter 'contractAddress' is not null or undefined
267
+ if ((params === null || params === void 0 ? void 0 : params.contractAddress) === null || (params === null || params === void 0 ? void 0 : params.contractAddress) === undefined) {
268
+ throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractTransactions.');
269
+ }
270
+ if ((params === null || params === void 0 ? void 0 : params.startDate) !== undefined) {
271
+ localVarQueryParameters['start_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.startDate, "string");
272
+ }
273
+ if ((params === null || params === void 0 ? void 0 : params.endDate) !== undefined) {
274
+ localVarQueryParameters['end_date'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.endDate, "string");
275
+ }
276
+ if ((params === null || params === void 0 ? void 0 : params.page) !== undefined) {
277
+ localVarQueryParameters['page'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.page, "number");
278
+ }
279
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
280
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(params === null || params === void 0 ? void 0 : params.limit, "number");
281
+ }
282
+ Object.assign(localVarHeaderParams, options.headers);
283
+ let localVarUseFormData = false;
284
+ let localVarRequestOptions = {
285
+ method: 'GET',
286
+ qs: localVarQueryParameters,
287
+ headers: localVarHeaderParams,
288
+ uri: localVarPath,
289
+ useQuerystring: this._useQuerystring,
290
+ json: true,
291
+ };
292
+ let authenticationPromise = Promise.resolve();
293
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
294
+ let interceptorPromise = authenticationPromise;
295
+ for (const interceptor of this.interceptors) {
296
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
297
+ }
298
+ return interceptorPromise.then(() => {
299
+ if (Object.keys(localVarFormParams).length) {
300
+ if (localVarUseFormData) {
301
+ localVarRequestOptions.formData = localVarFormParams;
302
+ }
303
+ else {
304
+ localVarRequestOptions.form = localVarFormParams;
305
+ }
306
+ }
307
+ return new Promise((resolve, reject) => {
308
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
309
+ if (error) {
310
+ console.error('API call error:', error);
311
+ reject(error);
312
+ }
313
+ else {
314
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
315
+ body = models_1.ObjectSerializer.deserialize(body, "GetSmartContractTransactions200Response");
316
+ resolve({ body: body, status: response.statusCode });
317
+ }
318
+ else {
319
+ console.error('API response error:', response.statusCode);
320
+ resolve({ body: body, status: response.statusCode });
321
+ }
322
+ }
323
+ });
324
+ });
325
+ });
326
+ }
327
+ /**
328
+ *
329
+ * @summary Get list of all deployed smart contracts
330
+ */
331
+ async getSmartContracts(options = { headers: {} }) {
332
+ const localVarPath = this.basePath + '/smartContracts';
333
+ let localVarQueryParameters = {};
334
+ let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
335
+ const produces = ['application/json'];
336
+ if (produces.indexOf('application/json') >= 0) {
337
+ localVarHeaderParams.Accept = 'application/json';
338
+ }
339
+ else {
340
+ localVarHeaderParams.Accept = produces.join(',');
341
+ }
342
+ let localVarFormParams = {};
343
+ Object.assign(localVarHeaderParams, options.headers);
344
+ let localVarUseFormData = false;
345
+ let localVarRequestOptions = {
346
+ method: 'GET',
347
+ qs: localVarQueryParameters,
348
+ headers: localVarHeaderParams,
349
+ uri: localVarPath,
350
+ useQuerystring: this._useQuerystring,
351
+ json: true,
352
+ };
353
+ let authenticationPromise = Promise.resolve();
354
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
355
+ let interceptorPromise = authenticationPromise;
356
+ for (const interceptor of this.interceptors) {
357
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
358
+ }
359
+ return interceptorPromise.then(() => {
360
+ if (Object.keys(localVarFormParams).length) {
361
+ if (localVarUseFormData) {
362
+ localVarRequestOptions.formData = localVarFormParams;
363
+ }
364
+ else {
365
+ localVarRequestOptions.form = localVarFormParams;
366
+ }
367
+ }
368
+ return new Promise((resolve, reject) => {
369
+ (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
370
+ if (error) {
371
+ console.error('API call error:', error);
372
+ reject(error);
373
+ }
374
+ else {
375
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
376
+ body = models_1.ObjectSerializer.deserialize(body, "Array<SmartContract>");
377
+ resolve({ body: body, status: response.statusCode });
378
+ }
379
+ else {
380
+ console.error('API response error:', response.statusCode);
381
+ resolve({ body: body, status: response.statusCode });
382
+ }
383
+ }
384
+ });
385
+ });
386
+ });
387
+ }
388
+ }
389
+ exports.SmartContractsApi = SmartContractsApi;
package/dist/api.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AccountApi } from './api/accountApi';
2
2
  import { AccountApiKeysApi } from './api/accountApiKeysApi';
3
3
  import { LinkedWalletsApi } from './api/linkedWalletsApi';
4
+ import { SmartContractsApi } from './api/smartContractsApi';
4
5
  import { ValidatorMarketplaceBuyersApi } from './api/validatorMarketplaceBuyersApi';
5
6
  import { ValidatorMarketplaceFacilitatorApi } from './api/validatorMarketplaceFacilitatorApi';
6
7
  import { ValidatorMarketplaceSellersApi } from './api/validatorMarketplaceSellersApi';
@@ -28,8 +29,13 @@ export * from './model/./exitEstimateSeller';
28
29
  export * from './model/./exitProposal';
29
30
  export * from './model/./generateApiKeyRequest';
30
31
  export * from './model/./getMarketplaceMetadata200Response';
32
+ export * from './model/./getSmartContractInternalTransactions200Response';
33
+ export * from './model/./getSmartContractMinedBlocks200Response';
34
+ export * from './model/./getSmartContractTransactions200Response';
31
35
  export * from './model/./getWithdrawalsResponse';
36
+ export * from './model/./internalTransaction';
32
37
  export * from './model/./listAllRFQsForFacilitator200Response';
38
+ export * from './model/./minedBlock';
33
39
  export * from './model/./provideEscrowHashForRFQDocumentRequest';
34
40
  export * from './model/./quote';
35
41
  export * from './model/./rFQBidFacilitator';
@@ -53,6 +59,7 @@ export * from './model/./registerWithdrawalRecipientSettlementRequest';
53
59
  export * from './model/./settlementSteps';
54
60
  export * from './model/./smartContract';
55
61
  export * from './model/./submittedQuote';
62
+ export * from './model/./transaction';
56
63
  export * from './model/./validatorInfo';
57
64
  export * from './model/./validatorKeyHolder';
58
65
  export * from './model/./validatorType';
@@ -86,6 +93,7 @@ export declare class NorthstakeApi {
86
93
  account: AccountApi;
87
94
  accountApiKeys: AccountApiKeysApi;
88
95
  linkedWallets: LinkedWalletsApi;
96
+ smartContracts: SmartContractsApi;
89
97
  validatorMarketplaceBuyers: ValidatorMarketplaceBuyersApi;
90
98
  validatorMarketplaceFacilitator: ValidatorMarketplaceFacilitatorApi;
91
99
  validatorMarketplaceSellers: ValidatorMarketplaceSellersApi;
package/dist/api.js CHANGED
@@ -20,6 +20,7 @@ const models_1 = require("./model/models");
20
20
  const accountApi_1 = require("./api/accountApi");
21
21
  const accountApiKeysApi_1 = require("./api/accountApiKeysApi");
22
22
  const linkedWalletsApi_1 = require("./api/linkedWalletsApi");
23
+ const smartContractsApi_1 = require("./api/smartContractsApi");
23
24
  const validatorMarketplaceBuyersApi_1 = require("./api/validatorMarketplaceBuyersApi");
24
25
  const validatorMarketplaceFacilitatorApi_1 = require("./api/validatorMarketplaceFacilitatorApi");
25
26
  const validatorMarketplaceSellersApi_1 = require("./api/validatorMarketplaceSellersApi");
@@ -47,8 +48,13 @@ __exportStar(require("./model/./exitEstimateSeller"), exports);
47
48
  __exportStar(require("./model/./exitProposal"), exports);
48
49
  __exportStar(require("./model/./generateApiKeyRequest"), exports);
49
50
  __exportStar(require("./model/./getMarketplaceMetadata200Response"), exports);
51
+ __exportStar(require("./model/./getSmartContractInternalTransactions200Response"), exports);
52
+ __exportStar(require("./model/./getSmartContractMinedBlocks200Response"), exports);
53
+ __exportStar(require("./model/./getSmartContractTransactions200Response"), exports);
50
54
  __exportStar(require("./model/./getWithdrawalsResponse"), exports);
55
+ __exportStar(require("./model/./internalTransaction"), exports);
51
56
  __exportStar(require("./model/./listAllRFQsForFacilitator200Response"), exports);
57
+ __exportStar(require("./model/./minedBlock"), exports);
52
58
  __exportStar(require("./model/./provideEscrowHashForRFQDocumentRequest"), exports);
53
59
  __exportStar(require("./model/./quote"), exports);
54
60
  __exportStar(require("./model/./rFQBidFacilitator"), exports);
@@ -72,6 +78,7 @@ __exportStar(require("./model/./registerWithdrawalRecipientSettlementRequest"),
72
78
  __exportStar(require("./model/./settlementSteps"), exports);
73
79
  __exportStar(require("./model/./smartContract"), exports);
74
80
  __exportStar(require("./model/./submittedQuote"), exports);
81
+ __exportStar(require("./model/./transaction"), exports);
75
82
  __exportStar(require("./model/./validatorInfo"), exports);
76
83
  __exportStar(require("./model/./validatorKeyHolder"), exports);
77
84
  __exportStar(require("./model/./validatorType"), exports);
@@ -109,6 +116,8 @@ class NorthstakeApi {
109
116
  this.accountApiKeys.setDefaultAuthentication(jwtAuth);
110
117
  this.linkedWallets = new linkedWalletsApi_1.LinkedWalletsApi(basePath);
111
118
  this.linkedWallets.setDefaultAuthentication(jwtAuth);
119
+ this.smartContracts = new smartContractsApi_1.SmartContractsApi(basePath);
120
+ this.smartContracts.setDefaultAuthentication(jwtAuth);
112
121
  this.validatorMarketplaceBuyers = new validatorMarketplaceBuyersApi_1.ValidatorMarketplaceBuyersApi(basePath);
113
122
  this.validatorMarketplaceBuyers.setDefaultAuthentication(jwtAuth);
114
123
  this.validatorMarketplaceFacilitator = new validatorMarketplaceFacilitatorApi_1.ValidatorMarketplaceFacilitatorApi(basePath);
@@ -0,0 +1,38 @@
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 { InternalTransaction } from './internalTransaction';
13
+ export declare class GetSmartContractInternalTransactions200Response {
14
+ 'transactions': Array<InternalTransaction>;
15
+ /**
16
+ * Total number of internal transactions
17
+ */
18
+ 'total': number;
19
+ /**
20
+ * Total number of pages
21
+ */
22
+ 'pages': number;
23
+ /**
24
+ * Current page number
25
+ */
26
+ 'currentPage': number;
27
+ static discriminator: string | undefined;
28
+ static attributeTypeMap: Array<{
29
+ name: string;
30
+ baseName: string;
31
+ type: string;
32
+ }>;
33
+ static getAttributeTypeMap(): {
34
+ name: string;
35
+ baseName: string;
36
+ type: string;
37
+ }[];
38
+ }
@@ -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.GetSmartContractInternalTransactions200Response = void 0;
15
+ class GetSmartContractInternalTransactions200Response {
16
+ static getAttributeTypeMap() {
17
+ return GetSmartContractInternalTransactions200Response.attributeTypeMap;
18
+ }
19
+ }
20
+ exports.GetSmartContractInternalTransactions200Response = GetSmartContractInternalTransactions200Response;
21
+ GetSmartContractInternalTransactions200Response.discriminator = undefined;
22
+ GetSmartContractInternalTransactions200Response.attributeTypeMap = [
23
+ {
24
+ "name": "transactions",
25
+ "baseName": "transactions",
26
+ "type": "Array<InternalTransaction>"
27
+ },
28
+ {
29
+ "name": "total",
30
+ "baseName": "total",
31
+ "type": "number"
32
+ },
33
+ {
34
+ "name": "pages",
35
+ "baseName": "pages",
36
+ "type": "number"
37
+ },
38
+ {
39
+ "name": "currentPage",
40
+ "baseName": "currentPage",
41
+ "type": "number"
42
+ }
43
+ ];