import type { Provider, TransactionReceipt, TransactionResponse } from 'ethers'; import type { ApiAuth } from '../types/interfaces/auth.interface'; import type { ContractMetadata } from '../types/contracts/token.contract'; /** * * Retrieves the metadata of an NFT smart contract from the Alchemy or Infura API. * * @async * @function * @param {string} contractAddress - The Ethereum address of the smart contract to retrieve metadata for. * @param {{ alchemy: string | undefined, infura: string | undefined }} apiAuth - An object containing the API authentication data for the Ethereum API providers. * @returns {Promise} - A promise that resolves with the metadata of the smart contract. **/ declare const getContractMetadata: (contractAddress: string, apiAuth: ApiAuth) => Promise; /** * * Retrieves the metadata of an NFT from the Alchemy or Infura API. * * @async * @function * @param {string} contractAddress - The Ethereum address of the NFT's smart contract. * @param {string} tokenId - The ID of the NFT to retrieve metadata for. * @param {{ alchemy: string | undefined, infura: string | undefined }} apiAuth - An object containing the API authentication data for the Ethereum API providers. * @returns {Promise<{ name?: string | undefined; image: string }>} - A promise that resolves with the metadata of the NFT. **/ declare const getNftMetadata: (contractAddress: string, tokenId: string, apiAuth: ApiAuth) => Promise<{ name?: string | undefined; image: string; }>; /** * * Retrieves the ENS name associated with an Ethereum address from the provider. * * @async * @function * @param {string} address - The Ethereum address to retrieve the ENS name for. * @param {Provider} provider - The Ethereum provider to retrieve the ENS name from. * @returns {Promise} ENS name associated with the address, or null if no ENS name is found. **/ declare const getENSName: (address: string, provider: Provider) => Promise; /** * * Retrieves the OpenSea username associated with an Ethereum address from the OpenSea API. * * @async * @function * @param {string} address - The Ethereum address to retrieve the OpenSea username for. * @returns {Promise} OpenSea username associated with the address, or null if no username is found. **/ declare const getOpenseaName: (address: string) => Promise; /** * * Shortens an Ethereum address to its first 6 and last 4 characters, with '...' in between. * Example: 0x1234567890abcdef1234567890abcdef12345678 -> 0x1234...5678 * * @function * @param {string} address - The Ethereum address to be shortened. * @throws {Error} Throws an error if the address provided is not a valid Ethereum address. * @returns {string} - The shortened Ethereum address. **/ declare const shortenAddress: (address: string) => string; /** * * Retrieves a readable name for an Ethereum address. * * @function * @param {string} address - The Ethereum address to retrieve a readable name for. * @param {Provider} provider - The Ethereum provider to retrieve the ENS name from. * @returns {Promise} - A promise that resolves with the readable name associated with the address. **/ declare const getReadableName: (address: string, provider: Provider) => Promise; /** * * Retrieves the current Ethereum price in USD by making an API request to Etherscan. * * @async * @function * @param {number} ethPrice - The ETH price to be converted to USD. * @param {string} etherscanApiKey - The API key to be used for the Etherscan API request. * @returns {Promise} - The current Ethereum price in USD. **/ declare const getEthUsdPrice: (ethPrice: number, etherscanApiKey: string) => Promise; /** * * Retrieves a transaction with the specified transaction hash from * the specified Ethereum provider. * * @function * @param {string} transactionHash - The transaction hash to retrieve. * @param {Provider} provider - The Ethereum provider to retrieve the transaction from. * @returns {Promise} - The transaction object. **/ declare const getTransaction: (transactionHash: string, provider: Provider) => Promise; /** * * Retrieves a transaction receipt with the specified transaction hash * from the specified Ethereum provider. * * @async * @function * @param {string} transactionHash - The transaction hash to retrieve the receipt for. * @param {Provider} provider - The Ethereum provider to retrieve the receipt from. * @returns {Promise} Transaction receipt object. **/ declare const getTransactionReceipt: (transactionHash: string, provider: Provider) => Promise; export { getENSName, getNftMetadata, getContractMetadata, getEthUsdPrice, shortenAddress, getOpenseaName, getReadableName, getTransaction, getTransactionReceipt }; //# sourceMappingURL=api.d.ts.map