Detect XDEFI Providers
The XDeFi browser extension will inject objects called
xfi
and ethereum
on the window
object of any web application the user visits. To detect if a browser extension using this API is installed, you can check for the existence of the xfi
and ethereum
object.if ("xfi" in window) { // Detecting the XDeFi providers: xfi and ethereum console.log(window.xfi, window.ethereum); console.log(window.xfi, window.xfi && window.xfi.ethereum); this.ethereum = window.ethereum; this.xfiObject = window.xfi; }
from
- the address from which the request is comingrecipient
- the address on which the request is targetedamount
- request transaction amountmemo
- text hint for the request
Last modified 2mo ago