@northstake/northstakeapi 1.0.24 → 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.
- package/.openapi-generator/FILES +6 -36
- package/.openapi-generator/VERSION +1 -1
- package/api/apis.ts +3 -23
- package/api/{managedUsersApi.ts → smartContractsApi.ts} +118 -53
- package/api.ts +9 -69
- package/dist/api/apis.d.ts +3 -23
- package/dist/api/apis.js +3 -23
- package/dist/api/smartContractsApi.d.ts +125 -0
- package/dist/api/{managedUsersApi.js → smartContractsApi.js} +90 -49
- package/dist/api.d.ts +7 -47
- package/dist/api.js +8 -58
- package/dist/model/{getTransactionsResponse.d.ts → getSmartContractInternalTransactions200Response.d.ts} +7 -7
- package/dist/model/{transactionsforUser.js → getSmartContractInternalTransactions200Response.js} +11 -11
- package/dist/model/{allManagedUsersResponse.d.ts → getSmartContractMinedBlocks200Response.d.ts} +4 -4
- package/dist/model/{allManagedUsersResponse.js → getSmartContractMinedBlocks200Response.js} +9 -9
- package/dist/model/{transactionsforUser.d.ts → getSmartContractTransactions200Response.d.ts} +5 -5
- package/dist/model/{getTransactionsResponse.js → getSmartContractTransactions200Response.js} +10 -10
- package/dist/model/{stakeStep.d.ts → internalTransaction.d.ts} +9 -7
- package/dist/model/internalTransaction.js +58 -0
- package/dist/model/{managedUser.d.ts → minedBlock.d.ts} +8 -6
- package/dist/model/minedBlock.js +43 -0
- package/dist/model/models.d.ts +5 -25
- package/dist/model/models.js +15 -67
- package/dist/model/transaction.d.ts +40 -17
- package/dist/model/transaction.js +74 -17
- package/dist/model/webhookPayloadData.d.ts +2 -10
- package/dist/model/webhookPayloadData.js +2 -12
- package/model/{transactionsforUser.ts → getSmartContractInternalTransactions200Response.ts} +13 -13
- package/model/{allManagedUsersResponse.ts → getSmartContractMinedBlocks200Response.ts} +8 -8
- package/model/{getTransactionsResponse.ts → getSmartContractTransactions200Response.ts} +10 -10
- package/model/internalTransaction.ts +70 -0
- package/model/{depositAddress.ts → minedBlock.ts} +19 -13
- package/model/models.ts +17 -114
- package/model/transaction.ts +114 -31
- package/model/webhookPayloadData.ts +4 -23
- package/package.json +1 -1
- package/api/depositAddressesApi.ts +0 -267
- package/api/managedUsersDepositAddressesApi.ts +0 -186
- package/api/managedUsersLinkedWalletsApi.ts +0 -369
- package/api/managedUsersOrdersApi.ts +0 -462
- package/api/managedUsersPortfolioApi.ts +0 -186
- package/api/managedUsersTransactionsApi.ts +0 -222
- package/api/managedUsersValidatorsApi.ts +0 -302
- package/api/ordersApi.ts +0 -432
- package/api/portfolioApi.ts +0 -180
- package/api/transactionsApi.ts +0 -215
- package/dist/api/depositAddressesApi.d.ts +0 -64
- package/dist/api/depositAddressesApi.js +0 -207
- package/dist/api/managedUsersApi.d.ts +0 -94
- package/dist/api/managedUsersDepositAddressesApi.d.ts +0 -51
- package/dist/api/managedUsersDepositAddressesApi.js +0 -146
- package/dist/api/managedUsersLinkedWalletsApi.d.ts +0 -80
- package/dist/api/managedUsersLinkedWalletsApi.js +0 -290
- package/dist/api/managedUsersOrdersApi.d.ts +0 -94
- package/dist/api/managedUsersOrdersApi.js +0 -364
- package/dist/api/managedUsersPortfolioApi.d.ts +0 -51
- package/dist/api/managedUsersPortfolioApi.js +0 -146
- package/dist/api/managedUsersTransactionsApi.d.ts +0 -68
- package/dist/api/managedUsersTransactionsApi.js +0 -170
- package/dist/api/managedUsersValidatorsApi.d.ts +0 -78
- package/dist/api/managedUsersValidatorsApi.js +0 -233
- package/dist/api/ordersApi.d.ts +0 -90
- package/dist/api/ordersApi.js +0 -333
- package/dist/api/portfolioApi.d.ts +0 -50
- package/dist/api/portfolioApi.js +0 -140
- package/dist/api/transactionsApi.d.ts +0 -66
- package/dist/api/transactionsApi.js +0 -164
- package/dist/model/addLinkedWalletForUserRequest.d.ts +0 -29
- package/dist/model/addLinkedWalletForUserRequest.js +0 -33
- package/dist/model/createManagedUserRequest.d.ts +0 -25
- package/dist/model/createManagedUserRequest.js +0 -28
- package/dist/model/depositAddress.d.ts +0 -35
- package/dist/model/depositAddress.js +0 -36
- package/dist/model/depositAddressesForUserResponse.d.ts +0 -27
- package/dist/model/depositAddressesForUserResponse.js +0 -33
- package/dist/model/managedUser.js +0 -36
- package/dist/model/managedUserDetails.d.ts +0 -31
- package/dist/model/managedUserDetails.js +0 -41
- package/dist/model/order.d.ts +0 -42
- package/dist/model/order.js +0 -48
- package/dist/model/orderDocument.d.ts +0 -50
- package/dist/model/orderDocument.js +0 -71
- package/dist/model/orderDocumentSteps.d.ts +0 -30
- package/dist/model/orderDocumentSteps.js +0 -33
- package/dist/model/orderType.d.ts +0 -15
- package/dist/model/orderType.js +0 -13
- package/dist/model/orderUpdatePayload.d.ts +0 -36
- package/dist/model/orderUpdatePayload.js +0 -38
- package/dist/model/portfolioEntity.d.ts +0 -33
- package/dist/model/portfolioEntity.js +0 -41
- package/dist/model/stakeStep.js +0 -33
- package/dist/model/stakeStepElement.d.ts +0 -30
- package/dist/model/stakeStepElement.js +0 -33
- package/dist/model/stepStatus.d.ts +0 -15
- package/dist/model/stepStatus.js +0 -13
- package/dist/model/transactionEventType.d.ts +0 -15
- package/dist/model/transactionEventType.js +0 -13
- package/dist/model/unstakeStep.d.ts +0 -32
- package/dist/model/unstakeStep.js +0 -33
- package/dist/model/unstakeStepElement.d.ts +0 -30
- package/dist/model/unstakeStepElement.js +0 -33
- package/dist/model/unstakeStepType.d.ts +0 -15
- package/dist/model/unstakeStepType.js +0 -13
- package/dist/model/withdrawalStep.d.ts +0 -32
- package/dist/model/withdrawalStep.js +0 -33
- package/dist/model/withdrawalStepElement.d.ts +0 -30
- package/dist/model/withdrawalStepElement.js +0 -33
- package/dist/model/withdrawalStepType.d.ts +0 -15
- package/dist/model/withdrawalStepType.js +0 -13
- package/model/addLinkedWalletForUserRequest.ts +0 -40
- package/model/createManagedUserRequest.ts +0 -31
- package/model/depositAddressesForUserResponse.ts +0 -38
- package/model/managedUser.ts +0 -40
- package/model/managedUserDetails.ts +0 -47
- package/model/order.ts +0 -68
- package/model/orderDocument.ts +0 -106
- package/model/orderDocumentSteps.ts +0 -44
- package/model/orderType.ts +0 -21
- package/model/orderUpdatePayload.ts +0 -52
- package/model/portfolioEntity.ts +0 -49
- package/model/stakeStep.ts +0 -43
- package/model/stakeStepElement.ts +0 -41
- package/model/stepStatus.ts +0 -21
- package/model/transactionEventType.ts +0 -23
- package/model/unstakeStep.ts +0 -43
- package/model/unstakeStepElement.ts +0 -41
- package/model/unstakeStepType.ts +0 -32
- package/model/withdrawalStep.ts +0 -43
- package/model/withdrawalStepElement.ts +0 -41
- package/model/withdrawalStepType.ts +0 -24
package/.openapi-generator/FILES
CHANGED
|
@@ -4,18 +4,8 @@ api.ts
|
|
|
4
4
|
api/accountApi.ts
|
|
5
5
|
api/accountApiKeysApi.ts
|
|
6
6
|
api/apis.ts
|
|
7
|
-
api/depositAddressesApi.ts
|
|
8
7
|
api/linkedWalletsApi.ts
|
|
9
|
-
api/
|
|
10
|
-
api/managedUsersDepositAddressesApi.ts
|
|
11
|
-
api/managedUsersLinkedWalletsApi.ts
|
|
12
|
-
api/managedUsersOrdersApi.ts
|
|
13
|
-
api/managedUsersPortfolioApi.ts
|
|
14
|
-
api/managedUsersTransactionsApi.ts
|
|
15
|
-
api/managedUsersValidatorsApi.ts
|
|
16
|
-
api/ordersApi.ts
|
|
17
|
-
api/portfolioApi.ts
|
|
18
|
-
api/transactionsApi.ts
|
|
8
|
+
api/smartContractsApi.ts
|
|
19
9
|
api/validatorMarketplaceBuyersApi.ts
|
|
20
10
|
api/validatorMarketplaceFacilitatorApi.ts
|
|
21
11
|
api/validatorMarketplaceSellersApi.ts
|
|
@@ -24,15 +14,10 @@ api/validatorsApi.ts
|
|
|
24
14
|
git_push.sh
|
|
25
15
|
model/acceptedQuote.ts
|
|
26
16
|
model/accountEntity.ts
|
|
27
|
-
model/addLinkedWalletForUserRequest.ts
|
|
28
17
|
model/addLinkedWalletRequest.ts
|
|
29
|
-
model/allManagedUsersResponse.ts
|
|
30
18
|
model/apiKey.ts
|
|
31
19
|
model/asset.ts
|
|
32
|
-
model/createManagedUserRequest.ts
|
|
33
20
|
model/createRFQRequest.ts
|
|
34
|
-
model/depositAddress.ts
|
|
35
|
-
model/depositAddressesForUserResponse.ts
|
|
36
21
|
model/errorResponse.ts
|
|
37
22
|
model/escrowPayment.ts
|
|
38
23
|
model/escrowReleased.ts
|
|
@@ -49,18 +34,14 @@ model/exitEstimateSeller.ts
|
|
|
49
34
|
model/exitProposal.ts
|
|
50
35
|
model/generateApiKeyRequest.ts
|
|
51
36
|
model/getMarketplaceMetadata200Response.ts
|
|
52
|
-
model/
|
|
37
|
+
model/getSmartContractInternalTransactions200Response.ts
|
|
38
|
+
model/getSmartContractMinedBlocks200Response.ts
|
|
39
|
+
model/getSmartContractTransactions200Response.ts
|
|
53
40
|
model/getWithdrawalsResponse.ts
|
|
41
|
+
model/internalTransaction.ts
|
|
54
42
|
model/listAllRFQsForFacilitator200Response.ts
|
|
55
|
-
model/
|
|
56
|
-
model/managedUserDetails.ts
|
|
43
|
+
model/minedBlock.ts
|
|
57
44
|
model/models.ts
|
|
58
|
-
model/order.ts
|
|
59
|
-
model/orderDocument.ts
|
|
60
|
-
model/orderDocumentSteps.ts
|
|
61
|
-
model/orderType.ts
|
|
62
|
-
model/orderUpdatePayload.ts
|
|
63
|
-
model/portfolioEntity.ts
|
|
64
45
|
model/provideEscrowHashForRFQDocumentRequest.ts
|
|
65
46
|
model/quote.ts
|
|
66
47
|
model/rFQBidFacilitator.ts
|
|
@@ -83,16 +64,8 @@ model/rFQWebhookEventType.ts
|
|
|
83
64
|
model/registerWithdrawalRecipientSettlementRequest.ts
|
|
84
65
|
model/settlementSteps.ts
|
|
85
66
|
model/smartContract.ts
|
|
86
|
-
model/stakeStep.ts
|
|
87
|
-
model/stakeStepElement.ts
|
|
88
|
-
model/stepStatus.ts
|
|
89
67
|
model/submittedQuote.ts
|
|
90
68
|
model/transaction.ts
|
|
91
|
-
model/transactionEventType.ts
|
|
92
|
-
model/transactionsforUser.ts
|
|
93
|
-
model/unstakeStep.ts
|
|
94
|
-
model/unstakeStepElement.ts
|
|
95
|
-
model/unstakeStepType.ts
|
|
96
69
|
model/validatorInfo.ts
|
|
97
70
|
model/validatorKeyHolder.ts
|
|
98
71
|
model/validatorType.ts
|
|
@@ -121,6 +94,3 @@ model/webhookPayloadRFQWithdrawalClaimableDetails.ts
|
|
|
121
94
|
model/webhookRegistration.ts
|
|
122
95
|
model/webhookRegistrationDetails.ts
|
|
123
96
|
model/withdrawalRecipientSettlement.ts
|
|
124
|
-
model/withdrawalStep.ts
|
|
125
|
-
model/withdrawalStepElement.ts
|
|
126
|
-
model/withdrawalStepType.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.11.0-SNAPSHOT
|
package/api/apis.ts
CHANGED
|
@@ -2,30 +2,10 @@ export * from './accountApi';
|
|
|
2
2
|
import { AccountApi } from './accountApi';
|
|
3
3
|
export * from './accountApiKeysApi';
|
|
4
4
|
import { AccountApiKeysApi } from './accountApiKeysApi';
|
|
5
|
-
export * from './depositAddressesApi';
|
|
6
|
-
import { DepositAddressesApi } from './depositAddressesApi';
|
|
7
5
|
export * from './linkedWalletsApi';
|
|
8
6
|
import { LinkedWalletsApi } from './linkedWalletsApi';
|
|
9
|
-
export * from './
|
|
10
|
-
import {
|
|
11
|
-
export * from './managedUsersDepositAddressesApi';
|
|
12
|
-
import { ManagedUsersDepositAddressesApi } from './managedUsersDepositAddressesApi';
|
|
13
|
-
export * from './managedUsersLinkedWalletsApi';
|
|
14
|
-
import { ManagedUsersLinkedWalletsApi } from './managedUsersLinkedWalletsApi';
|
|
15
|
-
export * from './managedUsersOrdersApi';
|
|
16
|
-
import { ManagedUsersOrdersApi } from './managedUsersOrdersApi';
|
|
17
|
-
export * from './managedUsersPortfolioApi';
|
|
18
|
-
import { ManagedUsersPortfolioApi } from './managedUsersPortfolioApi';
|
|
19
|
-
export * from './managedUsersTransactionsApi';
|
|
20
|
-
import { ManagedUsersTransactionsApi } from './managedUsersTransactionsApi';
|
|
21
|
-
export * from './managedUsersValidatorsApi';
|
|
22
|
-
import { ManagedUsersValidatorsApi } from './managedUsersValidatorsApi';
|
|
23
|
-
export * from './ordersApi';
|
|
24
|
-
import { OrdersApi } from './ordersApi';
|
|
25
|
-
export * from './portfolioApi';
|
|
26
|
-
import { PortfolioApi } from './portfolioApi';
|
|
27
|
-
export * from './transactionsApi';
|
|
28
|
-
import { TransactionsApi } from './transactionsApi';
|
|
7
|
+
export * from './smartContractsApi';
|
|
8
|
+
import { SmartContractsApi } from './smartContractsApi';
|
|
29
9
|
export * from './validatorMarketplaceBuyersApi';
|
|
30
10
|
import { ValidatorMarketplaceBuyersApi } from './validatorMarketplaceBuyersApi';
|
|
31
11
|
export * from './validatorMarketplaceFacilitatorApi';
|
|
@@ -47,4 +27,4 @@ export class HttpError extends Error {
|
|
|
47
27
|
|
|
48
28
|
export { RequestFile } from '../model/models';
|
|
49
29
|
|
|
50
|
-
export const APIS = [AccountApi, AccountApiKeysApi,
|
|
30
|
+
export const APIS = [AccountApi, AccountApiKeysApi, LinkedWalletsApi, SmartContractsApi, ValidatorMarketplaceBuyersApi, ValidatorMarketplaceFacilitatorApi, ValidatorMarketplaceSellersApi, ValidatorMarketplaceWebhooksApi, ValidatorsApi];
|
|
@@ -15,11 +15,11 @@ import localVarRequest from 'request';
|
|
|
15
15
|
import http from 'http';
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
|
-
import { AllManagedUsersResponse } from '../model/allManagedUsersResponse';
|
|
19
|
-
import { CreateManagedUserRequest } from '../model/createManagedUserRequest';
|
|
20
18
|
import { ErrorResponse } from '../model/errorResponse';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
19
|
+
import { GetSmartContractInternalTransactions200Response } from '../model/getSmartContractInternalTransactions200Response';
|
|
20
|
+
import { GetSmartContractMinedBlocks200Response } from '../model/getSmartContractMinedBlocks200Response';
|
|
21
|
+
import { GetSmartContractTransactions200Response } from '../model/getSmartContractTransactions200Response';
|
|
22
|
+
import { SmartContract } from '../model/smartContract';
|
|
23
23
|
|
|
24
24
|
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
25
25
|
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
|
|
@@ -32,13 +32,37 @@ let defaultBasePath = 'https://api.northstake.dk/v1';
|
|
|
32
32
|
// This file is autogenerated - Please do not edit
|
|
33
33
|
// ===============================================
|
|
34
34
|
|
|
35
|
-
export enum
|
|
35
|
+
export enum SmartContractsApiApiKeys {
|
|
36
36
|
ApiKeyAuth,
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
// If vendorExtensions.x-packageParams is true, use a single object to pass parameters
|
|
41
|
+
export interface SmartContractsApiParams {
|
|
42
|
+
contractAddress: string;
|
|
43
|
+
startDate?: string;
|
|
44
|
+
endDate?: string;
|
|
45
|
+
page?: number;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}
|
|
48
|
+
// If vendorExtensions.x-packageParams is true, use a single object to pass parameters
|
|
49
|
+
export interface SmartContractsApiParams {
|
|
50
|
+
contractAddress: string;
|
|
51
|
+
page?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
startDate?: string;
|
|
54
|
+
endDate?: string;
|
|
55
|
+
}
|
|
56
|
+
// If vendorExtensions.x-packageParams is true, use a single object to pass parameters
|
|
57
|
+
export interface SmartContractsApiParams {
|
|
58
|
+
contractAddress: string;
|
|
59
|
+
startDate?: string;
|
|
60
|
+
endDate?: string;
|
|
61
|
+
page?: number;
|
|
62
|
+
limit?: number;
|
|
63
|
+
}
|
|
40
64
|
|
|
41
|
-
export class
|
|
65
|
+
export class SmartContractsApi {
|
|
42
66
|
protected _basePath = defaultBasePath;
|
|
43
67
|
protected _defaultHeaders : any = {};
|
|
44
68
|
protected _useQuerystring : boolean = false;
|
|
@@ -88,8 +112,8 @@ export class ManagedUsersApi {
|
|
|
88
112
|
this.authentications.default = auth;
|
|
89
113
|
}
|
|
90
114
|
|
|
91
|
-
public setApiKey(key:
|
|
92
|
-
(this.authentications as any)[
|
|
115
|
+
public setApiKey(key: SmartContractsApiApiKeys, value: string) {
|
|
116
|
+
(this.authentications as any)[SmartContractsApiApiKeys[key]].apiKey = value;
|
|
93
117
|
}
|
|
94
118
|
|
|
95
119
|
set accessToken(accessToken: string | (() => string)) {
|
|
@@ -101,18 +125,23 @@ export class ManagedUsersApi {
|
|
|
101
125
|
}
|
|
102
126
|
|
|
103
127
|
/**
|
|
104
|
-
*
|
|
105
|
-
* @summary
|
|
106
|
-
* @param
|
|
128
|
+
*
|
|
129
|
+
* @summary Get internal transactions related to a specific smart contract
|
|
130
|
+
* @param contractAddress The address of the smart contract
|
|
131
|
+
* @param startDate Start date for filtering internal transactions
|
|
132
|
+
* @param endDate End date for filtering internal transactions
|
|
133
|
+
* @param page Page number for pagination
|
|
134
|
+
* @param limit Number of internal transactions per page
|
|
107
135
|
*/
|
|
108
136
|
|
|
109
137
|
|
|
110
138
|
|
|
111
139
|
|
|
112
140
|
|
|
113
|
-
|
|
141
|
+
public async getSmartContractInternalTransactions(params?: SmartContractsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetSmartContractInternalTransactions200Response, status: number }> {
|
|
114
142
|
|
|
115
|
-
const localVarPath = this.basePath + '/
|
|
143
|
+
const localVarPath = this.basePath + '/smartContracts/{contractAddress}/internalTransactions'
|
|
144
|
+
.replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params?.contractAddress)));
|
|
116
145
|
|
|
117
146
|
let localVarQueryParameters: any = {};
|
|
118
147
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -125,13 +154,25 @@ export class ManagedUsersApi {
|
|
|
125
154
|
let localVarFormParams: any = {};
|
|
126
155
|
|
|
127
156
|
|
|
128
|
-
// Verify required parameter '
|
|
129
|
-
if (
|
|
130
|
-
throw new Error('Required parameter "
|
|
157
|
+
// Verify required parameter 'contractAddress' is not null or undefined
|
|
158
|
+
if (params?.contractAddress === null || params?.contractAddress === undefined) {
|
|
159
|
+
throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractInternalTransactions.');
|
|
131
160
|
}
|
|
132
161
|
|
|
133
162
|
|
|
134
163
|
|
|
164
|
+
if (params?.startDate !== undefined) {
|
|
165
|
+
localVarQueryParameters['start_date'] = ObjectSerializer.serialize(params?.startDate, "string");
|
|
166
|
+
}
|
|
167
|
+
if (params?.endDate !== undefined) {
|
|
168
|
+
localVarQueryParameters['end_date'] = ObjectSerializer.serialize(params?.endDate, "string");
|
|
169
|
+
}
|
|
170
|
+
if (params?.page !== undefined) {
|
|
171
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
|
|
172
|
+
}
|
|
173
|
+
if (params?.limit !== undefined) {
|
|
174
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
|
|
175
|
+
}
|
|
135
176
|
|
|
136
177
|
|
|
137
178
|
|
|
@@ -143,13 +184,12 @@ export class ManagedUsersApi {
|
|
|
143
184
|
|
|
144
185
|
|
|
145
186
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
146
|
-
method: '
|
|
187
|
+
method: 'GET',
|
|
147
188
|
qs: localVarQueryParameters,
|
|
148
189
|
headers: localVarHeaderParams,
|
|
149
190
|
uri: localVarPath,
|
|
150
191
|
useQuerystring: this._useQuerystring,
|
|
151
192
|
json: true,
|
|
152
|
-
body: ObjectSerializer.serialize(createManagedUserRequest, "CreateManagedUserRequest")
|
|
153
193
|
};
|
|
154
194
|
|
|
155
195
|
let authenticationPromise = Promise.resolve();
|
|
@@ -168,14 +208,14 @@ export class ManagedUsersApi {
|
|
|
168
208
|
localVarRequestOptions.form = localVarFormParams;
|
|
169
209
|
}
|
|
170
210
|
}
|
|
171
|
-
return new Promise<{ body:
|
|
211
|
+
return new Promise<{ body: GetSmartContractInternalTransactions200Response, status: number }>((resolve, reject) => {
|
|
172
212
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
173
213
|
if (error) {
|
|
174
214
|
console.error('API call error:', error);
|
|
175
215
|
reject(error);
|
|
176
216
|
} else {
|
|
177
217
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
178
|
-
body = ObjectSerializer.deserialize(body, "
|
|
218
|
+
body = ObjectSerializer.deserialize(body, "GetSmartContractInternalTransactions200Response");
|
|
179
219
|
resolve({ body: body, status: response.statusCode });
|
|
180
220
|
} else {
|
|
181
221
|
console.error('API response error:', response.statusCode);
|
|
@@ -188,18 +228,22 @@ export class ManagedUsersApi {
|
|
|
188
228
|
}
|
|
189
229
|
/**
|
|
190
230
|
*
|
|
191
|
-
* @summary
|
|
192
|
-
* @param
|
|
231
|
+
* @summary Get mined blocks related to a specific smart contract
|
|
232
|
+
* @param contractAddress The address of the smart contract
|
|
233
|
+
* @param page Page number for pagination
|
|
234
|
+
* @param limit Number of mined blocks per page
|
|
235
|
+
* @param startDate Start date for filtering mined blocks
|
|
236
|
+
* @param endDate End date for filtering mined blocks
|
|
193
237
|
*/
|
|
194
238
|
|
|
195
239
|
|
|
196
240
|
|
|
197
241
|
|
|
198
242
|
|
|
199
|
-
|
|
243
|
+
public async getSmartContractMinedBlocks(params?: SmartContractsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetSmartContractMinedBlocks200Response, status: number }> {
|
|
200
244
|
|
|
201
|
-
const localVarPath = this.basePath + '/
|
|
202
|
-
.replace('{' + '
|
|
245
|
+
const localVarPath = this.basePath + '/smartContracts/{contractAddress}/minedBlocks'
|
|
246
|
+
.replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params?.contractAddress)));
|
|
203
247
|
|
|
204
248
|
let localVarQueryParameters: any = {};
|
|
205
249
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -212,13 +256,25 @@ export class ManagedUsersApi {
|
|
|
212
256
|
let localVarFormParams: any = {};
|
|
213
257
|
|
|
214
258
|
|
|
215
|
-
// Verify required parameter '
|
|
216
|
-
if (
|
|
217
|
-
throw new Error('Required parameter "
|
|
259
|
+
// Verify required parameter 'contractAddress' is not null or undefined
|
|
260
|
+
if (params?.contractAddress === null || params?.contractAddress === undefined) {
|
|
261
|
+
throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractMinedBlocks.');
|
|
218
262
|
}
|
|
219
263
|
|
|
220
264
|
|
|
221
265
|
|
|
266
|
+
if (params?.page !== undefined) {
|
|
267
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
|
|
268
|
+
}
|
|
269
|
+
if (params?.limit !== undefined) {
|
|
270
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
|
|
271
|
+
}
|
|
272
|
+
if (params?.startDate !== undefined) {
|
|
273
|
+
localVarQueryParameters['start_date'] = ObjectSerializer.serialize(params?.startDate, "string");
|
|
274
|
+
}
|
|
275
|
+
if (params?.endDate !== undefined) {
|
|
276
|
+
localVarQueryParameters['end_date'] = ObjectSerializer.serialize(params?.endDate, "string");
|
|
277
|
+
}
|
|
222
278
|
|
|
223
279
|
|
|
224
280
|
|
|
@@ -230,7 +286,7 @@ export class ManagedUsersApi {
|
|
|
230
286
|
|
|
231
287
|
|
|
232
288
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
233
|
-
method: '
|
|
289
|
+
method: 'GET',
|
|
234
290
|
qs: localVarQueryParameters,
|
|
235
291
|
headers: localVarHeaderParams,
|
|
236
292
|
uri: localVarPath,
|
|
@@ -254,13 +310,14 @@ export class ManagedUsersApi {
|
|
|
254
310
|
localVarRequestOptions.form = localVarFormParams;
|
|
255
311
|
}
|
|
256
312
|
}
|
|
257
|
-
return new Promise<{ body:
|
|
313
|
+
return new Promise<{ body: GetSmartContractMinedBlocks200Response, status: number }>((resolve, reject) => {
|
|
258
314
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
259
315
|
if (error) {
|
|
260
316
|
console.error('API call error:', error);
|
|
261
317
|
reject(error);
|
|
262
318
|
} else {
|
|
263
319
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
320
|
+
body = ObjectSerializer.deserialize(body, "GetSmartContractMinedBlocks200Response");
|
|
264
321
|
resolve({ body: body, status: response.statusCode });
|
|
265
322
|
} else {
|
|
266
323
|
console.error('API response error:', response.statusCode);
|
|
@@ -273,18 +330,22 @@ export class ManagedUsersApi {
|
|
|
273
330
|
}
|
|
274
331
|
/**
|
|
275
332
|
*
|
|
276
|
-
* @summary Get
|
|
277
|
-
* @param
|
|
333
|
+
* @summary Get transactions related to a specific smart contract
|
|
334
|
+
* @param contractAddress The address of the smart contract
|
|
335
|
+
* @param startDate Start date for filtering transactions
|
|
336
|
+
* @param endDate End date for filtering transactions
|
|
337
|
+
* @param page Page number for pagination
|
|
338
|
+
* @param limit Number of transactions per page
|
|
278
339
|
*/
|
|
279
340
|
|
|
280
341
|
|
|
281
342
|
|
|
282
343
|
|
|
283
344
|
|
|
284
|
-
|
|
345
|
+
public async getSmartContractTransactions(params?: SmartContractsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetSmartContractTransactions200Response, status: number }> {
|
|
285
346
|
|
|
286
|
-
const localVarPath = this.basePath + '/
|
|
287
|
-
.replace('{' + '
|
|
347
|
+
const localVarPath = this.basePath + '/smartContracts/{contractAddress}/transactions'
|
|
348
|
+
.replace('{' + 'contractAddress' + '}', encodeURIComponent(String(params?.contractAddress)));
|
|
288
349
|
|
|
289
350
|
let localVarQueryParameters: any = {};
|
|
290
351
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -297,13 +358,25 @@ export class ManagedUsersApi {
|
|
|
297
358
|
let localVarFormParams: any = {};
|
|
298
359
|
|
|
299
360
|
|
|
300
|
-
// Verify required parameter '
|
|
301
|
-
if (
|
|
302
|
-
throw new Error('Required parameter "
|
|
361
|
+
// Verify required parameter 'contractAddress' is not null or undefined
|
|
362
|
+
if (params?.contractAddress === null || params?.contractAddress === undefined) {
|
|
363
|
+
throw new Error('Required parameter "contractAddress" was null or undefined when calling getSmartContractTransactions.');
|
|
303
364
|
}
|
|
304
365
|
|
|
305
366
|
|
|
306
367
|
|
|
368
|
+
if (params?.startDate !== undefined) {
|
|
369
|
+
localVarQueryParameters['start_date'] = ObjectSerializer.serialize(params?.startDate, "string");
|
|
370
|
+
}
|
|
371
|
+
if (params?.endDate !== undefined) {
|
|
372
|
+
localVarQueryParameters['end_date'] = ObjectSerializer.serialize(params?.endDate, "string");
|
|
373
|
+
}
|
|
374
|
+
if (params?.page !== undefined) {
|
|
375
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
|
|
376
|
+
}
|
|
377
|
+
if (params?.limit !== undefined) {
|
|
378
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
|
|
379
|
+
}
|
|
307
380
|
|
|
308
381
|
|
|
309
382
|
|
|
@@ -339,14 +412,14 @@ export class ManagedUsersApi {
|
|
|
339
412
|
localVarRequestOptions.form = localVarFormParams;
|
|
340
413
|
}
|
|
341
414
|
}
|
|
342
|
-
return new Promise<{ body:
|
|
415
|
+
return new Promise<{ body: GetSmartContractTransactions200Response, status: number }>((resolve, reject) => {
|
|
343
416
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
344
417
|
if (error) {
|
|
345
418
|
console.error('API call error:', error);
|
|
346
419
|
reject(error);
|
|
347
420
|
} else {
|
|
348
421
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
349
|
-
body = ObjectSerializer.deserialize(body, "
|
|
422
|
+
body = ObjectSerializer.deserialize(body, "GetSmartContractTransactions200Response");
|
|
350
423
|
resolve({ body: body, status: response.statusCode });
|
|
351
424
|
} else {
|
|
352
425
|
console.error('API response error:', response.statusCode);
|
|
@@ -359,18 +432,16 @@ export class ManagedUsersApi {
|
|
|
359
432
|
}
|
|
360
433
|
/**
|
|
361
434
|
*
|
|
362
|
-
* @summary Get
|
|
363
|
-
* @param page Page number of the managed users list
|
|
364
|
-
* @param limit Number of managed users to return per page
|
|
435
|
+
* @summary Get list of all deployed smart contracts
|
|
365
436
|
*/
|
|
366
437
|
|
|
367
438
|
|
|
368
439
|
|
|
369
440
|
|
|
370
441
|
|
|
371
|
-
public async
|
|
442
|
+
public async getSmartContracts (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<SmartContract>, status: number }> {
|
|
372
443
|
|
|
373
|
-
const localVarPath = this.basePath + '/
|
|
444
|
+
const localVarPath = this.basePath + '/smartContracts';
|
|
374
445
|
|
|
375
446
|
let localVarQueryParameters: any = {};
|
|
376
447
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
@@ -386,12 +457,6 @@ export class ManagedUsersApi {
|
|
|
386
457
|
|
|
387
458
|
|
|
388
459
|
|
|
389
|
-
if (page !== undefined) {
|
|
390
|
-
localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number");
|
|
391
|
-
}
|
|
392
|
-
if (limit !== undefined) {
|
|
393
|
-
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
|
394
|
-
}
|
|
395
460
|
|
|
396
461
|
|
|
397
462
|
|
|
@@ -427,14 +492,14 @@ export class ManagedUsersApi {
|
|
|
427
492
|
localVarRequestOptions.form = localVarFormParams;
|
|
428
493
|
}
|
|
429
494
|
}
|
|
430
|
-
return new Promise<{ body:
|
|
495
|
+
return new Promise<{ body: Array<SmartContract>, status: number }>((resolve, reject) => {
|
|
431
496
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
432
497
|
if (error) {
|
|
433
498
|
console.error('API call error:', error);
|
|
434
499
|
reject(error);
|
|
435
500
|
} else {
|
|
436
501
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
437
|
-
body = ObjectSerializer.deserialize(body, "
|
|
502
|
+
body = ObjectSerializer.deserialize(body, "Array<SmartContract>");
|
|
438
503
|
resolve({ body: body, status: response.statusCode });
|
|
439
504
|
} else {
|
|
440
505
|
console.error('API response error:', response.statusCode);
|
package/api.ts
CHANGED
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
import { JWTAuth } from './model/models';
|
|
3
3
|
import { AccountApi } from './api/accountApi';
|
|
4
4
|
import { AccountApiKeysApi } from './api/accountApiKeysApi';
|
|
5
|
-
import { DepositAddressesApi } from './api/depositAddressesApi';
|
|
6
5
|
import { LinkedWalletsApi } from './api/linkedWalletsApi';
|
|
7
|
-
import {
|
|
8
|
-
import { ManagedUsersDepositAddressesApi } from './api/managedUsersDepositAddressesApi';
|
|
9
|
-
import { ManagedUsersLinkedWalletsApi } from './api/managedUsersLinkedWalletsApi';
|
|
10
|
-
import { ManagedUsersOrdersApi } from './api/managedUsersOrdersApi';
|
|
11
|
-
import { ManagedUsersPortfolioApi } from './api/managedUsersPortfolioApi';
|
|
12
|
-
import { ManagedUsersTransactionsApi } from './api/managedUsersTransactionsApi';
|
|
13
|
-
import { ManagedUsersValidatorsApi } from './api/managedUsersValidatorsApi';
|
|
14
|
-
import { OrdersApi } from './api/ordersApi';
|
|
15
|
-
import { PortfolioApi } from './api/portfolioApi';
|
|
16
|
-
import { TransactionsApi } from './api/transactionsApi';
|
|
6
|
+
import { SmartContractsApi } from './api/smartContractsApi';
|
|
17
7
|
import { ValidatorMarketplaceBuyersApi } from './api/validatorMarketplaceBuyersApi';
|
|
18
8
|
import { ValidatorMarketplaceFacilitatorApi } from './api/validatorMarketplaceFacilitatorApi';
|
|
19
9
|
import { ValidatorMarketplaceSellersApi } from './api/validatorMarketplaceSellersApi';
|
|
@@ -21,15 +11,10 @@ import { ValidatorMarketplaceWebhooksApi } from './api/validatorMarketplaceWebho
|
|
|
21
11
|
import { ValidatorsApi } from './api/validatorsApi';
|
|
22
12
|
export * from './model/./acceptedQuote';
|
|
23
13
|
export * from './model/./accountEntity';
|
|
24
|
-
export * from './model/./addLinkedWalletForUserRequest';
|
|
25
14
|
export * from './model/./addLinkedWalletRequest';
|
|
26
|
-
export * from './model/./allManagedUsersResponse';
|
|
27
15
|
export * from './model/./apiKey';
|
|
28
16
|
export * from './model/./asset';
|
|
29
|
-
export * from './model/./createManagedUserRequest';
|
|
30
17
|
export * from './model/./createRFQRequest';
|
|
31
|
-
export * from './model/./depositAddress';
|
|
32
|
-
export * from './model/./depositAddressesForUserResponse';
|
|
33
18
|
export * from './model/./errorResponse';
|
|
34
19
|
export * from './model/./escrowPayment';
|
|
35
20
|
export * from './model/./escrowReleased';
|
|
@@ -46,17 +31,13 @@ export * from './model/./exitEstimateSeller';
|
|
|
46
31
|
export * from './model/./exitProposal';
|
|
47
32
|
export * from './model/./generateApiKeyRequest';
|
|
48
33
|
export * from './model/./getMarketplaceMetadata200Response';
|
|
49
|
-
export * from './model/./
|
|
34
|
+
export * from './model/./getSmartContractInternalTransactions200Response';
|
|
35
|
+
export * from './model/./getSmartContractMinedBlocks200Response';
|
|
36
|
+
export * from './model/./getSmartContractTransactions200Response';
|
|
50
37
|
export * from './model/./getWithdrawalsResponse';
|
|
38
|
+
export * from './model/./internalTransaction';
|
|
51
39
|
export * from './model/./listAllRFQsForFacilitator200Response';
|
|
52
|
-
export * from './model/./
|
|
53
|
-
export * from './model/./managedUserDetails';
|
|
54
|
-
export * from './model/./order';
|
|
55
|
-
export * from './model/./orderDocument';
|
|
56
|
-
export * from './model/./orderDocumentSteps';
|
|
57
|
-
export * from './model/./orderType';
|
|
58
|
-
export * from './model/./orderUpdatePayload';
|
|
59
|
-
export * from './model/./portfolioEntity';
|
|
40
|
+
export * from './model/./minedBlock';
|
|
60
41
|
export * from './model/./provideEscrowHashForRFQDocumentRequest';
|
|
61
42
|
export * from './model/./quote';
|
|
62
43
|
export * from './model/./rFQBidFacilitator';
|
|
@@ -79,16 +60,8 @@ export * from './model/./rFQWebhookEventType';
|
|
|
79
60
|
export * from './model/./registerWithdrawalRecipientSettlementRequest';
|
|
80
61
|
export * from './model/./settlementSteps';
|
|
81
62
|
export * from './model/./smartContract';
|
|
82
|
-
export * from './model/./stakeStep';
|
|
83
|
-
export * from './model/./stakeStepElement';
|
|
84
|
-
export * from './model/./stepStatus';
|
|
85
63
|
export * from './model/./submittedQuote';
|
|
86
64
|
export * from './model/./transaction';
|
|
87
|
-
export * from './model/./transactionEventType';
|
|
88
|
-
export * from './model/./transactionsforUser';
|
|
89
|
-
export * from './model/./unstakeStep';
|
|
90
|
-
export * from './model/./unstakeStepElement';
|
|
91
|
-
export * from './model/./unstakeStepType';
|
|
92
65
|
export * from './model/./validatorInfo';
|
|
93
66
|
export * from './model/./validatorKeyHolder';
|
|
94
67
|
export * from './model/./validatorType';
|
|
@@ -117,9 +90,6 @@ export * from './model/./webhookPayloadRFQWithdrawalClaimableDetails';
|
|
|
117
90
|
export * from './model/./webhookRegistration';
|
|
118
91
|
export * from './model/./webhookRegistrationDetails';
|
|
119
92
|
export * from './model/./withdrawalRecipientSettlement';
|
|
120
|
-
export * from './model/./withdrawalStep';
|
|
121
|
-
export * from './model/./withdrawalStepElement';
|
|
122
|
-
export * from './model/./withdrawalStepType';
|
|
123
93
|
|
|
124
94
|
export class NorthstakeApi {
|
|
125
95
|
constructor(apiKey: string, privateKey: string, basePath: string = "https://api.northstake.dk/v1") {
|
|
@@ -129,30 +99,10 @@ export class NorthstakeApi {
|
|
|
129
99
|
this.account.setDefaultAuthentication(jwtAuth);
|
|
130
100
|
this.accountApiKeys = new AccountApiKeysApi(basePath);
|
|
131
101
|
this.accountApiKeys.setDefaultAuthentication(jwtAuth);
|
|
132
|
-
this.depositAddresses = new DepositAddressesApi(basePath);
|
|
133
|
-
this.depositAddresses.setDefaultAuthentication(jwtAuth);
|
|
134
102
|
this.linkedWallets = new LinkedWalletsApi(basePath);
|
|
135
103
|
this.linkedWallets.setDefaultAuthentication(jwtAuth);
|
|
136
|
-
this.
|
|
137
|
-
this.
|
|
138
|
-
this.managedUsersDepositAddresses = new ManagedUsersDepositAddressesApi(basePath);
|
|
139
|
-
this.managedUsersDepositAddresses.setDefaultAuthentication(jwtAuth);
|
|
140
|
-
this.managedUsersLinkedWallets = new ManagedUsersLinkedWalletsApi(basePath);
|
|
141
|
-
this.managedUsersLinkedWallets.setDefaultAuthentication(jwtAuth);
|
|
142
|
-
this.managedUsersOrders = new ManagedUsersOrdersApi(basePath);
|
|
143
|
-
this.managedUsersOrders.setDefaultAuthentication(jwtAuth);
|
|
144
|
-
this.managedUsersPortfolio = new ManagedUsersPortfolioApi(basePath);
|
|
145
|
-
this.managedUsersPortfolio.setDefaultAuthentication(jwtAuth);
|
|
146
|
-
this.managedUsersTransactions = new ManagedUsersTransactionsApi(basePath);
|
|
147
|
-
this.managedUsersTransactions.setDefaultAuthentication(jwtAuth);
|
|
148
|
-
this.managedUsersValidators = new ManagedUsersValidatorsApi(basePath);
|
|
149
|
-
this.managedUsersValidators.setDefaultAuthentication(jwtAuth);
|
|
150
|
-
this.orders = new OrdersApi(basePath);
|
|
151
|
-
this.orders.setDefaultAuthentication(jwtAuth);
|
|
152
|
-
this.portfolio = new PortfolioApi(basePath);
|
|
153
|
-
this.portfolio.setDefaultAuthentication(jwtAuth);
|
|
154
|
-
this.transactions = new TransactionsApi(basePath);
|
|
155
|
-
this.transactions.setDefaultAuthentication(jwtAuth);
|
|
104
|
+
this.smartContracts = new SmartContractsApi(basePath);
|
|
105
|
+
this.smartContracts.setDefaultAuthentication(jwtAuth);
|
|
156
106
|
this.validatorMarketplaceBuyers = new ValidatorMarketplaceBuyersApi(basePath);
|
|
157
107
|
this.validatorMarketplaceBuyers.setDefaultAuthentication(jwtAuth);
|
|
158
108
|
this.validatorMarketplaceFacilitator = new ValidatorMarketplaceFacilitatorApi(basePath);
|
|
@@ -166,18 +116,8 @@ export class NorthstakeApi {
|
|
|
166
116
|
}
|
|
167
117
|
public account: AccountApi;
|
|
168
118
|
public accountApiKeys: AccountApiKeysApi;
|
|
169
|
-
public depositAddresses: DepositAddressesApi;
|
|
170
119
|
public linkedWallets: LinkedWalletsApi;
|
|
171
|
-
public
|
|
172
|
-
public managedUsersDepositAddresses: ManagedUsersDepositAddressesApi;
|
|
173
|
-
public managedUsersLinkedWallets: ManagedUsersLinkedWalletsApi;
|
|
174
|
-
public managedUsersOrders: ManagedUsersOrdersApi;
|
|
175
|
-
public managedUsersPortfolio: ManagedUsersPortfolioApi;
|
|
176
|
-
public managedUsersTransactions: ManagedUsersTransactionsApi;
|
|
177
|
-
public managedUsersValidators: ManagedUsersValidatorsApi;
|
|
178
|
-
public orders: OrdersApi;
|
|
179
|
-
public portfolio: PortfolioApi;
|
|
180
|
-
public transactions: TransactionsApi;
|
|
120
|
+
public smartContracts: SmartContractsApi;
|
|
181
121
|
public validatorMarketplaceBuyers: ValidatorMarketplaceBuyersApi;
|
|
182
122
|
public validatorMarketplaceFacilitator: ValidatorMarketplaceFacilitatorApi;
|
|
183
123
|
public validatorMarketplaceSellers: ValidatorMarketplaceSellersApi;
|