getAddress()
Returns the connected wallet’s Stellar address, or null if no wallet is
connected yet.
getAddress(): string | nullReturns
- A Stellar public key (
"G...") when a wallet is connected. nullbeforeconnect()has completed, or afterdisconnect().
getAddress() is synchronous — it reads the already-connected session and does
not open a prompt, so it’s safe to call on render to decide whether to show a
connected or disconnected state.
Example
const address = orbi.getAddress()
if (address) {
// show the dashboard for `address`
} else {
// show the Connect button
}Last updated on