Skip to main content

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:

  1. name: The wallet name, please note that alephium cannot be used as the wallet name
  2. id: The wallet ID, please note that alephium cannot be used as the wallet ID
  3. icon: The wallet icon
  4. version: The wallet version

For more details, you can refer to the code in the Alephium extension wallet here.