@avalabs/glacier-sdk 2.8.0-alpha.88 → 2.8.0-alpha.9

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