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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/CHANGELOG.md +218 -0
  2. package/README.md +0 -10
  3. package/__tests__/glacier-sdk.test.js +7 -0
  4. package/dist/index.d.ts +3 -3209
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +153 -1531
  7. package/dist/index.js.map +1 -0
  8. package/dist/src/generated/models.d.ts +385 -0
  9. package/dist/src/generated/models.d.ts.map +1 -0
  10. package/dist/src/glacierClient.d.ts +93 -0
  11. package/dist/src/glacierClient.d.ts.map +1 -0
  12. package/dist/src/types.d.ts +13 -0
  13. package/dist/src/types.d.ts.map +1 -0
  14. package/index.ts +2 -0
  15. package/package.json +15 -12
  16. package/rollup.config.js +33 -0
  17. package/src/generated/models.ts +460 -0
  18. package/src/glacierClient.ts +190 -0
  19. package/src/types.ts +6 -0
  20. package/swagger/generateModels.js +40 -0
  21. package/tsconfig.json +7 -0
  22. package/esm/generated/Glacier.d.ts +0 -18
  23. package/esm/generated/Glacier.js +0 -28
  24. package/esm/generated/core/ApiError.d.ts +0 -13
  25. package/esm/generated/core/ApiError.js +0 -13
  26. package/esm/generated/core/ApiRequestOptions.d.ts +0 -15
  27. package/esm/generated/core/ApiResult.d.ts +0 -9
  28. package/esm/generated/core/BaseHttpRequest.d.ts +0 -11
  29. package/esm/generated/core/BaseHttpRequest.js +0 -7
  30. package/esm/generated/core/CancelablePromise.d.ts +0 -28
  31. package/esm/generated/core/CancelablePromise.js +0 -86
  32. package/esm/generated/core/FetchHttpRequest.js +0 -13
  33. package/esm/generated/core/OpenAPI.d.ts +0 -18
  34. package/esm/generated/core/OpenAPI.js +0 -13
  35. package/esm/generated/core/request.js +0 -244
  36. package/esm/generated/models/Address.d.ts +0 -8
  37. package/esm/generated/models/Asset.d.ts +0 -28
  38. package/esm/generated/models/AssetType.d.ts +0 -8
  39. package/esm/generated/models/AssetType.js +0 -9
  40. package/esm/generated/models/Block.d.ts +0 -15
  41. package/esm/generated/models/BlockchainId.d.ts +0 -9
  42. package/esm/generated/models/BlockchainId.js +0 -10
  43. package/esm/generated/models/CChainAtomicBalances.d.ts +0 -8
  44. package/esm/generated/models/CChainExportTransaction.d.ts +0 -58
  45. package/esm/generated/models/CChainExportTransaction.js +0 -8
  46. package/esm/generated/models/CChainImportTransaction.d.ts +0 -58
  47. package/esm/generated/models/CChainImportTransaction.js +0 -8
  48. package/esm/generated/models/CChainSharedAssetBalance.d.ts +0 -30
  49. package/esm/generated/models/CPBlockchainId.d.ts +0 -7
  50. package/esm/generated/models/CPBlockchainId.js +0 -8
  51. package/esm/generated/models/CancelListingEventResponse.d.ts +0 -5
  52. package/esm/generated/models/ChainAddressChainIdMap.d.ts +0 -8
  53. package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +0 -7
  54. package/esm/generated/models/ChainInfo.d.ts +0 -30
  55. package/esm/generated/models/ChainStatus.d.ts +0 -6
  56. package/esm/generated/models/ChainStatus.js +0 -7
  57. package/esm/generated/models/CloseAuctionEventResponse.d.ts +0 -6
  58. package/esm/generated/models/CollectionMetrics.d.ts +0 -40
  59. package/esm/generated/models/CollectionSortByOption.d.ts +0 -8
  60. package/esm/generated/models/CollectionSortByOption.js +0 -9
  61. package/esm/generated/models/ContractType.d.ts +0 -7
  62. package/esm/generated/models/ContractType.js +0 -8
  63. package/esm/generated/models/CreateTransactionExportRequest.d.ts +0 -11
  64. package/esm/generated/models/CurrencyCode.d.ts +0 -18
  65. package/esm/generated/models/CurrencyCode.js +0 -19
  66. package/esm/generated/models/EVMInput.d.ts +0 -14
  67. package/esm/generated/models/EVMOutput.d.ts +0 -14
  68. package/esm/generated/models/Erc1155Token.d.ts +0 -19
  69. package/esm/generated/models/Erc1155Token.js +0 -8
  70. package/esm/generated/models/Erc1155TokenBalance.d.ts +0 -28
  71. package/esm/generated/models/Erc1155TokenBalance.js +0 -8
  72. package/esm/generated/models/Erc1155TokenMetadata.d.ts +0 -20
  73. package/esm/generated/models/Erc1155Transfer.d.ts +0 -27
  74. package/esm/generated/models/Erc1155TransferDetails.d.ts +0 -11
  75. package/esm/generated/models/Erc20Token.d.ts +0 -38
  76. package/esm/generated/models/Erc20Token.js +0 -8
  77. package/esm/generated/models/Erc20TokenBalance.d.ts +0 -51
  78. package/esm/generated/models/Erc20TokenBalance.js +0 -8
  79. package/esm/generated/models/Erc20Transfer.d.ts +0 -27
  80. package/esm/generated/models/Erc20TransferDetails.d.ts +0 -11
  81. package/esm/generated/models/Erc721Token.d.ts +0 -31
  82. package/esm/generated/models/Erc721Token.js +0 -8
  83. package/esm/generated/models/Erc721TokenBalance.d.ts +0 -35
  84. package/esm/generated/models/Erc721TokenBalance.js +0 -8
  85. package/esm/generated/models/Erc721TokenMetadata.d.ts +0 -19
  86. package/esm/generated/models/Erc721Transfer.d.ts +0 -26
  87. package/esm/generated/models/Erc721TransferDetails.d.ts +0 -10
  88. package/esm/generated/models/ErcType.d.ts +0 -8
  89. package/esm/generated/models/ErcType.js +0 -9
  90. package/esm/generated/models/EvmNetworkOptions.d.ts +0 -6
  91. package/esm/generated/models/FullNativeTransactionDetails.d.ts +0 -62
  92. package/esm/generated/models/GetBlockResponse.d.ts +0 -49
  93. package/esm/generated/models/GetChainResponse.d.ts +0 -30
  94. package/esm/generated/models/GetContractInformationResponse.d.ts +0 -58
  95. package/esm/generated/models/GetNativeBalanceResponse.d.ts +0 -10
  96. package/esm/generated/models/GetTransactionResponse.d.ts +0 -35
  97. package/esm/generated/models/InternalTransaction.d.ts +0 -33
  98. package/esm/generated/models/InternalTransactionDetails.d.ts +0 -17
  99. package/esm/generated/models/InternalTransactionOpCall.d.ts +0 -11
  100. package/esm/generated/models/InternalTransactionOpCall.js +0 -12
  101. package/esm/generated/models/ListBlocksResponse.d.ts +0 -11
  102. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +0 -7
  103. package/esm/generated/models/ListCChainExportTxsResponse.d.ts +0 -11
  104. package/esm/generated/models/ListCChainImportTxsResponse.d.ts +0 -11
  105. package/esm/generated/models/ListChainsResponse.d.ts +0 -7
  106. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +0 -16
  107. package/esm/generated/models/ListErc1155BalancesResponse.d.ts +0 -14
  108. package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +0 -11
  109. package/esm/generated/models/ListErc20BalancesResponse.d.ts +0 -14
  110. package/esm/generated/models/ListErc20TransactionsResponse.d.ts +0 -11
  111. package/esm/generated/models/ListErc721BalancesResponse.d.ts +0 -14
  112. package/esm/generated/models/ListErc721TransactionsResponse.d.ts +0 -11
  113. package/esm/generated/models/ListInternalTransactionsResponse.d.ts +0 -11
  114. package/esm/generated/models/ListListingsResponse.d.ts +0 -11
  115. package/esm/generated/models/ListNativeTransactionsResponse.d.ts +0 -11
  116. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
  117. package/esm/generated/models/ListPChainBalancesResponse.d.ts +0 -7
  118. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +0 -11
  119. package/esm/generated/models/ListPChainUtxosResponse.d.ts +0 -11
  120. package/esm/generated/models/ListTransactionDetailsResponse.d.ts +0 -11
  121. package/esm/generated/models/ListTransfersResponse.d.ts +0 -13
  122. package/esm/generated/models/ListUtxosResponse.d.ts +0 -11
  123. package/esm/generated/models/ListXChainBalancesResponse.d.ts +0 -7
  124. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +0 -11
  125. package/esm/generated/models/ListXChainVerticesResponse.d.ts +0 -11
  126. package/esm/generated/models/ListingCurrencyType.d.ts +0 -6
  127. package/esm/generated/models/ListingCurrencyType.js +0 -7
  128. package/esm/generated/models/ListingEventType.d.ts +0 -8
  129. package/esm/generated/models/ListingEventType.js +0 -9
  130. package/esm/generated/models/ListingResponse.d.ts +0 -19
  131. package/esm/generated/models/ListingType.d.ts +0 -6
  132. package/esm/generated/models/ListingType.js +0 -7
  133. package/esm/generated/models/ListingsSortByOption.d.ts +0 -5
  134. package/esm/generated/models/ListingsSortByOption.js +0 -6
  135. package/esm/generated/models/Method.d.ts +0 -24
  136. package/esm/generated/models/Money.d.ts +0 -14
  137. package/esm/generated/models/NativeTokenBalance.d.ts +0 -41
  138. package/esm/generated/models/NativeTransaction.d.ts +0 -55
  139. package/esm/generated/models/Network.d.ts +0 -6
  140. package/esm/generated/models/Network.js +0 -7
  141. package/esm/generated/models/NetworkToken.d.ts +0 -23
  142. package/esm/generated/models/NetworkTokenDetails.d.ts +0 -18
  143. package/esm/generated/models/NftCollection.d.ts +0 -22
  144. package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -24
  145. package/esm/generated/models/NftFilterOptionsProperty.d.ts +0 -10
  146. package/esm/generated/models/NftSearchBody.d.ts +0 -10
  147. package/esm/generated/models/NftSearchResultTypeOption.d.ts +0 -6
  148. package/esm/generated/models/NftSearchResultTypeOption.js +0 -7
  149. package/esm/generated/models/NftTokenMetadataStatus.d.ts +0 -15
  150. package/esm/generated/models/NftTokenMetadataStatus.js +0 -16
  151. package/esm/generated/models/OpenListingEventResponse.d.ts +0 -17
  152. package/esm/generated/models/OperationStatus.d.ts +0 -8
  153. package/esm/generated/models/OperationStatus.js +0 -9
  154. package/esm/generated/models/OperationStatusCode.d.ts +0 -7
  155. package/esm/generated/models/OperationStatusCode.js +0 -8
  156. package/esm/generated/models/OperationStatusResponse.d.ts +0 -15
  157. package/esm/generated/models/OperationTransactionExportMetadata.d.ts +0 -18
  158. package/esm/generated/models/OperationType.d.ts +0 -5
  159. package/esm/generated/models/OperationType.js +0 -6
  160. package/esm/generated/models/PChainAsset.d.ts +0 -6
  161. package/esm/generated/models/PChainBalance.d.ts +0 -30
  162. package/esm/generated/models/PChainConsumedUtxo.d.ts +0 -11
  163. package/esm/generated/models/PChainEmittedUtxo.d.ts +0 -19
  164. package/esm/generated/models/PChainId.d.ts +0 -6
  165. package/esm/generated/models/PChainId.js +0 -7
  166. package/esm/generated/models/PChainTransaction.d.ts +0 -69
  167. package/esm/generated/models/PChainUtxo.d.ts +0 -22
  168. package/esm/generated/models/PaginationParams.d.ts +0 -13
  169. package/esm/generated/models/PrimaryNetworkOptions.d.ts +0 -6
  170. package/esm/generated/models/ProposerDetails.d.ts +0 -9
  171. package/esm/generated/models/PurchaseListingEventResponse.d.ts +0 -17
  172. package/esm/generated/models/ResourceLink.d.ts +0 -8
  173. package/esm/generated/models/ResourceLinkType.d.ts +0 -18
  174. package/esm/generated/models/ResourceLinkType.js +0 -19
  175. package/esm/generated/models/ReviewStatus.d.ts +0 -6
  176. package/esm/generated/models/ReviewStatus.js +0 -7
  177. package/esm/generated/models/RichAddress.d.ts +0 -26
  178. package/esm/generated/models/SortOrder.d.ts +0 -6
  179. package/esm/generated/models/SortOrder.js +0 -7
  180. package/esm/generated/models/TokenWithPrice.d.ts +0 -28
  181. package/esm/generated/models/TransactionDetails.d.ts +0 -36
  182. package/esm/generated/models/TransactionMethodType.d.ts +0 -7
  183. package/esm/generated/models/TransactionMethodType.js +0 -8
  184. package/esm/generated/models/TransactionStatus.d.ts +0 -6
  185. package/esm/generated/models/TransactionStatus.js +0 -7
  186. package/esm/generated/models/TransactionVertexDetail.d.ts +0 -16
  187. package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
  188. package/esm/generated/models/TrendingTimeframe.js +0 -8
  189. package/esm/generated/models/UtilityAddresses.d.ts +0 -5
  190. package/esm/generated/models/Utxo.d.ts +0 -60
  191. package/esm/generated/models/UtxoCredential.d.ts +0 -12
  192. package/esm/generated/models/VmName.d.ts +0 -7
  193. package/esm/generated/models/VmName.js +0 -8
  194. package/esm/generated/models/XChainAssetBalance.d.ts +0 -29
  195. package/esm/generated/models/XChainAssetDetails.d.ts +0 -32
  196. package/esm/generated/models/XChainBalances.d.ts +0 -17
  197. package/esm/generated/models/XChainId.d.ts +0 -6
  198. package/esm/generated/models/XChainId.js +0 -7
  199. package/esm/generated/models/XChainSharedAssetBalance.d.ts +0 -30
  200. package/esm/generated/models/XChainTransaction.d.ts +0 -51
  201. package/esm/generated/models/XChainVertex.d.ts +0 -12
  202. package/esm/generated/services/EvmService.d.ts +0 -734
  203. package/esm/generated/services/EvmService.js +0 -518
  204. package/esm/generated/services/HealthCheckService.d.ts +0 -20
  205. package/esm/generated/services/HealthCheckService.js +0 -16
  206. package/esm/generated/services/OperationsService.d.ts +0 -30
  207. package/esm/generated/services/OperationsService.js +0 -28
  208. package/esm/generated/services/PrimaryNetworkService.d.ts +0 -387
  209. package/esm/generated/services/PrimaryNetworkService.js +0 -273
  210. package/esm/index.d.ts +0 -139
  211. package/esm/index.js +0 -45
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/generated/models.ts","../src/glacierClient.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\n\nexport enum CurrencyCode {\n Usd = 'usd',\n Eur = 'eur',\n Aud = 'aud',\n Cad = 'cad',\n Chf = 'chf',\n Clp = 'clp',\n Czk = 'czk',\n Dkk = 'dkk',\n Gbp = 'gbp',\n Hkd = 'hkd',\n Huf = 'huf',\n}\n\nexport interface Money {\n /**\n * ISO 4217 currency code.\n * @example usd\n */\n currencyCode: CurrencyCode;\n\n /**\n * Monetary value in base 10 decimals.\n * @example 42.42\n */\n value: number;\n}\n\nexport interface NativeTokenBalance {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n chainId: string;\n price?: Money;\n balance: string;\n balanceValue?: Money;\n}\n\nexport interface NativeBalance {\n nativeTokenBalance: NativeTokenBalance;\n}\n\nexport interface Erc20TokenBalance {\n /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */\n address: string;\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n price?: Money;\n chainId: string;\n balance: string;\n balanceValue?: Money;\n}\n\nexport interface Erc20Balances {\n /** 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. */\n nextPageToken?: string;\n erc20TokenBalances: Erc20TokenBalance[];\n}\n\nexport enum Erc721MetadataStatus {\n UNKNOWN = 'UNKNOWN',\n MISSING_TOKEN = 'MISSING_TOKEN',\n INVALID_TOKEN_URI = 'INVALID_TOKEN_URI',\n INVALID_TOKEN_URI_SCHEME = 'INVALID_TOKEN_URI_SCHEME',\n UNREACHABLE_TOKEN_URI = 'UNREACHABLE_TOKEN_URI',\n THROTTLED_TOKEN_URI = 'THROTTLED_TOKEN_URI',\n METADATA_CONTENT_TOO_LARGE = 'METADATA_CONTENT_TOO_LARGE',\n INVALID_METADATA = 'INVALID_METADATA',\n INVALID_METADATA_JSON = 'INVALID_METADATA_JSON',\n INDEXED = 'INDEXED',\n UNINDEXED = 'UNINDEXED',\n}\n\nexport interface Erc721Metadata {\n /**\n * The metadata indexing status of the nft.\n * @example indexed\n */\n indexStatus: Erc721MetadataStatus;\n metadataLastUpdatedTimestamp?: number;\n name?: string;\n symbol?: string;\n imageUri?: string;\n description?: string;\n animationUri?: string;\n externalUrl?: string;\n background?: string;\n attributes?: string;\n}\n\nexport interface Erc721TokenBalance {\n /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */\n address: string;\n name: string;\n symbol: string;\n tokenId: string;\n tokenUri: string;\n metadata: Erc721Metadata;\n chainId: string;\n}\n\nexport interface Erc721Balances {\n /** 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. */\n nextPageToken?: string;\n erc721TokenBalances: Erc721TokenBalance[];\n}\n\nexport interface Block {\n /**\n * The block number on the chain.\n * @example 339\n */\n blockNumber: string;\n\n /**\n * The block finality timestamp.\n * @example 1648672486\n */\n blockTimestamp: number;\n\n /**\n * The block hash identifier.\n * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c\n */\n blockHash: string;\n\n /** The number of transactions in the block. */\n txCount: number;\n\n /** The base gas fee for a transaction to be included in the block. */\n baseFee: string;\n\n /** The gas used for transactions in the block. */\n gasUsed: string;\n\n /** The total gas limit set for transactions in the block. */\n gasLimit: string;\n gasCost: string;\n\n /** The hash of the parent block. */\n parentHash: string;\n\n /** The amount of fees spent/burned for transactions in the block. */\n feesSpent: string;\n\n /** The cumulative number of transactions for the chain including this block. */\n cumulativeTransactions: string;\n}\n\nexport interface ListBlocks {\n /** 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. */\n nextPageToken?: string;\n blocks: Block[];\n}\n\nexport interface ListTransfers {\n /** 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. */\n nextPageToken?: string;\n transfers: Erc20Transfer[] | Erc721Transfer[];\n}\n\nexport interface RichAddress {\n name?: string;\n symbol?: string;\n decimals?: number;\n logoUri?: string;\n\n /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */\n address: string;\n}\n\nexport interface Method {\n /**\n * The contract method hash identifier.\n * @example 0xa9059cbb\n */\n methodHash: string;\n\n /**\n * The contract method name including parameter types.\n * @example transfer(address,uint256)\n */\n methodName?: string;\n}\n\nexport interface NativeTransaction {\n /**\n * The block number on the chain.\n * @example 339\n */\n blockNumber: string;\n\n /**\n * The block finality timestamp.\n * @example 1648672486\n */\n blockTimestamp: number;\n\n /**\n * The block hash identifier.\n * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c\n */\n blockHash: string;\n\n /**\n * The index at which the transaction occured in the block (0-indexed).\n * @example 0\n */\n blockIndex: number;\n\n /**\n * The transaction hash identifier.\n * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4\n */\n txHash: string;\n\n /**\n * The transaction status, which is either 0 (failed) or 1 (successful).\n * @example 1\n */\n txStatus: string;\n\n /**\n * The transaction type.\n * @example 1\n */\n txType: number;\n\n /**\n * The gas limit set for the transaction.\n * @example 51373\n */\n gasLimit: string;\n\n /**\n * The amount of gas used.\n * @example 51373\n */\n gasUsed: string;\n\n /**\n * The gas price denominated by the number of decimals of the native token.\n * @example 470000000000\n */\n gasPrice: string;\n\n /**\n * The nonce used by the sender of the transaction.\n * @example 1\n */\n nonce: string;\n from: RichAddress;\n to: RichAddress;\n method?: Method;\n\n /** @example 10000000000000000000 */\n value: string;\n}\n\nexport interface Erc20Token {\n /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */\n address: string;\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n price?: Money;\n}\n\nexport interface Erc20TransferDetails {\n from: RichAddress;\n to: RichAddress;\n erc20Token: Erc20Token;\n\n /** @example 10000000000000000000 */\n value: string;\n}\n\nexport interface Erc721Token {\n /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */\n address: string;\n name: string;\n symbol: string;\n tokenId: string;\n tokenUri: string;\n metadata: Erc721Metadata;\n}\n\nexport interface Erc721TransferDetails {\n from: RichAddress;\n to: RichAddress;\n erc721Token: Erc721Token;\n}\n\nexport enum InternalTransactionOpCall {\n UNKNOWN = 'UNKNOWN',\n CALL = 'CALL',\n CREATE = 'CREATE',\n CREATE2 = 'CREATE2',\n CALLCODE = 'CALLCODE',\n DELEGATECALL = 'DELEGATECALL',\n STATICCALL = 'STATICCALL',\n}\n\nexport interface InternalTransactionDetails {\n from: RichAddress;\n to: RichAddress;\n internalTxType: InternalTransactionOpCall;\n\n /** @example 10000000000000000000 */\n value: string;\n isReverted: boolean;\n}\n\nexport interface TransactionDetails {\n nativeTransaction: NativeTransaction;\n erc20Transfers?: Erc20TransferDetails[];\n erc721Transfers?: Erc721TransferDetails[];\n internalTransactions?: InternalTransactionDetails[];\n}\n\nexport interface ListTransactionDetails {\n /** 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. */\n nextPageToken?: string;\n transactions: TransactionDetails[];\n}\n\nexport interface ListNativeTransactions {\n /** 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. */\n nextPageToken?: string;\n transactions: NativeTransaction[];\n}\n\nexport interface Erc20Transfer {\n /**\n * The block number on the chain.\n * @example 339\n */\n blockNumber: string;\n\n /**\n * The block finality timestamp.\n * @example 1648672486\n */\n blockTimestamp: number;\n\n /**\n * The transaction hash identifier.\n * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4\n */\n txHash: string;\n from: RichAddress;\n to: RichAddress;\n erc20Token: Erc20Token;\n\n /** @example 10000000000000000000 */\n value: string;\n}\n\nexport interface ListErc20Transactions {\n /** 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. */\n nextPageToken?: string;\n transactions: Erc20Transfer[];\n}\n\nexport interface Erc721Transfer {\n /**\n * The block number on the chain.\n * @example 339\n */\n blockNumber: string;\n\n /**\n * The block finality timestamp.\n * @example 1648672486\n */\n blockTimestamp: number;\n\n /**\n * The transaction hash identifier.\n * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4\n */\n txHash: string;\n from: RichAddress;\n to: RichAddress;\n erc721Token: Erc721Token;\n}\n\nexport interface ListErc721Transactions {\n /** 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. */\n nextPageToken?: string;\n transactions: Erc721Transfer[];\n}\n\nexport interface NetworkToken {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n description?: string;\n}\n\nexport interface NetworkTokenDetails {\n networkToken: NetworkToken;\n currentPrice?: Money;\n historicalPrice?: Money;\n}\n\nexport interface FullTransactionDetails {\n nativeTransaction: NativeTransaction;\n erc20Transfers?: Erc20TransferDetails[];\n erc721Transfers?: Erc721TransferDetails[];\n internalTransactions?: InternalTransactionDetails[];\n networkTokenDetails: NetworkTokenDetails;\n}\n\nexport enum VmName {\n EVM = 'EVM',\n BITCOIN = 'BITCOIN',\n ETHEREUM = 'ETHEREUM',\n}\n\nexport interface UtilityAddresses {\n multicall?: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n description: string;\n platformChainId?: string;\n subnetId?: string;\n vmId?: string;\n vmName: VmName;\n explorerUrl?: string;\n rpcUrl: string;\n wsUrl?: string;\n isTestnet: boolean;\n utilityAddresses?: UtilityAddresses;\n networkToken: NetworkToken;\n chainLogoUri?: string;\n}\n\nexport interface Chains {\n chains: ChainInfo[];\n}\n","import { HttpClient, HttpOptions } from '@avalabs/utils-sdk';\nimport {\n ChainInfo,\n Chains,\n CurrencyCode,\n Erc20Balances,\n Erc721Balances,\n ListTransactionDetails,\n NativeBalance,\n TransactionDetails,\n} from './generated/models';\nimport { HealthStatusCheck } from './types';\n\nexport class GlacierClient {\n private httpClient: HttpClient;\n constructor(\n private baseUrl: string,\n private version = 'v1',\n private httpOptions?: HttpOptions\n ) {\n this.httpClient = new HttpClient(\n `${this.baseUrl}/${this.version}`,\n this.httpOptions\n );\n }\n /**\n *\n * @name HealthCheck\n * @summary Get the health of the service.\n * @request GET:/${version}/health-check\n * @response `200` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is successful\n * @response `503` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is not successful\n */\n healthCheck(\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<HealthStatusCheck>(\n `/health-check`,\n params,\n customOptions\n );\n }\n\n /**\n * No description\n *\n * @name GetNativeBalance\n * @summary Get native token balance of a wallet address for a given chain.\n * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:getNative\n * @response `200` `NativeBalanceDto`\n */\n getNativeBalance(\n chainId: string,\n address: string,\n query?: {\n currency?: CurrencyCode;\n },\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<NativeBalance>(\n `/chains/${chainId}/addresses/${address}/balances:getNative`,\n { ...query, ...params },\n customOptions\n );\n }\n /**\n *\n * @name ListErc20Balances\n * @summary Get erc-20 token balances of a wallet address for a given chain.\n * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20\n * @response `200` `Erc20BalancesDto`\n */\n listErc20Balances(\n chainId: string,\n address: string,\n query?: {\n pageSize?: number;\n pageToken?: string;\n currency?: CurrencyCode;\n },\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<Erc20Balances>(\n `/chains/${chainId}/addresses/${address}/balances:listErc20`,\n { ...query, ...params },\n customOptions\n );\n }\n /**\n * No description\n *\n * @name ListErc721Balances\n * @summary Get erc-721 token balances of a wallet address for a given chain.\n * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721\n * @response `200` `Erc721BalancesDto`\n */\n listErc721Balances(\n chainId: string,\n address: string,\n query?: {\n pageSize?: number;\n pageToken?: string;\n currency?: CurrencyCode;\n },\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<Erc721Balances>(\n `/chains/${chainId}/addresses/${address}/balances:listErc721`,\n { ...query, ...params },\n customOptions\n );\n }\n /**\n * @description Gets a list of transactions where the given wallet address had an on-chain interaction for a given chain. The erc20 transfers, erc721 transfers, and internal transactions returned as part of the native transactions are only those where the address had an interaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint.\n *\n * @name ListTransactions\n * @summary Gets a list of transactions for a wallet address and chain.\n * @request GET:/v1/chains/{chainId}/addresses/{address}/transactions\n * @response `200` `ListTransactionDetailsDto`\n */\n listTransactions(\n chainId: string,\n address: string,\n query?: { pageSize?: number; pageToken?: string },\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<ListTransactionDetails>(\n `/chains/${chainId}/addresses/${address}/transactions`,\n { ...query, ...params },\n customOptions\n );\n }\n /**\n *\n * @name GetTransaction\n * @summary Gets the details of a single transaction.\n * @request GET:/v1/chains/{chainId}/transactions/{txHash}\n * @response `200` `TransactionDetailsDto`\n */\n getTransaction(\n chainId: string,\n txHash: string,\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<TransactionDetails>(\n `/chains/${chainId}/transactions/${txHash}`,\n params,\n customOptions\n );\n }\n /**\n *\n * @name SupportedChains\n * @summary Gets the list of chains supported by the api.\n * @request GET:/v1/chains\n * @response `200` `ChainsDto`\n */\n supportedChains(\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<Chains>(`/chains`, params, customOptions);\n }\n\n /**\n * No description\n *\n * @name GetChainInfo\n * @summary Gets chain information by chain id.\n * @request GET:/v1/chains/{chainId}\n * @response `200` `ChainInfoDto`\n */\n getChainInfo(\n chainId: string,\n params: Record<string, any> = {},\n customOptions: HttpOptions = {}\n ) {\n return this.httpClient.get<ChainInfo>(\n `/chains/${chainId}`,\n params,\n customOptions\n );\n }\n}\n"],"names":["CurrencyCode","Erc721MetadataStatus","InternalTransactionOpCall","VmName","HttpClient"],"mappings":";;;;;;AAAA;AACA;AACA;;;;;;;AAOG;AAESA,8BAYX;AAZD,CAAA,UAAY,YAAY,EAAA;AACtB,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA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O,IAAI,CAAC,UAAU,CAAC,GAAG,CACxB,CAAW,QAAA,EAAA,OAAO,CAAiB,cAAA,EAAA,MAAM,EAAE,EAC3C,MAAM,EACN,aAAa,CACd,CAAC;KACH;AACD;;;;;;AAMG;AACH,IAAA,eAAe,CACb,MAAA,GAA8B,EAAE,EAChC,gBAA6B,EAAE,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAS,CAAS,OAAA,CAAA,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;KACtE;AAED;;;;;;;AAOG;AACH,IAAA,YAAY,CACV,OAAe,EACf,SAA8B,EAAE,EAChC,gBAA6B,EAAE,EAAA;AAE/B,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CACxB,CAAA,QAAA,EAAW,OAAO,CAAA,CAAE,EACpB,MAAM,EACN,aAAa,CACd,CAAC;KACH;AACF;;;;"}
@@ -0,0 +1,385 @@
1
+ export declare enum CurrencyCode {
2
+ Usd = "usd",
3
+ Eur = "eur",
4
+ Aud = "aud",
5
+ Cad = "cad",
6
+ Chf = "chf",
7
+ Clp = "clp",
8
+ Czk = "czk",
9
+ Dkk = "dkk",
10
+ Gbp = "gbp",
11
+ Hkd = "hkd",
12
+ Huf = "huf"
13
+ }
14
+ export interface Money {
15
+ /**
16
+ * ISO 4217 currency code.
17
+ * @example usd
18
+ */
19
+ currencyCode: CurrencyCode;
20
+ /**
21
+ * Monetary value in base 10 decimals.
22
+ * @example 42.42
23
+ */
24
+ value: number;
25
+ }
26
+ export interface NativeTokenBalance {
27
+ name: string;
28
+ symbol: string;
29
+ decimals: number;
30
+ logoUri?: string;
31
+ chainId: string;
32
+ price?: Money;
33
+ balance: string;
34
+ balanceValue?: Money;
35
+ }
36
+ export interface NativeBalance {
37
+ nativeTokenBalance: NativeTokenBalance;
38
+ }
39
+ export interface Erc20TokenBalance {
40
+ /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
41
+ address: string;
42
+ name: string;
43
+ symbol: string;
44
+ decimals: number;
45
+ logoUri?: string;
46
+ price?: Money;
47
+ chainId: string;
48
+ balance: string;
49
+ balanceValue?: Money;
50
+ }
51
+ export interface Erc20Balances {
52
+ /** 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. */
53
+ nextPageToken?: string;
54
+ erc20TokenBalances: Erc20TokenBalance[];
55
+ }
56
+ export declare enum Erc721MetadataStatus {
57
+ UNKNOWN = "UNKNOWN",
58
+ MISSING_TOKEN = "MISSING_TOKEN",
59
+ INVALID_TOKEN_URI = "INVALID_TOKEN_URI",
60
+ INVALID_TOKEN_URI_SCHEME = "INVALID_TOKEN_URI_SCHEME",
61
+ UNREACHABLE_TOKEN_URI = "UNREACHABLE_TOKEN_URI",
62
+ THROTTLED_TOKEN_URI = "THROTTLED_TOKEN_URI",
63
+ METADATA_CONTENT_TOO_LARGE = "METADATA_CONTENT_TOO_LARGE",
64
+ INVALID_METADATA = "INVALID_METADATA",
65
+ INVALID_METADATA_JSON = "INVALID_METADATA_JSON",
66
+ INDEXED = "INDEXED",
67
+ UNINDEXED = "UNINDEXED"
68
+ }
69
+ export interface Erc721Metadata {
70
+ /**
71
+ * The metadata indexing status of the nft.
72
+ * @example indexed
73
+ */
74
+ indexStatus: Erc721MetadataStatus;
75
+ metadataLastUpdatedTimestamp?: number;
76
+ name?: string;
77
+ symbol?: string;
78
+ imageUri?: string;
79
+ description?: string;
80
+ animationUri?: string;
81
+ externalUrl?: string;
82
+ background?: string;
83
+ attributes?: string;
84
+ }
85
+ export interface Erc721TokenBalance {
86
+ /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
87
+ address: string;
88
+ name: string;
89
+ symbol: string;
90
+ tokenId: string;
91
+ tokenUri: string;
92
+ metadata: Erc721Metadata;
93
+ chainId: string;
94
+ }
95
+ export interface Erc721Balances {
96
+ /** 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. */
97
+ nextPageToken?: string;
98
+ erc721TokenBalances: Erc721TokenBalance[];
99
+ }
100
+ export interface Block {
101
+ /**
102
+ * The block number on the chain.
103
+ * @example 339
104
+ */
105
+ blockNumber: string;
106
+ /**
107
+ * The block finality timestamp.
108
+ * @example 1648672486
109
+ */
110
+ blockTimestamp: number;
111
+ /**
112
+ * The block hash identifier.
113
+ * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c
114
+ */
115
+ blockHash: string;
116
+ /** The number of transactions in the block. */
117
+ txCount: number;
118
+ /** The base gas fee for a transaction to be included in the block. */
119
+ baseFee: string;
120
+ /** The gas used for transactions in the block. */
121
+ gasUsed: string;
122
+ /** The total gas limit set for transactions in the block. */
123
+ gasLimit: string;
124
+ gasCost: string;
125
+ /** The hash of the parent block. */
126
+ parentHash: string;
127
+ /** The amount of fees spent/burned for transactions in the block. */
128
+ feesSpent: string;
129
+ /** The cumulative number of transactions for the chain including this block. */
130
+ cumulativeTransactions: string;
131
+ }
132
+ export interface ListBlocks {
133
+ /** 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. */
134
+ nextPageToken?: string;
135
+ blocks: Block[];
136
+ }
137
+ export interface ListTransfers {
138
+ /** 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. */
139
+ nextPageToken?: string;
140
+ transfers: Erc20Transfer[] | Erc721Transfer[];
141
+ }
142
+ export interface RichAddress {
143
+ name?: string;
144
+ symbol?: string;
145
+ decimals?: number;
146
+ logoUri?: string;
147
+ /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
148
+ address: string;
149
+ }
150
+ export interface Method {
151
+ /**
152
+ * The contract method hash identifier.
153
+ * @example 0xa9059cbb
154
+ */
155
+ methodHash: string;
156
+ /**
157
+ * The contract method name including parameter types.
158
+ * @example transfer(address,uint256)
159
+ */
160
+ methodName?: string;
161
+ }
162
+ export interface NativeTransaction {
163
+ /**
164
+ * The block number on the chain.
165
+ * @example 339
166
+ */
167
+ blockNumber: string;
168
+ /**
169
+ * The block finality timestamp.
170
+ * @example 1648672486
171
+ */
172
+ blockTimestamp: number;
173
+ /**
174
+ * The block hash identifier.
175
+ * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c
176
+ */
177
+ blockHash: string;
178
+ /**
179
+ * The index at which the transaction occured in the block (0-indexed).
180
+ * @example 0
181
+ */
182
+ blockIndex: number;
183
+ /**
184
+ * The transaction hash identifier.
185
+ * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
186
+ */
187
+ txHash: string;
188
+ /**
189
+ * The transaction status, which is either 0 (failed) or 1 (successful).
190
+ * @example 1
191
+ */
192
+ txStatus: string;
193
+ /**
194
+ * The transaction type.
195
+ * @example 1
196
+ */
197
+ txType: number;
198
+ /**
199
+ * The gas limit set for the transaction.
200
+ * @example 51373
201
+ */
202
+ gasLimit: string;
203
+ /**
204
+ * The amount of gas used.
205
+ * @example 51373
206
+ */
207
+ gasUsed: string;
208
+ /**
209
+ * The gas price denominated by the number of decimals of the native token.
210
+ * @example 470000000000
211
+ */
212
+ gasPrice: string;
213
+ /**
214
+ * The nonce used by the sender of the transaction.
215
+ * @example 1
216
+ */
217
+ nonce: string;
218
+ from: RichAddress;
219
+ to: RichAddress;
220
+ method?: Method;
221
+ /** @example 10000000000000000000 */
222
+ value: string;
223
+ }
224
+ export interface Erc20Token {
225
+ /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
226
+ address: string;
227
+ name: string;
228
+ symbol: string;
229
+ decimals: number;
230
+ logoUri?: string;
231
+ price?: Money;
232
+ }
233
+ export interface Erc20TransferDetails {
234
+ from: RichAddress;
235
+ to: RichAddress;
236
+ erc20Token: Erc20Token;
237
+ /** @example 10000000000000000000 */
238
+ value: string;
239
+ }
240
+ export interface Erc721Token {
241
+ /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
242
+ address: string;
243
+ name: string;
244
+ symbol: string;
245
+ tokenId: string;
246
+ tokenUri: string;
247
+ metadata: Erc721Metadata;
248
+ }
249
+ export interface Erc721TransferDetails {
250
+ from: RichAddress;
251
+ to: RichAddress;
252
+ erc721Token: Erc721Token;
253
+ }
254
+ export declare enum InternalTransactionOpCall {
255
+ UNKNOWN = "UNKNOWN",
256
+ CALL = "CALL",
257
+ CREATE = "CREATE",
258
+ CREATE2 = "CREATE2",
259
+ CALLCODE = "CALLCODE",
260
+ DELEGATECALL = "DELEGATECALL",
261
+ STATICCALL = "STATICCALL"
262
+ }
263
+ export interface InternalTransactionDetails {
264
+ from: RichAddress;
265
+ to: RichAddress;
266
+ internalTxType: InternalTransactionOpCall;
267
+ /** @example 10000000000000000000 */
268
+ value: string;
269
+ isReverted: boolean;
270
+ }
271
+ export interface TransactionDetails {
272
+ nativeTransaction: NativeTransaction;
273
+ erc20Transfers?: Erc20TransferDetails[];
274
+ erc721Transfers?: Erc721TransferDetails[];
275
+ internalTransactions?: InternalTransactionDetails[];
276
+ }
277
+ export interface ListTransactionDetails {
278
+ /** 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. */
279
+ nextPageToken?: string;
280
+ transactions: TransactionDetails[];
281
+ }
282
+ export interface ListNativeTransactions {
283
+ /** 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. */
284
+ nextPageToken?: string;
285
+ transactions: NativeTransaction[];
286
+ }
287
+ export interface Erc20Transfer {
288
+ /**
289
+ * The block number on the chain.
290
+ * @example 339
291
+ */
292
+ blockNumber: string;
293
+ /**
294
+ * The block finality timestamp.
295
+ * @example 1648672486
296
+ */
297
+ blockTimestamp: number;
298
+ /**
299
+ * The transaction hash identifier.
300
+ * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
301
+ */
302
+ txHash: string;
303
+ from: RichAddress;
304
+ to: RichAddress;
305
+ erc20Token: Erc20Token;
306
+ /** @example 10000000000000000000 */
307
+ value: string;
308
+ }
309
+ export interface ListErc20Transactions {
310
+ /** 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. */
311
+ nextPageToken?: string;
312
+ transactions: Erc20Transfer[];
313
+ }
314
+ export interface Erc721Transfer {
315
+ /**
316
+ * The block number on the chain.
317
+ * @example 339
318
+ */
319
+ blockNumber: string;
320
+ /**
321
+ * The block finality timestamp.
322
+ * @example 1648672486
323
+ */
324
+ blockTimestamp: number;
325
+ /**
326
+ * The transaction hash identifier.
327
+ * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
328
+ */
329
+ txHash: string;
330
+ from: RichAddress;
331
+ to: RichAddress;
332
+ erc721Token: Erc721Token;
333
+ }
334
+ export interface ListErc721Transactions {
335
+ /** 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. */
336
+ nextPageToken?: string;
337
+ transactions: Erc721Transfer[];
338
+ }
339
+ export interface NetworkToken {
340
+ name: string;
341
+ symbol: string;
342
+ decimals: number;
343
+ logoUri?: string;
344
+ description?: string;
345
+ }
346
+ export interface NetworkTokenDetails {
347
+ networkToken: NetworkToken;
348
+ currentPrice?: Money;
349
+ historicalPrice?: Money;
350
+ }
351
+ export interface FullTransactionDetails {
352
+ nativeTransaction: NativeTransaction;
353
+ erc20Transfers?: Erc20TransferDetails[];
354
+ erc721Transfers?: Erc721TransferDetails[];
355
+ internalTransactions?: InternalTransactionDetails[];
356
+ networkTokenDetails: NetworkTokenDetails;
357
+ }
358
+ export declare enum VmName {
359
+ EVM = "EVM",
360
+ BITCOIN = "BITCOIN",
361
+ ETHEREUM = "ETHEREUM"
362
+ }
363
+ export interface UtilityAddresses {
364
+ multicall?: string;
365
+ }
366
+ export interface ChainInfo {
367
+ chainId: string;
368
+ chainName: string;
369
+ description: string;
370
+ platformChainId?: string;
371
+ subnetId?: string;
372
+ vmId?: string;
373
+ vmName: VmName;
374
+ explorerUrl?: string;
375
+ rpcUrl: string;
376
+ wsUrl?: string;
377
+ isTestnet: boolean;
378
+ utilityAddresses?: UtilityAddresses;
379
+ networkToken: NetworkToken;
380
+ chainLogoUri?: string;
381
+ }
382
+ export interface Chains {
383
+ chains: ChainInfo[];
384
+ }
385
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAWA,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,MA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CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB"}
@@ -0,0 +1,93 @@
1
+ import { HttpOptions } from '@avalabs/utils-sdk';
2
+ import { ChainInfo, Chains, CurrencyCode, Erc20Balances, Erc721Balances, ListTransactionDetails, NativeBalance, TransactionDetails } from './generated/models';
3
+ import { HealthStatusCheck } from './types';
4
+ export declare class GlacierClient {
5
+ private baseUrl;
6
+ private version;
7
+ private httpOptions?;
8
+ private httpClient;
9
+ constructor(baseUrl: string, version?: string, httpOptions?: HttpOptions | undefined);
10
+ /**
11
+ *
12
+ * @name HealthCheck
13
+ * @summary Get the health of the service.
14
+ * @request GET:/${version}/health-check
15
+ * @response `200` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is successful
16
+ * @response `503` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is not successful
17
+ */
18
+ healthCheck(params?: Record<string, any>, customOptions?: HttpOptions): Promise<HealthStatusCheck>;
19
+ /**
20
+ * No description
21
+ *
22
+ * @name GetNativeBalance
23
+ * @summary Get native token balance of a wallet address for a given chain.
24
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:getNative
25
+ * @response `200` `NativeBalanceDto`
26
+ */
27
+ getNativeBalance(chainId: string, address: string, query?: {
28
+ currency?: CurrencyCode;
29
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<NativeBalance>;
30
+ /**
31
+ *
32
+ * @name ListErc20Balances
33
+ * @summary Get erc-20 token balances of a wallet address for a given chain.
34
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20
35
+ * @response `200` `Erc20BalancesDto`
36
+ */
37
+ listErc20Balances(chainId: string, address: string, query?: {
38
+ pageSize?: number;
39
+ pageToken?: string;
40
+ currency?: CurrencyCode;
41
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc20Balances>;
42
+ /**
43
+ * No description
44
+ *
45
+ * @name ListErc721Balances
46
+ * @summary Get erc-721 token balances of a wallet address for a given chain.
47
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721
48
+ * @response `200` `Erc721BalancesDto`
49
+ */
50
+ listErc721Balances(chainId: string, address: string, query?: {
51
+ pageSize?: number;
52
+ pageToken?: string;
53
+ currency?: CurrencyCode;
54
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc721Balances>;
55
+ /**
56
+ * @description Gets a list of transactions where the given wallet address had an on-chain interaction for a given chain. The erc20 transfers, erc721 transfers, and internal transactions returned as part of the native transactions are only those where the address had an interaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint.
57
+ *
58
+ * @name ListTransactions
59
+ * @summary Gets a list of transactions for a wallet address and chain.
60
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/transactions
61
+ * @response `200` `ListTransactionDetailsDto`
62
+ */
63
+ listTransactions(chainId: string, address: string, query?: {
64
+ pageSize?: number;
65
+ pageToken?: string;
66
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetails>;
67
+ /**
68
+ *
69
+ * @name GetTransaction
70
+ * @summary Gets the details of a single transaction.
71
+ * @request GET:/v1/chains/{chainId}/transactions/{txHash}
72
+ * @response `200` `TransactionDetailsDto`
73
+ */
74
+ getTransaction(chainId: string, txHash: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<TransactionDetails>;
75
+ /**
76
+ *
77
+ * @name SupportedChains
78
+ * @summary Gets the list of chains supported by the api.
79
+ * @request GET:/v1/chains
80
+ * @response `200` `ChainsDto`
81
+ */
82
+ supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<Chains>;
83
+ /**
84
+ * No description
85
+ *
86
+ * @name GetChainInfo
87
+ * @summary Gets chain information by chain id.
88
+ * @request GET:/v1/chains/{chainId}
89
+ * @response `200` `ChainInfoDto`
90
+ */
91
+ getChainInfo(chainId: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ChainInfo>;
92
+ }
93
+ //# sourceMappingURL=glacierClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glacierClient.d.ts","sourceRoot":"","sources":["../../src/glacierClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,qBAAa,aAAa;IAGtB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,WAAW,CAAC;IAJtB,OAAO,CAAC,UAAU,CAAa;gBAErB,OAAO,EAAE,MAAM,EACf,OAAO,SAAO,EACd,WAAW,CAAC,yBAAa;IAOnC;;;;;;;OAOG;IACH,WAAW,CACT,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAChC,aAAa,GAAE,WAAgB;IASjC;;;;;;;OAOG;IACH,gBAAgB,CACd,OAAO,EAAE,MAAM,EACf,OAAO,E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,GAAG,CAAM,EAChC,aAAa,GAAE,WAAgB;IAKjC;;;;;;;OAOG;IACH,YAAY,CACV,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAChC,aAAa,GAAE,WAAgB;CAQlC"}
@@ -0,0 +1,13 @@
1
+ export interface HealthStatusCheck {
2
+ status?: string;
3
+ info?: Record<string, {
4
+ status?: string;
5
+ }>;
6
+ error?: Record<string, {
7
+ status?: string;
8
+ }>;
9
+ details?: Record<string, {
10
+ status?: string;
11
+ }>;
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C"}
package/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './src/generated/models';
2
+ export * from './src/glacierClient';
package/package.json CHANGED
@@ -1,39 +1,42 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-alpha.89",
3
+ "version": "2.8.0-alpha.9",
4
4
  "description": "sdk for interacting with glacier-api",
5
5
  "author": "Oliver Wang <oliver.wang@avalabs.org>",
6
6
  "homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
7
7
  "license": "ISC",
8
8
  "main": "dist/index.js",
9
- "module": "esm/index.js",
10
9
  "typings": "dist/index.d.ts",
11
- "files": [
12
- "dist",
13
- "esm"
14
- ],
15
- "sideEffects": false,
16
10
  "publishConfig": {
17
11
  "access": "restricted"
18
12
  },
19
13
  "devDependencies": {
20
- "openapi-typescript-codegen": "0.23.0"
14
+ "@rollup/plugin-json": "^4.1.0",
15
+ "@rollup/plugin-typescript": "^8.2.1",
16
+ "@zerollup/ts-transform-paths": "^1.7.18",
17
+ "rollup": "^2.47.0",
18
+ "rollup-plugin-commonjs": "^10.1.0",
19
+ "rollup-plugin-delete": "^2.0.0",
20
+ "rollup-plugin-typescript2": "^0.30.0",
21
+ "swagger-typescript-api": "10.0.1",
22
+ "ttypescript": "^1.5.12"
21
23
  },
22
24
  "repository": {
23
25
  "type": "git",
24
26
  "url": "git+https://github.com/ava-labs/avalanche-sdks.git"
25
27
  },
26
28
  "scripts": {
27
- "codegen": "node ./src/generateApi.js",
29
+ "codegen": "node ./swagger/generateModels.js",
28
30
  "start": "rollup -c --watch",
29
- "build": "yarn codegen && rollup -c",
31
+ "build": "rollup -c",
32
+ "build:prod": "rollup -c --environment BUILD:production",
30
33
  "lint": "eslint --fix -c ./.eslintrc.js \"src/**/*.ts*\""
31
34
  },
32
35
  "bugs": {
33
36
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
34
37
  },
35
38
  "dependencies": {
36
- "@avalabs/utils-sdk": "2.8.0-alpha.89"
39
+ "@avalabs/utils-sdk": "2.8.0-alpha.9"
37
40
  },
38
- "gitHead": "43bc24b5bd9dcdcceaf2d11aaea62e008b7d4ba9"
41
+ "gitHead": "2a7f77f2e98629b957ce3afaedd727436454bdd3"
39
42
  }
@@ -0,0 +1,33 @@
1
+ import json from '@rollup/plugin-json';
2
+ import commonjs from 'rollup-plugin-commonjs';
3
+ import del from 'rollup-plugin-delete';
4
+ import typescript from 'rollup-plugin-typescript2';
5
+ import ttypescript from 'ttypescript';
6
+
7
+ export default {
8
+ input: './index.ts',
9
+ output: {
10
+ dir: 'dist',
11
+ format: 'cjs',
12
+ sourcemap: process.env.BUILD === 'production' ? false : true,
13
+ },
14
+ plugins: [
15
+ del({ targets: 'dist/*' }),
16
+ typescript({
17
+ typescript: ttypescript,
18
+ tsconfig: 'tsconfig.json',
19
+ tsconfigOverride: {
20
+ exclude: ['./test/**'],
21
+ // index.ts is included here and not in tsconfig.ts so relative imports
22
+ // are imported correctly by VS Code.
23
+ include: ['src', 'index.ts'],
24
+ compilerOptions: {
25
+ rootDir: './',
26
+ },
27
+ },
28
+ }),
29
+ json(),
30
+ commonjs(),
31
+ ],
32
+ external: ['big.js'],
33
+ };