@avalabs/glacier-sdk 2.8.0-alpha.80 → 2.8.0-alpha.81
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 +2614 -1012
- package/dist/index.js +1428 -207
- package/esm/generated/Glacier.d.ts +18 -0
- package/esm/generated/Glacier.js +28 -0
- package/esm/generated/core/ApiError.d.ts +13 -0
- package/esm/generated/core/ApiError.js +13 -0
- package/esm/generated/core/ApiRequestOptions.d.ts +15 -0
- package/esm/generated/core/ApiResult.d.ts +9 -0
- package/esm/generated/core/BaseHttpRequest.d.ts +11 -0
- package/esm/generated/core/BaseHttpRequest.js +7 -0
- package/esm/generated/core/CancelablePromise.d.ts +28 -0
- package/esm/generated/core/CancelablePromise.js +86 -0
- package/esm/generated/core/FetchHttpRequest.js +13 -0
- package/esm/generated/core/OpenAPI.d.ts +18 -0
- package/esm/generated/core/OpenAPI.js +13 -0
- package/esm/generated/core/request.js +244 -0
- package/esm/generated/models/Address.d.ts +8 -0
- package/esm/generated/models/Asset.d.ts +28 -0
- package/esm/generated/models/AssetType.d.ts +8 -0
- package/esm/generated/models/AssetType.js +9 -0
- package/esm/generated/models/Block.d.ts +15 -0
- package/esm/generated/models/BlockchainId.d.ts +9 -0
- package/esm/generated/models/BlockchainId.js +10 -0
- package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
- package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
- package/esm/generated/models/CChainExportTransaction.js +8 -0
- package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
- package/esm/generated/models/CChainImportTransaction.js +8 -0
- package/esm/generated/models/CChainSharedAssetBalance.d.ts +30 -0
- package/esm/generated/models/CPBlockchainId.d.ts +7 -0
- package/esm/generated/models/CPBlockchainId.js +8 -0
- package/esm/generated/models/CancelListingEventResponse.d.ts +5 -0
- package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
- package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
- package/esm/generated/models/ChainInfo.d.ts +22 -0
- package/esm/generated/models/CloseAuctionEventResponse.d.ts +6 -0
- package/esm/generated/models/CollectionMetrics.d.ts +40 -0
- package/esm/generated/models/CollectionSortByOption.d.ts +8 -0
- package/esm/generated/models/CollectionSortByOption.js +9 -0
- package/esm/generated/models/ContractType.d.ts +7 -0
- package/esm/generated/models/ContractType.js +8 -0
- package/esm/generated/models/CreateTransactionExportRequest.d.ts +11 -0
- package/esm/generated/models/CurrencyCode.d.ts +18 -0
- package/esm/generated/models/CurrencyCode.js +19 -0
- package/esm/generated/models/EVMInput.d.ts +14 -0
- package/esm/generated/models/EVMOutput.d.ts +14 -0
- package/esm/generated/models/Erc1155Token.d.ts +19 -0
- package/esm/generated/models/Erc1155Token.js +8 -0
- package/esm/generated/models/Erc1155TokenBalance.d.ts +28 -0
- package/esm/generated/models/Erc1155TokenBalance.js +8 -0
- package/esm/generated/models/Erc1155TokenMetadata.d.ts +20 -0
- package/esm/generated/models/Erc1155Transfer.d.ts +27 -0
- package/esm/generated/models/Erc1155TransferDetails.d.ts +11 -0
- package/esm/generated/models/Erc20Token.d.ts +38 -0
- package/esm/generated/models/Erc20Token.js +8 -0
- package/esm/generated/models/Erc20TokenBalance.d.ts +51 -0
- package/esm/generated/models/Erc20TokenBalance.js +8 -0
- package/esm/generated/models/Erc20Transfer.d.ts +27 -0
- package/esm/generated/models/Erc20TransferDetails.d.ts +11 -0
- package/esm/generated/models/Erc721Token.d.ts +27 -0
- package/esm/generated/models/Erc721Token.js +8 -0
- package/esm/generated/models/Erc721TokenBalance.d.ts +31 -0
- package/esm/generated/models/Erc721TokenBalance.js +8 -0
- package/esm/generated/models/Erc721TokenMetadata.d.ts +19 -0
- package/esm/generated/models/Erc721Transfer.d.ts +26 -0
- package/esm/generated/models/Erc721TransferDetails.d.ts +10 -0
- package/esm/generated/models/ErcType.d.ts +8 -0
- package/esm/generated/models/ErcType.js +9 -0
- package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
- package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
- package/esm/generated/models/GetBlockResponse.d.ts +49 -0
- package/esm/generated/models/GetChainResponse.d.ts +22 -0
- package/esm/generated/models/GetContractInformationResponse.d.ts +58 -0
- package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
- package/esm/generated/models/GetTransactionResponse.d.ts +35 -0
- package/esm/generated/models/InternalTransaction.d.ts +33 -0
- package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
- package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
- package/esm/generated/models/InternalTransactionOpCall.js +12 -0
- package/esm/generated/models/ListBlocksResponse.d.ts +11 -0
- package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListCChainExportTxsResponse.d.ts +11 -0
- package/esm/generated/models/ListCChainImportTxsResponse.d.ts +11 -0
- package/esm/generated/models/ListChainsResponse.d.ts +7 -0
- package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +16 -0
- package/esm/generated/models/ListErc1155BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListErc20BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc20TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListErc721BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc721TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListInternalTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListListingsResponse.d.ts +11 -0
- package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +11 -0
- package/esm/generated/models/ListPChainBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListPChainTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListPChainUtxosResponse.d.ts +11 -0
- package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
- package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
- package/esm/generated/models/ListUtxosResponse.d.ts +11 -0
- package/esm/generated/models/ListXChainBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListXChainTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListXChainVerticesResponse.d.ts +11 -0
- package/esm/generated/models/ListingCurrencyType.d.ts +6 -0
- package/esm/generated/models/ListingCurrencyType.js +7 -0
- package/esm/generated/models/ListingEventType.d.ts +8 -0
- package/esm/generated/models/ListingEventType.js +9 -0
- package/esm/generated/models/ListingResponse.d.ts +19 -0
- package/esm/generated/models/ListingType.d.ts +6 -0
- package/esm/generated/models/ListingType.js +7 -0
- package/esm/generated/models/ListingsSortByOption.d.ts +5 -0
- package/esm/generated/models/ListingsSortByOption.js +6 -0
- package/esm/generated/models/Method.d.ts +24 -0
- package/esm/generated/models/Money.d.ts +14 -0
- package/esm/generated/models/NativeTokenBalance.d.ts +41 -0
- package/esm/generated/models/NativeTransaction.d.ts +55 -0
- package/esm/generated/models/Network.d.ts +6 -0
- package/esm/generated/models/Network.js +7 -0
- package/esm/generated/models/NetworkToken.d.ts +23 -0
- package/esm/generated/models/NetworkTokenDetails.d.ts +18 -0
- package/esm/generated/models/NftCollection.d.ts +22 -0
- package/esm/generated/models/NftCollectionWithMetrics.d.ts +24 -0
- package/esm/generated/models/NftFilterOptionsProperty.d.ts +10 -0
- package/esm/generated/models/NftSearchBody.d.ts +10 -0
- package/esm/generated/models/NftSearchResultTypeOption.d.ts +6 -0
- package/esm/generated/models/NftSearchResultTypeOption.js +7 -0
- package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
- package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
- package/esm/generated/models/OpenListingEventResponse.d.ts +17 -0
- package/esm/generated/models/OperationMetadata.d.ts +3 -0
- package/esm/generated/models/OperationStatusResponse.d.ts +14 -0
- package/esm/generated/models/PChainAsset.d.ts +6 -0
- package/esm/generated/models/PChainBalance.d.ts +30 -0
- package/esm/generated/models/PChainConsumedUtxo.d.ts +9 -0
- package/esm/generated/models/PChainEmittedUtxo.d.ts +13 -0
- package/esm/generated/models/PChainId.d.ts +6 -0
- package/esm/generated/models/PChainId.js +7 -0
- package/esm/generated/models/PChainTransaction.d.ts +45 -0
- package/esm/generated/models/PChainUtxo.d.ts +20 -0
- package/esm/generated/models/PaginationParams.d.ts +13 -0
- package/esm/generated/models/PrimaryNetworkOptions.d.ts +6 -0
- package/esm/generated/models/ProposerDetails.d.ts +9 -0
- package/esm/generated/models/PurchaseListingEventResponse.d.ts +17 -0
- package/esm/generated/models/ResourceLink.d.ts +8 -0
- package/esm/generated/models/ResourceLinkType.d.ts +18 -0
- package/esm/generated/models/ResourceLinkType.js +19 -0
- package/esm/generated/models/ReviewStatus.d.ts +6 -0
- package/esm/generated/models/ReviewStatus.js +7 -0
- package/esm/generated/models/RichAddress.d.ts +26 -0
- package/esm/generated/models/SortOrder.d.ts +6 -0
- package/esm/generated/models/SortOrder.js +7 -0
- package/esm/generated/models/TokenWithPrice.d.ts +28 -0
- package/esm/generated/models/TransactionDetails.d.ts +36 -0
- package/esm/generated/models/TransactionMethodType.d.ts +7 -0
- package/esm/generated/models/TransactionMethodType.js +8 -0
- package/esm/generated/models/TransactionStatus.d.ts +6 -0
- package/esm/generated/models/TransactionStatus.js +7 -0
- package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
- package/esm/generated/models/TrendingTimeframe.d.ts +7 -0
- package/esm/generated/models/TrendingTimeframe.js +8 -0
- package/esm/generated/models/UtilityAddresses.d.ts +5 -0
- package/esm/generated/models/Utxo.d.ts +60 -0
- package/esm/generated/models/UtxoCredential.d.ts +12 -0
- package/esm/generated/models/VmName.d.ts +7 -0
- package/esm/generated/models/VmName.js +8 -0
- package/esm/generated/models/XChainAssetBalance.d.ts +29 -0
- package/esm/generated/models/XChainAssetDetails.d.ts +32 -0
- package/esm/generated/models/XChainBalances.d.ts +17 -0
- package/esm/generated/models/XChainId.d.ts +6 -0
- package/esm/generated/models/XChainId.js +7 -0
- package/esm/generated/models/XChainSharedAssetBalance.d.ts +30 -0
- package/esm/generated/models/XChainTransaction.d.ts +51 -0
- package/esm/generated/models/XChainVertex.d.ts +12 -0
- package/esm/generated/services/EvmService.d.ts +734 -0
- package/esm/generated/services/EvmService.js +518 -0
- package/esm/generated/services/HealthCheckService.d.ts +20 -0
- package/esm/generated/services/HealthCheckService.js +16 -0
- package/esm/generated/services/OperationsService.d.ts +30 -0
- package/esm/generated/services/OperationsService.js +28 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +359 -0
- package/esm/generated/services/PrimaryNetworkService.js +252 -0
- package/esm/index.d.ts +135 -2
- package/esm/index.js +41 -2
- package/package.json +6 -6
- package/esm/generated/models.d.ts +0 -1351
- package/esm/generated/models.js +0 -148
- package/esm/glacierClient.d.ts +0 -128
- package/esm/glacierClient.js +0 -94
- package/esm/types.d.ts +0 -14
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { BlockchainId } from '../models/BlockchainId.js';
|
|
2
|
+
import { CChainExportTransaction } from '../models/CChainExportTransaction.js';
|
|
3
|
+
import { CChainImportTransaction } from '../models/CChainImportTransaction.js';
|
|
4
|
+
import { ChainAddressChainIdMapListResponse } from '../models/ChainAddressChainIdMapListResponse.js';
|
|
5
|
+
import { CPBlockchainId } from '../models/CPBlockchainId.js';
|
|
6
|
+
import { ListBlocksResponse } from '../models/ListBlocksResponse.js';
|
|
7
|
+
import { ListCChainAtomicBalancesResponse } from '../models/ListCChainAtomicBalancesResponse.js';
|
|
8
|
+
import { ListCChainExportTxsResponse } from '../models/ListCChainExportTxsResponse.js';
|
|
9
|
+
import { ListCChainImportTxsResponse } from '../models/ListCChainImportTxsResponse.js';
|
|
10
|
+
import { ListPChainBalancesResponse } from '../models/ListPChainBalancesResponse.js';
|
|
11
|
+
import { ListPChainTransactionsResponse } from '../models/ListPChainTransactionsResponse.js';
|
|
12
|
+
import { ListPChainUtxosResponse } from '../models/ListPChainUtxosResponse.js';
|
|
13
|
+
import { ListUtxosResponse } from '../models/ListUtxosResponse.js';
|
|
14
|
+
import { ListXChainBalancesResponse } from '../models/ListXChainBalancesResponse.js';
|
|
15
|
+
import { ListXChainTransactionsResponse } from '../models/ListXChainTransactionsResponse.js';
|
|
16
|
+
import { ListXChainVerticesResponse } from '../models/ListXChainVerticesResponse.js';
|
|
17
|
+
import { Network } from '../models/Network.js';
|
|
18
|
+
import { PChainId } from '../models/PChainId.js';
|
|
19
|
+
import { PChainTransaction } from '../models/PChainTransaction.js';
|
|
20
|
+
import { SortOrder } from '../models/SortOrder.js';
|
|
21
|
+
import { XChainAssetDetails } from '../models/XChainAssetDetails.js';
|
|
22
|
+
import { XChainId } from '../models/XChainId.js';
|
|
23
|
+
import { XChainTransaction } from '../models/XChainTransaction.js';
|
|
24
|
+
import { XChainVertex } from '../models/XChainVertex.js';
|
|
25
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
26
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
27
|
+
|
|
28
|
+
declare class PrimaryNetworkService {
|
|
29
|
+
readonly httpRequest: BaseHttpRequest;
|
|
30
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
31
|
+
/**
|
|
32
|
+
* Returns the details of the supplied transaction hash.
|
|
33
|
+
* @returns any
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
getTxByHash({ blockchainId, network, txHash, }: {
|
|
37
|
+
/**
|
|
38
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
39
|
+
*/
|
|
40
|
+
blockchainId: BlockchainId;
|
|
41
|
+
/**
|
|
42
|
+
* Either mainnet or a testnet.
|
|
43
|
+
*/
|
|
44
|
+
network: Network;
|
|
45
|
+
/**
|
|
46
|
+
* A primary network (P or X chain) transaction hash.
|
|
47
|
+
*/
|
|
48
|
+
txHash: string;
|
|
49
|
+
}): CancelablePromise<(PChainTransaction | XChainTransaction | CChainExportTransaction | CChainImportTransaction)>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
|
|
52
|
+
* @returns any
|
|
53
|
+
* @throws ApiError
|
|
54
|
+
*/
|
|
55
|
+
listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
56
|
+
/**
|
|
57
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
58
|
+
*/
|
|
59
|
+
blockchainId: BlockchainId;
|
|
60
|
+
/**
|
|
61
|
+
* Either mainnet or a testnet.
|
|
62
|
+
*/
|
|
63
|
+
network: Network;
|
|
64
|
+
/**
|
|
65
|
+
* 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".
|
|
66
|
+
*/
|
|
67
|
+
addresses?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The maximum number of items to return. The minimum page size
|
|
70
|
+
* is 1. The maximum pageSize is 100.
|
|
71
|
+
*/
|
|
72
|
+
pageSize?: number;
|
|
73
|
+
/**
|
|
74
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
75
|
+
*/
|
|
76
|
+
pageToken?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
79
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
80
|
+
* query parameter, if provided.
|
|
81
|
+
*/
|
|
82
|
+
sortOrder?: SortOrder;
|
|
83
|
+
}): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainExportTxsResponse | ListCChainImportTxsResponse)>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns active staking transactions for supplied addresses.
|
|
86
|
+
* @returns ListPChainTransactionsResponse
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
90
|
+
/**
|
|
91
|
+
* A supported chain name for P-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain instead!
|
|
92
|
+
*/
|
|
93
|
+
blockchainId: PChainId;
|
|
94
|
+
/**
|
|
95
|
+
* Either mainnet or a testnet.
|
|
96
|
+
*/
|
|
97
|
+
network: Network;
|
|
98
|
+
/**
|
|
99
|
+
* 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".
|
|
100
|
+
*/
|
|
101
|
+
addresses?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The maximum number of items to return. The minimum page size
|
|
104
|
+
* is 1. The maximum pageSize is 100.
|
|
105
|
+
*/
|
|
106
|
+
pageSize?: number;
|
|
107
|
+
/**
|
|
108
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
109
|
+
*/
|
|
110
|
+
pageToken?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
113
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
114
|
+
* query parameter, if provided.
|
|
115
|
+
*/
|
|
116
|
+
sortOrder?: SortOrder;
|
|
117
|
+
}): CancelablePromise<ListPChainTransactionsResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Returns a list of UTXOs for the supplied addresses.
|
|
120
|
+
* @returns any
|
|
121
|
+
* @throws ApiError
|
|
122
|
+
*/
|
|
123
|
+
getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
|
|
124
|
+
/**
|
|
125
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
126
|
+
*/
|
|
127
|
+
blockchainId: BlockchainId;
|
|
128
|
+
/**
|
|
129
|
+
* Either mainnet or a testnet.
|
|
130
|
+
*/
|
|
131
|
+
network: Network;
|
|
132
|
+
/**
|
|
133
|
+
* 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".
|
|
134
|
+
*/
|
|
135
|
+
addresses?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The maximum number of items to return. The minimum page size
|
|
138
|
+
* is 1. The maximum pageSize is 100.
|
|
139
|
+
*/
|
|
140
|
+
pageSize?: number;
|
|
141
|
+
/**
|
|
142
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
143
|
+
*/
|
|
144
|
+
pageToken?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Asset ID for any asset (only applicable X-Chain)
|
|
147
|
+
*/
|
|
148
|
+
assetId?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
151
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
152
|
+
* query parameter, if provided.
|
|
153
|
+
*/
|
|
154
|
+
sortOrder?: SortOrder;
|
|
155
|
+
}): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns balance for P-Chain, X-Chain, and C-Chain (only shared memory balance for C-Chain).
|
|
158
|
+
* @returns any
|
|
159
|
+
* @throws ApiError
|
|
160
|
+
*/
|
|
161
|
+
getBalancesByAddresses({ blockchainId, network, addresses, }: {
|
|
162
|
+
/**
|
|
163
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
164
|
+
*/
|
|
165
|
+
blockchainId: BlockchainId;
|
|
166
|
+
/**
|
|
167
|
+
* Either mainnet or a testnet.
|
|
168
|
+
*/
|
|
169
|
+
network: Network;
|
|
170
|
+
/**
|
|
171
|
+
* 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".
|
|
172
|
+
*/
|
|
173
|
+
addresses?: string;
|
|
174
|
+
}): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
|
|
175
|
+
/**
|
|
176
|
+
* Returns block by block_height or block_hash on P-Chain or C-Chain (hexadecimal for C-Chain).
|
|
177
|
+
* @returns ListBlocksResponse
|
|
178
|
+
* @throws ApiError
|
|
179
|
+
*/
|
|
180
|
+
getBlockById({ blockchainId, network, blockId, }: {
|
|
181
|
+
/**
|
|
182
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
183
|
+
*/
|
|
184
|
+
blockchainId: CPBlockchainId;
|
|
185
|
+
/**
|
|
186
|
+
* Either mainnet or a testnet.
|
|
187
|
+
*/
|
|
188
|
+
network: Network;
|
|
189
|
+
/**
|
|
190
|
+
* A block identifier which is either a block number or the block hash.
|
|
191
|
+
*/
|
|
192
|
+
blockId: string;
|
|
193
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
194
|
+
/**
|
|
195
|
+
* Returns latest blocks, up to user defined limit on P-Chain or C-Chain.
|
|
196
|
+
* @returns ListBlocksResponse
|
|
197
|
+
* @throws ApiError
|
|
198
|
+
*/
|
|
199
|
+
listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
|
|
200
|
+
/**
|
|
201
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
202
|
+
*/
|
|
203
|
+
blockchainId: CPBlockchainId;
|
|
204
|
+
/**
|
|
205
|
+
* Either mainnet or a testnet.
|
|
206
|
+
*/
|
|
207
|
+
network: Network;
|
|
208
|
+
/**
|
|
209
|
+
* The maximum number of items to return. The minimum page size
|
|
210
|
+
* is 1. The maximum pageSize is 100.
|
|
211
|
+
*/
|
|
212
|
+
pageSize?: number;
|
|
213
|
+
/**
|
|
214
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
215
|
+
*/
|
|
216
|
+
pageToken?: string;
|
|
217
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* Returns latest vertices, up to user defined limit on X-Chain.
|
|
220
|
+
* @returns ListXChainVerticesResponse
|
|
221
|
+
* @throws ApiError
|
|
222
|
+
*/
|
|
223
|
+
listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
|
|
224
|
+
/**
|
|
225
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
226
|
+
*/
|
|
227
|
+
blockchainId: XChainId;
|
|
228
|
+
/**
|
|
229
|
+
* Either mainnet or a testnet.
|
|
230
|
+
*/
|
|
231
|
+
network: Network;
|
|
232
|
+
/**
|
|
233
|
+
* The maximum number of items to return. The minimum page size
|
|
234
|
+
* is 1. The maximum pageSize is 100.
|
|
235
|
+
*/
|
|
236
|
+
pageSize?: number;
|
|
237
|
+
/**
|
|
238
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
239
|
+
*/
|
|
240
|
+
pageToken?: string;
|
|
241
|
+
}): CancelablePromise<ListXChainVerticesResponse>;
|
|
242
|
+
/**
|
|
243
|
+
* Returns one vertex with the provided vertex hash on X-Chain.
|
|
244
|
+
* @returns XChainVertex
|
|
245
|
+
* @throws ApiError
|
|
246
|
+
*/
|
|
247
|
+
getVertexByHash({ vertexHash, blockchainId, network, }: {
|
|
248
|
+
/**
|
|
249
|
+
* A vertex hash string.
|
|
250
|
+
*/
|
|
251
|
+
vertexHash: string;
|
|
252
|
+
/**
|
|
253
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
254
|
+
*/
|
|
255
|
+
blockchainId: XChainId;
|
|
256
|
+
/**
|
|
257
|
+
* Either mainnet or a testnet.
|
|
258
|
+
*/
|
|
259
|
+
network: Network;
|
|
260
|
+
}): CancelablePromise<XChainVertex>;
|
|
261
|
+
/**
|
|
262
|
+
* Returns vertices with the provided vertex height on X-Chain.
|
|
263
|
+
* @returns ListXChainVerticesResponse
|
|
264
|
+
* @throws ApiError
|
|
265
|
+
*/
|
|
266
|
+
getVertexByHeight({ vertexHeight, blockchainId, network, pageSize, pageToken, sortOrder, }: {
|
|
267
|
+
/**
|
|
268
|
+
* The height of a vertex.
|
|
269
|
+
*/
|
|
270
|
+
vertexHeight: number;
|
|
271
|
+
/**
|
|
272
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
273
|
+
*/
|
|
274
|
+
blockchainId: XChainId;
|
|
275
|
+
/**
|
|
276
|
+
* Either mainnet or a testnet.
|
|
277
|
+
*/
|
|
278
|
+
network: Network;
|
|
279
|
+
/**
|
|
280
|
+
* The maximum number of items to return. The minimum page size
|
|
281
|
+
* is 1. The maximum pageSize is 100.
|
|
282
|
+
*/
|
|
283
|
+
pageSize?: number;
|
|
284
|
+
/**
|
|
285
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
286
|
+
*/
|
|
287
|
+
pageToken?: string;
|
|
288
|
+
/**
|
|
289
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
290
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
291
|
+
* query parameter, if provided.
|
|
292
|
+
*/
|
|
293
|
+
sortOrder?: SortOrder;
|
|
294
|
+
}): CancelablePromise<ListXChainVerticesResponse>;
|
|
295
|
+
/**
|
|
296
|
+
* Returns asset details corresponding to the asset id on X-Chain.
|
|
297
|
+
* @returns XChainAssetDetails
|
|
298
|
+
* @throws ApiError
|
|
299
|
+
*/
|
|
300
|
+
getAssetDetails({ assetId, blockchainId, network, }: {
|
|
301
|
+
/**
|
|
302
|
+
* Asset ID for any asset on X-Chain
|
|
303
|
+
*/
|
|
304
|
+
assetId: string;
|
|
305
|
+
/**
|
|
306
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
307
|
+
*/
|
|
308
|
+
blockchainId: BlockchainId;
|
|
309
|
+
/**
|
|
310
|
+
* Either mainnet or a testnet.
|
|
311
|
+
*/
|
|
312
|
+
network: Network;
|
|
313
|
+
}): CancelablePromise<XChainAssetDetails>;
|
|
314
|
+
/**
|
|
315
|
+
* Returns asset transactions corresponding to the asset id on X-Chain.
|
|
316
|
+
* @returns ListXChainTransactionsResponse
|
|
317
|
+
* @throws ApiError
|
|
318
|
+
*/
|
|
319
|
+
getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
|
|
320
|
+
/**
|
|
321
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
322
|
+
*/
|
|
323
|
+
blockchainId: XChainId;
|
|
324
|
+
/**
|
|
325
|
+
* Either mainnet or a testnet.
|
|
326
|
+
*/
|
|
327
|
+
network: Network;
|
|
328
|
+
/**
|
|
329
|
+
* Asset ID for any asset on X-Chain
|
|
330
|
+
*/
|
|
331
|
+
assetId: string;
|
|
332
|
+
/**
|
|
333
|
+
* The maximum number of items to return. The minimum page size
|
|
334
|
+
* is 1. The maximum pageSize is 100.
|
|
335
|
+
*/
|
|
336
|
+
pageSize?: number;
|
|
337
|
+
/**
|
|
338
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
339
|
+
*/
|
|
340
|
+
pageToken?: string;
|
|
341
|
+
}): CancelablePromise<ListXChainTransactionsResponse>;
|
|
342
|
+
/**
|
|
343
|
+
* Return all address-mapped chain IDs that an address has been seen on chain before.
|
|
344
|
+
* @returns ChainAddressChainIdMapListResponse
|
|
345
|
+
* @throws ApiError
|
|
346
|
+
*/
|
|
347
|
+
getChainAddresses({ addresses, network, }: {
|
|
348
|
+
/**
|
|
349
|
+
* 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".
|
|
350
|
+
*/
|
|
351
|
+
addresses: string;
|
|
352
|
+
/**
|
|
353
|
+
* Either mainnet or a testnet.
|
|
354
|
+
*/
|
|
355
|
+
network: Network;
|
|
356
|
+
}): CancelablePromise<ChainAddressChainIdMapListResponse>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export { PrimaryNetworkService };
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
class PrimaryNetworkService {
|
|
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
|
+
pageSize = 10,
|
|
25
|
+
pageToken,
|
|
26
|
+
sortOrder
|
|
27
|
+
}) {
|
|
28
|
+
return this.httpRequest.request({
|
|
29
|
+
method: "GET",
|
|
30
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
|
|
31
|
+
path: {
|
|
32
|
+
"blockchainId": blockchainId,
|
|
33
|
+
"network": network
|
|
34
|
+
},
|
|
35
|
+
query: {
|
|
36
|
+
"addresses": addresses,
|
|
37
|
+
"pageSize": pageSize,
|
|
38
|
+
"pageToken": pageToken,
|
|
39
|
+
"sortOrder": sortOrder
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
listActivePrimaryNetworkStakingTransactions({
|
|
44
|
+
blockchainId,
|
|
45
|
+
network,
|
|
46
|
+
addresses,
|
|
47
|
+
pageSize = 10,
|
|
48
|
+
pageToken,
|
|
49
|
+
sortOrder
|
|
50
|
+
}) {
|
|
51
|
+
return this.httpRequest.request({
|
|
52
|
+
method: "GET",
|
|
53
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
|
|
54
|
+
path: {
|
|
55
|
+
"blockchainId": blockchainId,
|
|
56
|
+
"network": network
|
|
57
|
+
},
|
|
58
|
+
query: {
|
|
59
|
+
"addresses": addresses,
|
|
60
|
+
"pageSize": pageSize,
|
|
61
|
+
"pageToken": pageToken,
|
|
62
|
+
"sortOrder": sortOrder
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getUtxosByAddresses({
|
|
67
|
+
blockchainId,
|
|
68
|
+
network,
|
|
69
|
+
addresses,
|
|
70
|
+
pageSize = 10,
|
|
71
|
+
pageToken,
|
|
72
|
+
assetId,
|
|
73
|
+
sortOrder
|
|
74
|
+
}) {
|
|
75
|
+
return this.httpRequest.request({
|
|
76
|
+
method: "GET",
|
|
77
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
|
|
78
|
+
path: {
|
|
79
|
+
"blockchainId": blockchainId,
|
|
80
|
+
"network": network
|
|
81
|
+
},
|
|
82
|
+
query: {
|
|
83
|
+
"addresses": addresses,
|
|
84
|
+
"pageSize": pageSize,
|
|
85
|
+
"pageToken": pageToken,
|
|
86
|
+
"assetId": assetId,
|
|
87
|
+
"sortOrder": sortOrder
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getBalancesByAddresses({
|
|
92
|
+
blockchainId,
|
|
93
|
+
network,
|
|
94
|
+
addresses
|
|
95
|
+
}) {
|
|
96
|
+
return this.httpRequest.request({
|
|
97
|
+
method: "GET",
|
|
98
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/balances",
|
|
99
|
+
path: {
|
|
100
|
+
"blockchainId": blockchainId,
|
|
101
|
+
"network": network
|
|
102
|
+
},
|
|
103
|
+
query: {
|
|
104
|
+
"addresses": addresses
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
getBlockById({
|
|
109
|
+
blockchainId,
|
|
110
|
+
network,
|
|
111
|
+
blockId
|
|
112
|
+
}) {
|
|
113
|
+
return this.httpRequest.request({
|
|
114
|
+
method: "GET",
|
|
115
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}",
|
|
116
|
+
path: {
|
|
117
|
+
"blockchainId": blockchainId,
|
|
118
|
+
"network": network,
|
|
119
|
+
"blockId": blockId
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
listLatestPrimaryNetworkBlocks({
|
|
124
|
+
blockchainId,
|
|
125
|
+
network,
|
|
126
|
+
pageSize = 10,
|
|
127
|
+
pageToken
|
|
128
|
+
}) {
|
|
129
|
+
return this.httpRequest.request({
|
|
130
|
+
method: "GET",
|
|
131
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks",
|
|
132
|
+
path: {
|
|
133
|
+
"blockchainId": blockchainId,
|
|
134
|
+
"network": network
|
|
135
|
+
},
|
|
136
|
+
query: {
|
|
137
|
+
"pageSize": pageSize,
|
|
138
|
+
"pageToken": pageToken
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
listLatestXChainVertices({
|
|
143
|
+
blockchainId,
|
|
144
|
+
network,
|
|
145
|
+
pageSize = 10,
|
|
146
|
+
pageToken
|
|
147
|
+
}) {
|
|
148
|
+
return this.httpRequest.request({
|
|
149
|
+
method: "GET",
|
|
150
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
|
|
151
|
+
path: {
|
|
152
|
+
"blockchainId": blockchainId,
|
|
153
|
+
"network": network
|
|
154
|
+
},
|
|
155
|
+
query: {
|
|
156
|
+
"pageSize": pageSize,
|
|
157
|
+
"pageToken": pageToken
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
getVertexByHash({
|
|
162
|
+
vertexHash,
|
|
163
|
+
blockchainId,
|
|
164
|
+
network
|
|
165
|
+
}) {
|
|
166
|
+
return this.httpRequest.request({
|
|
167
|
+
method: "GET",
|
|
168
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
|
|
169
|
+
path: {
|
|
170
|
+
"vertexHash": vertexHash,
|
|
171
|
+
"blockchainId": blockchainId,
|
|
172
|
+
"network": network
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
getVertexByHeight({
|
|
177
|
+
vertexHeight,
|
|
178
|
+
blockchainId,
|
|
179
|
+
network,
|
|
180
|
+
pageSize = 10,
|
|
181
|
+
pageToken,
|
|
182
|
+
sortOrder
|
|
183
|
+
}) {
|
|
184
|
+
return this.httpRequest.request({
|
|
185
|
+
method: "GET",
|
|
186
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
|
|
187
|
+
path: {
|
|
188
|
+
"blockchainId": blockchainId,
|
|
189
|
+
"network": network
|
|
190
|
+
},
|
|
191
|
+
query: {
|
|
192
|
+
"vertexHeight": vertexHeight,
|
|
193
|
+
"pageSize": pageSize,
|
|
194
|
+
"pageToken": pageToken,
|
|
195
|
+
"sortOrder": sortOrder
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
getAssetDetails({
|
|
200
|
+
assetId,
|
|
201
|
+
blockchainId,
|
|
202
|
+
network
|
|
203
|
+
}) {
|
|
204
|
+
return this.httpRequest.request({
|
|
205
|
+
method: "GET",
|
|
206
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}",
|
|
207
|
+
path: {
|
|
208
|
+
"assetId": assetId,
|
|
209
|
+
"blockchainId": blockchainId,
|
|
210
|
+
"network": network
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
getAssetTransactions({
|
|
215
|
+
blockchainId,
|
|
216
|
+
network,
|
|
217
|
+
assetId,
|
|
218
|
+
pageSize = 10,
|
|
219
|
+
pageToken
|
|
220
|
+
}) {
|
|
221
|
+
return this.httpRequest.request({
|
|
222
|
+
method: "GET",
|
|
223
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
|
|
224
|
+
path: {
|
|
225
|
+
"blockchainId": blockchainId,
|
|
226
|
+
"network": network,
|
|
227
|
+
"assetId": assetId
|
|
228
|
+
},
|
|
229
|
+
query: {
|
|
230
|
+
"pageSize": pageSize,
|
|
231
|
+
"pageToken": pageToken
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
getChainAddresses({
|
|
236
|
+
addresses,
|
|
237
|
+
network
|
|
238
|
+
}) {
|
|
239
|
+
return this.httpRequest.request({
|
|
240
|
+
method: "GET",
|
|
241
|
+
url: "/v1/networks/{network}/addresses:listChainIds",
|
|
242
|
+
path: {
|
|
243
|
+
"network": network
|
|
244
|
+
},
|
|
245
|
+
query: {
|
|
246
|
+
"addresses": addresses
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export { PrimaryNetworkService };
|