Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
chia-changelist-generator
Advanced tools
chia-changelist-generator
This README offers an overview and usage guidelines for the chia-changelist-generator
, a utility crafted to facilitate interactions with the Chia DataLayer.
The chia-changelist-generator
module introduces utility functions to collaborate with the Chia DataLayer, specifically aiming to produce changesets founded on hexadecimal keys and values. Moreover, it incorporates the chia-changelist-chunks
tool to segment the change list depending on the configuration.
Chia Wallet: This tool hinges on the Chia Wallet to ensure there aren't any lingering transactions before probing the DataLayer. This step is essential for working with the latest available data.
Chia DataLayer: The DataLayer must be active, given the utility examines if specific keys already exist, subsequently determining the fitting change operation for the change list.
The utility is pre-loaded with a built-in configuration as follows:
{
datalayer_host: "https://localhost:8562",
wallet_host: "https://localhost:9256",
certificate_folder_path: "~/.chia/mainnet/config/ssl"
}
You can effortlessly supersede this default setup through the configure
method.
Make sure to have the chia-changelist-generator
package:
npm install chia-changelist-generator
1. Configuration: Although initialized with the aforementioned default setup, you can modify it:
const changeListGenerator = require('chia-changelist-generator');
changeListGenerator.configure(yourCustomConfig);
2. Generate Changes: To compute changes for a store from several key-value pairs:
const changes = await changeListGenerator.generateChangeList(storeId, [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}], { chunkChangeList: true });
This function precisely calculates the changes and can, if directed in the options, chunk the changes into several changelist if the maximum size of the changelist exceed the RPC size limits.
encodeHex(str): Transforms a conventional string to its hexadecimal variant.
decodeHex(str): Converts a hex string (with an optional "0x" prefix) to its UTF8 version.
isValidHexadecimal(value): Validates if a given string corresponds to a legit hexadecimal.
In cases where the key or value diverges from a valid hexadecimal string format, the module will react by raising an error. Always integrate robust error-handling strategies when interfacing with these functions.
FAQs
Easily Generate a ChangeList for Chia DataLayer
The npm package chia-changelist-generator receives a total of 2 weekly downloads. As such, chia-changelist-generator popularity was classified as not popular.
We found that chia-changelist-generator demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.