
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
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 provides utility functions to work with the Chia DataLayer, specifically aiming to produce changesets based on hexadecimal keys and values. Moreover, it incorporates the chia-changelist-chunks
module to optionally segment the change list depending on the configuration.
The utility comes pre-loaded with a default configuration:
{
datalayer_host: "https://localhost:8562",
wallet_host: "https://localhost:9256",
certificate_folder_path: "~/.chia/mainnet/config/ssl"
}
You can override this configuration using the configure
method.
changeListChunker
configurations dynamically.Ensure you've installed the chia-changelist-generator
package:
npm install chia-changelist-generator
1. Configuration: Although initialized with a default configuration, you can easily modify it:
const changeListGenerator = require('chia-changelist-generator');
changeListGenerator.configure(yourCustomConfig);
2. Generate Changes: To compute changes for a store using multiple key-value pairs and a specified action (either 'insert' or 'delete'):
const changes = await changeListGenerator.generateChangeList(storeId, 'insert', [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}], { chunkChangeList: true });
This function calculates the necessary changes and, if specified in the options, chunks the changes into multiple changelists if they exceed the RPC size limits.
encodeHex(str): Transforms a string into its hexadecimal representation.
decodeHex(str): Converts a hex string (with or without a "0x" prefix) into its UTF8 string representation.
isValidHexadecimal(value): Determines if the provided string is a valid hexadecimal.
The module will throw an error if provided keys or values are not in valid hexadecimal string format, or if an unsupported action is passed to the change generator. Always ensure proper error handling when utilizing these functions.
If you found this tool helpful, consider donating to support the development of more Chia Datalayer Tools.
Donation address: xch1es9faez5evlvdyfjdjth40fazfm3c9gptds0reuhryf30y3kl67qtcsc83
Your support is greatly appreciated!
FAQs
Easily Generate a ChangeList for Chia DataLayer
The npm package chia-changelist-generator receives a total of 0 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.