
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@idecentralize-finance/chain-types
Advanced tools
A wallet connector library for EVM and Solana chains
A versatile React-based wallet connector package that supports Solana Name Service (SNS) and ENS (Ethereum Name Service). It simplifies wallet integration for Solana and Ethereum chains, allowing developers to seamlessly resolve domain names, avatars, and manage wallet connections.
Install the package using your preferred package manager.
pnpm install @idecentralize-finance/chain-types
yarn install @idecentralize-finance/chain-types
npm add @idecentralize-finance/chain-types
The package requires a configuration object to initialize the wallet and name resolution services. The configuration object should include the following fields
Create a wagmi.ts file to configure your EVM wallets and chains:
import { createConfig } from 'wagmi';
import { mainnet, sepolia } from 'wagmi/chains';
import { injected, walletConnect, coinbaseWallet } from 'wagmi/connectors';
import { createConfig, http } from 'wagmi';
import { mainnet, sepolia } from 'wagmi/chains';
import { injected, walletConnect, coinbaseWallet } from 'wagmi/connectors';
export const config = createConfig({
chains: [mainnet, sepolia],
connectors: [
injected(),
walletConnect({
projectId: process.env.VITE_WC_PROJECT_ID || '',
}),
coinbaseWallet(),
],
transports: {
[mainnet.id]: http('https://mainnet.example.com'),
[sepolia.id]: http('https://sepolia.example.com'),
},
});
Create a solana.ts file to configure your Solana wallets and chains:
Note: The name resolving feature SNS requires rpc endpoints that provide program ID and cluster information.
export const rpcEndpoint = '<YOUR_RPC_URL>'
Wrap your application with the AppProvider component to enable wallet integration and name resolution.
import { createRoot } from 'react-dom/client'
import { ChainTypesProvider } from '@idecentralize-finance/chain-types';
import { config } from './wagmi.ts'
import { rpcEndpoint } from "./solana.ts";
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<ChainTypesProvider config={config} solanaRpcEndpoint={rpcEndpoint}>
<App />
</ChainTypesProvider>
)
Import the WalletConnector component to enable wallet connection.
import { WalletConnector } from '@idecentralize-finance/wallet-connector';
function App() {
return (
<>
<WalletConnector/>
</>
);
}
3 classes are available for styling the wallet connector component button.
plugin to come with default styling/theme
.chain-type-connect{
// styling for the connect button
}
.connect-shimmer{
// styling for the shimmer effect
}
.connect-text{
// styling for the text
}
FAQs
A wallet connector library for EVM and Solana chains
The npm package @idecentralize-finance/chain-types receives a total of 2 weekly downloads. As such, @idecentralize-finance/chain-types popularity was classified as not popular.
We found that @idecentralize-finance/chain-types 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.