Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@kaiachain/web3js-ext
Advanced tools
Web3.js Extension for kaia offers:
new Web3(...)
that supports both Ethereum and kaia transaction types involving AccountKey and TxTypes. See Modifications to the Web3 object section for detailsnpm install --save @kaiachain/web3js-ext
import { Web3 } from "@kaiachain/web3js-ext";
const web3 = new Web3("https://public-en-kairos.node.kaia.io");
const { Web3 } = require("@kaiachain/web3js-ext");
const web3 = new Web3("https://public-en-kairos.node.kaia.io");
It is not recommended to use CDNs in production, But you can use below for quick prototyping.
<script src="https://cdn.jsdelivr.net/npm/@kaiachain/web3js-ext@latest/dist/web3js-ext.bundle.js"></script>
<script>
const web3 = new web3_ext.Web3(window.klaytn);
</script>
See DESIGN for source code organization.
// account independent functions
web3.eth.accounts.recoverTransaction(rlp)
web3.eth.accounts.signTransaction(obj or rlp)
web3.eth.accounts.signTransactionAsFeePayer(obj or rlp)
// account-bound functions
var account = web3.eth.accounts.create()
var account = web3.eth.accounts.privateKeyToAccount(priv)
var account = web3.eth.accounts.decrypt(keystore)
account.signTransaction(obj or rlp)
account.signTransactionAsFeePayer(obj or rlp)
web3.eth.accounts.decrypt(keystore)
web3.eth.accounts.decryptList(keystore)
// Try klay_protocolVersion, falls back to eth_protocolVersion
web3.eth.getProtocolVersion()
// klay_sendTransaction if Klaytn TxType, otherwise eth_sendTransaction
// Additional treatment for Kaikas compatibility
web3.eth.sendTransaction(obj)
// klay_sendRawTransaction if Klaytn TxType, otherwise eth_sendRawTransaction
web3.eth.sendSignedTransaction(rlp)
// klay_signTransaction if Klaytn TxType, otherwise eth_signTransaction
// Additional treatment for Kaikas compatibility
web3.eth.signTransaction(obj)
web3.klay.blockNumber() // klay_blockNumber
web3.net.networkID() // net_networkID
FAQs
web3.js extension for kaiachain blockchain
The npm package @kaiachain/web3js-ext receives a total of 122 weekly downloads. As such, @kaiachain/web3js-ext popularity was classified as not popular.
We found that @kaiachain/web3js-ext 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.