@avalabs/glacier-sdk 2.8.0-alpha.122 → 2.8.0-alpha.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2244 -2021
- package/dist/index.js +355 -198
- package/esm/generated/Glacier.d.ts +24 -2
- package/esm/generated/Glacier.js +25 -3
- package/esm/generated/core/OpenAPI.js +1 -1
- package/esm/generated/models/CompletedDelegatorDetails.d.ts +15 -0
- package/esm/generated/models/Contract.d.ts +37 -0
- package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
- package/esm/generated/models/DelegationStatusType.d.ts +5 -0
- package/esm/generated/models/DelegationStatusType.js +6 -0
- package/esm/generated/models/ListContractsResponse.d.ts +11 -0
- package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +11 -0
- package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
- package/esm/generated/models/PrimaryNetwork.js +7 -0
- package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +5 -2
- package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
- package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
- package/esm/generated/models/StakingDistribution.d.ts +1 -0
- package/esm/generated/models/ValidatorsDetails.d.ts +1 -0
- package/esm/generated/services/DefaultService.d.ts +52 -0
- package/esm/generated/services/DefaultService.js +34 -0
- package/esm/generated/services/EvmBalancesService.d.ts +177 -0
- package/esm/generated/services/EvmBalancesService.js +116 -0
- package/esm/generated/services/EvmBlocksService.d.ts +47 -0
- package/esm/generated/services/EvmBlocksService.js +37 -0
- package/esm/generated/services/EvmChainsService.d.ts +36 -0
- package/esm/generated/services/EvmChainsService.js +29 -0
- package/esm/generated/services/{EvmService.d.ts → EvmTransactionsService.d.ts} +9 -314
- package/esm/generated/services/{EvmService.js → EvmTransactionsService.js} +7 -219
- package/esm/generated/services/NfTsService.d.ts +108 -0
- package/esm/generated/services/NfTsService.js +77 -0
- package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
- package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
- package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
- package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
- package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +69 -0
- package/esm/generated/services/PrimaryNetworkRewardsService.js +49 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +0 -436
- package/esm/generated/services/PrimaryNetworkService.js +0 -298
- package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +171 -0
- package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
- package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
- package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
- package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
- package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
- package/esm/index.d.ts +20 -1
- package/esm/index.js +15 -1
- package/package.json +2 -2
|
@@ -2,277 +2,6 @@ class PrimaryNetworkService {
|
|
|
2
2
|
constructor(httpRequest) {
|
|
3
3
|
this.httpRequest = httpRequest;
|
|
4
4
|
}
|
|
5
|
-
getTxByHash({
|
|
6
|
-
blockchainId,
|
|
7
|
-
network,
|
|
8
|
-
txHash
|
|
9
|
-
}) {
|
|
10
|
-
return this.httpRequest.request({
|
|
11
|
-
method: "GET",
|
|
12
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}",
|
|
13
|
-
path: {
|
|
14
|
-
"blockchainId": blockchainId,
|
|
15
|
-
"network": network,
|
|
16
|
-
"txHash": txHash
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
listLatestPrimaryNetworkTransactions({
|
|
21
|
-
blockchainId,
|
|
22
|
-
network,
|
|
23
|
-
addresses,
|
|
24
|
-
txTypes,
|
|
25
|
-
startTimestamp,
|
|
26
|
-
endTimestamp,
|
|
27
|
-
pageSize = 10,
|
|
28
|
-
pageToken,
|
|
29
|
-
sortOrder
|
|
30
|
-
}) {
|
|
31
|
-
return this.httpRequest.request({
|
|
32
|
-
method: "GET",
|
|
33
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
|
|
34
|
-
path: {
|
|
35
|
-
"blockchainId": blockchainId,
|
|
36
|
-
"network": network
|
|
37
|
-
},
|
|
38
|
-
query: {
|
|
39
|
-
"addresses": addresses,
|
|
40
|
-
"txTypes": txTypes,
|
|
41
|
-
"startTimestamp": startTimestamp,
|
|
42
|
-
"endTimestamp": endTimestamp,
|
|
43
|
-
"pageSize": pageSize,
|
|
44
|
-
"pageToken": pageToken,
|
|
45
|
-
"sortOrder": sortOrder
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
listActivePrimaryNetworkStakingTransactions({
|
|
50
|
-
blockchainId,
|
|
51
|
-
network,
|
|
52
|
-
addresses,
|
|
53
|
-
txTypes,
|
|
54
|
-
startTimestamp,
|
|
55
|
-
endTimestamp,
|
|
56
|
-
pageSize = 10,
|
|
57
|
-
pageToken,
|
|
58
|
-
sortOrder
|
|
59
|
-
}) {
|
|
60
|
-
return this.httpRequest.request({
|
|
61
|
-
method: "GET",
|
|
62
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
|
|
63
|
-
path: {
|
|
64
|
-
"blockchainId": blockchainId,
|
|
65
|
-
"network": network
|
|
66
|
-
},
|
|
67
|
-
query: {
|
|
68
|
-
"addresses": addresses,
|
|
69
|
-
"txTypes": txTypes,
|
|
70
|
-
"startTimestamp": startTimestamp,
|
|
71
|
-
"endTimestamp": endTimestamp,
|
|
72
|
-
"pageSize": pageSize,
|
|
73
|
-
"pageToken": pageToken,
|
|
74
|
-
"sortOrder": sortOrder
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
listPendingPrimaryNetworkRewards({
|
|
79
|
-
network,
|
|
80
|
-
addresses,
|
|
81
|
-
pageSize = 10,
|
|
82
|
-
pageToken,
|
|
83
|
-
sortOrder
|
|
84
|
-
}) {
|
|
85
|
-
return this.httpRequest.request({
|
|
86
|
-
method: "GET",
|
|
87
|
-
url: "/v1/networks/{network}/rewards:listPending",
|
|
88
|
-
path: {
|
|
89
|
-
"network": network
|
|
90
|
-
},
|
|
91
|
-
query: {
|
|
92
|
-
"addresses": addresses,
|
|
93
|
-
"pageSize": pageSize,
|
|
94
|
-
"pageToken": pageToken,
|
|
95
|
-
"sortOrder": sortOrder
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
listHistoricalPrimaryNetworkRewards({
|
|
100
|
-
network,
|
|
101
|
-
addresses,
|
|
102
|
-
pageSize = 10,
|
|
103
|
-
pageToken,
|
|
104
|
-
sortOrder
|
|
105
|
-
}) {
|
|
106
|
-
return this.httpRequest.request({
|
|
107
|
-
method: "GET",
|
|
108
|
-
url: "/v1/networks/{network}/rewards",
|
|
109
|
-
path: {
|
|
110
|
-
"network": network
|
|
111
|
-
},
|
|
112
|
-
query: {
|
|
113
|
-
"addresses": addresses,
|
|
114
|
-
"pageSize": pageSize,
|
|
115
|
-
"pageToken": pageToken,
|
|
116
|
-
"sortOrder": sortOrder
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
getUtxosByAddresses({
|
|
121
|
-
blockchainId,
|
|
122
|
-
network,
|
|
123
|
-
addresses,
|
|
124
|
-
pageSize = 10,
|
|
125
|
-
pageToken,
|
|
126
|
-
assetId,
|
|
127
|
-
sortOrder
|
|
128
|
-
}) {
|
|
129
|
-
return this.httpRequest.request({
|
|
130
|
-
method: "GET",
|
|
131
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
|
|
132
|
-
path: {
|
|
133
|
-
"blockchainId": blockchainId,
|
|
134
|
-
"network": network
|
|
135
|
-
},
|
|
136
|
-
query: {
|
|
137
|
-
"addresses": addresses,
|
|
138
|
-
"pageSize": pageSize,
|
|
139
|
-
"pageToken": pageToken,
|
|
140
|
-
"assetId": assetId,
|
|
141
|
-
"sortOrder": sortOrder
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
getBalancesByAddresses({
|
|
146
|
-
blockchainId,
|
|
147
|
-
network,
|
|
148
|
-
blockTimestamp,
|
|
149
|
-
addresses
|
|
150
|
-
}) {
|
|
151
|
-
return this.httpRequest.request({
|
|
152
|
-
method: "GET",
|
|
153
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/balances",
|
|
154
|
-
path: {
|
|
155
|
-
"blockchainId": blockchainId,
|
|
156
|
-
"network": network
|
|
157
|
-
},
|
|
158
|
-
query: {
|
|
159
|
-
"blockTimestamp": blockTimestamp,
|
|
160
|
-
"addresses": addresses
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
getBlockById({
|
|
165
|
-
blockchainId,
|
|
166
|
-
network,
|
|
167
|
-
blockId
|
|
168
|
-
}) {
|
|
169
|
-
return this.httpRequest.request({
|
|
170
|
-
method: "GET",
|
|
171
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}",
|
|
172
|
-
path: {
|
|
173
|
-
"blockchainId": blockchainId,
|
|
174
|
-
"network": network,
|
|
175
|
-
"blockId": blockId
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
listPrimaryNetworkBlocksByNodeId({
|
|
180
|
-
blockchainId,
|
|
181
|
-
network,
|
|
182
|
-
nodeId,
|
|
183
|
-
pageSize = 10,
|
|
184
|
-
pageToken
|
|
185
|
-
}) {
|
|
186
|
-
return this.httpRequest.request({
|
|
187
|
-
method: "GET",
|
|
188
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks",
|
|
189
|
-
path: {
|
|
190
|
-
"blockchainId": blockchainId,
|
|
191
|
-
"network": network,
|
|
192
|
-
"nodeId": nodeId
|
|
193
|
-
},
|
|
194
|
-
query: {
|
|
195
|
-
"pageSize": pageSize,
|
|
196
|
-
"pageToken": pageToken
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
listLatestPrimaryNetworkBlocks({
|
|
201
|
-
blockchainId,
|
|
202
|
-
network,
|
|
203
|
-
pageSize = 10,
|
|
204
|
-
pageToken
|
|
205
|
-
}) {
|
|
206
|
-
return this.httpRequest.request({
|
|
207
|
-
method: "GET",
|
|
208
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks",
|
|
209
|
-
path: {
|
|
210
|
-
"blockchainId": blockchainId,
|
|
211
|
-
"network": network
|
|
212
|
-
},
|
|
213
|
-
query: {
|
|
214
|
-
"pageSize": pageSize,
|
|
215
|
-
"pageToken": pageToken
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
listLatestXChainVertices({
|
|
220
|
-
blockchainId,
|
|
221
|
-
network,
|
|
222
|
-
pageSize = 10,
|
|
223
|
-
pageToken
|
|
224
|
-
}) {
|
|
225
|
-
return this.httpRequest.request({
|
|
226
|
-
method: "GET",
|
|
227
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
|
|
228
|
-
path: {
|
|
229
|
-
"blockchainId": blockchainId,
|
|
230
|
-
"network": network
|
|
231
|
-
},
|
|
232
|
-
query: {
|
|
233
|
-
"pageSize": pageSize,
|
|
234
|
-
"pageToken": pageToken
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
getVertexByHash({
|
|
239
|
-
vertexHash,
|
|
240
|
-
blockchainId,
|
|
241
|
-
network
|
|
242
|
-
}) {
|
|
243
|
-
return this.httpRequest.request({
|
|
244
|
-
method: "GET",
|
|
245
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
|
|
246
|
-
path: {
|
|
247
|
-
"vertexHash": vertexHash,
|
|
248
|
-
"blockchainId": blockchainId,
|
|
249
|
-
"network": network
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
getVertexByHeight({
|
|
254
|
-
vertexHeight,
|
|
255
|
-
blockchainId,
|
|
256
|
-
network,
|
|
257
|
-
pageSize = 10,
|
|
258
|
-
pageToken,
|
|
259
|
-
sortOrder
|
|
260
|
-
}) {
|
|
261
|
-
return this.httpRequest.request({
|
|
262
|
-
method: "GET",
|
|
263
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
|
|
264
|
-
path: {
|
|
265
|
-
"blockchainId": blockchainId,
|
|
266
|
-
"network": network
|
|
267
|
-
},
|
|
268
|
-
query: {
|
|
269
|
-
"vertexHeight": vertexHeight,
|
|
270
|
-
"pageSize": pageSize,
|
|
271
|
-
"pageToken": pageToken,
|
|
272
|
-
"sortOrder": sortOrder
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
5
|
getAssetDetails({
|
|
277
6
|
blockchainId,
|
|
278
7
|
network,
|
|
@@ -288,33 +17,6 @@ class PrimaryNetworkService {
|
|
|
288
17
|
}
|
|
289
18
|
});
|
|
290
19
|
}
|
|
291
|
-
listAssetTransactions({
|
|
292
|
-
blockchainId,
|
|
293
|
-
network,
|
|
294
|
-
assetId,
|
|
295
|
-
txTypes,
|
|
296
|
-
startTimestamp,
|
|
297
|
-
endTimestamp,
|
|
298
|
-
pageSize = 10,
|
|
299
|
-
pageToken
|
|
300
|
-
}) {
|
|
301
|
-
return this.httpRequest.request({
|
|
302
|
-
method: "GET",
|
|
303
|
-
url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
|
|
304
|
-
path: {
|
|
305
|
-
"blockchainId": blockchainId,
|
|
306
|
-
"network": network,
|
|
307
|
-
"assetId": assetId
|
|
308
|
-
},
|
|
309
|
-
query: {
|
|
310
|
-
"txTypes": txTypes,
|
|
311
|
-
"startTimestamp": startTimestamp,
|
|
312
|
-
"endTimestamp": endTimestamp,
|
|
313
|
-
"pageSize": pageSize,
|
|
314
|
-
"pageToken": pageToken
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
20
|
getChainIdsForAddresses({
|
|
319
21
|
addresses,
|
|
320
22
|
network
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { BlockchainId } from '../models/BlockchainId.js';
|
|
2
|
+
import { CChainExportTransaction } from '../models/CChainExportTransaction.js';
|
|
3
|
+
import { CChainImportTransaction } from '../models/CChainImportTransaction.js';
|
|
4
|
+
import { ListCChainAtomicTransactionsResponse } from '../models/ListCChainAtomicTransactionsResponse.js';
|
|
5
|
+
import { ListPChainTransactionsResponse } from '../models/ListPChainTransactionsResponse.js';
|
|
6
|
+
import { ListXChainTransactionsResponse } from '../models/ListXChainTransactionsResponse.js';
|
|
7
|
+
import { Network } from '../models/Network.js';
|
|
8
|
+
import { PChainId } from '../models/PChainId.js';
|
|
9
|
+
import { PChainTransaction } from '../models/PChainTransaction.js';
|
|
10
|
+
import { PrimaryNetworkTxType } from '../models/PrimaryNetworkTxType.js';
|
|
11
|
+
import { SortOrder } from '../models/SortOrder.js';
|
|
12
|
+
import { XChainId } from '../models/XChainId.js';
|
|
13
|
+
import { XChainLinearTransaction } from '../models/XChainLinearTransaction.js';
|
|
14
|
+
import { XChainNonLinearTransaction } from '../models/XChainNonLinearTransaction.js';
|
|
15
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
16
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
17
|
+
|
|
18
|
+
declare class PrimaryNetworkTransactionsService {
|
|
19
|
+
readonly httpRequest: BaseHttpRequest;
|
|
20
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
21
|
+
/**
|
|
22
|
+
* Get transaction
|
|
23
|
+
* Gets the details of a single transaction on one of the Primary Network chains.
|
|
24
|
+
* @returns any
|
|
25
|
+
* @throws ApiError
|
|
26
|
+
*/
|
|
27
|
+
getTxByHash({ blockchainId, network, txHash, }: {
|
|
28
|
+
/**
|
|
29
|
+
* A primary network blockchain id or alias.
|
|
30
|
+
*/
|
|
31
|
+
blockchainId: BlockchainId;
|
|
32
|
+
/**
|
|
33
|
+
* Either mainnet or a testnet.
|
|
34
|
+
*/
|
|
35
|
+
network: Network;
|
|
36
|
+
/**
|
|
37
|
+
* A primary network (P or X chain) transaction hash.
|
|
38
|
+
*/
|
|
39
|
+
txHash: string;
|
|
40
|
+
}): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
|
|
41
|
+
/**
|
|
42
|
+
* List latest transactions
|
|
43
|
+
* Lists the latest transactions on one of the Primary Network chains. Transactions are filterable by addresses.
|
|
44
|
+
* @returns any
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
|
|
48
|
+
/**
|
|
49
|
+
* A primary network blockchain id or alias.
|
|
50
|
+
*/
|
|
51
|
+
blockchainId: BlockchainId;
|
|
52
|
+
/**
|
|
53
|
+
* Either mainnet or a testnet.
|
|
54
|
+
*/
|
|
55
|
+
network: Network;
|
|
56
|
+
/**
|
|
57
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
58
|
+
*/
|
|
59
|
+
addresses?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Query param for filtering items based on transaction types.
|
|
62
|
+
*/
|
|
63
|
+
txTypes?: Array<PrimaryNetworkTxType>;
|
|
64
|
+
/**
|
|
65
|
+
* Query param for retrieving items after a specific timestamp.
|
|
66
|
+
*/
|
|
67
|
+
startTimestamp?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Query param for retrieving items before a specific timestamp.
|
|
70
|
+
*/
|
|
71
|
+
endTimestamp?: number;
|
|
72
|
+
/**
|
|
73
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
74
|
+
*/
|
|
75
|
+
pageSize?: number;
|
|
76
|
+
/**
|
|
77
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
78
|
+
*/
|
|
79
|
+
pageToken?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
82
|
+
*/
|
|
83
|
+
sortOrder?: SortOrder;
|
|
84
|
+
}): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
|
|
85
|
+
/**
|
|
86
|
+
* List staking transactions
|
|
87
|
+
* Lists active staking transactions on the P-Chain for the supplied addresses.
|
|
88
|
+
* @returns ListPChainTransactionsResponse
|
|
89
|
+
* @throws ApiError
|
|
90
|
+
*/
|
|
91
|
+
listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
|
|
92
|
+
/**
|
|
93
|
+
* A primary network blockchain id or alias.
|
|
94
|
+
*/
|
|
95
|
+
blockchainId: PChainId;
|
|
96
|
+
/**
|
|
97
|
+
* Either mainnet or a testnet.
|
|
98
|
+
*/
|
|
99
|
+
network: Network;
|
|
100
|
+
/**
|
|
101
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
102
|
+
*/
|
|
103
|
+
addresses?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Query param for filtering items based on transaction types.
|
|
106
|
+
*/
|
|
107
|
+
txTypes?: Array<PrimaryNetworkTxType>;
|
|
108
|
+
/**
|
|
109
|
+
* Query param for retrieving items after a specific timestamp.
|
|
110
|
+
*/
|
|
111
|
+
startTimestamp?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Query param for retrieving items before a specific timestamp.
|
|
114
|
+
*/
|
|
115
|
+
endTimestamp?: number;
|
|
116
|
+
/**
|
|
117
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
118
|
+
*/
|
|
119
|
+
pageSize?: number;
|
|
120
|
+
/**
|
|
121
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
122
|
+
*/
|
|
123
|
+
pageToken?: string;
|
|
124
|
+
/**
|
|
125
|
+
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
126
|
+
*/
|
|
127
|
+
sortOrder?: SortOrder;
|
|
128
|
+
}): CancelablePromise<ListPChainTransactionsResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* List asset transactions
|
|
131
|
+
* Lists asset transactions corresponding to the given asset id on the X-Chain.
|
|
132
|
+
* @returns ListXChainTransactionsResponse
|
|
133
|
+
* @throws ApiError
|
|
134
|
+
*/
|
|
135
|
+
listAssetTransactions({ blockchainId, network, assetId, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, }: {
|
|
136
|
+
/**
|
|
137
|
+
* A primary network blockchain id or alias.
|
|
138
|
+
*/
|
|
139
|
+
blockchainId: XChainId;
|
|
140
|
+
/**
|
|
141
|
+
* Either mainnet or a testnet.
|
|
142
|
+
*/
|
|
143
|
+
network: Network;
|
|
144
|
+
/**
|
|
145
|
+
* Asset ID for any asset on X-Chain
|
|
146
|
+
*/
|
|
147
|
+
assetId: string;
|
|
148
|
+
/**
|
|
149
|
+
* Query param for filtering items based on transaction types.
|
|
150
|
+
*/
|
|
151
|
+
txTypes?: Array<PrimaryNetworkTxType>;
|
|
152
|
+
/**
|
|
153
|
+
* Query param for retrieving items after a specific timestamp.
|
|
154
|
+
*/
|
|
155
|
+
startTimestamp?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Query param for retrieving items before a specific timestamp.
|
|
158
|
+
*/
|
|
159
|
+
endTimestamp?: number;
|
|
160
|
+
/**
|
|
161
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
162
|
+
*/
|
|
163
|
+
pageSize?: number;
|
|
164
|
+
/**
|
|
165
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
166
|
+
*/
|
|
167
|
+
pageToken?: string;
|
|
168
|
+
}): CancelablePromise<ListXChainTransactionsResponse>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { PrimaryNetworkTransactionsService };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
class PrimaryNetworkTransactionsService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
getTxByHash({
|
|
6
|
+
blockchainId,
|
|
7
|
+
network,
|
|
8
|
+
txHash
|
|
9
|
+
}) {
|
|
10
|
+
return this.httpRequest.request({
|
|
11
|
+
method: "GET",
|
|
12
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}",
|
|
13
|
+
path: {
|
|
14
|
+
"blockchainId": blockchainId,
|
|
15
|
+
"network": network,
|
|
16
|
+
"txHash": txHash
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
listLatestPrimaryNetworkTransactions({
|
|
21
|
+
blockchainId,
|
|
22
|
+
network,
|
|
23
|
+
addresses,
|
|
24
|
+
txTypes,
|
|
25
|
+
startTimestamp,
|
|
26
|
+
endTimestamp,
|
|
27
|
+
pageSize = 10,
|
|
28
|
+
pageToken,
|
|
29
|
+
sortOrder
|
|
30
|
+
}) {
|
|
31
|
+
return this.httpRequest.request({
|
|
32
|
+
method: "GET",
|
|
33
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
|
|
34
|
+
path: {
|
|
35
|
+
"blockchainId": blockchainId,
|
|
36
|
+
"network": network
|
|
37
|
+
},
|
|
38
|
+
query: {
|
|
39
|
+
"addresses": addresses,
|
|
40
|
+
"txTypes": txTypes,
|
|
41
|
+
"startTimestamp": startTimestamp,
|
|
42
|
+
"endTimestamp": endTimestamp,
|
|
43
|
+
"pageSize": pageSize,
|
|
44
|
+
"pageToken": pageToken,
|
|
45
|
+
"sortOrder": sortOrder
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
listActivePrimaryNetworkStakingTransactions({
|
|
50
|
+
blockchainId,
|
|
51
|
+
network,
|
|
52
|
+
addresses,
|
|
53
|
+
txTypes,
|
|
54
|
+
startTimestamp,
|
|
55
|
+
endTimestamp,
|
|
56
|
+
pageSize = 10,
|
|
57
|
+
pageToken,
|
|
58
|
+
sortOrder
|
|
59
|
+
}) {
|
|
60
|
+
return this.httpRequest.request({
|
|
61
|
+
method: "GET",
|
|
62
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
|
|
63
|
+
path: {
|
|
64
|
+
"blockchainId": blockchainId,
|
|
65
|
+
"network": network
|
|
66
|
+
},
|
|
67
|
+
query: {
|
|
68
|
+
"addresses": addresses,
|
|
69
|
+
"txTypes": txTypes,
|
|
70
|
+
"startTimestamp": startTimestamp,
|
|
71
|
+
"endTimestamp": endTimestamp,
|
|
72
|
+
"pageSize": pageSize,
|
|
73
|
+
"pageToken": pageToken,
|
|
74
|
+
"sortOrder": sortOrder
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
listAssetTransactions({
|
|
79
|
+
blockchainId,
|
|
80
|
+
network,
|
|
81
|
+
assetId,
|
|
82
|
+
txTypes,
|
|
83
|
+
startTimestamp,
|
|
84
|
+
endTimestamp,
|
|
85
|
+
pageSize = 10,
|
|
86
|
+
pageToken
|
|
87
|
+
}) {
|
|
88
|
+
return this.httpRequest.request({
|
|
89
|
+
method: "GET",
|
|
90
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
|
|
91
|
+
path: {
|
|
92
|
+
"blockchainId": blockchainId,
|
|
93
|
+
"network": network,
|
|
94
|
+
"assetId": assetId
|
|
95
|
+
},
|
|
96
|
+
query: {
|
|
97
|
+
"txTypes": txTypes,
|
|
98
|
+
"startTimestamp": startTimestamp,
|
|
99
|
+
"endTimestamp": endTimestamp,
|
|
100
|
+
"pageSize": pageSize,
|
|
101
|
+
"pageToken": pageToken
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { PrimaryNetworkTransactionsService };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BlockchainId } from '../models/BlockchainId.js';
|
|
2
|
+
import { ListPChainUtxosResponse } from '../models/ListPChainUtxosResponse.js';
|
|
3
|
+
import { ListUtxosResponse } from '../models/ListUtxosResponse.js';
|
|
4
|
+
import { Network } from '../models/Network.js';
|
|
5
|
+
import { SortOrder } from '../models/SortOrder.js';
|
|
6
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
7
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
8
|
+
|
|
9
|
+
declare class PrimaryNetworkUtxOsService {
|
|
10
|
+
readonly httpRequest: BaseHttpRequest;
|
|
11
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
12
|
+
/**
|
|
13
|
+
* List UTXOs
|
|
14
|
+
* Lists UTXOs on one of the Primary Network chains for the supplied addresses.
|
|
15
|
+
* @returns any
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, includeSpent, sortOrder, }: {
|
|
19
|
+
/**
|
|
20
|
+
* A primary network blockchain id or alias.
|
|
21
|
+
*/
|
|
22
|
+
blockchainId: BlockchainId;
|
|
23
|
+
/**
|
|
24
|
+
* Either mainnet or a testnet.
|
|
25
|
+
*/
|
|
26
|
+
network: Network;
|
|
27
|
+
/**
|
|
28
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
29
|
+
*/
|
|
30
|
+
addresses?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
33
|
+
*/
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
/**
|
|
36
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
37
|
+
*/
|
|
38
|
+
pageToken?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Asset ID for any asset (only applicable X-Chain)
|
|
41
|
+
*/
|
|
42
|
+
assetId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Boolean filter to include spent UTXOs.
|
|
45
|
+
*/
|
|
46
|
+
includeSpent?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
49
|
+
*/
|
|
50
|
+
sortOrder?: SortOrder;
|
|
51
|
+
}): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { PrimaryNetworkUtxOsService };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
class PrimaryNetworkUtxOsService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
getUtxosByAddresses({
|
|
6
|
+
blockchainId,
|
|
7
|
+
network,
|
|
8
|
+
addresses,
|
|
9
|
+
pageSize = 10,
|
|
10
|
+
pageToken,
|
|
11
|
+
assetId,
|
|
12
|
+
includeSpent,
|
|
13
|
+
sortOrder
|
|
14
|
+
}) {
|
|
15
|
+
return this.httpRequest.request({
|
|
16
|
+
method: "GET",
|
|
17
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
|
|
18
|
+
path: {
|
|
19
|
+
"blockchainId": blockchainId,
|
|
20
|
+
"network": network
|
|
21
|
+
},
|
|
22
|
+
query: {
|
|
23
|
+
"addresses": addresses,
|
|
24
|
+
"pageSize": pageSize,
|
|
25
|
+
"pageToken": pageToken,
|
|
26
|
+
"assetId": assetId,
|
|
27
|
+
"includeSpent": includeSpent,
|
|
28
|
+
"sortOrder": sortOrder
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { PrimaryNetworkUtxOsService };
|