Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@solanafm/explorerkit-wasm-translator
Advanced tools
We offer developers various options to decode Solana instructions, including Typescript and Rust-based Web Assembly, providing flexibility for those familiar with Rust to easily import their existing structs and decoding methods.
We offer developers various options to decode Solana instructions, including Typescript and Rust-based Web Assembly, providing flexibility for those familiar with Rust to easily import their existing structs and decoding methods.
Before running this project, you are required to install the following dependencies.
wasm-pack build --out-dir ../explorerkit-wasm-package --release
After running the aboe command, the compiled Web Assembly file will be generated and saved in the pkg folder. This file can be used by the Typescript application to decode Solana instructions, as well as by any other programming language that supports Web Assembly (WASM) for decoding purposes.
Update the the following file packages/explorerkit-wasm-package/package.json
after the build and include the following two lines
{
"name": "explorerkit-wasm-translator",
"version": "0.1.0",
"files": [
"explorerkit_wasm_translator_bg.wasm",
"explorerkit_wasm_translator.js",
"explorerkit_wasm_translator_bg.js",
"explorerkit_wasm_translator.d.ts"
],
"main": "explorerkit_wasm_translator.js", // include this line
"type": "module", // include this line
"module": "explorerkit_wasm_translator.js",
"types": "explorerkit_wasm_translator.d.ts",
"sideEffects": false
}
[ ] TODO: add script to automate creation of properties main
and type
To generate typescript definitions for the generated Web Assembly file, run the following command:
# generate typescript definitions from structs
cargo test
# export individual files from one file (ensure that you're in "explorerkit-wasm-translator" folder)
./scripts/compile-types.sh
After running the command to generate typescript definitions for the Web Assembly file, a new folder named bindings
will be created. This folder will contain all the exported structs that can be inferred, meaning that the TypeScript compiler will be able to detect the types of these structs automatically, allowing for more streamlined development.
FAQs
We offer developers various options to decode Solana instructions, including Typescript and Rust-based Web Assembly, providing flexibility for those familiar with Rust to easily import their existing structs and decoding methods.
We found that @solanafm/explorerkit-wasm-translator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.