Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
mycrypto-eth-exists
Advanced tools
A library that helps check for available nodes / providers. Useful for when you want to check a list of providers and see which ones are online.
A library that helps check for available nodes / providers. Useful for when you want to check a list of providers and see which ones are online.
import { exists } from 'mycrypto-eth-exists';
// a provider to see if they're online or not by sending a
// getNetVersion JSON-RPC request to them and checking for a response
const httpProviderToCheck: IHttpConfig = {
type: 'http',
addr: 'http://localhost',
port: 8545,
timeout: 5000,
};
// a provider to see if they're online or not by
// attempting to open a ws connection to that address
const wsProviderToCheck: IWSConfig = {
type: 'ws',
addr: 'ws://localhost',
port: 8546,
timeout: 5000,
};
// array of providers to check
const providersToCheck = [httpProviderToCheck, wsProviderToCheck];
// whether to include the default provider checks
const includeDefaults = false;
async function example() {
// results will contain an array of providers with the same data as the initially declared
// objects above, except they will now have a success parameter included to see if
// they were succesfully connected to or not
// and an error parameter of the error if it failed to connect
const results = await exists(providersToCheck, includeDefaults);
}
const DEFAULT_WS: IWSConfig = {
type: 'ws',
addr: 'ws://localhost',
port: 8546,
timeout: 5000,
};
const DEFAULT_HTTP: IHttpConfig = {
type: 'http',
addr: 'http://localhost',
port: 8545,
timeout: 5000,
};
FAQs
A library that helps check for available nodes / providers. Useful for when you want to check a list of providers and see which ones are online.
We found that mycrypto-eth-exists demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.