@covalenthq/client-sdk 0.5.3 → 0.6.1
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.
- package/README.md +12 -6
- package/dist/cjs/index.js +597 -26
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +51 -1
- package/dist/cjs/services/BaseService.d.ts +92 -0
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/NftService.d.ts +47 -0
- package/dist/cjs/services/TransactionService.d.ts +3 -0
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +6 -0
- package/dist/es/index.js +597 -26
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +51 -1
- package/dist/es/services/BaseService.d.ts +92 -0
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/NftService.d.ts +47 -0
- package/dist/es/services/TransactionService.d.ts +3 -0
- package/dist/es/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +6 -0
- package/dist/esm/index.js +597 -26
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +51 -1
- package/dist/esm/services/BaseService.d.ts +92 -0
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/NftService.d.ts +47 -0
- package/dist/esm/services/TransactionService.d.ts +3 -0
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +6 -0
- package/dist/services/BalanceService.d.ts +51 -1
- package/dist/services/BalanceService.js +101 -0
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +92 -0
- package/dist/services/BaseService.js +243 -0
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/NftService.d.ts +47 -0
- package/dist/services/NftService.js +170 -0
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +3 -0
- package/dist/services/TransactionService.js +4 -0
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +18 -0
- package/dist/util/types/NftServiceTypes.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,7 +93,8 @@ The `BalanceService` class refers to the [balances API endpoints](https://www.co
|
|
|
93
93
|
- `getHistoricalPortfolioForWalletAddress()`: Render a daily portfolio balance for an address broken down by the token. The timeframe is user-configurable, defaults to 30 days.
|
|
94
94
|
- `getErc20TransfersForWalletAddress()`: Render the transfer-in and transfer-out of a token along with historical prices from an address. (Paginated)
|
|
95
95
|
- `getErc20TransfersForWalletAddressByPage()`: Render the transfer-in and transfer-out of a token along with historical prices from an address. (NonPaginated)
|
|
96
|
-
- `getTokenHoldersV2ForTokenAddress()`: Get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to latest). Useful for building pie charts of token holders.
|
|
96
|
+
- `getTokenHoldersV2ForTokenAddress()`: Get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to latest). Useful for building pie charts of token holders. (Paginated)
|
|
97
|
+
- `getTokenHoldersV2ForTokenAddressByPage()`: Get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to latest). Useful for building pie charts of token holders. (Nonpaginated)
|
|
97
98
|
- `getNativeTokenBalance()`: Get the native token balance for an address. This endpoint is required because native tokens are usually not ERC20 tokens and sometimes you want something lightweight.
|
|
98
99
|
|
|
99
100
|
### BaseService
|
|
@@ -103,9 +104,12 @@ The `BaseService` class refers to the [address activity, log events, chain statu
|
|
|
103
104
|
- `getBlock()`: Fetch and render a single block for a block explorer.
|
|
104
105
|
- `getLogs()`: Get all the event logs of the latest block, or for a range of blocks. Includes sender contract metadata as well as decoded logs.
|
|
105
106
|
- `getResolvedAddress()`: Used to resolve ENS, RNS and Unstoppable Domains addresses.
|
|
106
|
-
- `getBlockHeights()`: Get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
|
|
107
|
-
- `
|
|
108
|
-
- `
|
|
107
|
+
- `getBlockHeights()`: Get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day. (Paginated)
|
|
108
|
+
- `getBlockHeightsByPage()`: Get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day. (Nonpaginated)
|
|
109
|
+
- `getLogEventsByAddress()`: Get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions. (Paginated)
|
|
110
|
+
- `getLogEventsByAddressByPage()`: Get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions. (Nonpaginated)
|
|
111
|
+
- `getLogEventsByTopicHash()`: Get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain. (Paginated)
|
|
112
|
+
- `getLogEventsByTopicHashByPage()`: Get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain. (Nonpaginated)
|
|
109
113
|
- `getAllChains()`: Used to build internal dashboards for all supported chains on Covalent.
|
|
110
114
|
- `getAllChainStatus()`: Used to build internal status dashboards of all supported chains.
|
|
111
115
|
- `getAddressActivity()`: Locate chains where an address is active on with a single API call.
|
|
@@ -114,9 +118,11 @@ The `BaseService` class refers to the [address activity, log events, chain statu
|
|
|
114
118
|
|
|
115
119
|
The `NftService` class refers to the [NFT API endpoints](https://www.covalenthq.com/docs/api/nft/get-nfts-for-address/):
|
|
116
120
|
|
|
117
|
-
- `getChainCollections()`: Used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
|
|
121
|
+
- `getChainCollections()`: Used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files. (Paginated)
|
|
122
|
+
- `getChainCollectionsByPage()`: Used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files. (Nonpaginated)
|
|
118
123
|
- `getNftsForAddress()`: Used to render the NFTs (including ERC721 and ERC1155) held by an address.
|
|
119
|
-
- `getTokenIdsForContractWithMetadata()`: Get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
|
|
124
|
+
- `getTokenIdsForContractWithMetadata()`: Get NFT token IDs with metadata from a collection. Useful for building NFT card displays. (Paginated)
|
|
125
|
+
- `getTokenIdsForContractWithMetadataByPage()`: Get NFT token IDs with metadata from a collection. Useful for building NFT card displays. (Nonpaginated)
|
|
120
126
|
- `getNftMetadataForGivenTokenIDForContract()`: Get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
|
|
121
127
|
- `getNftTransactionsForContractTokenId()`: Get all transactions of an NFT token. Useful for building a transaction history table or price chart.
|
|
122
128
|
- `getTraitsForCollection()`: Used to fetch and render the traits of a collection as seen in rarity calculators.
|