
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@automata-network/wallet-react
Advanced tools
A monorepo consists of Web3 wallet SDK and React UI component to connect dApp web app to popular web3 wallet like MetaMask and WalletConnect.
A monorepo consists of Web3 wallet SDK and React UI component to connect dApp web app to popular web3 wallet like MetaMask and WalletConnect.
npm install @automata-network/wallet-react /
@solana/wallet-adapter-react /
@solana/wallet-adapter-wallets /
@polkadot/api /
@polkadot/extension-inject /
@web3-onboard/coinbase /
@web3-onboard/core /
@web3-onboard/enkrypt /
@web3-onboard/fortmatic /
@web3-onboard/gnosis /
@web3-onboard/injected-wallets /
@web3-onboard/ledger /
@web3-onboard/mew-wallet /
@web3-onboard/portis /
@web3-onboard/torus /
@web3-onboard/trezor /
@web3-onboard/walletconnect /
ethers /
react /
react-dom -S
Here's the example.
import '@automata-network/wallet-react/style.css'
createRoot(document.getElementById('root') as HTMLElement).render(
<StrictMode>
<WalletProvider
appName="Automata Wallet Demo"
chains={[
{
type: ChainType.EVM,
chainId: "5",
chainName: "Ethereum Goerli",
nativeCurrency: {
decimals: 18,
name: "GoerliETH",
symbol: "GoerliETH",
},
rpcUrls: [
"https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
],
blockExplorerUrls: ["https://goerli.etherscan.io/"],
iconUrl:
"https://raw.githubusercontent.com/ethereum/ethereum-org-website/dev/src/assets/assets/eth-glyph-colored.svg",
},
{
type: ChainType.EVM,
chainId: "80001",
chainName: "Polygon",
nativeCurrency: {
decimals: 18,
name: "MATIC",
symbol: "MATIC",
},
rpcUrls: ["https://rpc.ankr.com/polygon_mumbai"],
blockExplorerUrls: ["https://mumbai.polygonscan.com/"],
iconUrl:
"https://raw.githubusercontent.com/maticnetwork/matic-docs/master/static/img/polygon-logo.svg",
},
{
type: ChainType.Polkadot,
chainId: "Westend",
chainName: "Westend",
rpcUrls: ["wss://westend-rpc.polkadot.io"],
blockExplorerUrls: ["https://westend.subscan.io/"],
iconUrl:
"https://polkadot.js.org/apps/static/westend_colour.eb7969da..svg",
},
{
type: ChainType.Solana,
chainId: "Solana Testnet",
chainName: "Solana Testnet",
rpcUrls: ["https://api.testnet.solana.com"],
blockExplorerUrls: ["https://explorer.solana.com/?cluster=testnet"],
iconUrl: "https://solana.com/src/img/branding/solanaLogoMark.svg",
},
]}
providerConfigs={{
evm: {
fortmatic: process.env.VITE_FORTMATIC_API_KEY
? {
apiKey: process.env.VITE_FORTMATIC_API_KEY,
}
: undefined,
walletconnect: {},
// coinbase: {},
portis: process.env.VITE_PORTIS_API_KEY
? {
apiKey: process.env.VITE_PORTIS_API_KEY,
}
: undefined,
gnosis: {},
torus: process.env.VITE_TORUS_API_KEY
? { apiKey: process.env.VITE_TORUS_API_KEY, showTorusButton: false }
: undefined,
trezor:
process.env.VITE_TREZOR_EMAIL && process.env.VITE_TREZOR_APP_URL
? {
email: process.env.VITE_TREZOR_EMAIL,
appUrl: process.env.VITE_TREZOR_APP_URL,
}
: undefined,
mew: true,
enkrypt: true,
subwallet: true,
talisman: true,
ledger: {},
},
polkadot: {
enkrypt: true,
subwallet: true,
talisman: true,
polkadotJsExtension: true,
},
solana: {
math: {},
solflare: {},
phantom: {},
},
}}
>
<Navbar>
<Wallet />
</Navbar>
<App />
</WalletProvider>
</StrictMode>
)
If you want to use the json rpc provider or get the account address, chain ID, etc.. you can use the useWallet
hook.
const { account, chainId, rpcRequest } = useWallet()
If you want to customize your style you can copy the content from @automata-network/wallet-react/src/style.less and use your own variables or component style file. then compile your less to css on your build phase and import it to your website.
If our class name prefix conflict with your code, you can modify the @selector-prefix variable on the @automata-network/wallet-react/src/style.less and compile your customized css.
Then you need to set up the customized class name prefix on the wallet provider.
<WalletProvider
prefixCls="your-class-name-prefix"
>
[TBD]
[TBD]
[TBD]
That caused by the @walletconnect/web3-provider, it required the process object from Node.js, but there is no process on the browser.
so we need to set up an alias to point @walletconnect/web3-provider to its prebuilt bundle.
{
alias: {
'@walletconnect/web3-provider': '@walletconnect/web3-provider/dist/umd/index.min.js'
}
}
Clone this repo and run the script below to install all required dependencies.
# First we install the dependencies and link
cd wallet_sdk_dir && npm install
Then build the SDK and link the dist
directory so you can use the SDK in the example site.
npm run build
npm link
When you've made some changes on the SDK part, just rebuild it and the example site will be reloaded automatically.
Don't forget to unlink the SDK when you've finished with the development, using
npm unlink @automata-network/wallet-sdk
.
FAQs
A monorepo consists of Web3 wallet SDK and React UI component to connect dApp web app to popular web3 wallet like MetaMask and WalletConnect.
The npm package @automata-network/wallet-react receives a total of 35 weekly downloads. As such, @automata-network/wallet-react popularity was classified as not popular.
We found that @automata-network/wallet-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.