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

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