Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@tronweb3/tronwallet-adapter-metamask
Advanced tools
Wallet adapter for Metamask wallet extension and app.
@tronweb3/tronwallet-adapter-metamask
This package provides an adapter to enable DApps to connect to the MetaMask Wallet extension and MetaMask Wallet App.
import { MetaMaskAdapter } from '@tronweb3/tronwallet-adapter-metamask';
const adapter = new MetaMaskAdapter();
// connect
await adapter.connect();
// then you can get address
console.log(adapter.address);
// just use the sendTransaction method to send a transfer transaction.
const transaction = {
value: '0x' + Number(0.01 * Math.pow(10, 18)).toString(16), // 0.01 is 0.01ETH
to: 'your target address',
from: adapter.address,
};
await adapter.sendTransaction(transaction);
Constructor(config: MetaMaskAdapterOptions)
import { MetaMaskAdapter } from '@tronweb3/tronwallet-adapter-metamask';
interface MetaMaskAdapterOptions {
/**
* Set if open MetaMask app when in mobile device.
* Default is true.
*/
useDeeplink?: boolean;
}
const metaMaskAdapter = new MetaMaskAdapter({ useDeeplink: false });
More detailed API can be found in Abstract Adapter.
FAQs
Wallet adapter for Metamask wallet extension and app.
The npm package @tronweb3/tronwallet-adapter-metamask receives a total of 13 weekly downloads. As such, @tronweb3/tronwallet-adapter-metamask popularity was classified as not popular.
We found that @tronweb3/tronwallet-adapter-metamask 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.