@evmexplorer/climate
Version:
EVM Explorer Climate SDK
48 lines (45 loc) • 1.54 kB
TypeScript
type BitcoinDogeEnergy = {
'24hr_kWh': string;
'24hr_kgCO2': string;
Output_kWh: string;
Output_kgCO2: string;
};
type EthereumEnergy = {
'24hr_kWh': string;
'24hr_kgCO2': string;
Gas_unit_Wh: string;
Gas_unit_gCO2: string;
};
declare function fetchBitcoin(date: string): Promise<BitcoinDogeEnergy | undefined>;
declare function fetchEthereum(date: string): Promise<EthereumEnergy | undefined>;
declare function fetchDogecoin(date: string): Promise<BitcoinDogeEnergy | undefined>;
type AddressDovu = {
account: string;
address_carbon_emissions: number;
address_gas_used: number;
address_transaction_count: number;
dov_per_kg: number;
dov_price: number;
dov_to_buy: number;
};
type PriceDovu = {
currency: string;
price: number;
quote_created_at: string;
ticker_symbol: string;
};
type MarketDebtDovu = {
date: string;
total_gas: number;
gas_used: number;
day_change: number;
percent_day_change: number;
total_carbon_debt: number;
day_carbon_debt: number;
day_change_carbon_debt: number;
cost_to_offset: number;
};
declare function fetchAddressDovu(address: string): Promise<AddressDovu>;
declare function fetchPriceDovu(): Promise<PriceDovu>;
declare function fetchMarketDebtDovu(): Promise<MarketDebtDovu | undefined>;
export { type AddressDovu, type BitcoinDogeEnergy, type EthereumEnergy, type MarketDebtDovu, type PriceDovu, fetchAddressDovu, fetchBitcoin, fetchDogecoin, fetchEthereum, fetchMarketDebtDovu, fetchPriceDovu };