Wallet
  • 🖐️XIDAR wallet
  • Pages
    • ✨Register
    • 🌟Login
    • 📇Accounts & addresses
      • 🔎Overview
      • ➕Create / Import account
      • 🔑Security
    • ⚖️Balances
      • 🔎Overview
      • 📥Categorisation
      • ✅Badges
    • 💽History
      • 🔎Overview
      • 🪄Search & Filters
    • 🔒Staking
      • 🔎Overview
      • 🔒Stake
      • 🔓Unstake
    • 🔁Swap
    • 📒Address book
    • 🗞️Events
    • 🔐Security center
    • ⚙️Settings
  • Integration
    • 🎨Front end
    • 🖥️API
    • 🗣️Events
Powered by GitBook
On this page
  1. Integration

Events

All javascript events triggered by the wallet

xidar.account.change

This event is triggered when the user changes the active address in the wallet.

CustomEvent {
    ...
    detail: {
        address: 'rdx...'
    },
    type: 'xidar.account.change'
}
const hasWallet = await window.xidar.v1.hasWallet();
if (hasWallet) {
    const isConnected = await window.xidar.v1.isConnected();
    if (isConnected) {
        window.addEventListener(
            'xidar.account.change',
            data => {
                console.log('New active address : ' + data.detail.address);
            },
            false
        );
    }
}

PreviousAPI

Last updated 2 years ago

🗣️