Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@initia/builder.js
Advanced tools
This SDK is a Javascript wrapper for Initia Move Compiler using ffi-napi library.
$ npm install @initia/builder.js
import { MoveBuilder } from '@initia/builder.js';
async function buildExample() {
// recommend to use full package path, not relative path
// ex) path.resolve(__dirname, "../relative_path")
const builder = new MoveBuilder(/* path to move package */, {});
// execute move compiler via ffi
await builder.build();
// load compiled module bytes as `Buffer`
const compiledModuleBytes = await builder.get(/* module name */);
console.info(compiledModuleBytes.toString('hex'));
// change module name to what you want
const nameConvertedModuleBytes = await MoveBuilder.convert_module_name(compiledModuleBytes, /* new module name */);
console.info(nameConvertedModuleBytes.toString('hex'));
}
import { MoveBuilder } from '@initia/builder.js';
async function createAndCleanExample() {
// recommend to use full package path, not relative path
// ex) path.resolve(__dirname, "../relative_path")
const builder = new MoveBuilder(/* path to move package */, {});
// create new move package
await builder.new(/* package name */);
await builder.build();
// clean /build directory
await builder.clean();
}
import { MoveBuilder } from '@initia/builder.js';
async function readExample() {
const builder = new MoveBuilder(/* path to move package */, {});
const binary = await builder.get(/* module name */);
// read module bytes
const moduleInfo = await MoveBuilder.read_module_info(binary)
console.log(moduleInfo)
// decode module bytes
const decodedModule = await MoveBuilder.decode_module_bytes(binary);
console.log(decodedModule)
}
FAQs
The JavaScript Move Builder for Initia
The npm package @initia/builder.js receives a total of 0 weekly downloads. As such, @initia/builder.js popularity was classified as not popular.
We found that @initia/builder.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.