TronLink / tronlink-extension

TronLink Chrome Extension
2 stars 3 forks source link

TronLink should use a generic, non-branded name for the provider injected into window #344

Open fulldecent opened 1 year ago

fulldecent commented 1 year ago

In Ethereum, browser extension wallets are using a standardized variable name to inject. It is window.ethereum. And there is an agreed API to use here.

That means that if you use MetaMask or another wallet you can still use window.ethereum.

However TronLink will inject window.tronLink, which is a proprietary variable and no cross-implementation API.

If I make my own Tron wallet, should I also use the window.tronLink variable? What API should I follow? There is not a good answer to these questions and this makes it too difficult to make competing wallets on Tron.