@avalabs/glacier-sdk 2.8.0-alpha.10 → 2.8.0-alpha.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +3242 -3
  3. package/dist/index.js +1558 -153
  4. package/esm/generated/Glacier.d.ts +18 -0
  5. package/esm/generated/Glacier.js +28 -0
  6. package/esm/generated/core/ApiError.d.ts +13 -0
  7. package/esm/generated/core/ApiError.js +13 -0
  8. package/esm/generated/core/ApiRequestOptions.d.ts +15 -0
  9. package/esm/generated/core/ApiResult.d.ts +9 -0
  10. package/esm/generated/core/BaseHttpRequest.d.ts +11 -0
  11. package/esm/generated/core/BaseHttpRequest.js +7 -0
  12. package/esm/generated/core/CancelablePromise.d.ts +28 -0
  13. package/esm/generated/core/CancelablePromise.js +86 -0
  14. package/esm/generated/core/FetchHttpRequest.js +13 -0
  15. package/esm/generated/core/OpenAPI.d.ts +18 -0
  16. package/esm/generated/core/OpenAPI.js +13 -0
  17. package/esm/generated/core/request.js +244 -0
  18. package/esm/generated/models/Address.d.ts +8 -0
  19. package/esm/generated/models/Asset.d.ts +28 -0
  20. package/esm/generated/models/Block.d.ts +15 -0
  21. package/esm/generated/models/BlockchainId.d.ts +9 -0
  22. package/esm/generated/models/BlockchainId.js +10 -0
  23. package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
  24. package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
  25. package/esm/generated/models/CChainExportTransaction.js +8 -0
  26. package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
  27. package/esm/generated/models/CChainImportTransaction.js +8 -0
  28. package/esm/generated/models/CChainSharedAssetBalance.d.ts +30 -0
  29. package/esm/generated/models/CancelListingEventResponse.d.ts +5 -0
  30. package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
  31. package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
  32. package/esm/generated/models/ChainInfo.d.ts +30 -0
  33. package/esm/generated/models/ChainStatus.d.ts +6 -0
  34. package/esm/generated/models/ChainStatus.js +7 -0
  35. package/esm/generated/models/CloseAuctionEventResponse.d.ts +6 -0
  36. package/esm/generated/models/CollectionMetrics.d.ts +42 -0
  37. package/esm/generated/models/CollectionSortByOption.d.ts +8 -0
  38. package/esm/generated/models/CollectionSortByOption.js +9 -0
  39. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +15 -0
  40. package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
  41. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +15 -0
  42. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
  43. package/esm/generated/models/CurrencyCode.d.ts +18 -0
  44. package/esm/generated/models/CurrencyCode.js +19 -0
  45. package/esm/generated/models/EVMInput.d.ts +14 -0
  46. package/esm/generated/models/EVMOutput.d.ts +14 -0
  47. package/esm/generated/models/Erc1155Token.d.ts +19 -0
  48. package/esm/generated/models/Erc1155Token.js +8 -0
  49. package/esm/generated/models/Erc1155TokenBalance.d.ts +28 -0
  50. package/esm/generated/models/Erc1155TokenBalance.js +8 -0
  51. package/esm/generated/models/Erc1155TokenMetadata.d.ts +20 -0
  52. package/esm/generated/models/Erc1155Transfer.d.ts +27 -0
  53. package/esm/generated/models/Erc1155TransferDetails.d.ts +11 -0
  54. package/esm/generated/models/Erc20Token.d.ts +38 -0
  55. package/esm/generated/models/Erc20Token.js +8 -0
  56. package/esm/generated/models/Erc20TokenBalance.d.ts +51 -0
  57. package/esm/generated/models/Erc20TokenBalance.js +8 -0
  58. package/esm/generated/models/Erc20Transfer.d.ts +27 -0
  59. package/esm/generated/models/Erc20TransferDetails.d.ts +11 -0
  60. package/esm/generated/models/Erc721Token.d.ts +31 -0
  61. package/esm/generated/models/Erc721Token.js +8 -0
  62. package/esm/generated/models/Erc721TokenBalance.d.ts +35 -0
  63. package/esm/generated/models/Erc721TokenBalance.js +8 -0
  64. package/esm/generated/models/Erc721TokenMetadata.d.ts +19 -0
  65. package/esm/generated/models/Erc721Transfer.d.ts +26 -0
  66. package/esm/generated/models/Erc721TransferDetails.d.ts +10 -0
  67. package/esm/generated/models/ErcType.d.ts +8 -0
  68. package/esm/generated/models/ErcType.js +9 -0
  69. package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
  70. package/esm/generated/models/FloorPrice.d.ts +6 -0
  71. package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
  72. package/esm/generated/models/GetBlockResponse.d.ts +49 -0
  73. package/esm/generated/models/GetChainResponse.d.ts +30 -0
  74. package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
  75. package/esm/generated/models/GetTransactionResponse.d.ts +35 -0
  76. package/esm/generated/models/InternalTransaction.d.ts +33 -0
  77. package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
  78. package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
  79. package/esm/generated/models/InternalTransactionOpCall.js +12 -0
  80. package/esm/generated/models/ListBlocksResponse.d.ts +11 -0
  81. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +7 -0
  82. package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +12 -0
  83. package/esm/generated/models/ListChainsResponse.d.ts +7 -0
  84. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +16 -0
  85. package/esm/generated/models/ListErc1155BalancesResponse.d.ts +14 -0
  86. package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +11 -0
  87. package/esm/generated/models/ListErc20BalancesResponse.d.ts +14 -0
  88. package/esm/generated/models/ListErc20TransactionsResponse.d.ts +11 -0
  89. package/esm/generated/models/ListErc721BalancesResponse.d.ts +14 -0
  90. package/esm/generated/models/ListErc721TransactionsResponse.d.ts +11 -0
  91. package/esm/generated/models/ListInternalTransactionsResponse.d.ts +11 -0
  92. package/esm/generated/models/ListListingsResponse.d.ts +11 -0
  93. package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
  94. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +11 -0
  95. package/esm/generated/models/ListPChainBalancesResponse.d.ts +7 -0
  96. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +11 -0
  97. package/esm/generated/models/ListPChainUtxosResponse.d.ts +11 -0
  98. package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
  99. package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
  100. package/esm/generated/models/ListUtxosResponse.d.ts +11 -0
  101. package/esm/generated/models/ListXChainBalancesResponse.d.ts +7 -0
  102. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +12 -0
  103. package/esm/generated/models/ListXChainVerticesResponse.d.ts +11 -0
  104. package/esm/generated/models/ListingCurrencyType.d.ts +6 -0
  105. package/esm/generated/models/ListingCurrencyType.js +7 -0
  106. package/esm/generated/models/ListingEventType.d.ts +8 -0
  107. package/esm/generated/models/ListingEventType.js +9 -0
  108. package/esm/generated/models/ListingResponse.d.ts +19 -0
  109. package/esm/generated/models/ListingType.d.ts +6 -0
  110. package/esm/generated/models/ListingType.js +7 -0
  111. package/esm/generated/models/ListingsSortByOption.d.ts +5 -0
  112. package/esm/generated/models/ListingsSortByOption.js +6 -0
  113. package/esm/generated/models/Method.d.ts +24 -0
  114. package/esm/generated/models/Money.d.ts +14 -0
  115. package/esm/generated/models/NativeTokenBalance.d.ts +41 -0
  116. package/esm/generated/models/NativeTransaction.d.ts +55 -0
  117. package/esm/generated/models/Network.d.ts +6 -0
  118. package/esm/generated/models/Network.js +7 -0
  119. package/esm/generated/models/NetworkToken.d.ts +23 -0
  120. package/esm/generated/models/NetworkTokenDetails.d.ts +18 -0
  121. package/esm/generated/models/NftCollection.d.ts +24 -0
  122. package/esm/generated/models/NftCollectionWithMetrics.d.ts +26 -0
  123. package/esm/generated/models/NftFilterOptionsProperty.d.ts +10 -0
  124. package/esm/generated/models/NftSearchBody.d.ts +10 -0
  125. package/esm/generated/models/NftSearchResultTypeOption.d.ts +6 -0
  126. package/esm/generated/models/NftSearchResultTypeOption.js +7 -0
  127. package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
  128. package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
  129. package/esm/generated/models/OpenListingEventResponse.d.ts +17 -0
  130. package/esm/generated/models/OperationStatus.d.ts +8 -0
  131. package/esm/generated/models/OperationStatus.js +9 -0
  132. package/esm/generated/models/OperationStatusCode.d.ts +7 -0
  133. package/esm/generated/models/OperationStatusCode.js +8 -0
  134. package/esm/generated/models/OperationStatusResponse.d.ts +15 -0
  135. package/esm/generated/models/OperationType.d.ts +6 -0
  136. package/esm/generated/models/OperationType.js +7 -0
  137. package/esm/generated/models/PChainAsset.d.ts +6 -0
  138. package/esm/generated/models/PChainBalance.d.ts +30 -0
  139. package/esm/generated/models/PChainId.d.ts +6 -0
  140. package/esm/generated/models/PChainId.js +7 -0
  141. package/esm/generated/models/PChainTransaction.d.ts +76 -0
  142. package/esm/generated/models/PChainTransactionType.d.ts +16 -0
  143. package/esm/generated/models/PChainTransactionType.js +17 -0
  144. package/esm/generated/models/PChainUtxo.d.ts +37 -0
  145. package/esm/generated/models/PaginationParams.d.ts +13 -0
  146. package/esm/generated/models/PrimaryNetworkOptions.d.ts +6 -0
  147. package/esm/generated/models/ProposerDetails.d.ts +9 -0
  148. package/esm/generated/models/PurchaseListingEventResponse.d.ts +17 -0
  149. package/esm/generated/models/ResourceLink.d.ts +8 -0
  150. package/esm/generated/models/ResourceLinkType.d.ts +22 -0
  151. package/esm/generated/models/ResourceLinkType.js +23 -0
  152. package/esm/generated/models/RewardType.d.ts +6 -0
  153. package/esm/generated/models/RewardType.js +7 -0
  154. package/esm/generated/models/RichAddress.d.ts +26 -0
  155. package/esm/generated/models/SortOrder.d.ts +6 -0
  156. package/esm/generated/models/SortOrder.js +7 -0
  157. package/esm/generated/models/TokenWithPrice.d.ts +28 -0
  158. package/esm/generated/models/TransactionDetails.d.ts +36 -0
  159. package/esm/generated/models/TransactionExportMetadata.d.ts +18 -0
  160. package/esm/generated/models/TransactionMethodType.d.ts +7 -0
  161. package/esm/generated/models/TransactionMethodType.js +8 -0
  162. package/esm/generated/models/TransactionStatus.d.ts +6 -0
  163. package/esm/generated/models/TransactionStatus.js +7 -0
  164. package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
  165. package/esm/generated/models/TrendingTimeframe.d.ts +7 -0
  166. package/esm/generated/models/TrendingTimeframe.js +8 -0
  167. package/esm/generated/models/UtilityAddresses.d.ts +5 -0
  168. package/esm/generated/models/Utxo.d.ts +60 -0
  169. package/esm/generated/models/UtxoCredential.d.ts +12 -0
  170. package/esm/generated/models/UtxoType.d.ts +6 -0
  171. package/esm/generated/models/UtxoType.js +7 -0
  172. package/esm/generated/models/VmName.d.ts +7 -0
  173. package/esm/generated/models/VmName.js +8 -0
  174. package/esm/generated/models/XChainAssetBalance.d.ts +29 -0
  175. package/esm/generated/models/XChainAssetDetails.d.ts +32 -0
  176. package/esm/generated/models/XChainBalances.d.ts +17 -0
  177. package/esm/generated/models/XChainId.d.ts +6 -0
  178. package/esm/generated/models/XChainId.js +7 -0
  179. package/esm/generated/models/XChainLinearTransaction.d.ts +67 -0
  180. package/esm/generated/models/XChainLinearTransaction.js +9 -0
  181. package/esm/generated/models/XChainNonLinearTransaction.d.ts +64 -0
  182. package/esm/generated/models/XChainNonLinearTransaction.js +9 -0
  183. package/esm/generated/models/XChainSharedAssetBalance.d.ts +30 -0
  184. package/esm/generated/models/XChainVertex.d.ts +12 -0
  185. package/esm/generated/services/EvmService.d.ts +730 -0
  186. package/esm/generated/services/EvmService.js +511 -0
  187. package/esm/generated/services/HealthCheckService.d.ts +20 -0
  188. package/esm/generated/services/HealthCheckService.js +16 -0
  189. package/esm/generated/services/OperationsService.d.ts +31 -0
  190. package/esm/generated/services/OperationsService.js +28 -0
  191. package/esm/generated/services/PrimaryNetworkService.d.ts +387 -0
  192. package/esm/generated/services/PrimaryNetworkService.js +273 -0
  193. package/esm/index.d.ts +137 -0
  194. package/esm/index.js +48 -0
  195. package/package.json +11 -20
  196. package/CHANGELOG.md +0 -224
  197. package/__tests__/glacier-sdk.test.js +0 -7
  198. package/dist/index.d.ts.map +0 -1
  199. package/dist/index.js.map +0 -1
  200. package/dist/src/generated/models.d.ts +0 -385
  201. package/dist/src/generated/models.d.ts.map +0 -1
  202. package/dist/src/glacierClient.d.ts +0 -93
  203. package/dist/src/glacierClient.d.ts.map +0 -1
  204. package/dist/src/types.d.ts +0 -13
  205. package/dist/src/types.d.ts.map +0 -1
  206. package/index.ts +0 -2
  207. package/rollup.config.js +0 -33
  208. package/src/generated/models.ts +0 -460
  209. package/src/glacierClient.ts +0 -190
  210. package/src/types.ts +0 -6
  211. package/swagger/generateModels.js +0 -40
  212. package/tsconfig.json +0 -7
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3242 @@
1
- export * from './src/generated/models';
2
- export * from './src/glacierClient';
3
- //# sourceMappingURL=index.d.ts.map
1
+ type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, any>;
5
+ readonly cookies?: Record<string, any>;
6
+ readonly headers?: Record<string, any>;
7
+ readonly query?: Record<string, any>;
8
+ readonly formData?: Record<string, any>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
14
+
15
+ declare class CancelError extends Error {
16
+ constructor(message: string);
17
+ get isCancelled(): boolean;
18
+ }
19
+ interface OnCancel {
20
+ readonly isResolved: boolean;
21
+ readonly isRejected: boolean;
22
+ readonly isCancelled: boolean;
23
+ (cancelHandler: () => void): void;
24
+ }
25
+ declare class CancelablePromise<T> implements Promise<T> {
26
+ readonly [Symbol.toStringTag]: string;
27
+ private _isResolved;
28
+ private _isRejected;
29
+ private _isCancelled;
30
+ private readonly _cancelHandlers;
31
+ private readonly _promise;
32
+ private _resolve?;
33
+ private _reject?;
34
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
35
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
36
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
37
+ finally(onFinally?: (() => void) | null): Promise<T>;
38
+ cancel(): void;
39
+ get isCancelled(): boolean;
40
+ }
41
+
42
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
43
+ type Headers = Record<string, string>;
44
+ type OpenAPIConfig = {
45
+ BASE: string;
46
+ VERSION: string;
47
+ WITH_CREDENTIALS: boolean;
48
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
49
+ TOKEN?: string | Resolver<string>;
50
+ USERNAME?: string | Resolver<string>;
51
+ PASSWORD?: string | Resolver<string>;
52
+ HEADERS?: Headers | Resolver<Headers>;
53
+ ENCODE_PATH?: (path: string) => string;
54
+ };
55
+ declare const OpenAPI: OpenAPIConfig;
56
+
57
+ declare abstract class BaseHttpRequest {
58
+ readonly config: OpenAPIConfig;
59
+ constructor(config: OpenAPIConfig);
60
+ abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
+ }
62
+
63
+ declare enum CollectionSortByOption {
64
+ SALE_TIMESTAMP = "saleTimestamp",
65
+ VOLUME = "volume",
66
+ VOLUME_CHANGE = "volumeChange",
67
+ FLOOR_PRICE = "floorPrice"
68
+ }
69
+
70
+ declare enum CurrencyCode {
71
+ USD = "usd",
72
+ EUR = "eur",
73
+ AUD = "aud",
74
+ CAD = "cad",
75
+ CHF = "chf",
76
+ CLP = "clp",
77
+ CNY = "cny",
78
+ CZK = "czk",
79
+ DKK = "dkk",
80
+ GBP = "gbp",
81
+ HKD = "hkd",
82
+ HUF = "huf",
83
+ JPY = "jpy",
84
+ NZD = "nzd"
85
+ }
86
+
87
+ declare enum NftTokenMetadataStatus {
88
+ UNKNOWN = "UNKNOWN",
89
+ MISSING_TOKEN = "MISSING_TOKEN",
90
+ INVALID_TOKEN_URI = "INVALID_TOKEN_URI",
91
+ INVALID_TOKEN_URI_SCHEME = "INVALID_TOKEN_URI_SCHEME",
92
+ UNREACHABLE_TOKEN_URI = "UNREACHABLE_TOKEN_URI",
93
+ THROTTLED_TOKEN_URI = "THROTTLED_TOKEN_URI",
94
+ METADATA_CONTENT_TOO_LARGE = "METADATA_CONTENT_TOO_LARGE",
95
+ INVALID_METADATA = "INVALID_METADATA",
96
+ INVALID_METADATA_JSON = "INVALID_METADATA_JSON",
97
+ INDEXED = "INDEXED",
98
+ UNINDEXED = "UNINDEXED"
99
+ }
100
+
101
+ type Erc1155TokenMetadata = {
102
+ /**
103
+ * The metadata indexing status of the nft.
104
+ */
105
+ indexStatus: NftTokenMetadataStatus;
106
+ metadataLastUpdatedTimestamp?: number;
107
+ name?: string;
108
+ symbol?: string;
109
+ imageUri?: string;
110
+ description?: string;
111
+ animationUri?: string;
112
+ externalUrl?: string;
113
+ background?: string;
114
+ decimals?: number;
115
+ properties?: string;
116
+ };
117
+
118
+ type Erc1155Token = {
119
+ /**
120
+ * A wallet or contract address in mixed-case checksum encoding.
121
+ */
122
+ address: string;
123
+ ercType: Erc1155Token.ercType;
124
+ tokenId: string;
125
+ tokenUri: string;
126
+ metadata: Erc1155TokenMetadata;
127
+ };
128
+ declare namespace Erc1155Token {
129
+ enum ercType {
130
+ ERC_1155 = "ERC-1155"
131
+ }
132
+ }
133
+
134
+ type Erc721TokenMetadata = {
135
+ /**
136
+ * The metadata indexing status of the nft.
137
+ */
138
+ indexStatus: NftTokenMetadataStatus;
139
+ metadataLastUpdatedTimestamp?: number;
140
+ name?: string;
141
+ symbol?: string;
142
+ imageUri?: string;
143
+ description?: string;
144
+ animationUri?: string;
145
+ externalUrl?: string;
146
+ background?: string;
147
+ attributes?: string;
148
+ };
149
+
150
+ type Erc721Token = {
151
+ /**
152
+ * A wallet or contract address in mixed-case checksum encoding.
153
+ */
154
+ address: string;
155
+ /**
156
+ * The contract name.
157
+ */
158
+ name: string;
159
+ /**
160
+ * The contract symbol.
161
+ */
162
+ symbol: string;
163
+ ercType: Erc721Token.ercType;
164
+ tokenId: string;
165
+ tokenUri: string;
166
+ metadata: Erc721TokenMetadata;
167
+ /**
168
+ * A wallet or contract address in mixed-case checksum encoding.
169
+ */
170
+ ownerAddress?: string;
171
+ };
172
+ declare namespace Erc721Token {
173
+ enum ercType {
174
+ ERC_721 = "ERC-721"
175
+ }
176
+ }
177
+
178
+ type GetBlockResponse = {
179
+ /**
180
+ * The block number on the chain.
181
+ */
182
+ blockNumber: string;
183
+ /**
184
+ * The block finality timestamp.
185
+ */
186
+ blockTimestamp: number;
187
+ /**
188
+ * The block hash identifier.
189
+ */
190
+ blockHash: string;
191
+ /**
192
+ * The number of evm transactions in the block.
193
+ */
194
+ txCount: number;
195
+ /**
196
+ * The number of atomic transactions in the block.
197
+ */
198
+ atomicTxCount: number;
199
+ /**
200
+ * The base gas fee for a transaction to be included in the block.
201
+ */
202
+ baseFee: string;
203
+ /**
204
+ * The gas used for transactions in the block.
205
+ */
206
+ gasUsed: string;
207
+ /**
208
+ * The total gas limit set for transactions in the block.
209
+ */
210
+ gasLimit: string;
211
+ gasCost: string;
212
+ /**
213
+ * The hash of the parent block.
214
+ */
215
+ parentHash: string;
216
+ /**
217
+ * The amount of fees spent/burned for transactions in the block.
218
+ */
219
+ feesSpent: string;
220
+ /**
221
+ * The cumulative number of transactions for the chain including this block.
222
+ */
223
+ cumulativeTransactions: string;
224
+ };
225
+
226
+ declare enum ChainStatus {
227
+ OK = "OK",
228
+ UNAVAILABLE = "UNAVAILABLE"
229
+ }
230
+
231
+ type NetworkToken = {
232
+ /**
233
+ * The contract name.
234
+ */
235
+ name: string;
236
+ /**
237
+ * The contract symbol.
238
+ */
239
+ symbol: string;
240
+ /**
241
+ * The number of decimals the token uses. For example `6`,
242
+ * means to divide the token amount by `1000000` to get its user
243
+ * representation.
244
+ */
245
+ decimals: number;
246
+ /**
247
+ * The logo uri for the address.
248
+ */
249
+ logoUri?: string;
250
+ description?: string;
251
+ };
252
+
253
+ type UtilityAddresses = {
254
+ multicall?: string;
255
+ };
256
+
257
+ declare enum VmName {
258
+ EVM = "EVM",
259
+ BITCOIN = "BITCOIN",
260
+ ETHEREUM = "ETHEREUM"
261
+ }
262
+
263
+ type GetChainResponse = {
264
+ chainId: string;
265
+ /**
266
+ * Status of chain nodes. Chain nodes can become temporarily
267
+ * `UNAVAILABLE` for several reasons, such as validator stake falling
268
+ * below threshold. If chain nodes are `UNAVAILABLE`, requests that rely
269
+ * on data from the chain nodes may return 503 errors.
270
+ */
271
+ status: ChainStatus;
272
+ chainName: string;
273
+ description: string;
274
+ platformChainId?: string;
275
+ subnetId?: string;
276
+ vmId?: string;
277
+ vmName: VmName;
278
+ explorerUrl?: string;
279
+ rpcUrl: string;
280
+ wsUrl?: string;
281
+ isTestnet: boolean;
282
+ utilityAddresses?: UtilityAddresses;
283
+ networkToken: NetworkToken;
284
+ chainLogoUri?: string;
285
+ };
286
+
287
+ type Money = {
288
+ /**
289
+ * ISO 4217 currency code.
290
+ */
291
+ currencyCode: CurrencyCode;
292
+ /**
293
+ * Monetary value in base 10 decimals.
294
+ */
295
+ value: number;
296
+ };
297
+
298
+ type NativeTokenBalance = {
299
+ /**
300
+ * The contract name.
301
+ */
302
+ name: string;
303
+ /**
304
+ * The contract symbol.
305
+ */
306
+ symbol: string;
307
+ /**
308
+ * The number of decimals the token uses. For example `6`,
309
+ * means to divide the token amount by `1000000` to get its user
310
+ * representation.
311
+ */
312
+ decimals: number;
313
+ /**
314
+ * The logo uri for the address.
315
+ */
316
+ logoUri?: string;
317
+ /**
318
+ * The evm chain id.
319
+ */
320
+ chainId: string;
321
+ /**
322
+ * The token price, if available.
323
+ */
324
+ price?: Money;
325
+ /**
326
+ * The address balance for the token, in units specified by the
327
+ * `decimals` value for the contract.
328
+ */
329
+ balance: string;
330
+ /**
331
+ * The monetary value of the balance, if a price is available for the token.
332
+ */
333
+ balanceValue?: Money;
334
+ };
335
+
336
+ type GetNativeBalanceResponse = {
337
+ /**
338
+ * The native token balance for the address.
339
+ */
340
+ nativeTokenBalance: NativeTokenBalance;
341
+ };
342
+
343
+ type RichAddress = {
344
+ /**
345
+ * The contract name.
346
+ */
347
+ name?: string;
348
+ /**
349
+ * The contract symbol.
350
+ */
351
+ symbol?: string;
352
+ /**
353
+ * The number of decimals the token uses. For example `6`,
354
+ * means to divide the token amount by `1000000` to get its user
355
+ * representation.
356
+ */
357
+ decimals?: number;
358
+ /**
359
+ * The logo uri for the address.
360
+ */
361
+ logoUri?: string;
362
+ /**
363
+ * A wallet or contract address in mixed-case checksum encoding.
364
+ */
365
+ address: string;
366
+ };
367
+
368
+ type Erc1155TransferDetails = {
369
+ from: RichAddress;
370
+ to: RichAddress;
371
+ value: string;
372
+ erc1155Token: Erc1155Token;
373
+ };
374
+
375
+ type Erc20Token = {
376
+ /**
377
+ * A wallet or contract address in mixed-case checksum encoding.
378
+ */
379
+ address: string;
380
+ /**
381
+ * The contract name.
382
+ */
383
+ name: string;
384
+ /**
385
+ * The contract symbol.
386
+ */
387
+ symbol: string;
388
+ /**
389
+ * The number of decimals the token uses. For example `6`,
390
+ * means to divide the token amount by `1000000` to get its user
391
+ * representation.
392
+ */
393
+ decimals: number;
394
+ /**
395
+ * The logo uri for the address.
396
+ */
397
+ logoUri?: string;
398
+ ercType: Erc20Token.ercType;
399
+ /**
400
+ * The token price, if available.
401
+ */
402
+ price?: Money;
403
+ };
404
+ declare namespace Erc20Token {
405
+ enum ercType {
406
+ ERC_20 = "ERC-20"
407
+ }
408
+ }
409
+
410
+ type Erc20TransferDetails = {
411
+ from: RichAddress;
412
+ to: RichAddress;
413
+ value: string;
414
+ erc20Token: Erc20Token;
415
+ };
416
+
417
+ type Erc721TransferDetails = {
418
+ from: RichAddress;
419
+ to: RichAddress;
420
+ erc721Token: Erc721Token;
421
+ };
422
+
423
+ declare enum TransactionMethodType {
424
+ NATIVE_TRANSFER = "NATIVE_TRANSFER",
425
+ CONTRACT_CALL = "CONTRACT_CALL",
426
+ CONTRACT_CREATION = "CONTRACT_CREATION"
427
+ }
428
+
429
+ type Method = {
430
+ /**
431
+ * The contract call type.
432
+ * NATIVE_TRANSFER indicates a transfer of the
433
+ * native token without any smart-contract interaction.
434
+ * CONTRACT_CALL indicates a smart-contract
435
+ * interaction.
436
+ * CONTRACT_CREATION indicates a smart-contract
437
+ * creation.
438
+ */
439
+ callType: TransactionMethodType;
440
+ /**
441
+ * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
442
+ */
443
+ methodHash: string;
444
+ /**
445
+ * The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'.
446
+ */
447
+ methodName?: string;
448
+ };
449
+
450
+ type FullNativeTransactionDetails = {
451
+ /**
452
+ * The block number on the chain.
453
+ */
454
+ blockNumber: string;
455
+ /**
456
+ * The block finality timestamp.
457
+ */
458
+ blockTimestamp: number;
459
+ /**
460
+ * The block hash identifier.
461
+ */
462
+ blockHash: string;
463
+ /**
464
+ * The index at which the transaction occured in the block (0-indexed).
465
+ */
466
+ blockIndex: number;
467
+ /**
468
+ * The transaction hash identifier.
469
+ */
470
+ txHash: string;
471
+ /**
472
+ * The transaction status, which is either 0 (failed) or 1 (successful).
473
+ */
474
+ txStatus: string;
475
+ /**
476
+ * The transaction type.
477
+ */
478
+ txType: number;
479
+ /**
480
+ * The gas limit set for the transaction.
481
+ */
482
+ gasLimit: string;
483
+ /**
484
+ * The amount of gas used.
485
+ */
486
+ gasUsed: string;
487
+ /**
488
+ * The gas price denominated by the number of decimals of the native token.
489
+ */
490
+ gasPrice: string;
491
+ /**
492
+ * The nonce used by the sender of the transaction.
493
+ */
494
+ nonce: string;
495
+ from: RichAddress;
496
+ to: RichAddress;
497
+ method?: Method;
498
+ value: string;
499
+ /**
500
+ * The data sent for the transaction.
501
+ */
502
+ input: string;
503
+ baseFeePerGas: string;
504
+ maxFeePerGas?: string;
505
+ maxPriorityFeePerGas?: string;
506
+ };
507
+
508
+ declare enum InternalTransactionOpCall {
509
+ UNKNOWN = "UNKNOWN",
510
+ CALL = "CALL",
511
+ CREATE = "CREATE",
512
+ CREATE2 = "CREATE2",
513
+ CALLCODE = "CALLCODE",
514
+ DELEGATECALL = "DELEGATECALL",
515
+ STATICCALL = "STATICCALL"
516
+ }
517
+
518
+ type InternalTransactionDetails = {
519
+ from: RichAddress;
520
+ to: RichAddress;
521
+ internalTxType: InternalTransactionOpCall;
522
+ value: string;
523
+ /**
524
+ * True if the internal transaction was reverted.
525
+ */
526
+ isReverted: boolean;
527
+ gasUsed: string;
528
+ gasLimit: string;
529
+ };
530
+
531
+ type NetworkTokenDetails = {
532
+ networkToken: NetworkToken;
533
+ /**
534
+ * The current token price, if available.
535
+ */
536
+ currentPrice?: Money;
537
+ /**
538
+ * The historical token price at the time the transaction
539
+ * occured, if available. Note, this is only provided if the transaction
540
+ * occured more than 24 hours ago.
541
+ */
542
+ historicalPrice?: Money;
543
+ };
544
+
545
+ type GetTransactionResponse = {
546
+ /**
547
+ * The list of ERC-20 transfers.
548
+ */
549
+ erc20Transfers?: Array<Erc20TransferDetails>;
550
+ /**
551
+ * The list of ERC-721 transfers.
552
+ */
553
+ erc721Transfers?: Array<Erc721TransferDetails>;
554
+ /**
555
+ * The list of ERC-1155 transfers.
556
+ */
557
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
558
+ /**
559
+ * The list of internal transactions. Note that this list only
560
+ * includes CALL and
561
+ * CALLCODE internal transactions that had a
562
+ * non-zero value and
563
+ * CREATE/CREATE2
564
+ * calls. Use a client provider to recieve a full debug trace of the
565
+ * transaction.
566
+ */
567
+ internalTransactions?: Array<InternalTransactionDetails>;
568
+ networkTokenDetails: NetworkTokenDetails;
569
+ nativeTransaction: FullNativeTransactionDetails;
570
+ };
571
+
572
+ type ProposerDetails = {
573
+ proposerId?: string;
574
+ proposerParentId?: string;
575
+ proposerNodeId?: string;
576
+ proposerPChainHeight?: number;
577
+ proposerTimestamp?: number;
578
+ };
579
+
580
+ type Block = {
581
+ blockNumber: string;
582
+ blockHash: string;
583
+ parentHash: string;
584
+ blockTimestamp: number;
585
+ blockType: string;
586
+ txCount: number;
587
+ transactions: Array<string>;
588
+ blockSizeBytes: number;
589
+ proposerDetails?: ProposerDetails;
590
+ };
591
+
592
+ type ListBlocksResponse = {
593
+ /**
594
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
595
+ */
596
+ nextPageToken?: string;
597
+ blocks: Array<Block>;
598
+ };
599
+
600
+ type ChainInfo = {
601
+ chainId: string;
602
+ /**
603
+ * Status of chain nodes. Chain nodes can become temporarily
604
+ * `UNAVAILABLE` for several reasons, such as validator stake falling
605
+ * below threshold. If chain nodes are `UNAVAILABLE`, requests that rely
606
+ * on data from the chain nodes may return 503 errors.
607
+ */
608
+ status: ChainStatus;
609
+ chainName: string;
610
+ description: string;
611
+ platformChainId?: string;
612
+ subnetId?: string;
613
+ vmId?: string;
614
+ vmName: VmName;
615
+ explorerUrl?: string;
616
+ rpcUrl: string;
617
+ wsUrl?: string;
618
+ isTestnet: boolean;
619
+ utilityAddresses?: UtilityAddresses;
620
+ networkToken: NetworkToken;
621
+ chainLogoUri?: string;
622
+ };
623
+
624
+ type ListChainsResponse = {
625
+ chains: Array<ChainInfo>;
626
+ };
627
+
628
+ type Erc1155TokenBalance = {
629
+ /**
630
+ * A wallet or contract address in mixed-case checksum encoding.
631
+ */
632
+ address: string;
633
+ ercType: Erc1155TokenBalance.ercType;
634
+ tokenId: string;
635
+ tokenUri: string;
636
+ metadata: Erc1155TokenMetadata;
637
+ /**
638
+ * The evm chain id.
639
+ */
640
+ chainId: string;
641
+ /**
642
+ * The address balance for the token, in units specified by the
643
+ * `decimals` value for the contract.
644
+ */
645
+ balance: string;
646
+ };
647
+ declare namespace Erc1155TokenBalance {
648
+ enum ercType {
649
+ ERC_1155 = "ERC-1155"
650
+ }
651
+ }
652
+
653
+ type Erc721TokenBalance = {
654
+ /**
655
+ * A wallet or contract address in mixed-case checksum encoding.
656
+ */
657
+ address: string;
658
+ /**
659
+ * The contract name.
660
+ */
661
+ name: string;
662
+ /**
663
+ * The contract symbol.
664
+ */
665
+ symbol: string;
666
+ ercType: Erc721TokenBalance.ercType;
667
+ tokenId: string;
668
+ tokenUri: string;
669
+ metadata: Erc721TokenMetadata;
670
+ /**
671
+ * A wallet or contract address in mixed-case checksum encoding.
672
+ */
673
+ ownerAddress?: string;
674
+ /**
675
+ * The evm chain id.
676
+ */
677
+ chainId: string;
678
+ };
679
+ declare namespace Erc721TokenBalance {
680
+ enum ercType {
681
+ ERC_721 = "ERC-721"
682
+ }
683
+ }
684
+
685
+ type ListCollectibleBalancesResponse = {
686
+ /**
687
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
688
+ */
689
+ nextPageToken?: string;
690
+ /**
691
+ * The list of ERC-721 and ERC-1155 token balances for the
692
+ * address.
693
+ */
694
+ collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
695
+ };
696
+
697
+ type ListErc1155BalancesResponse = {
698
+ /**
699
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
700
+ */
701
+ nextPageToken?: string;
702
+ /**
703
+ * The list of ERC-1155 token balances for the address.
704
+ */
705
+ erc1155TokenBalances: Array<Erc1155TokenBalance>;
706
+ };
707
+
708
+ type Erc1155Transfer = {
709
+ /**
710
+ * The block number on the chain.
711
+ */
712
+ blockNumber: string;
713
+ /**
714
+ * The block finality timestamp.
715
+ */
716
+ blockTimestamp: number;
717
+ /**
718
+ * The block hash identifier.
719
+ */
720
+ blockHash: string;
721
+ /**
722
+ * The transaction hash identifier.
723
+ */
724
+ txHash: string;
725
+ from: RichAddress;
726
+ to: RichAddress;
727
+ value: string;
728
+ erc1155Token: Erc1155Token;
729
+ };
730
+
731
+ type ListErc1155TransactionsResponse = {
732
+ /**
733
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
734
+ */
735
+ nextPageToken?: string;
736
+ transactions: Array<Erc1155Transfer>;
737
+ };
738
+
739
+ type Erc20TokenBalance = {
740
+ /**
741
+ * A wallet or contract address in mixed-case checksum encoding.
742
+ */
743
+ address: string;
744
+ /**
745
+ * The contract name.
746
+ */
747
+ name: string;
748
+ /**
749
+ * The contract symbol.
750
+ */
751
+ symbol: string;
752
+ /**
753
+ * The number of decimals the token uses. For example `6`,
754
+ * means to divide the token amount by `1000000` to get its user
755
+ * representation.
756
+ */
757
+ decimals: number;
758
+ /**
759
+ * The logo uri for the address.
760
+ */
761
+ logoUri?: string;
762
+ ercType: Erc20TokenBalance.ercType;
763
+ /**
764
+ * The token price, if available.
765
+ */
766
+ price?: Money;
767
+ /**
768
+ * The evm chain id.
769
+ */
770
+ chainId: string;
771
+ /**
772
+ * The address balance for the token, in units specified by the
773
+ * `decimals` value for the contract.
774
+ */
775
+ balance: string;
776
+ /**
777
+ * The monetary value of the balance, if a price is available for the token.
778
+ */
779
+ balanceValue?: Money;
780
+ };
781
+ declare namespace Erc20TokenBalance {
782
+ enum ercType {
783
+ ERC_20 = "ERC-20"
784
+ }
785
+ }
786
+
787
+ type ListErc20BalancesResponse = {
788
+ /**
789
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
790
+ */
791
+ nextPageToken?: string;
792
+ /**
793
+ * The list of ERC-20 token balances for the address.
794
+ */
795
+ erc20TokenBalances: Array<Erc20TokenBalance>;
796
+ };
797
+
798
+ type Erc20Transfer = {
799
+ /**
800
+ * The block number on the chain.
801
+ */
802
+ blockNumber: string;
803
+ /**
804
+ * The block finality timestamp.
805
+ */
806
+ blockTimestamp: number;
807
+ /**
808
+ * The block hash identifier.
809
+ */
810
+ blockHash: string;
811
+ /**
812
+ * The transaction hash identifier.
813
+ */
814
+ txHash: string;
815
+ from: RichAddress;
816
+ to: RichAddress;
817
+ value: string;
818
+ erc20Token: Erc20Token;
819
+ };
820
+
821
+ type ListErc20TransactionsResponse = {
822
+ /**
823
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
824
+ */
825
+ nextPageToken?: string;
826
+ transactions: Array<Erc20Transfer>;
827
+ };
828
+
829
+ type ListErc721BalancesResponse = {
830
+ /**
831
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
832
+ */
833
+ nextPageToken?: string;
834
+ /**
835
+ * The list of ERC-721 token balances for the address.
836
+ */
837
+ erc721TokenBalances: Array<Erc721TokenBalance>;
838
+ };
839
+
840
+ type Erc721Transfer = {
841
+ /**
842
+ * The block number on the chain.
843
+ */
844
+ blockNumber: string;
845
+ /**
846
+ * The block finality timestamp.
847
+ */
848
+ blockTimestamp: number;
849
+ /**
850
+ * The block hash identifier.
851
+ */
852
+ blockHash: string;
853
+ /**
854
+ * The transaction hash identifier.
855
+ */
856
+ txHash: string;
857
+ from: RichAddress;
858
+ to: RichAddress;
859
+ erc721Token: Erc721Token;
860
+ };
861
+
862
+ type ListErc721TransactionsResponse = {
863
+ /**
864
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
865
+ */
866
+ nextPageToken?: string;
867
+ transactions: Array<Erc721Transfer>;
868
+ };
869
+
870
+ declare enum ListingEventType {
871
+ OPEN_LISTING = "OPEN_LISTING",
872
+ CANCEL_LISTING = "CANCEL_LISTING",
873
+ PURCHASE_LISTING = "PURCHASE_LISTING",
874
+ CLOSE_AUCTION = "CLOSE_AUCTION"
875
+ }
876
+
877
+ declare enum ListingsSortByOption {
878
+ LAST_EVENT_TIMESTAMP = "lastEventTimestamp"
879
+ }
880
+
881
+ type InternalTransaction = {
882
+ /**
883
+ * The block number on the chain.
884
+ */
885
+ blockNumber: string;
886
+ /**
887
+ * The block finality timestamp.
888
+ */
889
+ blockTimestamp: number;
890
+ /**
891
+ * The block hash identifier.
892
+ */
893
+ blockHash: string;
894
+ /**
895
+ * The transaction hash identifier.
896
+ */
897
+ txHash: string;
898
+ from: RichAddress;
899
+ to: RichAddress;
900
+ internalTxType: InternalTransactionOpCall;
901
+ value: string;
902
+ /**
903
+ * True if the internal transaction was reverted.
904
+ */
905
+ isReverted: boolean;
906
+ gasUsed: string;
907
+ gasLimit: string;
908
+ };
909
+
910
+ type ListInternalTransactionsResponse = {
911
+ /**
912
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
913
+ */
914
+ nextPageToken?: string;
915
+ transactions: Array<InternalTransaction>;
916
+ };
917
+
918
+ type CancelListingEventResponse = {
919
+ eventTimestamp: number;
920
+ };
921
+
922
+ type CloseAuctionEventResponse = {
923
+ eventTimestamp: number;
924
+ purchaseTxHash?: string;
925
+ };
926
+
927
+ declare enum ErcType {
928
+ ERC_20 = "ERC-20",
929
+ ERC_721 = "ERC-721",
930
+ ERC_1155 = "ERC-1155",
931
+ UNKNOWN = "UNKNOWN"
932
+ }
933
+
934
+ declare enum ResourceLinkType {
935
+ BLOG = "Blog",
936
+ COIN_GECKO = "CoinGecko",
937
+ COIN_MARKET_CAP = "CoinMarketCap",
938
+ DISCORD = "Discord",
939
+ DOCUMENTATION = "Documentation",
940
+ FACEBOOK = "Facebook",
941
+ GITHUB = "Github",
942
+ INSTAGRAM = "Instagram",
943
+ LINKED_IN = "LinkedIn",
944
+ MEDIUM = "Medium",
945
+ REDDIT = "Reddit",
946
+ SUPPORT = "Support",
947
+ TELEGRAM = "Telegram",
948
+ TIK_TOK = "TikTok",
949
+ TWITTER = "Twitter",
950
+ WEBSITE = "Website",
951
+ WHITEPAPER = "Whitepaper",
952
+ YOUTUBE = "Youtube"
953
+ }
954
+
955
+ type ResourceLink = {
956
+ type: ResourceLinkType;
957
+ url: string;
958
+ };
959
+
960
+ type NftCollection = {
961
+ /**
962
+ * A wallet or contract address in mixed-case checksum encoding.
963
+ */
964
+ address: string;
965
+ /**
966
+ * The contract name.
967
+ */
968
+ name: string;
969
+ /**
970
+ * The contract symbol.
971
+ */
972
+ symbol: string;
973
+ ercType: ErcType;
974
+ bannerUri?: string;
975
+ logoUri?: string;
976
+ description?: string;
977
+ resourceLinks?: Array<ResourceLink>;
978
+ };
979
+
980
+ type Address = {
981
+ /**
982
+ * A wallet or contract address in mixed-case checksum encoding.
983
+ */
984
+ address: string;
985
+ };
986
+
987
+ declare enum ListingCurrencyType {
988
+ NATIVE = "NATIVE",
989
+ ERC20 = "ERC20"
990
+ }
991
+
992
+ declare enum ListingType {
993
+ SALE = "SALE",
994
+ AUCTION = "AUCTION"
995
+ }
996
+
997
+ type TokenWithPrice = {
998
+ /**
999
+ * A wallet or contract address in mixed-case checksum encoding.
1000
+ */
1001
+ address?: string;
1002
+ /**
1003
+ * The contract name.
1004
+ */
1005
+ name: string;
1006
+ /**
1007
+ * The contract symbol.
1008
+ */
1009
+ symbol: string;
1010
+ /**
1011
+ * The number of decimals the token uses. For example `6`,
1012
+ * means to divide the token amount by `1000000` to get its user
1013
+ * representation.
1014
+ */
1015
+ decimals: number;
1016
+ /**
1017
+ * The token price, if available.
1018
+ */
1019
+ price?: Money;
1020
+ };
1021
+
1022
+ type OpenListingEventResponse = {
1023
+ eventTimestamp: number;
1024
+ listingType: ListingType;
1025
+ listingPrice?: string;
1026
+ listingCurrencyType: ListingCurrencyType;
1027
+ listingCurrencyInfo: TokenWithPrice;
1028
+ sellerAddress: Address;
1029
+ startingPrice?: string;
1030
+ auctionCloseTimestamp?: number;
1031
+ };
1032
+
1033
+ type PurchaseListingEventResponse = {
1034
+ eventTimestamp: number;
1035
+ listingPrice: string;
1036
+ listingCurrencyType: ListingCurrencyType;
1037
+ listingCurrencyInfo: TokenWithPrice;
1038
+ sellerAddress: Address;
1039
+ salePrice: string;
1040
+ buyerAddress: Address;
1041
+ saleTimestamp: number;
1042
+ purchaseTxHash?: string;
1043
+ };
1044
+
1045
+ type ListingResponse = {
1046
+ marketplaceName: string;
1047
+ chainId: string;
1048
+ collection: NftCollection;
1049
+ token: any;
1050
+ listingId: string;
1051
+ openListingEvents?: Array<OpenListingEventResponse>;
1052
+ cancelListingEvents?: Array<CancelListingEventResponse>;
1053
+ purchaseListingEvents?: Array<PurchaseListingEventResponse>;
1054
+ closeAuctionEvents?: Array<CloseAuctionEventResponse>;
1055
+ };
1056
+
1057
+ type ListListingsResponse = {
1058
+ /**
1059
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
1060
+ */
1061
+ nextPageToken?: string;
1062
+ listings: Array<ListingResponse>;
1063
+ };
1064
+
1065
+ type NativeTransaction = {
1066
+ /**
1067
+ * The block number on the chain.
1068
+ */
1069
+ blockNumber: string;
1070
+ /**
1071
+ * The block finality timestamp.
1072
+ */
1073
+ blockTimestamp: number;
1074
+ /**
1075
+ * The block hash identifier.
1076
+ */
1077
+ blockHash: string;
1078
+ /**
1079
+ * The index at which the transaction occured in the block (0-indexed).
1080
+ */
1081
+ blockIndex: number;
1082
+ /**
1083
+ * The transaction hash identifier.
1084
+ */
1085
+ txHash: string;
1086
+ /**
1087
+ * The transaction status, which is either 0 (failed) or 1 (successful).
1088
+ */
1089
+ txStatus: string;
1090
+ /**
1091
+ * The transaction type.
1092
+ */
1093
+ txType: number;
1094
+ /**
1095
+ * The gas limit set for the transaction.
1096
+ */
1097
+ gasLimit: string;
1098
+ /**
1099
+ * The amount of gas used.
1100
+ */
1101
+ gasUsed: string;
1102
+ /**
1103
+ * The gas price denominated by the number of decimals of the native token.
1104
+ */
1105
+ gasPrice: string;
1106
+ /**
1107
+ * The nonce used by the sender of the transaction.
1108
+ */
1109
+ nonce: string;
1110
+ from: RichAddress;
1111
+ to: RichAddress;
1112
+ method?: Method;
1113
+ value: string;
1114
+ };
1115
+
1116
+ type ListNativeTransactionsResponse = {
1117
+ /**
1118
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
1119
+ */
1120
+ nextPageToken?: string;
1121
+ transactions: Array<NativeTransaction>;
1122
+ };
1123
+
1124
+ type FloorPrice = {
1125
+ floorPrice: string;
1126
+ marketplace: string;
1127
+ };
1128
+
1129
+ type CollectionMetrics = {
1130
+ /**
1131
+ * The timeframe used to calculate the metrics
1132
+ */
1133
+ timeframe: string;
1134
+ /**
1135
+ * The number of sales between (now) & (now - timeframe)
1136
+ */
1137
+ salesInTimeframe: number;
1138
+ /**
1139
+ * The number of sales between (now - timeframe) & (now - (2 * timeframe))
1140
+ */
1141
+ salesInPreviousTimeframe: number;
1142
+ /**
1143
+ * The total value of sales between (now) & (now - timeframe)
1144
+ */
1145
+ totalValueInTimeframe: string;
1146
+ /**
1147
+ * The total value of sales between (now - timeframe) & (now - (2 * timeframe))
1148
+ */
1149
+ totalValueInPreviousTimeframe: string;
1150
+ /**
1151
+ * The change in volume between (now) & (now - timeframe)
1152
+ */
1153
+ volumeChange?: number;
1154
+ /**
1155
+ * The average sale price for sales between (now) & (now - timeframe)
1156
+ */
1157
+ averagePriceInTimeframe: string;
1158
+ /**
1159
+ * The average sale price for sales between (now - timeframe) & (now - (2 * timeframe))
1160
+ */
1161
+ averagePriceInPreviousTimeframe: string;
1162
+ latestSaleTimestamp?: number;
1163
+ marketplaceFloorPrices: Array<FloorPrice>;
1164
+ minFloorPrice?: string;
1165
+ minFloorPriceMarketplace?: string;
1166
+ };
1167
+
1168
+ type NftCollectionWithMetrics = {
1169
+ /**
1170
+ * A wallet or contract address in mixed-case checksum encoding.
1171
+ */
1172
+ address: string;
1173
+ /**
1174
+ * The contract name.
1175
+ */
1176
+ name: string;
1177
+ /**
1178
+ * The contract symbol.
1179
+ */
1180
+ symbol: string;
1181
+ ercType: ErcType;
1182
+ bannerUri?: string;
1183
+ logoUri?: string;
1184
+ description?: string;
1185
+ resourceLinks?: Array<ResourceLink>;
1186
+ metrics: CollectionMetrics;
1187
+ };
1188
+
1189
+ type ListNftCollectionWithMetricsResponse = {
1190
+ /**
1191
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
1192
+ */
1193
+ nextPageToken?: string;
1194
+ collections: Array<NftCollectionWithMetrics>;
1195
+ };
1196
+
1197
+ type TransactionDetails = {
1198
+ /**
1199
+ * The native (top-level) transaction details.
1200
+ */
1201
+ nativeTransaction: NativeTransaction;
1202
+ /**
1203
+ * The list of ERC-20 transfers.
1204
+ */
1205
+ erc20Transfers?: Array<Erc20TransferDetails>;
1206
+ /**
1207
+ * The list of ERC-721 transfers.
1208
+ */
1209
+ erc721Transfers?: Array<Erc721TransferDetails>;
1210
+ /**
1211
+ * The list of ERC-1155 transfers.
1212
+ */
1213
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
1214
+ /**
1215
+ * The list of internal transactions. Note that this list only
1216
+ * includes CALL and
1217
+ * CALLCODE internal transactions that had a
1218
+ * non-zero value and
1219
+ * CREATE/CREATE2
1220
+ * calls. Use a client provider to recieve a full debug trace of the
1221
+ * transaction.
1222
+ */
1223
+ internalTransactions?: Array<InternalTransactionDetails>;
1224
+ };
1225
+
1226
+ type ListTransactionDetailsResponse = {
1227
+ /**
1228
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
1229
+ */
1230
+ nextPageToken?: string;
1231
+ transactions: Array<TransactionDetails>;
1232
+ };
1233
+
1234
+ type ListTransfersResponse = {
1235
+ /**
1236
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
1237
+ */
1238
+ nextPageToken?: string;
1239
+ transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
1240
+ };
1241
+
1242
+ declare enum NftSearchResultTypeOption {
1243
+ TOKEN = "token",
1244
+ COLLECTION = "collection"
1245
+ }
1246
+
1247
+ type NftFilterOptionsProperty = {
1248
+ /**
1249
+ * Filters search results by collection or token.
1250
+ */
1251
+ resultType: NftSearchResultTypeOption;
1252
+ };
1253
+
1254
+ type PaginationParams = {
1255
+ /**
1256
+ * The maximum number of items to return.
1257
+ */
1258
+ pageSize?: number;
1259
+ /**
1260
+ * A page token, received from a previous list call.
1261
+ * Provide this to retrieve the subsequent page.
1262
+ */
1263
+ pageToken?: string;
1264
+ };
1265
+
1266
+ type NftSearchBody = {
1267
+ searchQuery: string;
1268
+ paginationParams?: PaginationParams;
1269
+ filterOptions: NftFilterOptionsProperty;
1270
+ };
1271
+
1272
+ declare enum SortOrder {
1273
+ ASC = "asc",
1274
+ DESC = "desc"
1275
+ }
1276
+
1277
+ declare enum TransactionStatus {
1278
+ FAILED = "failed",
1279
+ SUCCESS = "success"
1280
+ }
1281
+
1282
+ declare enum TrendingTimeframe {
1283
+ DAY = "day",
1284
+ WEEK = "week",
1285
+ MONTH = "month"
1286
+ }
1287
+
1288
+ declare class EvmService {
1289
+ readonly httpRequest: BaseHttpRequest;
1290
+ constructor(httpRequest: BaseHttpRequest);
1291
+ /**
1292
+ * Get native token balance of a wallet address for a given chain.
1293
+ * @returns GetNativeBalanceResponse
1294
+ * @throws ApiError
1295
+ */
1296
+ getNativeBalance({ chainId, address, currency, }: {
1297
+ /**
1298
+ * A supported evm chain id. Use the `/chains` endpoint to get
1299
+ * a list of supported chain ids.
1300
+ */
1301
+ chainId: string;
1302
+ /**
1303
+ * A wallet address.
1304
+ */
1305
+ address: string;
1306
+ /**
1307
+ * The currency that return values should use. Defaults to USD.
1308
+ */
1309
+ currency?: CurrencyCode;
1310
+ }): CancelablePromise<GetNativeBalanceResponse>;
1311
+ /**
1312
+ * List ERC-20 token balances of a wallet address for a given chain.
1313
+ * @returns ListErc20BalancesResponse
1314
+ * @throws ApiError
1315
+ */
1316
+ listErc20Balances({ chainId, address, pageSize, pageToken, currency, }: {
1317
+ /**
1318
+ * A supported evm chain id. Use the `/chains` endpoint to get
1319
+ * a list of supported chain ids.
1320
+ */
1321
+ chainId: string;
1322
+ /**
1323
+ * A wallet address.
1324
+ */
1325
+ address: string;
1326
+ /**
1327
+ * The maximum number of items to return. The minimum page size
1328
+ * is 1. The maximum pageSize is 100.
1329
+ */
1330
+ pageSize?: number;
1331
+ /**
1332
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1333
+ */
1334
+ pageToken?: string;
1335
+ /**
1336
+ * The currency that return values should use. Defaults to USD.
1337
+ */
1338
+ currency?: CurrencyCode;
1339
+ }): CancelablePromise<ListErc20BalancesResponse>;
1340
+ /**
1341
+ * List ERC-721 token balances of a wallet address for a given chain.
1342
+ * @returns ListErc721BalancesResponse
1343
+ * @throws ApiError
1344
+ */
1345
+ listErc721Balances({ chainId, address, pageSize, pageToken, }: {
1346
+ /**
1347
+ * A supported evm chain id. Use the `/chains` endpoint to get
1348
+ * a list of supported chain ids.
1349
+ */
1350
+ chainId: string;
1351
+ /**
1352
+ * A wallet address.
1353
+ */
1354
+ address: string;
1355
+ /**
1356
+ * The maximum number of items to return. The minimum page size
1357
+ * is 1. The maximum pageSize is 100.
1358
+ */
1359
+ pageSize?: number;
1360
+ /**
1361
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1362
+ */
1363
+ pageToken?: string;
1364
+ }): CancelablePromise<ListErc721BalancesResponse>;
1365
+ /**
1366
+ * List ERC-1155 token balances of a wallet address for a given chain.
1367
+ * @returns ListErc1155BalancesResponse
1368
+ * @throws ApiError
1369
+ */
1370
+ listErc1155Balances({ chainId, address, pageSize, pageToken, }: {
1371
+ /**
1372
+ * A supported evm chain id. Use the `/chains` endpoint to get
1373
+ * a list of supported chain ids.
1374
+ */
1375
+ chainId: string;
1376
+ /**
1377
+ * A wallet address.
1378
+ */
1379
+ address: string;
1380
+ /**
1381
+ * The maximum number of items to return. The minimum page size
1382
+ * is 1. The maximum pageSize is 100.
1383
+ */
1384
+ pageSize?: number;
1385
+ /**
1386
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1387
+ */
1388
+ pageToken?: string;
1389
+ }): CancelablePromise<ListErc1155BalancesResponse>;
1390
+ /**
1391
+ * List ERC-721 and ERC-1155 token balances of a wallet address
1392
+ * for a given chain.
1393
+ * @returns ListCollectibleBalancesResponse
1394
+ * @throws ApiError
1395
+ */
1396
+ listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
1397
+ /**
1398
+ * A supported evm chain id. Use the `/chains` endpoint to get
1399
+ * a list of supported chain ids.
1400
+ */
1401
+ chainId: string;
1402
+ /**
1403
+ * A wallet address.
1404
+ */
1405
+ address: string;
1406
+ /**
1407
+ * The maximum number of items to return. The minimum page size
1408
+ * is 1. The maximum pageSize is 100.
1409
+ */
1410
+ pageSize?: number;
1411
+ /**
1412
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1413
+ */
1414
+ pageToken?: string;
1415
+ }): CancelablePromise<ListCollectibleBalancesResponse>;
1416
+ /**
1417
+ * Returns the latest blocks indexed for the chain.
1418
+ * @returns ListBlocksResponse
1419
+ * @throws ApiError
1420
+ */
1421
+ getLatestBlocks({ chainId, pageSize, pageToken, }: {
1422
+ /**
1423
+ * A supported evm chain id. Use the `/chains` endpoint to get
1424
+ * a list of supported chain ids.
1425
+ */
1426
+ chainId: string;
1427
+ /**
1428
+ * The maximum number of items to return. The minimum page size
1429
+ * is 1. The maximum pageSize is 100.
1430
+ */
1431
+ pageSize?: number;
1432
+ /**
1433
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1434
+ */
1435
+ pageToken?: string;
1436
+ }): CancelablePromise<ListBlocksResponse>;
1437
+ /**
1438
+ * Returns the details of an individual block for the chain.
1439
+ * @returns GetBlockResponse
1440
+ * @throws ApiError
1441
+ */
1442
+ getBlock({ chainId, blockId, }: {
1443
+ /**
1444
+ * A supported evm chain id. Use the `/chains` endpoint to get
1445
+ * a list of supported chain ids.
1446
+ */
1447
+ chainId: string;
1448
+ /**
1449
+ * A block identifier which is either a block number or the block hash.
1450
+ */
1451
+ blockId: string;
1452
+ }): CancelablePromise<GetBlockResponse>;
1453
+ /**
1454
+ * If the address is a smart contract, returns the transaction at which it was deployed.
1455
+ * @returns GetTransactionResponse
1456
+ * @throws ApiError
1457
+ */
1458
+ getDeploymentTransaction({ chainId, address, currency, }: {
1459
+ /**
1460
+ * A supported evm chain id. Use the `/chains` endpoint to get
1461
+ * a list of supported chain ids.
1462
+ */
1463
+ chainId: string;
1464
+ /**
1465
+ * Contract address on the relevant chain.
1466
+ */
1467
+ address: string;
1468
+ /**
1469
+ * The currency that return values should use. Defaults to USD.
1470
+ */
1471
+ currency?: CurrencyCode;
1472
+ }): CancelablePromise<GetTransactionResponse>;
1473
+ /**
1474
+ * Gets a list of erc transfers for an ERC-20, ERC-721,
1475
+ * or ERC-1155 contract address.
1476
+ * @returns ListTransfersResponse
1477
+ * @throws ApiError
1478
+ */
1479
+ listTransfers({ chainId, address, pageSize, pageToken, }: {
1480
+ /**
1481
+ * A supported evm chain id. Use the `/chains` endpoint to get
1482
+ * a list of supported chain ids.
1483
+ */
1484
+ chainId: string;
1485
+ /**
1486
+ * A wallet address.
1487
+ */
1488
+ address: string;
1489
+ /**
1490
+ * The maximum number of items to return. The minimum page size
1491
+ * is 1. The maximum pageSize is 100.
1492
+ */
1493
+ pageSize?: number;
1494
+ /**
1495
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1496
+ */
1497
+ pageToken?: string;
1498
+ }): CancelablePromise<ListTransfersResponse>;
1499
+ /**
1500
+ * Gets a list of transactions for an address and chain.
1501
+ * Returns a list of transactions where the given wallet
1502
+ * address had an on-chain interaction for a given chain. The ERC-20
1503
+ * transfers, ERC-721 transfers, ERC-1155, and internal transactions
1504
+ * returned are only those where the input address had an interaction.
1505
+ * Specifically, those list only inlcude entries where the input address
1506
+ * was the sender (`from` field) or the receiver (`to` field) for the
1507
+ * sub-transaction. Therefore the transactions returned from this list may
1508
+ * not be complete representations of the on-chain data. For a complete
1509
+ * view of a transaction use the `/chains/:chainId/transactions/:txHash`
1510
+ * endpoint.
1511
+ * @returns ListTransactionDetailsResponse
1512
+ * @throws ApiError
1513
+ */
1514
+ listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, sortOrder, }: {
1515
+ /**
1516
+ * A supported evm chain id. Use the `/chains` endpoint to get
1517
+ * a list of supported chain ids.
1518
+ */
1519
+ chainId: string;
1520
+ /**
1521
+ * A wallet address.
1522
+ */
1523
+ address: string;
1524
+ /**
1525
+ * The maximum number of items to return. The minimum page size
1526
+ * is 1. The maximum pageSize is 100.
1527
+ */
1528
+ pageSize?: number;
1529
+ /**
1530
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1531
+ */
1532
+ pageToken?: string;
1533
+ /**
1534
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
1535
+ */
1536
+ startBlock?: number;
1537
+ /**
1538
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
1539
+ */
1540
+ endBlock?: number;
1541
+ /**
1542
+ * The order by which to sort results. Use "asc" for ascending
1543
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1544
+ * query parameter, if provided.
1545
+ */
1546
+ sortOrder?: SortOrder;
1547
+ }): CancelablePromise<ListTransactionDetailsResponse>;
1548
+ /**
1549
+ * Gets a list of native transactions for an address and chain.
1550
+ * @returns ListNativeTransactionsResponse
1551
+ * @throws ApiError
1552
+ */
1553
+ listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
1554
+ /**
1555
+ * A supported evm chain id. Use the `/chains` endpoint to get
1556
+ * a list of supported chain ids.
1557
+ */
1558
+ chainId: string;
1559
+ /**
1560
+ * A wallet address.
1561
+ */
1562
+ address: string;
1563
+ /**
1564
+ * The maximum number of items to return. The minimum page size
1565
+ * is 1. The maximum pageSize is 100.
1566
+ */
1567
+ pageSize?: number;
1568
+ /**
1569
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1570
+ */
1571
+ pageToken?: string;
1572
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1573
+ /**
1574
+ * Lists ERC-20 transfers for an address.
1575
+ * @returns ListErc20TransactionsResponse
1576
+ * @throws ApiError
1577
+ */
1578
+ listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
1579
+ /**
1580
+ * A supported evm chain id. Use the `/chains` endpoint to get
1581
+ * a list of supported chain ids.
1582
+ */
1583
+ chainId: string;
1584
+ /**
1585
+ * A wallet address.
1586
+ */
1587
+ address: string;
1588
+ /**
1589
+ * The maximum number of items to return. The minimum page size
1590
+ * is 1. The maximum pageSize is 100.
1591
+ */
1592
+ pageSize?: number;
1593
+ /**
1594
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1595
+ */
1596
+ pageToken?: string;
1597
+ }): CancelablePromise<ListErc20TransactionsResponse>;
1598
+ /**
1599
+ * Lists ERC-721 transfers for an address.
1600
+ * @returns ListErc721TransactionsResponse
1601
+ * @throws ApiError
1602
+ */
1603
+ listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
1604
+ /**
1605
+ * A supported evm chain id. Use the `/chains` endpoint to get
1606
+ * a list of supported chain ids.
1607
+ */
1608
+ chainId: string;
1609
+ /**
1610
+ * A wallet address.
1611
+ */
1612
+ address: string;
1613
+ /**
1614
+ * The maximum number of items to return. The minimum page size
1615
+ * is 1. The maximum pageSize is 100.
1616
+ */
1617
+ pageSize?: number;
1618
+ /**
1619
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1620
+ */
1621
+ pageToken?: string;
1622
+ }): CancelablePromise<ListErc721TransactionsResponse>;
1623
+ /**
1624
+ * Lists of ERC-1155 transfers for an address.
1625
+ * @returns ListErc1155TransactionsResponse
1626
+ * @throws ApiError
1627
+ */
1628
+ listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
1629
+ /**
1630
+ * A supported evm chain id. Use the `/chains` endpoint to get
1631
+ * a list of supported chain ids.
1632
+ */
1633
+ chainId: string;
1634
+ /**
1635
+ * A wallet address.
1636
+ */
1637
+ address: string;
1638
+ /**
1639
+ * The maximum number of items to return. The minimum page size
1640
+ * is 1. The maximum pageSize is 100.
1641
+ */
1642
+ pageSize?: number;
1643
+ /**
1644
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1645
+ */
1646
+ pageToken?: string;
1647
+ }): CancelablePromise<ListErc1155TransactionsResponse>;
1648
+ /**
1649
+ * Lists internal transactions for an address.
1650
+ * Returns a list of internal transactions for an address and
1651
+ * chain. Note that the internal transactions list only contains CALL or
1652
+ * CALLCODE transactions with a non-zero value and CREATE/CREATE2
1653
+ * transactions. To get a complete list of internal transactions use the
1654
+ * `debug_` prefixed RPC methods on an archive node.
1655
+ * @returns ListInternalTransactionsResponse
1656
+ * @throws ApiError
1657
+ */
1658
+ listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
1659
+ /**
1660
+ * A supported evm chain id. Use the `/chains` endpoint to get
1661
+ * a list of supported chain ids.
1662
+ */
1663
+ chainId: string;
1664
+ /**
1665
+ * A wallet address.
1666
+ */
1667
+ address: string;
1668
+ /**
1669
+ * The maximum number of items to return. The minimum page size
1670
+ * is 1. The maximum pageSize is 100.
1671
+ */
1672
+ pageSize?: number;
1673
+ /**
1674
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1675
+ */
1676
+ pageToken?: string;
1677
+ }): CancelablePromise<ListInternalTransactionsResponse>;
1678
+ /**
1679
+ * Gets the details of a single transaction.
1680
+ * @returns GetTransactionResponse
1681
+ * @throws ApiError
1682
+ */
1683
+ getTransaction({ chainId, txHash, }: {
1684
+ /**
1685
+ * A supported evm chain id. Use the `/chains` endpoint to get
1686
+ * a list of supported chain ids.
1687
+ */
1688
+ chainId: string;
1689
+ /**
1690
+ * A transaction hash.
1691
+ */
1692
+ txHash: string;
1693
+ }): CancelablePromise<GetTransactionResponse>;
1694
+ /**
1695
+ * Gets the transactions that occured in a given block.
1696
+ * @returns ListNativeTransactionsResponse
1697
+ * @throws ApiError
1698
+ */
1699
+ getTransactionsForBlock({ chainId, blockId, }: {
1700
+ /**
1701
+ * A supported evm chain id. Use the `/chains` endpoint to get
1702
+ * a list of supported chain ids.
1703
+ */
1704
+ chainId: string;
1705
+ /**
1706
+ * A block identifier which is either a block number or the block hash.
1707
+ */
1708
+ blockId: string;
1709
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1710
+ /**
1711
+ * Gets the latest transactions; can be filtered by status.
1712
+ * @returns ListNativeTransactionsResponse
1713
+ * @throws ApiError
1714
+ */
1715
+ listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
1716
+ /**
1717
+ * A supported evm chain id. Use the `/chains` endpoint to get
1718
+ * a list of supported chain ids.
1719
+ */
1720
+ chainId: string;
1721
+ /**
1722
+ * The maximum number of items to return. The minimum page size
1723
+ * is 1. The maximum pageSize is 100.
1724
+ */
1725
+ pageSize?: number;
1726
+ /**
1727
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1728
+ */
1729
+ pageToken?: string;
1730
+ /**
1731
+ * A status filter for listed transactions.
1732
+ */
1733
+ status?: TransactionStatus;
1734
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1735
+ /**
1736
+ * Gets the list of chains supported by the api.
1737
+ * @returns ListChainsResponse
1738
+ * @throws ApiError
1739
+ */
1740
+ supportedChains(): CancelablePromise<ListChainsResponse>;
1741
+ /**
1742
+ * Gets chain information by chain id.
1743
+ * @returns GetChainResponse
1744
+ * @throws ApiError
1745
+ */
1746
+ getChainInfo({ chainId, }: {
1747
+ /**
1748
+ * A supported evm chain id. Use the `/chains` endpoint to get
1749
+ * a list of supported chain ids.
1750
+ */
1751
+ chainId: string;
1752
+ }): CancelablePromise<GetChainResponse>;
1753
+ /**
1754
+ * Triggers reindexing for a single nft contract and token id pair.
1755
+ * Triggers reindexing of token metadata for nft contracts.
1756
+ * Will throw 400 if Nft has been indexed within the last hour.
1757
+ * @returns any
1758
+ * @throws ApiError
1759
+ */
1760
+ reindexNft({ chainId, address, tokenId, }: {
1761
+ /**
1762
+ * A supported evm chain id. Use the `/chains` endpoint to get
1763
+ * a list of supported chain ids.
1764
+ */
1765
+ chainId: string;
1766
+ /**
1767
+ * Contract address on the relevant chain.
1768
+ */
1769
+ address: string;
1770
+ /**
1771
+ * TokenId on the contract
1772
+ */
1773
+ tokenId: string;
1774
+ }): CancelablePromise<any>;
1775
+ /**
1776
+ * Get metadata for a specific token by providing the contract address and token id.
1777
+ * @returns any
1778
+ * @throws ApiError
1779
+ */
1780
+ getTokenMetadata({ chainId, address, tokenId, }: {
1781
+ /**
1782
+ * A supported evm chain id. Use the `/chains` endpoint to get
1783
+ * a list of supported chain ids.
1784
+ */
1785
+ chainId: string;
1786
+ /**
1787
+ * Contract address on the relevant chain.
1788
+ */
1789
+ address: string;
1790
+ /**
1791
+ * TokenId on the contract
1792
+ */
1793
+ tokenId: string;
1794
+ }): CancelablePromise<(Erc721Token | Erc1155Token)>;
1795
+ /**
1796
+ * Get collection data for provided a ChainID and address.
1797
+ * @returns NftCollectionWithMetrics
1798
+ * @throws ApiError
1799
+ */
1800
+ getCollection({ chainId, address, timeframe, }: {
1801
+ /**
1802
+ * A supported evm chain id. Use the `/chains` endpoint to get
1803
+ * a list of supported chain ids.
1804
+ */
1805
+ chainId: string;
1806
+ /**
1807
+ * Contract address on the relevant chain.
1808
+ */
1809
+ address: string;
1810
+ /**
1811
+ * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
1812
+ */
1813
+ timeframe?: TrendingTimeframe;
1814
+ }): CancelablePromise<NftCollectionWithMetrics>;
1815
+ /**
1816
+ * List open listings for a NFT token.
1817
+ * @returns ListListingsResponse
1818
+ * @throws ApiError
1819
+ */
1820
+ listListingsByCollectionTokenId({ chainId, address, tokenId, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
1821
+ /**
1822
+ * A supported evm chain id. Use the `/chains` endpoint to get
1823
+ * a list of supported chain ids.
1824
+ */
1825
+ chainId: string;
1826
+ /**
1827
+ * Contract address on the relevant chain.
1828
+ */
1829
+ address: string;
1830
+ /**
1831
+ * TokenId on the contract
1832
+ */
1833
+ tokenId: string;
1834
+ /**
1835
+ * The maximum number of items to return. The minimum page size
1836
+ * is 1. The maximum pageSize is 100.
1837
+ */
1838
+ pageSize?: number;
1839
+ /**
1840
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1841
+ */
1842
+ pageToken?: string;
1843
+ /**
1844
+ * Which property to sort by, in conjunction with sortOrder.
1845
+ */
1846
+ sortBy?: ListingsSortByOption;
1847
+ /**
1848
+ * The order by which to sort results. Use "asc" for ascending
1849
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1850
+ * query parameter, if provided.
1851
+ */
1852
+ sortOrder?: SortOrder;
1853
+ /**
1854
+ * The currency that return values should use. Defaults to USD.
1855
+ */
1856
+ currency?: CurrencyCode;
1857
+ /**
1858
+ * Determines whether to return full transaction history for listings.
1859
+ */
1860
+ includeHistory?: boolean;
1861
+ }): CancelablePromise<ListListingsResponse>;
1862
+ /**
1863
+ * List open listings for a NFT collection.
1864
+ * @returns ListListingsResponse
1865
+ * @throws ApiError
1866
+ */
1867
+ listListingsByCollection({ chainId, address, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
1868
+ /**
1869
+ * A supported evm chain id. Use the `/chains` endpoint to get
1870
+ * a list of supported chain ids.
1871
+ */
1872
+ chainId: string;
1873
+ /**
1874
+ * Contract address on the relevant chain.
1875
+ */
1876
+ address: string;
1877
+ /**
1878
+ * The maximum number of items to return. The minimum page size
1879
+ * is 1. The maximum pageSize is 100.
1880
+ */
1881
+ pageSize?: number;
1882
+ /**
1883
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1884
+ */
1885
+ pageToken?: string;
1886
+ /**
1887
+ * Which property to sort by, in conjunction with sortOrder.
1888
+ */
1889
+ sortBy?: ListingsSortByOption;
1890
+ /**
1891
+ * The order by which to sort results. Use "asc" for ascending
1892
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1893
+ * query parameter, if provided.
1894
+ */
1895
+ sortOrder?: SortOrder;
1896
+ /**
1897
+ * The currency that return values should use. Defaults to USD.
1898
+ */
1899
+ currency?: CurrencyCode;
1900
+ /**
1901
+ * Determines whether to return full transaction history for listings.
1902
+ */
1903
+ includeHistory?: boolean;
1904
+ }): CancelablePromise<ListListingsResponse>;
1905
+ /**
1906
+ * List recent listings on the chain.
1907
+ * @returns ListListingsResponse
1908
+ * @throws ApiError
1909
+ */
1910
+ listRecentListings({ chainId, pageSize, pageToken, eventType, currency, }: {
1911
+ /**
1912
+ * A supported evm chain id. Use the `/chains` endpoint to get
1913
+ * a list of supported chain ids.
1914
+ */
1915
+ chainId: string;
1916
+ /**
1917
+ * The maximum number of items to return. The minimum page size
1918
+ * is 1. The maximum pageSize is 100.
1919
+ */
1920
+ pageSize?: number;
1921
+ /**
1922
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1923
+ */
1924
+ pageToken?: string;
1925
+ eventType?: ListingEventType;
1926
+ /**
1927
+ * The currency that return values should use. Defaults to USD.
1928
+ */
1929
+ currency?: CurrencyCode;
1930
+ }): CancelablePromise<ListListingsResponse>;
1931
+ /**
1932
+ * List details and metrics for collections.
1933
+ * @returns ListNftCollectionWithMetricsResponse
1934
+ * @throws ApiError
1935
+ */
1936
+ listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
1937
+ /**
1938
+ * A supported evm chain id. Use the `/chains` endpoint to get
1939
+ * a list of supported chain ids.
1940
+ */
1941
+ chainId: string;
1942
+ /**
1943
+ * The maximum number of items to return. The minimum page size
1944
+ * is 1. The maximum pageSize is 100.
1945
+ */
1946
+ pageSize?: number;
1947
+ /**
1948
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1949
+ */
1950
+ pageToken?: string;
1951
+ /**
1952
+ * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
1953
+ */
1954
+ timeframe?: TrendingTimeframe;
1955
+ /**
1956
+ * Which property to sort by, in conjunction with sortOrder.
1957
+ */
1958
+ sortBy?: CollectionSortByOption;
1959
+ /**
1960
+ * The order by which to sort results. Use "asc" for ascending
1961
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1962
+ * query parameter, if provided.
1963
+ */
1964
+ sortOrder?: SortOrder;
1965
+ }): CancelablePromise<ListNftCollectionWithMetricsResponse>;
1966
+ /**
1967
+ * Search for token by name and contract name.
1968
+ * @returns any
1969
+ * @throws ApiError
1970
+ */
1971
+ search({ chainId, requestBody, }: {
1972
+ /**
1973
+ * A supported evm chain id. Use the `/chains` endpoint to get
1974
+ * a list of supported chain ids.
1975
+ */
1976
+ chainId: string;
1977
+ requestBody: NftSearchBody;
1978
+ }): CancelablePromise<{
1979
+ results?: Array<NftCollection>;
1980
+ }>;
1981
+ }
1982
+
1983
+ declare class HealthCheckService {
1984
+ readonly httpRequest: BaseHttpRequest;
1985
+ constructor(httpRequest: BaseHttpRequest);
1986
+ /**
1987
+ * Get the health of the service.
1988
+ * @returns any The Health Check is successful
1989
+ * @throws ApiError
1990
+ */
1991
+ healthCheck(): CancelablePromise<{
1992
+ status?: string;
1993
+ info?: Record<string, Record<string, string>> | null;
1994
+ error?: Record<string, Record<string, string>> | null;
1995
+ details?: Record<string, Record<string, string>>;
1996
+ }>;
1997
+ }
1998
+
1999
+ type EvmNetworkOptions = {
2000
+ addresses: Array<string>;
2001
+ includeChains: Array<string>;
2002
+ };
2003
+
2004
+ type CreateEvmTransactionExportRequest = {
2005
+ type: CreateEvmTransactionExportRequest.type;
2006
+ startDate: string;
2007
+ endDate: string;
2008
+ options: EvmNetworkOptions;
2009
+ };
2010
+ declare namespace CreateEvmTransactionExportRequest {
2011
+ enum type {
2012
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM"
2013
+ }
2014
+ }
2015
+
2016
+ type PrimaryNetworkOptions = {
2017
+ addresses: Array<string>;
2018
+ includeChains: Array<'p-chain' | 'x-chain' | 'c-chain' | '11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM'>;
2019
+ };
2020
+
2021
+ type CreatePrimaryNetworkTransactionExportRequest = {
2022
+ type: CreatePrimaryNetworkTransactionExportRequest.type;
2023
+ startDate: string;
2024
+ endDate: string;
2025
+ options: PrimaryNetworkOptions;
2026
+ };
2027
+ declare namespace CreatePrimaryNetworkTransactionExportRequest {
2028
+ enum type {
2029
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
2030
+ }
2031
+ }
2032
+
2033
+ declare enum OperationStatus {
2034
+ RUNNING = "RUNNING",
2035
+ COMPLETED = "COMPLETED",
2036
+ COMPLETED_WITH_WARNING = "COMPLETED_WITH_WARNING",
2037
+ FAILED = "FAILED"
2038
+ }
2039
+
2040
+ declare enum OperationType {
2041
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM",
2042
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
2043
+ }
2044
+
2045
+ declare enum OperationStatusCode {
2046
+ ERR_INVALID_REQUEST = "ErrInvalidRequest",
2047
+ ERR_INTERNAL = "ErrInternal",
2048
+ WARN_TRUNCATED_EXPORT = "WarnTruncatedExport"
2049
+ }
2050
+
2051
+ type TransactionExportMetadata = {
2052
+ code?: OperationStatusCode;
2053
+ /**
2054
+ * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations.
2055
+ */
2056
+ downloadUrl?: string;
2057
+ /**
2058
+ * The next date to use as the startDate in follow up requests
2059
+ * if a request results in a transaction history exceeding the max size and
2060
+ * has been reported as COMPLETED_WITH_WARNING with the warning
2061
+ * WarnTruncatedExport.
2062
+ */
2063
+ nextDate?: string;
2064
+ };
2065
+
2066
+ type OperationStatusResponse = {
2067
+ operationId: string;
2068
+ operationType: OperationType;
2069
+ operationStatus: OperationStatus;
2070
+ message?: string;
2071
+ metadata: TransactionExportMetadata;
2072
+ createdAtTimestamp: number;
2073
+ updatedAtTimestamp: number;
2074
+ };
2075
+
2076
+ declare class OperationsService {
2077
+ readonly httpRequest: BaseHttpRequest;
2078
+ constructor(httpRequest: BaseHttpRequest);
2079
+ /**
2080
+ * Trigger a transaction export operation with given parameters.
2081
+ * @returns OperationStatusResponse
2082
+ * @throws ApiError
2083
+ */
2084
+ postTransactionExportJob({ requestBody, }: {
2085
+ requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
2086
+ }): CancelablePromise<OperationStatusResponse>;
2087
+ /**
2088
+ * Retrieve operation result with given operation id
2089
+ * @returns OperationStatusResponse
2090
+ * @throws ApiError
2091
+ */
2092
+ getOperationResult({ operationId, }: {
2093
+ /**
2094
+ * UUID of given operation
2095
+ */
2096
+ operationId: string;
2097
+ }): CancelablePromise<OperationStatusResponse>;
2098
+ }
2099
+
2100
+ declare enum BlockchainId {
2101
+ P_CHAIN = "p-chain",
2102
+ X_CHAIN = "x-chain",
2103
+ C_CHAIN = "c-chain",
2104
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2105
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
2106
+ }
2107
+
2108
+ type Asset = {
2109
+ /**
2110
+ * Unique ID for an asset.
2111
+ */
2112
+ assetId: string;
2113
+ /**
2114
+ * Name of this asset.
2115
+ */
2116
+ name: string;
2117
+ /**
2118
+ * Symbol for this asset (max 4 characters).
2119
+ */
2120
+ symbol: string;
2121
+ /**
2122
+ * Denomination of this asset to represent fungibility.
2123
+ */
2124
+ denomination: number;
2125
+ /**
2126
+ * Type of asset like SECP256K1 or NFT.
2127
+ */
2128
+ type: string;
2129
+ /**
2130
+ * Amount of the asset.
2131
+ */
2132
+ amount: string;
2133
+ };
2134
+
2135
+ type EVMInput = {
2136
+ /**
2137
+ * EVM address from which the asset is exported in ExportTx.
2138
+ */
2139
+ fromAddress: string;
2140
+ /**
2141
+ * Asset details for the asset being transferred.
2142
+ */
2143
+ asset: Asset;
2144
+ };
2145
+
2146
+ type UtxoCredential = {
2147
+ /**
2148
+ * Signature provided to consume the output
2149
+ */
2150
+ signature?: string;
2151
+ /**
2152
+ * Public key associated with the signature
2153
+ */
2154
+ publicKey?: string;
2155
+ };
2156
+
2157
+ type Utxo = {
2158
+ /**
2159
+ * UTXO ID for this output.
2160
+ */
2161
+ utxoId: string;
2162
+ asset: Asset;
2163
+ /**
2164
+ * Type of output.
2165
+ */
2166
+ utxoType: string;
2167
+ /**
2168
+ * Blockchain ID on which this output is created on.
2169
+ */
2170
+ createdOnChainId: string;
2171
+ /**
2172
+ * Blockchain ID on which this output is consumed on.
2173
+ */
2174
+ consumedOnChainId: string;
2175
+ /**
2176
+ * Transaction ID that created this output.
2177
+ */
2178
+ creationTxHash: string;
2179
+ /**
2180
+ * Transaction ID that consumed this output.
2181
+ */
2182
+ consumingTxHash?: string;
2183
+ /**
2184
+ * Timestamp in seconds this output is consumed.
2185
+ */
2186
+ consumingTxTimestamp?: number;
2187
+ /**
2188
+ * Postion of this output in a list of lexiographically sorted outputs of a transaction.
2189
+ */
2190
+ outputIndex: string;
2191
+ /**
2192
+ * Timestamp in seconds this outptut is created on.
2193
+ */
2194
+ timestamp: number;
2195
+ /**
2196
+ * Locktime in seconds after which this output can be consumed.
2197
+ */
2198
+ locktime: number;
2199
+ /**
2200
+ * Minimum number of signatures required to consume this output.
2201
+ */
2202
+ threshold: number;
2203
+ /**
2204
+ * Addresses that are eligible to sign the consumption of this output.
2205
+ */
2206
+ addresses: Array<string>;
2207
+ /**
2208
+ * Credentials that signed the transaction to consume this utxo
2209
+ */
2210
+ credentials: Array<UtxoCredential>;
2211
+ };
2212
+
2213
+ type CChainExportTransaction = {
2214
+ /**
2215
+ * Unique ID for this transaction.
2216
+ */
2217
+ txHash: string;
2218
+ /**
2219
+ * Height of the block this transaction belongs to.
2220
+ */
2221
+ blockHeight: number;
2222
+ /**
2223
+ * Hash of the block this transaction belongs to.
2224
+ */
2225
+ blockHash: string;
2226
+ /**
2227
+ * Latest timestamp in seconds this transaction was accepted.
2228
+ */
2229
+ timestamp: number;
2230
+ /**
2231
+ * Hex encoded memo bytes for this transaction.
2232
+ */
2233
+ memo: string;
2234
+ /**
2235
+ * Assets unlocked by inputs of this transaction.
2236
+ */
2237
+ amountUnlocked: Array<Asset>;
2238
+ /**
2239
+ * Assets created by outputs of this transaction.
2240
+ */
2241
+ amountCreated: Array<Asset>;
2242
+ /**
2243
+ * Source chain for an atomic transaction.
2244
+ */
2245
+ sourceChain: string;
2246
+ /**
2247
+ * Destination chain for an atomic transaction.
2248
+ */
2249
+ destinationChain: string;
2250
+ /**
2251
+ * Type of transaction.
2252
+ */
2253
+ txType: CChainExportTransaction.txType;
2254
+ evmInputs: Array<EVMInput>;
2255
+ emittedUtxos: Array<Utxo>;
2256
+ };
2257
+ declare namespace CChainExportTransaction {
2258
+ /**
2259
+ * Type of transaction.
2260
+ */
2261
+ enum txType {
2262
+ EXPORT_TX = "ExportTx"
2263
+ }
2264
+ }
2265
+
2266
+ type EVMOutput = {
2267
+ /**
2268
+ * EVM address to which the asset is imported in ImportTx
2269
+ */
2270
+ toAddress: string;
2271
+ /**
2272
+ * Asset details for the asset being transferred.
2273
+ */
2274
+ asset: Asset;
2275
+ };
2276
+
2277
+ type CChainImportTransaction = {
2278
+ /**
2279
+ * Unique ID for this transaction.
2280
+ */
2281
+ txHash: string;
2282
+ /**
2283
+ * Height of the block this transaction belongs to.
2284
+ */
2285
+ blockHeight: number;
2286
+ /**
2287
+ * Hash of the block this transaction belongs to.
2288
+ */
2289
+ blockHash: string;
2290
+ /**
2291
+ * Latest timestamp in seconds this transaction was accepted.
2292
+ */
2293
+ timestamp: number;
2294
+ /**
2295
+ * Hex encoded memo bytes for this transaction.
2296
+ */
2297
+ memo: string;
2298
+ /**
2299
+ * Assets unlocked by inputs of this transaction.
2300
+ */
2301
+ amountUnlocked: Array<Asset>;
2302
+ /**
2303
+ * Assets created by outputs of this transaction.
2304
+ */
2305
+ amountCreated: Array<Asset>;
2306
+ /**
2307
+ * Source chain for an atomic transaction.
2308
+ */
2309
+ sourceChain: string;
2310
+ /**
2311
+ * Destination chain for an atomic transaction.
2312
+ */
2313
+ destinationChain: string;
2314
+ /**
2315
+ * Type of transaction.
2316
+ */
2317
+ txType: CChainImportTransaction.txType;
2318
+ evmOutputs: Array<EVMOutput>;
2319
+ consumedUtxos: Array<Utxo>;
2320
+ };
2321
+ declare namespace CChainImportTransaction {
2322
+ /**
2323
+ * Type of transaction.
2324
+ */
2325
+ enum txType {
2326
+ IMPORT_TX = "ImportTx"
2327
+ }
2328
+ }
2329
+
2330
+ type ChainAddressChainIdMap = {
2331
+ address: string;
2332
+ blockchainIds: BlockchainId;
2333
+ };
2334
+
2335
+ type ChainAddressChainIdMapListResponse = {
2336
+ addresses: Array<ChainAddressChainIdMap>;
2337
+ };
2338
+
2339
+ type CChainSharedAssetBalance = {
2340
+ /**
2341
+ * Unique ID for an asset.
2342
+ */
2343
+ assetId: string;
2344
+ /**
2345
+ * Name of this asset.
2346
+ */
2347
+ name: string;
2348
+ /**
2349
+ * Symbol for this asset (max 4 characters).
2350
+ */
2351
+ symbol: string;
2352
+ /**
2353
+ * Denomination of this asset to represent fungibility.
2354
+ */
2355
+ denomination: number;
2356
+ /**
2357
+ * Type of asset like SECP256K1 or NFT.
2358
+ */
2359
+ type: string;
2360
+ /**
2361
+ * Amount of the asset.
2362
+ */
2363
+ amount: string;
2364
+ utxoCount: number;
2365
+ sharedWithChainId: string;
2366
+ };
2367
+
2368
+ type CChainAtomicBalances = {
2369
+ atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
2370
+ atomicMemoryLocked: Array<CChainSharedAssetBalance>;
2371
+ };
2372
+
2373
+ type ListCChainAtomicBalancesResponse = {
2374
+ balances: CChainAtomicBalances;
2375
+ };
2376
+
2377
+ type ListCChainAtomicTransactionsResponse = {
2378
+ /**
2379
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2380
+ */
2381
+ nextPageToken?: string;
2382
+ transactions: Array<(CChainExportTransaction | CChainImportTransaction)>;
2383
+ };
2384
+
2385
+ type PChainAsset = {
2386
+ assetId: string;
2387
+ amount: string;
2388
+ };
2389
+
2390
+ type PChainBalance = {
2391
+ /**
2392
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction.
2393
+ */
2394
+ unlockedUnstaked?: Array<PChainAsset>;
2395
+ /**
2396
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends.
2397
+ */
2398
+ unlockedStaked?: Array<PChainAsset>;
2399
+ /**
2400
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time.
2401
+ */
2402
+ lockedPlatform?: Array<PChainAsset>;
2403
+ /**
2404
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions.
2405
+ */
2406
+ lockedStakeable?: Array<PChainAsset>;
2407
+ /**
2408
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends.
2409
+ */
2410
+ lockedStaked?: Array<PChainAsset>;
2411
+ /**
2412
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked. Sum of lockedPlatform and lockedStakeable. TO BE DEPRECATED.
2413
+ */
2414
+ lockedUnstaked?: Array<PChainAsset>;
2415
+ };
2416
+
2417
+ type ListPChainBalancesResponse = {
2418
+ balances: PChainBalance;
2419
+ };
2420
+
2421
+ declare enum PChainTransactionType {
2422
+ ADD_VALIDATOR_TX = "AddValidatorTx",
2423
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
2424
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
2425
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
2426
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
2427
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
2428
+ CREATE_CHAIN_TX = "CreateChainTx",
2429
+ CREATE_SUBNET_TX = "CreateSubnetTx",
2430
+ IMPORT_TX = "ImportTx",
2431
+ EXPORT_TX = "ExportTx",
2432
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
2433
+ UNKNOWN = "UNKNOWN"
2434
+ }
2435
+
2436
+ declare enum RewardType {
2437
+ VALIDATOR = "VALIDATOR",
2438
+ DELEGATOR = "DELEGATOR"
2439
+ }
2440
+
2441
+ declare enum UtxoType {
2442
+ STAKE = "STAKE",
2443
+ TRANSFER = "TRANSFER"
2444
+ }
2445
+
2446
+ type PChainUtxo = {
2447
+ /**
2448
+ * An array of P-Chain wallet addresses.
2449
+ */
2450
+ addresses: Array<string>;
2451
+ utxoId: string;
2452
+ txHash: string;
2453
+ outputIndex: number;
2454
+ blockTimestamp: number;
2455
+ consumingTxHash?: string;
2456
+ consumingBlockTimestamp?: number;
2457
+ assetId: string;
2458
+ utxoType: UtxoType;
2459
+ amount: string;
2460
+ stakeableLocktime?: number;
2461
+ platformLocktime?: number;
2462
+ threshold?: number;
2463
+ createdOnChainId: string;
2464
+ consumedOnChainId: string;
2465
+ staked?: boolean;
2466
+ rewardType?: RewardType;
2467
+ /**
2468
+ * To be deprecated
2469
+ * @deprecated
2470
+ */
2471
+ fromTx?: string;
2472
+ /**
2473
+ * To be deprecated
2474
+ * @deprecated
2475
+ */
2476
+ toTx?: string;
2477
+ };
2478
+
2479
+ type PChainTransaction = {
2480
+ /**
2481
+ * A P-Chain transaction hash.
2482
+ */
2483
+ txHash: string;
2484
+ txType: PChainTransactionType;
2485
+ /**
2486
+ * The block finality timestamp.
2487
+ */
2488
+ blockTimestamp: number;
2489
+ blockNumber: string;
2490
+ blockHash: string;
2491
+ consumedUtxos: Array<PChainUtxo>;
2492
+ emittedUtxos: Array<PChainUtxo>;
2493
+ /**
2494
+ * Source chain for an atomic transaction.
2495
+ */
2496
+ sourceChain?: string;
2497
+ /**
2498
+ * Destination chain for an atomic transaction.
2499
+ */
2500
+ destinationChain?: string;
2501
+ /**
2502
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2503
+ */
2504
+ value?: Array<PChainAsset>;
2505
+ /**
2506
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2507
+ */
2508
+ amountBurned?: Array<PChainAsset>;
2509
+ /**
2510
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2511
+ */
2512
+ amountStaked?: Array<PChainAsset>;
2513
+ /**
2514
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2515
+ */
2516
+ startTimestamp?: number;
2517
+ /**
2518
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2519
+ */
2520
+ endTimestamp?: number;
2521
+ /**
2522
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx
2523
+ */
2524
+ delegationFeePercent?: string;
2525
+ /**
2526
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2527
+ */
2528
+ nodeId?: string;
2529
+ /**
2530
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
2531
+ */
2532
+ subnetId?: string;
2533
+ /**
2534
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2535
+ */
2536
+ estimatedReward?: string;
2537
+ rewardTxHash?: string;
2538
+ /**
2539
+ * To be deprecated
2540
+ * @deprecated
2541
+ */
2542
+ rewardTx?: string;
2543
+ memo?: string;
2544
+ /**
2545
+ * Present for RewardValidatorTx
2546
+ */
2547
+ stakingTxHash?: string;
2548
+ };
2549
+
2550
+ type ListPChainTransactionsResponse = {
2551
+ /**
2552
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2553
+ */
2554
+ nextPageToken?: string;
2555
+ transactions: Array<PChainTransaction>;
2556
+ };
2557
+
2558
+ type ListPChainUtxosResponse = {
2559
+ /**
2560
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2561
+ */
2562
+ nextPageToken?: string;
2563
+ utxos: Array<PChainUtxo>;
2564
+ };
2565
+
2566
+ type ListUtxosResponse = {
2567
+ /**
2568
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2569
+ */
2570
+ nextPageToken?: string;
2571
+ utxos: Array<Utxo>;
2572
+ };
2573
+
2574
+ type XChainAssetBalance = {
2575
+ /**
2576
+ * Unique ID for an asset.
2577
+ */
2578
+ assetId: string;
2579
+ /**
2580
+ * Name of this asset.
2581
+ */
2582
+ name: string;
2583
+ /**
2584
+ * Symbol for this asset (max 4 characters).
2585
+ */
2586
+ symbol: string;
2587
+ /**
2588
+ * Denomination of this asset to represent fungibility.
2589
+ */
2590
+ denomination: number;
2591
+ /**
2592
+ * Type of asset like SECP256K1 or NFT.
2593
+ */
2594
+ type: string;
2595
+ /**
2596
+ * Amount of the asset.
2597
+ */
2598
+ amount: string;
2599
+ utxoCount: number;
2600
+ };
2601
+
2602
+ type XChainSharedAssetBalance = {
2603
+ /**
2604
+ * Unique ID for an asset.
2605
+ */
2606
+ assetId: string;
2607
+ /**
2608
+ * Name of this asset.
2609
+ */
2610
+ name: string;
2611
+ /**
2612
+ * Symbol for this asset (max 4 characters).
2613
+ */
2614
+ symbol: string;
2615
+ /**
2616
+ * Denomination of this asset to represent fungibility.
2617
+ */
2618
+ denomination: number;
2619
+ /**
2620
+ * Type of asset like SECP256K1 or NFT.
2621
+ */
2622
+ type: string;
2623
+ /**
2624
+ * Amount of the asset.
2625
+ */
2626
+ amount: string;
2627
+ utxoCount: number;
2628
+ sharedWithChainId: string;
2629
+ };
2630
+
2631
+ type XChainBalances = {
2632
+ /**
2633
+ * A list of objects containing X-chain Asset balance infromation.
2634
+ */
2635
+ locked: Array<XChainAssetBalance>;
2636
+ /**
2637
+ * A list of objects containing X-chain Asset balance infromation.
2638
+ */
2639
+ unlocked: Array<XChainAssetBalance>;
2640
+ atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
2641
+ atomicMemoryLocked: Array<XChainSharedAssetBalance>;
2642
+ };
2643
+
2644
+ type ListXChainBalancesResponse = {
2645
+ balances: XChainBalances;
2646
+ };
2647
+
2648
+ type XChainAssetDetails = {
2649
+ /**
2650
+ * Unique ID for an asset.
2651
+ */
2652
+ assetId: string;
2653
+ /**
2654
+ * Name of this asset.
2655
+ */
2656
+ name: string;
2657
+ /**
2658
+ * Symbol for this asset (max 4 characters).
2659
+ */
2660
+ symbol: string;
2661
+ /**
2662
+ * Denomination of this asset to represent fungibility.
2663
+ */
2664
+ denomination: number;
2665
+ /**
2666
+ * Type of asset like SECP256K1 or NFT.
2667
+ */
2668
+ type: string;
2669
+ /**
2670
+ * Timestamp in seconds this asset was created on.
2671
+ */
2672
+ createdAtTimestamp: number;
2673
+ /**
2674
+ * Cap represents if an asset can be or is fixed cap.
2675
+ */
2676
+ cap: string;
2677
+ };
2678
+
2679
+ type XChainLinearTransaction = {
2680
+ /**
2681
+ * Unique ID for this transaction.
2682
+ */
2683
+ txHash: string;
2684
+ /**
2685
+ * Represents container format this transaction is included in.
2686
+ */
2687
+ chainFormat: XChainLinearTransaction.chainFormat;
2688
+ /**
2689
+ * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
2690
+ */
2691
+ timestamp: number;
2692
+ /**
2693
+ * Type of transaction.
2694
+ */
2695
+ txType: string;
2696
+ /**
2697
+ * Hex encoded memo bytes for this transaction.
2698
+ */
2699
+ memo: string;
2700
+ consumedUtxos: Array<Utxo>;
2701
+ emittedUtxos: Array<Utxo>;
2702
+ /**
2703
+ * Assets unlocked by inputs of this transaction.
2704
+ */
2705
+ amountUnlocked: Array<Asset>;
2706
+ /**
2707
+ * Assets created by outputs of this transaction.
2708
+ */
2709
+ amountCreated: Array<Asset>;
2710
+ /**
2711
+ * Source chain for an atomic transaction.
2712
+ */
2713
+ sourceChain?: string;
2714
+ /**
2715
+ * Destination chain for an atomic transaction.
2716
+ */
2717
+ destinationChain?: string;
2718
+ /**
2719
+ * Asset details of the asset created in CreateAssetTx
2720
+ */
2721
+ assetCreated?: XChainAssetDetails;
2722
+ /**
2723
+ * Height of the block this transaction belongs to.
2724
+ */
2725
+ blockHeight: number;
2726
+ /**
2727
+ * Hash of the block this transaction belongs to.
2728
+ */
2729
+ blockHash: string;
2730
+ };
2731
+ declare namespace XChainLinearTransaction {
2732
+ /**
2733
+ * Represents container format this transaction is included in.
2734
+ */
2735
+ enum chainFormat {
2736
+ LINEAR = "linear",
2737
+ NON_LINEAR = "non-linear"
2738
+ }
2739
+ }
2740
+
2741
+ type TransactionVertexDetail = {
2742
+ /**
2743
+ * Vertex ID of the vertex this transaction belongs to.
2744
+ */
2745
+ hash: string;
2746
+ /**
2747
+ * Vertex height of the vertex this transaction belongs to.
2748
+ */
2749
+ height: number;
2750
+ /**
2751
+ * Timestamp in seconds this vertex was accepted.
2752
+ */
2753
+ timestamp: number;
2754
+ };
2755
+
2756
+ type XChainNonLinearTransaction = {
2757
+ /**
2758
+ * Unique ID for this transaction.
2759
+ */
2760
+ txHash: string;
2761
+ /**
2762
+ * Represents container format this transaction is included in.
2763
+ */
2764
+ chainFormat: XChainNonLinearTransaction.chainFormat;
2765
+ /**
2766
+ * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
2767
+ */
2768
+ timestamp: number;
2769
+ /**
2770
+ * Type of transaction.
2771
+ */
2772
+ txType: string;
2773
+ /**
2774
+ * Hex encoded memo bytes for this transaction.
2775
+ */
2776
+ memo: string;
2777
+ consumedUtxos: Array<Utxo>;
2778
+ emittedUtxos: Array<Utxo>;
2779
+ /**
2780
+ * Assets unlocked by inputs of this transaction.
2781
+ */
2782
+ amountUnlocked: Array<Asset>;
2783
+ /**
2784
+ * Assets created by outputs of this transaction.
2785
+ */
2786
+ amountCreated: Array<Asset>;
2787
+ /**
2788
+ * Source chain for an atomic transaction.
2789
+ */
2790
+ sourceChain?: string;
2791
+ /**
2792
+ * Destination chain for an atomic transaction.
2793
+ */
2794
+ destinationChain?: string;
2795
+ /**
2796
+ * Asset details of the asset created in CreateAssetTx
2797
+ */
2798
+ assetCreated?: XChainAssetDetails;
2799
+ /**
2800
+ * A transaction on X-Chain can be accepted over multiple vertices.
2801
+ */
2802
+ vertices: Array<TransactionVertexDetail>;
2803
+ };
2804
+ declare namespace XChainNonLinearTransaction {
2805
+ /**
2806
+ * Represents container format this transaction is included in.
2807
+ */
2808
+ enum chainFormat {
2809
+ LINEAR = "linear",
2810
+ NON_LINEAR = "non-linear"
2811
+ }
2812
+ }
2813
+
2814
+ type ListXChainTransactionsResponse = {
2815
+ /**
2816
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2817
+ */
2818
+ nextPageToken?: string;
2819
+ transactions: Array<(XChainNonLinearTransaction | XChainLinearTransaction)>;
2820
+ };
2821
+
2822
+ type XChainVertex = {
2823
+ vertexHash: string;
2824
+ parentHashes: Array<string>;
2825
+ vertexHeight: number;
2826
+ vertexIndex: number;
2827
+ vertexTimestamp: number;
2828
+ txCount: number;
2829
+ transactions: Array<string>;
2830
+ vertexSizeBytes: number;
2831
+ };
2832
+
2833
+ type ListXChainVerticesResponse = {
2834
+ /**
2835
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
2836
+ */
2837
+ nextPageToken?: string;
2838
+ vertices: Array<XChainVertex>;
2839
+ };
2840
+
2841
+ declare enum Network {
2842
+ MAINNET = "mainnet",
2843
+ FUJI = "fuji"
2844
+ }
2845
+
2846
+ declare enum PChainId {
2847
+ P_CHAIN = "p-chain",
2848
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY"
2849
+ }
2850
+
2851
+ declare enum XChainId {
2852
+ X_CHAIN = "x-chain",
2853
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
2854
+ }
2855
+
2856
+ declare class PrimaryNetworkService {
2857
+ readonly httpRequest: BaseHttpRequest;
2858
+ constructor(httpRequest: BaseHttpRequest);
2859
+ /**
2860
+ * Returns the details of the supplied transaction hash.
2861
+ * @returns any
2862
+ * @throws ApiError
2863
+ */
2864
+ getTxByHash({ blockchainId, network, txHash, }: {
2865
+ /**
2866
+ * 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!
2867
+ */
2868
+ blockchainId: BlockchainId;
2869
+ /**
2870
+ * Either mainnet or a testnet.
2871
+ */
2872
+ network: Network;
2873
+ /**
2874
+ * A primary network (P or X chain) transaction hash.
2875
+ */
2876
+ txHash: string;
2877
+ }): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
2878
+ /**
2879
+ * Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
2880
+ * @returns any
2881
+ * @throws ApiError
2882
+ */
2883
+ listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
2884
+ /**
2885
+ * 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!
2886
+ */
2887
+ blockchainId: BlockchainId;
2888
+ /**
2889
+ * Either mainnet or a testnet.
2890
+ */
2891
+ network: Network;
2892
+ /**
2893
+ * 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".
2894
+ */
2895
+ addresses?: string;
2896
+ /**
2897
+ * The maximum number of items to return. The minimum page size
2898
+ * is 1. The maximum pageSize is 100.
2899
+ */
2900
+ pageSize?: number;
2901
+ /**
2902
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2903
+ */
2904
+ pageToken?: string;
2905
+ /**
2906
+ * The order by which to sort results. Use "asc" for ascending
2907
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2908
+ * query parameter, if provided.
2909
+ */
2910
+ sortOrder?: SortOrder;
2911
+ }): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
2912
+ /**
2913
+ * Returns active staking transactions for supplied addresses.
2914
+ * @returns ListPChainTransactionsResponse
2915
+ * @throws ApiError
2916
+ */
2917
+ listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
2918
+ /**
2919
+ * A supported chain name for P-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain instead!
2920
+ */
2921
+ blockchainId: PChainId;
2922
+ /**
2923
+ * Either mainnet or a testnet.
2924
+ */
2925
+ network: Network;
2926
+ /**
2927
+ * 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".
2928
+ */
2929
+ addresses?: string;
2930
+ /**
2931
+ * The maximum number of items to return. The minimum page size
2932
+ * is 1. The maximum pageSize is 100.
2933
+ */
2934
+ pageSize?: number;
2935
+ /**
2936
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2937
+ */
2938
+ pageToken?: string;
2939
+ /**
2940
+ * The order by which to sort results. Use "asc" for ascending
2941
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2942
+ * query parameter, if provided.
2943
+ */
2944
+ sortOrder?: SortOrder;
2945
+ }): CancelablePromise<ListPChainTransactionsResponse>;
2946
+ /**
2947
+ * Returns a list of UTXOs for the supplied addresses.
2948
+ * @returns any
2949
+ * @throws ApiError
2950
+ */
2951
+ getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
2952
+ /**
2953
+ * 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!
2954
+ */
2955
+ blockchainId: BlockchainId;
2956
+ /**
2957
+ * Either mainnet or a testnet.
2958
+ */
2959
+ network: Network;
2960
+ /**
2961
+ * 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".
2962
+ */
2963
+ addresses?: string;
2964
+ /**
2965
+ * The maximum number of items to return. The minimum page size
2966
+ * is 1. The maximum pageSize is 100.
2967
+ */
2968
+ pageSize?: number;
2969
+ /**
2970
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2971
+ */
2972
+ pageToken?: string;
2973
+ /**
2974
+ * Asset ID for any asset (only applicable X-Chain)
2975
+ */
2976
+ assetId?: string;
2977
+ /**
2978
+ * The order by which to sort results. Use "asc" for ascending
2979
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2980
+ * query parameter, if provided.
2981
+ */
2982
+ sortOrder?: SortOrder;
2983
+ }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
2984
+ /**
2985
+ * Returns balance for P-Chain, X-Chain, and C-Chain (only shared memory balance for C-Chain).
2986
+ * @returns any
2987
+ * @throws ApiError
2988
+ */
2989
+ getBalancesByAddresses({ blockchainId, network, addresses, }: {
2990
+ /**
2991
+ * 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!
2992
+ */
2993
+ blockchainId: BlockchainId;
2994
+ /**
2995
+ * Either mainnet or a testnet.
2996
+ */
2997
+ network: Network;
2998
+ /**
2999
+ * 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".
3000
+ */
3001
+ addresses?: string;
3002
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
3003
+ /**
3004
+ * Returns block by block_height or block_hash on P-Chain, X-Chain (Cortina), C-Chain (hexadecimal for C-Chain).
3005
+ * @returns Block
3006
+ * @throws ApiError
3007
+ */
3008
+ getBlockById({ blockchainId, network, blockId, }: {
3009
+ /**
3010
+ * 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!
3011
+ */
3012
+ blockchainId: BlockchainId;
3013
+ /**
3014
+ * Either mainnet or a testnet.
3015
+ */
3016
+ network: Network;
3017
+ /**
3018
+ * A block identifier which is either a block number or the block hash.
3019
+ */
3020
+ blockId: string;
3021
+ }): CancelablePromise<Block>;
3022
+ /**
3023
+ * Returns latest blocks proposed by a given NodeID, up to user defined limit.
3024
+ * @returns ListBlocksResponse
3025
+ * @throws ApiError
3026
+ */
3027
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
3028
+ /**
3029
+ * 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!
3030
+ */
3031
+ blockchainId: BlockchainId;
3032
+ /**
3033
+ * Either mainnet or a testnet.
3034
+ */
3035
+ network: Network;
3036
+ /**
3037
+ * A primary network (P or X chain) nodeId.
3038
+ */
3039
+ nodeId: string;
3040
+ /**
3041
+ * The maximum number of items to return. The minimum page size
3042
+ * is 1. The maximum pageSize is 100.
3043
+ */
3044
+ pageSize?: number;
3045
+ /**
3046
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3047
+ */
3048
+ pageToken?: string;
3049
+ }): CancelablePromise<ListBlocksResponse>;
3050
+ /**
3051
+ * Returns latest blocks, up to user defined limit on P-Chain, X-Chain or C-Chain.
3052
+ * @returns ListBlocksResponse
3053
+ * @throws ApiError
3054
+ */
3055
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
3056
+ /**
3057
+ * 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!
3058
+ */
3059
+ blockchainId: BlockchainId;
3060
+ /**
3061
+ * Either mainnet or a testnet.
3062
+ */
3063
+ network: Network;
3064
+ /**
3065
+ * The maximum number of items to return. The minimum page size
3066
+ * is 1. The maximum pageSize is 100.
3067
+ */
3068
+ pageSize?: number;
3069
+ /**
3070
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3071
+ */
3072
+ pageToken?: string;
3073
+ }): CancelablePromise<ListBlocksResponse>;
3074
+ /**
3075
+ * Returns latest vertices, up to user defined limit on X-Chain.
3076
+ * @returns ListXChainVerticesResponse
3077
+ * @throws ApiError
3078
+ */
3079
+ listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
3080
+ /**
3081
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3082
+ */
3083
+ blockchainId: XChainId;
3084
+ /**
3085
+ * Either mainnet or a testnet.
3086
+ */
3087
+ network: Network;
3088
+ /**
3089
+ * The maximum number of items to return. The minimum page size
3090
+ * is 1. The maximum pageSize is 100.
3091
+ */
3092
+ pageSize?: number;
3093
+ /**
3094
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3095
+ */
3096
+ pageToken?: string;
3097
+ }): CancelablePromise<ListXChainVerticesResponse>;
3098
+ /**
3099
+ * Returns one vertex with the provided vertex hash on X-Chain.
3100
+ * @returns XChainVertex
3101
+ * @throws ApiError
3102
+ */
3103
+ getVertexByHash({ vertexHash, blockchainId, network, }: {
3104
+ /**
3105
+ * A vertex hash string.
3106
+ */
3107
+ vertexHash: string;
3108
+ /**
3109
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3110
+ */
3111
+ blockchainId: XChainId;
3112
+ /**
3113
+ * Either mainnet or a testnet.
3114
+ */
3115
+ network: Network;
3116
+ }): CancelablePromise<XChainVertex>;
3117
+ /**
3118
+ * Returns vertices with the provided vertex height on X-Chain.
3119
+ * @returns ListXChainVerticesResponse
3120
+ * @throws ApiError
3121
+ */
3122
+ getVertexByHeight({ vertexHeight, blockchainId, network, pageSize, pageToken, sortOrder, }: {
3123
+ /**
3124
+ * The height of a vertex.
3125
+ */
3126
+ vertexHeight: number;
3127
+ /**
3128
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3129
+ */
3130
+ blockchainId: XChainId;
3131
+ /**
3132
+ * Either mainnet or a testnet.
3133
+ */
3134
+ network: Network;
3135
+ /**
3136
+ * The maximum number of items to return. The minimum page size
3137
+ * is 1. The maximum pageSize is 100.
3138
+ */
3139
+ pageSize?: number;
3140
+ /**
3141
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3142
+ */
3143
+ pageToken?: string;
3144
+ /**
3145
+ * The order by which to sort results. Use "asc" for ascending
3146
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
3147
+ * query parameter, if provided.
3148
+ */
3149
+ sortOrder?: SortOrder;
3150
+ }): CancelablePromise<ListXChainVerticesResponse>;
3151
+ /**
3152
+ * Returns asset details corresponding to the asset id on X-Chain.
3153
+ * @returns XChainAssetDetails
3154
+ * @throws ApiError
3155
+ */
3156
+ getAssetDetails({ blockchainId, network, assetId, }: {
3157
+ /**
3158
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3159
+ */
3160
+ blockchainId: XChainId;
3161
+ /**
3162
+ * Either mainnet or a testnet.
3163
+ */
3164
+ network: Network;
3165
+ /**
3166
+ * Asset ID for any asset on X-Chain
3167
+ */
3168
+ assetId: string;
3169
+ }): CancelablePromise<XChainAssetDetails>;
3170
+ /**
3171
+ * Returns asset transactions corresponding to the asset id on X-Chain.
3172
+ * @returns ListXChainTransactionsResponse
3173
+ * @throws ApiError
3174
+ */
3175
+ getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
3176
+ /**
3177
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3178
+ */
3179
+ blockchainId: XChainId;
3180
+ /**
3181
+ * Either mainnet or a testnet.
3182
+ */
3183
+ network: Network;
3184
+ /**
3185
+ * Asset ID for any asset on X-Chain
3186
+ */
3187
+ assetId: string;
3188
+ /**
3189
+ * The maximum number of items to return. The minimum page size
3190
+ * is 1. The maximum pageSize is 100.
3191
+ */
3192
+ pageSize?: number;
3193
+ /**
3194
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3195
+ */
3196
+ pageToken?: string;
3197
+ }): CancelablePromise<ListXChainTransactionsResponse>;
3198
+ /**
3199
+ * Return all address-mapped chain IDs that an address has been seen on chain before.
3200
+ * @returns ChainAddressChainIdMapListResponse
3201
+ * @throws ApiError
3202
+ */
3203
+ getChainAddresses({ addresses, network, }: {
3204
+ /**
3205
+ * 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".
3206
+ */
3207
+ addresses: string;
3208
+ /**
3209
+ * Either mainnet or a testnet.
3210
+ */
3211
+ network: Network;
3212
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
3213
+ }
3214
+
3215
+ type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
3216
+ declare class Glacier {
3217
+ readonly evm: EvmService;
3218
+ readonly healthCheck: HealthCheckService;
3219
+ readonly operations: OperationsService;
3220
+ readonly primaryNetwork: PrimaryNetworkService;
3221
+ readonly request: BaseHttpRequest;
3222
+ constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
3223
+ }
3224
+
3225
+ type ApiResult = {
3226
+ readonly url: string;
3227
+ readonly ok: boolean;
3228
+ readonly status: number;
3229
+ readonly statusText: string;
3230
+ readonly body: any;
3231
+ };
3232
+
3233
+ declare class ApiError extends Error {
3234
+ readonly url: string;
3235
+ readonly status: number;
3236
+ readonly statusText: string;
3237
+ readonly body: any;
3238
+ readonly request: ApiRequestOptions;
3239
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3240
+ }
3241
+
3242
+ export { Address, ApiError, Asset, BaseHttpRequest, Block, BlockchainId, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelListingEventResponse, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CloseAuctionEventResponse, CollectionMetrics, CollectionSortByOption, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, EVMInput, EVMOutput, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, EvmNetworkOptions, EvmService, FloorPrice, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetNativeBalanceResponse, GetTransactionResponse, Glacier, HealthCheckService, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlocksResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListInternalTransactionsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListNftCollectionWithMetricsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingResponse, ListingType, ListingsSortByOption, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftCollectionWithMetrics, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OpenListingEventResponse, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainTransaction, PChainTransactionType, PChainUtxo, PaginationParams, PrimaryNetworkOptions, PrimaryNetworkService, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, RewardType, RichAddress, SortOrder, TokenWithPrice, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, TrendingTimeframe, UtilityAddresses, Utxo, UtxoCredential, UtxoType, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };