trezor / connect

:link: A platform for easy integration of Trezor into 3rd party services
Other
349 stars 262 forks source link

Documentation of TrezorConnect.renderWebUSBButton() #354

Closed pruflyos closed 5 years ago

pruflyos commented 5 years ago

Is there any documentation on the usage of TrezorConnect.renderWebUSBButton() method of Version 7 of the API?

The documentation from https://wiki.trezor.io/Developers_guide:Trezor_Connect_API_-_Login_with_Trezor and https://github.com/trezor/connect/blob/gh-pages/README.md seems to be outdated as it refers to the method TrezorConnect.renderLoginButtons() which doesn't exist in v7 anymore. So I guess TrezorConnect.renderWebUSBButton() is the replacement, isn't it?

Also all the examples from v1 don't exist in v7 anymore: https://connect.trezor.io/1/examples/ Seems like most of the examples are covered by the API Explorer though, except for the examples regarding the login button and it's styling.

szymonlesisz commented 5 years ago

TrezorConnect.renderWebUSBButton is not documented intentionally because it's useful only for our wallets and applications. Basically it renders an empty button to pair device with browser. Read more about Chome WebUSB API

On the other hand TrezorConnect.renderLoginButtons was removed in v5+ and no one was missing this method until today :) So we can say that our Wiki is out of date and this information shouldn't be there.

TrezorConnect Explorer will be extended with more examples soon, thanks for pointing that