For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

eth_coinbase

Returns the currently selected account address. Since @metamask/connect-evm 1.3.1, this returns a single address (not an array).

Parameters

This method doesn't accept any parameters.

Returns

hex encoded address

Example request
await provider.request({
method: 'eth_coinbase',
params: [],
})
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
}