@avalabs/glacier-sdk 2.8.0-alpha.11 → 2.8.0-alpha.111

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