slvler - covalenthq Service
An api service for covalenthq.com
To install this package tou can use composer:
composer require slvler/covalent
First, you should extract the config/covalent.php file to the config folder.
php artisan vendor:publish --tag=covalenthq
API key to be obtained from covalenthq.com address should be declared.
'covalent' => [
'base_url' => 'https://api.covalenthq.com/',
'api_key' => 'XXXXXXXXXXXXXXXXXXXXXXXX'
This is how you can connect to the covalenthq service.
$covalenthq = new BaseApi();
Given chain_id and wallet address, return current token balances along with their spot prices. This endpoint supports a variety of token standards like ERC20, ERC721 and ERC1155.
Given chain_id and wallet address , return wallet value for the last 30 days at 24 hour interval timestamps.
Given chain_id, wallet address and contract-address , return all ERC20 token contract transfers along with their historical prices at the time of their transfer.
Given chain_id and wallet address, return a paginated list of token holders. If block-height is omitted, the latest block is used.
Given chain_id and wallet address, return a paginated list of token holders and their current/historical balances, where the token balance of the token holder changes between starting-block and ending-block.
Given chain_id and contract_address, return a list of all token IDs for the NFT contract on the blockchain.
Given chain_id,contract_address and token_id, return a list of transactions.
Given chain_id, contract_address and token_id, fetch and return the external metadata. Both ERC721 as well as ERC1155 standards are supported.
Given chain_id and wallet address, return all transactions along with their decoded log events. This endpoint does a deep-crawl of the blockchain to retrieve all kinds of transactions that references the address including indexed topics within the event logs.
Given chain_id and tx_hash, return the transaction data with their decoded event logs.
Given chain_id and block_height, return a single block at block_height. If block_height is set to the value latest, return the latest block available.
Given chain_id, start_date and end_date, return all the block height(s) of a particular chain within a date range. If the end_date is set to latest, return every block height from the start_date to now.
Given chain_id and contract address, return a paginated list of decoded log events emitted by a particular smart contract.
Given chain_id and topic hash(es), return a paginated list of decoded log events with one or more topic hashes separated by a comma.
Returns a list of all chains.
Returns a list of all chain statuses.
The MIT License (MIT). Please see License File for more information.