@web3-wallet/plugin-balance
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

Balance

Install

pnpm add @web3-wallet/plugin-balance

Usage

import { MetaMask } from '@web3-wallet/metamask';
import { BalancePlugin } from '@web3-wallet/plugin-balance';

const wallet = createWallet(new MetaMask(), {
  plugins: [BalancePlugin.create()],
});

const { useBalance } = wallet.getPlugin<BalancePlugin.Api>(BalancePlugin.name);

const { data: balance, ...rest } = useBalance();

useBalance is wrapped with useQuery.

Readme

Keywords

Package Sidebar

Install

npm i @web3-wallet/plugin-balance

Weekly Downloads

113

Version

1.3.3

License

MIT

Unpacked Size

1.52 MB

Total Files

351

Last publish

Collaborators

  • logan_luo