Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethereum-emissions-calculator

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-emissions-calculator - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

1

lib/utils/constructEtherscanURL.d.ts
import { CalculatorOptions } from "../types";
export declare const ETHERSCAN_API_URL = "https://api.etherscan.io/api";
export declare const ETHERSCAN_RESULT_MAX_LENGTH = 5000;
export declare const constructEtherscanURL: (options: CalculatorOptions & {
isContract?: boolean;
}) => string;

5

lib/utils/constructEtherscanURL.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.constructEtherscanURL = exports.ETHERSCAN_API_URL = void 0;
exports.constructEtherscanURL = exports.ETHERSCAN_RESULT_MAX_LENGTH = exports.ETHERSCAN_API_URL = void 0;
exports.ETHERSCAN_API_URL = "https://api.etherscan.io/api";
exports.ETHERSCAN_RESULT_MAX_LENGTH = 5000;
const constructEtherscanURL = (options) => {

@@ -17,2 +18,4 @@ var _a, _b;

apikey: etherscanAPIKey,
page: "1",
offset: exports.ETHERSCAN_RESULT_MAX_LENGTH.toString(),
};

@@ -19,0 +22,0 @@ for (const property in params) {

@@ -13,4 +13,4 @@ "use strict";

exports.getAddressTransactions = void 0;
const constructEtherscanURL_1 = require("./constructEtherscanURL");
const fetchTransactions_1 = require("./fetchTransactions");
const ETHERSCAN_RESULT_MAX_LENGTH = 10000;
/**

@@ -23,3 +23,3 @@ * Fetch the most recent transactions, descending order (highest block # first)

const transactions = yield (0, fetchTransactions_1.fetchTransactions)(options);
if (transactions.length < ETHERSCAN_RESULT_MAX_LENGTH) {
if (transactions.length < constructEtherscanURL_1.ETHERSCAN_RESULT_MAX_LENGTH) {
return { done: true, transactions };

@@ -26,0 +26,0 @@ }

{
"name": "ethereum-emissions-calculator",
"version": "3.0.5",
"version": "3.0.6",
"description": "TypeScript utils to calculate the CO2 emissions of an Ethereum wallet. Powered by the Etherscan.io API.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc