Sender injects a global JavaScript API into websites visited by its users using the window.sender.ton provider object. This API allows websites to request users' Ton accounts, read data from blockchains the user is connected to, and suggest that the user sign messages and transactions.
Properties
deviceInfo
Developer can get deviceInfo from window.sender.ton object.
// Some codeexportdeclareinterfaceDeviceInfo { platform:'iphone'|'ipad'|'android'|'windows'|'mac'|'linux'|'browser'; appName:string; appVersion:string; maxProtocolVersion:number; features:Feature[];}
protocolVersion
This is protocol version number, and current protocol version is 2
isWalletBrowser
Check current Provider API if it's wallet browser, the default value is true
This method can restore app connection automatically if dapp is connected before, so that user don't need to connect dapp again. And this method will respond a ConnectEvent object.