How to implement a new wallet, shall we follow the legacy architecture or a new one?
johnnynanjiang opened this issue · 2 comments
It seems like the following instructions are outdated
https://portal.thirdweb.com/wallet-sdk/v2/build/connector
The link is broken
https://github.com/thirdweb-dev/js/blob/main/packages/wallets/src/evm/wallets/metamask.ts
The wallets got moved to legacy
https://github.com/thirdweb-dev/js/tree/0da97032849e533db0faee0bb617c29f137f52b8/legacy_packages
e.g.
Coinbase Wallet
https://github.com/thirdweb-dev/js/blob/0da97032849e533db0faee0bb617c29f137f52b8/legacy_packages/wallets/src/evm/wallets/coinbase-wallet.ts
Shall I still follow the legacy implementation or there is a new one?
Hey @johnnynanjiang , the @thirdweb-dev/wallets package is now legacy and has been replaced by the new thirdweb package (V5).
In V5 you can connect to 350+ wallets just by their wallet id https://portal.thirdweb.com/typescript/v5/supported-wallets
Any wallet that supports eip-6963 works out of the box.
For more custom wallets, you can easily implement our Account interface: https://portal.thirdweb.com/references/typescript/v5/Account
Lmk if that helps
That helped, thanks @joaquim-verges