Extension Wallet
To enable dApps to automatically detect extension wallets that support Alephium, these wallets must adhere to the following standard, which is inspired by EIP-6963:
function announceProvider() {
  const event = new CustomEvent('announceAlephiumProvider', {
    detail: Object.freeze({ provider: alephiumWindowObject })
  })
  const handler = () => window.dispatchEvent(event)
  handler()
  window.addEventListener('requestAlephiumProvider', handler)
}
The extension wallets must call the announceProvider function in inpage.js.
The alephiumWindowObject must inherit from the InteractiveSignerProvider and include the following four fields:
- name: The wallet name, please note that- alephiumcannot be used as the wallet name
- id: The wallet ID, please note that- alephiumcannot be used as the wallet ID
- icon: The wallet icon
- version: The wallet version
For more details, you can refer to the code in the Alephium extension wallet here.