Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.phantom.com/llms.txt

Use this file to discover all available pages before exploring further.

window.phantom.ethereum.selectedAddress

The address of the wallet that is currently connected to the dapp. This value will update upon accountsChanged and connect events. Returns a hexadecimal string.
const address = window.phantom.ethereum.selectedAddress;
console.log(address);
// "0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5"