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.
@ryze-blockchain/ethereum
Advanced tools
An opinionated wrapper to simplify the integration with ethers, a popular Ethereum library.
npm i @ryze-blockchain/ethereum
// ethereum.ts
import { Ethereum, ChainId, WalletInfo } from '@ryze-blockchain/ethereum'
export const ethereum = new Ethereum({
defaultChainId: ChainId.AVAX_TESTNET,
availableChainIds: [ChainId.AVAX_TESTNET],
chainToRpcMap: {
[ChainId.AVAX_TESTNET]: ['https://api.avax-test.network/ext/bc/C/rpc'],
},
onWalletUpdate: (walletInfo: WalletInfo | null) => {
// set walletInfo in your state management plugin
},
})
// your wallet component
import { isEthersError, isProviderError, ProviderErrorCode, WalletApplication } from '@ryze-blockchain/ethereum'
import { ethereum } from './ethereum.ts'
// You can use any one of the available WalletApplications
const connectWallet = async (walletApplication: WalletApplication) => {
return await ethereum.walletManager.connect(walletApplication, {
onReject: () => { throw new Error('User rejected wallet connection') },
onRequestAlreadyPending: () => { throw new Error('Wallet connection already pending') },
onProviderUnavailable: () => { throw new Error('Wallet provider not available') },
})
}
// your chain component
import { isEthersError, isProviderError, ProviderErrorCode, ChainId } from '@ryze-blockchain/ethereum'
import { ethereum } from './ethereum.ts'
const setChain = async (chainId: ChainId) => {
return await ethereum.walletManager.setChain(chainId, {
onReject: () => { throw new Error('Request rejected by the user') },
onRequestAlreadyPending: () => { throw new Error('Request to switch chain already pending') },
})
}
FAQs
Helpers for interacting with EVM based blockchains
We found that @ryze-blockchain/ethereum 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.