The WALLET group contains all wallet-related commands.
These commands work only if a browser wallet (such as MetaMask) is installed and exposing data.
If the wallet is locked, unavailable, or blocked by browser settings, these commands will return limited or no information.
To view these commands inside the terminal:
help wallet
You will see:
WALLET commands:
wallet - Show connected wallet address.
chain - Show connected chain info.
gas - Show current gas price.
block - Show latest block number.
txcount - Show your current transaction count (nonce).
metamask - Connect/disconnect MetaMask (same as MetaMask button).
Below is a full description of each command.
1. wallet — Show Wallet Address #
Displays the currently selected wallet address.
Example:
wallet
If MetaMask is unlocked:
Account: 0xAbC…123
If no wallet is detected:
No wallet detected.
If wallet exists but is locked:
Wallet detected but locked.
2. chain — Show Connected Chain Info #
Displays information about the network your wallet is currently connected to.
Example:
chain
Typical output:
Chain: Polygon
Chain ID: 137
This command only works when a wallet is exposing chain data.
3. gas — Show Current Gas Price #
Displays the current gas price for the connected network.
Example:
gas
Output example:
Gas Price: 32 gwei
If no network is available, a message will appear accordingly.
4. block — Show Latest Block Number #
Shows the most recent block number of the connected chain.
Example:
block
Output might look like:
Latest Block: 51239123
This is useful for monitoring whether the wallet is synced.
5. txcount — Show Transaction Count (Nonce) #
Displays the number of transactions sent from the connected account.
Example:
txcount
Typical output:
Transaction Count: 42
This value is often used for advanced blockchain operations (nonce management).
6. metamask — Connect/Disconnect Wallet #
Triggers a connect or disconnect action for MetaMask.
This command performs the exact same action as the MetaMask button in the UI.
Example:
metamask
If wallet is not installed:
MetaMask not detected.
If installed:
- When unlocked → disconnect
- When locked → prompt connection (via MetaMask popup)
Note:
Actions involving permission requests (e.g. wallet connect) are handled entirely by the wallet extension, not by WordPress.
Summary #
The WALLET group provides:
✔ wallet address #
✔ chain/network info #
✔ gas price #
✔ block number #
✔ transaction count #
✔ MetaMask connect/disconnect #
These commands are extremely useful for dashboards, Web3 projects, Social Mining add-ons, and advanced user experiences.