This package is for connecting to Ethereum wallets, for example, to Metamask.
Supported wallets:
Installation
npm install --save web3-wallets-kit
Creation and managing wallets
// Create instance; // Connect to walletawait web3Manager.connect'metamask'; // Get address and Web3 for sending transaction;; // Create contract; // Send transactionawait daiContract.methods .transfer'0x0000000000000000000000000000000000000000', '1000000000000000000' .send;
wallets manager API
Connecting to wallet guide
Metamask
await web3Manager.connect'metamask';
It does not need additional configuration. The user must have a browser extension installed.
ConnectWallet
await web3Manager.connect'wallet-connect';
You need to pass the config Options['walletConfigs']['wallet-connect']
when creating instance Web3WalletsManager
. Minimal config:
Fortmatic
await web3Manager.connect'fortmatic';
You need to pass the config Options['walletConfigs']['fortmatic']
when creating instance Web3WalletsManager
. Minimal config:
You can create API_KEY in Fortmatic dashboard.
Bitski
await web3Manager.connect'bitski';
You need to pass the config Options['walletConfigs']['bitski']
when creating instance Web3WalletsManager
. Minimal config:
This provider uses OAuth
- user must be registered with Bitski
- the application must be registered in Bitski. In the config you need to specify
CLIENT_ID
which can be found in your account - DApp must host the redirect page. An example on webpack.
- you need to set redirect settings in your personal account. On the OAuth page in the list of "Authorized Redirect URLs" you need to add the URL for the redirect, which we specified in the config.