@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
@@ -0,0 +1,742 @@
1
+ import { CollectionSortByOption } from '../models/CollectionSortByOption.js';
2
+ import { CurrencyCode } from '../models/CurrencyCode.js';
3
+ import { Erc1155Token } from '../models/Erc1155Token.js';
4
+ import { Erc721Token } from '../models/Erc721Token.js';
5
+ import { GetChainResponse } from '../models/GetChainResponse.js';
6
+ import { GetEvmBlockResponse } from '../models/GetEvmBlockResponse.js';
7
+ import { GetNativeBalanceResponse } from '../models/GetNativeBalanceResponse.js';
8
+ import { GetTransactionResponse } from '../models/GetTransactionResponse.js';
9
+ import { ListChainsResponse } from '../models/ListChainsResponse.js';
10
+ import { ListCollectibleBalancesResponse } from '../models/ListCollectibleBalancesResponse.js';
11
+ import { ListErc1155BalancesResponse } from '../models/ListErc1155BalancesResponse.js';
12
+ import { ListErc1155TransactionsResponse } from '../models/ListErc1155TransactionsResponse.js';
13
+ import { ListErc20BalancesResponse } from '../models/ListErc20BalancesResponse.js';
14
+ import { ListErc20TransactionsResponse } from '../models/ListErc20TransactionsResponse.js';
15
+ import { ListErc721BalancesResponse } from '../models/ListErc721BalancesResponse.js';
16
+ import { ListErc721TransactionsResponse } from '../models/ListErc721TransactionsResponse.js';
17
+ import { ListEvmBlocksResponse } from '../models/ListEvmBlocksResponse.js';
18
+ import { ListingEventType } from '../models/ListingEventType.js';
19
+ import { ListingsSortByOption } from '../models/ListingsSortByOption.js';
20
+ import { ListInternalTransactionsResponse } from '../models/ListInternalTransactionsResponse.js';
21
+ import { ListListingsResponse } from '../models/ListListingsResponse.js';
22
+ import { ListNativeTransactionsResponse } from '../models/ListNativeTransactionsResponse.js';
23
+ import { ListNftCollectionWithMetricsResponse } from '../models/ListNftCollectionWithMetricsResponse.js';
24
+ import { ListTransactionDetailsResponse } from '../models/ListTransactionDetailsResponse.js';
25
+ import { ListTransfersResponse } from '../models/ListTransfersResponse.js';
26
+ import { NftCollection } from '../models/NftCollection.js';
27
+ import { NftCollectionWithMetrics } from '../models/NftCollectionWithMetrics.js';
28
+ import { NftSearchBody } from '../models/NftSearchBody.js';
29
+ import { SortOrder } from '../models/SortOrder.js';
30
+ import { TransactionStatus } from '../models/TransactionStatus.js';
31
+ import { TrendingTimeframe } from '../models/TrendingTimeframe.js';
32
+ import { CancelablePromise } from '../core/CancelablePromise.js';
33
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
34
+
35
+ declare class EvmService {
36
+ readonly httpRequest: BaseHttpRequest;
37
+ constructor(httpRequest: BaseHttpRequest);
38
+ /**
39
+ * Get native token balance of a wallet address for a given chain.
40
+ * @returns GetNativeBalanceResponse
41
+ * @throws ApiError
42
+ */
43
+ getNativeBalance({ chainId, address, blockNumber, currency, }: {
44
+ /**
45
+ * A supported evm chain id. Use the `/chains` endpoint to get
46
+ * a list of supported chain ids.
47
+ */
48
+ chainId: string;
49
+ /**
50
+ * A wallet address.
51
+ */
52
+ address: string;
53
+ /**
54
+ * The block number, if not defined the block number will be the latest block.
55
+ */
56
+ blockNumber?: string;
57
+ /**
58
+ * The currency that return values should use. Defaults to USD.
59
+ */
60
+ currency?: CurrencyCode;
61
+ }): CancelablePromise<GetNativeBalanceResponse>;
62
+ /**
63
+ * List ERC-20 token balances of a wallet address for a given chain.
64
+ * @returns ListErc20BalancesResponse
65
+ * @throws ApiError
66
+ */
67
+ listErc20Balances({ chainId, address, blockNumber, pageSize, pageToken, currency, }: {
68
+ /**
69
+ * A supported evm chain id. Use the `/chains` endpoint to get
70
+ * a list of supported chain ids.
71
+ */
72
+ chainId: string;
73
+ /**
74
+ * A wallet address.
75
+ */
76
+ address: string;
77
+ /**
78
+ * The block number, if not defined the block number will be the latest block.
79
+ */
80
+ blockNumber?: string;
81
+ /**
82
+ * The maximum number of items to return. The minimum page size
83
+ * is 1. The maximum pageSize is 100.
84
+ */
85
+ pageSize?: number;
86
+ /**
87
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
88
+ */
89
+ pageToken?: string;
90
+ /**
91
+ * The currency that return values should use. Defaults to USD.
92
+ */
93
+ currency?: CurrencyCode;
94
+ }): CancelablePromise<ListErc20BalancesResponse>;
95
+ /**
96
+ * List ERC-721 token balances of a wallet address for a given chain.
97
+ * @returns ListErc721BalancesResponse
98
+ * @throws ApiError
99
+ */
100
+ listErc721Balances({ chainId, address, pageSize, pageToken, }: {
101
+ /**
102
+ * A supported evm chain id. Use the `/chains` endpoint to get
103
+ * a list of supported chain ids.
104
+ */
105
+ chainId: string;
106
+ /**
107
+ * A wallet address.
108
+ */
109
+ address: string;
110
+ /**
111
+ * The maximum number of items to return. The minimum page size
112
+ * is 1. The maximum pageSize is 100.
113
+ */
114
+ pageSize?: number;
115
+ /**
116
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
117
+ */
118
+ pageToken?: string;
119
+ }): CancelablePromise<ListErc721BalancesResponse>;
120
+ /**
121
+ * List ERC-1155 token balances of a wallet address for a given chain.
122
+ * @returns ListErc1155BalancesResponse
123
+ * @throws ApiError
124
+ */
125
+ listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, }: {
126
+ /**
127
+ * A supported evm chain id. Use the `/chains` endpoint to get
128
+ * a list of supported chain ids.
129
+ */
130
+ chainId: string;
131
+ /**
132
+ * A wallet address.
133
+ */
134
+ address: string;
135
+ /**
136
+ * The block number, if not defined the block number will be the latest block.
137
+ */
138
+ blockNumber?: string;
139
+ /**
140
+ * The maximum number of items to return. The minimum page size
141
+ * is 1. The maximum pageSize is 100.
142
+ */
143
+ pageSize?: number;
144
+ /**
145
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
146
+ */
147
+ pageToken?: string;
148
+ }): CancelablePromise<ListErc1155BalancesResponse>;
149
+ /**
150
+ * List ERC-721 and ERC-1155 token balances of a wallet address
151
+ * for a given chain.
152
+ * @returns ListCollectibleBalancesResponse
153
+ * @throws ApiError
154
+ */
155
+ listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
156
+ /**
157
+ * A supported evm chain id. Use the `/chains` endpoint to get
158
+ * a list of supported chain ids.
159
+ */
160
+ chainId: string;
161
+ /**
162
+ * A wallet address.
163
+ */
164
+ address: string;
165
+ /**
166
+ * The maximum number of items to return. The minimum page size
167
+ * is 1. The maximum pageSize is 100.
168
+ */
169
+ pageSize?: number;
170
+ /**
171
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
172
+ */
173
+ pageToken?: string;
174
+ }): CancelablePromise<ListCollectibleBalancesResponse>;
175
+ /**
176
+ * Returns the latest blocks indexed for the chain.
177
+ * @returns ListEvmBlocksResponse
178
+ * @throws ApiError
179
+ */
180
+ getLatestBlocks({ chainId, pageSize, pageToken, }: {
181
+ /**
182
+ * A supported evm chain id. Use the `/chains` endpoint to get
183
+ * a list of supported chain ids.
184
+ */
185
+ chainId: string;
186
+ /**
187
+ * The maximum number of items to return. The minimum page size
188
+ * is 1. The maximum pageSize is 100.
189
+ */
190
+ pageSize?: number;
191
+ /**
192
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
193
+ */
194
+ pageToken?: string;
195
+ }): CancelablePromise<ListEvmBlocksResponse>;
196
+ /**
197
+ * Returns the details of an individual block for the chain.
198
+ * @returns GetEvmBlockResponse
199
+ * @throws ApiError
200
+ */
201
+ getBlock({ chainId, blockId, }: {
202
+ /**
203
+ * A supported evm chain id. Use the `/chains` endpoint to get
204
+ * a list of supported chain ids.
205
+ */
206
+ chainId: string;
207
+ /**
208
+ * A block identifier which is either a block number or the block hash.
209
+ */
210
+ blockId: string;
211
+ }): CancelablePromise<GetEvmBlockResponse>;
212
+ /**
213
+ * If the address is a smart contract, returns the transaction at which it was deployed.
214
+ * @returns GetTransactionResponse
215
+ * @throws ApiError
216
+ */
217
+ getDeploymentTransaction({ chainId, address, currency, }: {
218
+ /**
219
+ * A supported evm chain id. Use the `/chains` endpoint to get
220
+ * a list of supported chain ids.
221
+ */
222
+ chainId: string;
223
+ /**
224
+ * Contract address on the relevant chain.
225
+ */
226
+ address: string;
227
+ /**
228
+ * The currency that return values should use. Defaults to USD.
229
+ */
230
+ currency?: CurrencyCode;
231
+ }): CancelablePromise<GetTransactionResponse>;
232
+ /**
233
+ * Gets the list of chains supported by the api.
234
+ * @returns ListChainsResponse
235
+ * @throws ApiError
236
+ */
237
+ supportedChains(): CancelablePromise<ListChainsResponse>;
238
+ /**
239
+ * Gets chain information by chain id.
240
+ * @returns GetChainResponse
241
+ * @throws ApiError
242
+ */
243
+ getChainInfo({ chainId, }: {
244
+ /**
245
+ * A supported evm chain id. Use the `/chains` endpoint to get
246
+ * a list of supported chain ids.
247
+ */
248
+ chainId: string;
249
+ }): CancelablePromise<GetChainResponse>;
250
+ /**
251
+ * Triggers reindexing for a single nft contract and token id pair.
252
+ * Triggers reindexing of token metadata for nft contracts.
253
+ * Will throw 400 if Nft has been indexed within the last hour.
254
+ * @returns any
255
+ * @throws ApiError
256
+ */
257
+ reindexNft({ chainId, address, tokenId, }: {
258
+ /**
259
+ * A supported evm chain id. Use the `/chains` endpoint to get
260
+ * a list of supported chain ids.
261
+ */
262
+ chainId: string;
263
+ /**
264
+ * Contract address on the relevant chain.
265
+ */
266
+ address: string;
267
+ /**
268
+ * TokenId on the contract
269
+ */
270
+ tokenId: string;
271
+ }): CancelablePromise<any>;
272
+ /**
273
+ * Get collection data for provided a ChainID and address.
274
+ * @returns NftCollectionWithMetrics
275
+ * @throws ApiError
276
+ */
277
+ getCollection({ chainId, address, timeframe, }: {
278
+ /**
279
+ * A supported evm chain id. Use the `/chains` endpoint to get
280
+ * a list of supported chain ids.
281
+ */
282
+ chainId: string;
283
+ /**
284
+ * Contract address on the relevant chain.
285
+ */
286
+ address: string;
287
+ /**
288
+ * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
289
+ */
290
+ timeframe?: TrendingTimeframe;
291
+ }): CancelablePromise<NftCollectionWithMetrics>;
292
+ /**
293
+ * List open listings for a NFT token.
294
+ * @returns ListListingsResponse
295
+ * @throws ApiError
296
+ */
297
+ listListingsByCollectionTokenId({ chainId, address, tokenId, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
298
+ /**
299
+ * A supported evm chain id. Use the `/chains` endpoint to get
300
+ * a list of supported chain ids.
301
+ */
302
+ chainId: string;
303
+ /**
304
+ * Contract address on the relevant chain.
305
+ */
306
+ address: string;
307
+ /**
308
+ * TokenId on the contract
309
+ */
310
+ tokenId: string;
311
+ /**
312
+ * The maximum number of items to return. The minimum page size
313
+ * is 1. The maximum pageSize is 100.
314
+ */
315
+ pageSize?: number;
316
+ /**
317
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
318
+ */
319
+ pageToken?: string;
320
+ /**
321
+ * Which property to sort by, in conjunction with sortOrder.
322
+ */
323
+ sortBy?: ListingsSortByOption;
324
+ /**
325
+ * The order by which to sort results. Use "asc" for ascending
326
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
327
+ * query parameter, if provided.
328
+ */
329
+ sortOrder?: SortOrder;
330
+ /**
331
+ * The currency that return values should use. Defaults to USD.
332
+ */
333
+ currency?: CurrencyCode;
334
+ /**
335
+ * Determines whether to return full transaction history for listings.
336
+ */
337
+ includeHistory?: boolean;
338
+ }): CancelablePromise<ListListingsResponse>;
339
+ /**
340
+ * List open listings for a NFT collection.
341
+ * @returns ListListingsResponse
342
+ * @throws ApiError
343
+ */
344
+ listListingsByCollection({ chainId, address, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
345
+ /**
346
+ * A supported evm chain id. Use the `/chains` endpoint to get
347
+ * a list of supported chain ids.
348
+ */
349
+ chainId: string;
350
+ /**
351
+ * Contract address on the relevant chain.
352
+ */
353
+ address: string;
354
+ /**
355
+ * The maximum number of items to return. The minimum page size
356
+ * is 1. The maximum pageSize is 100.
357
+ */
358
+ pageSize?: number;
359
+ /**
360
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
361
+ */
362
+ pageToken?: string;
363
+ /**
364
+ * Which property to sort by, in conjunction with sortOrder.
365
+ */
366
+ sortBy?: ListingsSortByOption;
367
+ /**
368
+ * The order by which to sort results. Use "asc" for ascending
369
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
370
+ * query parameter, if provided.
371
+ */
372
+ sortOrder?: SortOrder;
373
+ /**
374
+ * The currency that return values should use. Defaults to USD.
375
+ */
376
+ currency?: CurrencyCode;
377
+ /**
378
+ * Determines whether to return full transaction history for listings.
379
+ */
380
+ includeHistory?: boolean;
381
+ }): CancelablePromise<ListListingsResponse>;
382
+ /**
383
+ * List recent listings on the chain.
384
+ * @returns ListListingsResponse
385
+ * @throws ApiError
386
+ */
387
+ listRecentListings({ chainId, pageSize, pageToken, eventType, currency, }: {
388
+ /**
389
+ * A supported evm chain id. Use the `/chains` endpoint to get
390
+ * a list of supported chain ids.
391
+ */
392
+ chainId: string;
393
+ /**
394
+ * The maximum number of items to return. The minimum page size
395
+ * is 1. The maximum pageSize is 100.
396
+ */
397
+ pageSize?: number;
398
+ /**
399
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
400
+ */
401
+ pageToken?: string;
402
+ eventType?: ListingEventType;
403
+ /**
404
+ * The currency that return values should use. Defaults to USD.
405
+ */
406
+ currency?: CurrencyCode;
407
+ }): CancelablePromise<ListListingsResponse>;
408
+ /**
409
+ * List details and metrics for collections.
410
+ * @returns ListNftCollectionWithMetricsResponse
411
+ * @throws ApiError
412
+ */
413
+ listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
414
+ /**
415
+ * A supported evm chain id. Use the `/chains` endpoint to get
416
+ * a list of supported chain ids.
417
+ */
418
+ chainId: string;
419
+ /**
420
+ * The maximum number of items to return. The minimum page size
421
+ * is 1. The maximum pageSize is 100.
422
+ */
423
+ pageSize?: number;
424
+ /**
425
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
426
+ */
427
+ pageToken?: string;
428
+ /**
429
+ * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
430
+ */
431
+ timeframe?: TrendingTimeframe;
432
+ /**
433
+ * Which property to sort by, in conjunction with sortOrder.
434
+ */
435
+ sortBy?: CollectionSortByOption;
436
+ /**
437
+ * The order by which to sort results. Use "asc" for ascending
438
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
439
+ * query parameter, if provided.
440
+ */
441
+ sortOrder?: SortOrder;
442
+ }): CancelablePromise<ListNftCollectionWithMetricsResponse>;
443
+ /**
444
+ * Search for token by name and contract name.
445
+ * @returns any
446
+ * @throws ApiError
447
+ */
448
+ search({ chainId, requestBody, }: {
449
+ /**
450
+ * A supported evm chain id. Use the `/chains` endpoint to get
451
+ * a list of supported chain ids.
452
+ */
453
+ chainId: string;
454
+ requestBody: NftSearchBody;
455
+ }): CancelablePromise<{
456
+ results?: Array<NftCollection>;
457
+ }>;
458
+ /**
459
+ * Get metadata for a specific token by providing the contract address and token id.
460
+ * @returns any
461
+ * @throws ApiError
462
+ */
463
+ getTokenMetadata({ chainId, address, tokenId, }: {
464
+ /**
465
+ * A supported evm chain id. Use the `/chains` endpoint to get
466
+ * a list of supported chain ids.
467
+ */
468
+ chainId: string;
469
+ /**
470
+ * Contract address on the relevant chain.
471
+ */
472
+ address: string;
473
+ /**
474
+ * TokenId on the contract
475
+ */
476
+ tokenId: string;
477
+ }): CancelablePromise<(Erc721Token | Erc1155Token)>;
478
+ /**
479
+ * Gets a list of erc transfers for an ERC-20, ERC-721,
480
+ * or ERC-1155 contract address.
481
+ * @returns ListTransfersResponse
482
+ * @throws ApiError
483
+ */
484
+ listTransfers({ chainId, address, pageSize, pageToken, }: {
485
+ /**
486
+ * A supported evm chain id. Use the `/chains` endpoint to get
487
+ * a list of supported chain ids.
488
+ */
489
+ chainId: string;
490
+ /**
491
+ * A wallet address.
492
+ */
493
+ address: string;
494
+ /**
495
+ * The maximum number of items to return. The minimum page size
496
+ * is 1. The maximum pageSize is 100.
497
+ */
498
+ pageSize?: number;
499
+ /**
500
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
501
+ */
502
+ pageToken?: string;
503
+ }): CancelablePromise<ListTransfersResponse>;
504
+ /**
505
+ * Gets a list of transactions for an address and chain.
506
+ * Returns a list of transactions where the given wallet
507
+ * address had an on-chain interaction for a given chain. The ERC-20
508
+ * transfers, ERC-721 transfers, ERC-1155, and internal transactions
509
+ * returned are only those where the input address had an interaction.
510
+ * Specifically, those list only inlcude entries where the input address
511
+ * was the sender (`from` field) or the receiver (`to` field) for the
512
+ * sub-transaction. Therefore the transactions returned from this list may
513
+ * not be complete representations of the on-chain data. For a complete
514
+ * view of a transaction use the `/chains/:chainId/transactions/:txHash`
515
+ * endpoint.
516
+ * @returns ListTransactionDetailsResponse
517
+ * @throws ApiError
518
+ */
519
+ listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, sortOrder, }: {
520
+ /**
521
+ * A supported evm chain id. Use the `/chains` endpoint to get
522
+ * a list of supported chain ids.
523
+ */
524
+ chainId: string;
525
+ /**
526
+ * A wallet address.
527
+ */
528
+ address: string;
529
+ /**
530
+ * The maximum number of items to return. The minimum page size
531
+ * is 1. The maximum pageSize is 100.
532
+ */
533
+ pageSize?: number;
534
+ /**
535
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
536
+ */
537
+ pageToken?: string;
538
+ /**
539
+ * 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.
540
+ */
541
+ startBlock?: number;
542
+ /**
543
+ * 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.
544
+ */
545
+ endBlock?: number;
546
+ /**
547
+ * The order by which to sort results. Use "asc" for ascending
548
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
549
+ * query parameter, if provided.
550
+ */
551
+ sortOrder?: SortOrder;
552
+ }): CancelablePromise<ListTransactionDetailsResponse>;
553
+ /**
554
+ * Gets a list of native transactions for an address and chain.
555
+ * @returns ListNativeTransactionsResponse
556
+ * @throws ApiError
557
+ */
558
+ listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
559
+ /**
560
+ * A supported evm chain id. Use the `/chains` endpoint to get
561
+ * a list of supported chain ids.
562
+ */
563
+ chainId: string;
564
+ /**
565
+ * A wallet address.
566
+ */
567
+ address: string;
568
+ /**
569
+ * The maximum number of items to return. The minimum page size
570
+ * is 1. The maximum pageSize is 100.
571
+ */
572
+ pageSize?: number;
573
+ /**
574
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
575
+ */
576
+ pageToken?: string;
577
+ }): CancelablePromise<ListNativeTransactionsResponse>;
578
+ /**
579
+ * Lists ERC-20 transfers for an address.
580
+ * @returns ListErc20TransactionsResponse
581
+ * @throws ApiError
582
+ */
583
+ listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
584
+ /**
585
+ * A supported evm chain id. Use the `/chains` endpoint to get
586
+ * a list of supported chain ids.
587
+ */
588
+ chainId: string;
589
+ /**
590
+ * A wallet address.
591
+ */
592
+ address: string;
593
+ /**
594
+ * The maximum number of items to return. The minimum page size
595
+ * is 1. The maximum pageSize is 100.
596
+ */
597
+ pageSize?: number;
598
+ /**
599
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
600
+ */
601
+ pageToken?: string;
602
+ }): CancelablePromise<ListErc20TransactionsResponse>;
603
+ /**
604
+ * Lists ERC-721 transfers for an address.
605
+ * @returns ListErc721TransactionsResponse
606
+ * @throws ApiError
607
+ */
608
+ listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
609
+ /**
610
+ * A supported evm chain id. Use the `/chains` endpoint to get
611
+ * a list of supported chain ids.
612
+ */
613
+ chainId: string;
614
+ /**
615
+ * A wallet address.
616
+ */
617
+ address: string;
618
+ /**
619
+ * The maximum number of items to return. The minimum page size
620
+ * is 1. The maximum pageSize is 100.
621
+ */
622
+ pageSize?: number;
623
+ /**
624
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
625
+ */
626
+ pageToken?: string;
627
+ }): CancelablePromise<ListErc721TransactionsResponse>;
628
+ /**
629
+ * Lists of ERC-1155 transfers for an address.
630
+ * @returns ListErc1155TransactionsResponse
631
+ * @throws ApiError
632
+ */
633
+ listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
634
+ /**
635
+ * A supported evm chain id. Use the `/chains` endpoint to get
636
+ * a list of supported chain ids.
637
+ */
638
+ chainId: string;
639
+ /**
640
+ * A wallet address.
641
+ */
642
+ address: string;
643
+ /**
644
+ * The maximum number of items to return. The minimum page size
645
+ * is 1. The maximum pageSize is 100.
646
+ */
647
+ pageSize?: number;
648
+ /**
649
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
650
+ */
651
+ pageToken?: string;
652
+ }): CancelablePromise<ListErc1155TransactionsResponse>;
653
+ /**
654
+ * Lists internal transactions for an address.
655
+ * Returns a list of internal transactions for an address and
656
+ * chain. Note that the internal transactions list only contains CALL or
657
+ * CALLCODE transactions with a non-zero value and CREATE/CREATE2
658
+ * transactions. To get a complete list of internal transactions use the
659
+ * `debug_` prefixed RPC methods on an archive node.
660
+ * @returns ListInternalTransactionsResponse
661
+ * @throws ApiError
662
+ */
663
+ listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
664
+ /**
665
+ * A supported evm chain id. Use the `/chains` endpoint to get
666
+ * a list of supported chain ids.
667
+ */
668
+ chainId: string;
669
+ /**
670
+ * A wallet address.
671
+ */
672
+ address: string;
673
+ /**
674
+ * The maximum number of items to return. The minimum page size
675
+ * is 1. The maximum pageSize is 100.
676
+ */
677
+ pageSize?: number;
678
+ /**
679
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
680
+ */
681
+ pageToken?: string;
682
+ }): CancelablePromise<ListInternalTransactionsResponse>;
683
+ /**
684
+ * Gets the details of a single transaction.
685
+ * @returns GetTransactionResponse
686
+ * @throws ApiError
687
+ */
688
+ getTransaction({ chainId, txHash, }: {
689
+ /**
690
+ * A supported evm chain id. Use the `/chains` endpoint to get
691
+ * a list of supported chain ids.
692
+ */
693
+ chainId: string;
694
+ /**
695
+ * A transaction hash.
696
+ */
697
+ txHash: string;
698
+ }): CancelablePromise<GetTransactionResponse>;
699
+ /**
700
+ * Gets the transactions that occured in a given block.
701
+ * @returns ListNativeTransactionsResponse
702
+ * @throws ApiError
703
+ */
704
+ getTransactionsForBlock({ chainId, blockId, }: {
705
+ /**
706
+ * A supported evm chain id. Use the `/chains` endpoint to get
707
+ * a list of supported chain ids.
708
+ */
709
+ chainId: string;
710
+ /**
711
+ * A block identifier which is either a block number or the block hash.
712
+ */
713
+ blockId: string;
714
+ }): CancelablePromise<ListNativeTransactionsResponse>;
715
+ /**
716
+ * Gets the latest transactions; can be filtered by status.
717
+ * @returns ListNativeTransactionsResponse
718
+ * @throws ApiError
719
+ */
720
+ listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
721
+ /**
722
+ * A supported evm chain id. Use the `/chains` endpoint to get
723
+ * a list of supported chain ids.
724
+ */
725
+ chainId: string;
726
+ /**
727
+ * The maximum number of items to return. The minimum page size
728
+ * is 1. The maximum pageSize is 100.
729
+ */
730
+ pageSize?: number;
731
+ /**
732
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
733
+ */
734
+ pageToken?: string;
735
+ /**
736
+ * A status filter for listed transactions.
737
+ */
738
+ status?: TransactionStatus;
739
+ }): CancelablePromise<ListNativeTransactionsResponse>;
740
+ }
741
+
742
+ export { EvmService };