2020/11/19 walletconnect
ウォレットとアプリケーション(主に Web ページで)をつなぐ標準化された仕様
対応してるウォレット
MetaMask
Gnosis Safe
Argent
対応してるアプリケーション
MakerDAO
Uniswap
1inch Exchange
web3.js の provider(Ethereum との接続方法を抽象化したレイヤー) 実装
簡単に使えるっぽい
web3modal
WalletConnect のほか、MetaMask などの provider も使えるようにしつつ、いい感じのモーダルで表示するやつ
仕組み
dapp と wallet の間に relay する websocket サーバ(Bridge と呼ぶ)がいる
secret を QR コードで共有したら、Bridge を介して session を構築
dapp から tx 投げるときは暗号化して bridge に、bridge から wallet へ Push 通知して暗号化された tx を取得、事前に共有した secret で複合して tx をえる
https://walletconnect.readthedocs.io/en/latest/images/walletconnect-accounts-diagram.png
https://walletconnect.readthedocs.io/en/latest/images/walletconnect-transaction-diagram.png