Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@kyve/core
Advanced tools
@kyve/core
🚀 The base KYVE node implementation.
yarn add @kyve/core
In order to use KYVE in your own integration you only need to extend the exported base class KYVE
.
import KYVE from "@kyve/core";
import { providers } from "ethers";
import { version } from "../package.json";
process.env.KYVE_RUNTIME = "@kyve/evm";
process.env.KYVE_VERSION = version;
KYVE.metrics.register.setDefaultLabels({
app: process.env.KYVE_RUNTIME,
});
class EVM extends KYVE {
// pull data item from source
public async getDataItem(key: number): Promise<{ key: number; value: any }> {
let provider;
let block;
// setup provider for evm chain
try {
provider = new providers.StaticJsonRpcProvider(this.pool.config.rpc);
} catch (err) {
this.logger.warn(
`⚠️ EXTERNAL ERROR: Failed to connect with rpc: ${this.pool.config.rpc}. Retrying ...`
);
// forward error to core
throw err;
}
// fetch block with transactions at requested height
try {
block = await provider?.getBlockWithTransactions(key)!;
// delete transaction confirmations from block since they are not deterministic
block.transactions.forEach(
(transaction: Partial<providers.TransactionResponse>) =>
delete transaction.confirmations
);
} catch (err) {
this.logger.warn(
`⚠️ EXTERNAL ERROR: Failed to fetch data item from source at height ${key}. Retrying ...`
);
// forward error to core
throw err;
}
return {
key,
value: block,
};
}
// validate the data item uploaded by a node
public async validate(
localBundle: any[],
localBytes: number,
uploadBundle: any[],
uploadBytes: number
): Promise<boolean> {
// default validate consists of a simple hash comparison
return super.validate(localBundle, localBytes, uploadBundle, uploadBytes);
}
}
new EVM().start();
Coming soon!
To contribute to this repository please follow these steps:
git clone git@github.com:KYVENetwork/core.git
yarn install
FAQs
🚀 The base KYVE node implementation.
The npm package @kyve/core receives a total of 1 weekly downloads. As such, @kyve/core popularity was classified as not popular.
We found that @kyve/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.