-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrating with WalletConnect to work with dapp #144
Comments
here is a PoC to show
neuron-walletconect.mov |
I've designed a prototype for this integration including establishing a connection and initializing a transaction. The prototype links is below: https://vs0cjf.axshare.com/#id=oodwon&p=walletconnect&g=1 |
There is a brand-new protocol with a set of contracts created that attempts to create an authentication pattern between dApp and wallets. The new lock defines a new witness shape that introduces a human-readable object called {
message: {
actions: [
{
data: {
type: 'Transfer',
value: {
nftID: '/* NFT ID */',
to: {
type: 'Script',
value: {
/* the transfer target script */
},
},
},
},
scriptInfoHash: '0x...',
},
],
},
} This brings some benefits for wallets, such as
|
Table of Contents
Currently, Neuron supports signing/sending transaction directly. But it can't give support to dApps on the CKB Network.
Overview of WalletConnect
WalletConnect is an open-source protocol that enables secure and seamless communication between decentralized applications (dApps) and wallets on various blockchains. By establishing a remote connection using end-to-end encryption, WalletConnect allows users to interact with dApps through their preferred wallet without exposing their private keys.
So we consider integrating WalletConnect to achieve collaboration with dapp quickly.
WalletConnect Workflow
User visits a new website that requires a Sign session for submitting transactions and Auth for authentication
Once the connection is established, the Dapp will be able to send any JSON-RPC call requests to be handled by the Wallet either to read data from its node or make signing requests for transactions or messages.
Resources
Github: https://github.com/WalletConnect
Docs: https://docs.walletconnect.com/2.0/
Sign Reference API: https://docs.walletconnect.com/2.0/specs/clients/sign/client-api
WalletConnect Cloud
The javascript SDK requires a
projectId
which is supposed to be registered at their WalletConnect cloud.WalletConnect SDK
WalletConnect consists of two SDKs available for both the
dApps
and the Wallets:Web3Modal
andWeb3Wallet
:It's used to display a HTML popup with the QRCode containing the URI for the peering, it uses the core library to generate the necessary attributes.
The
web3wallet
library is used on the Wallets for the pairing and message exchangeWeb3Wallet SDK
It's basically a library that provides a single API for the Sign API and the Auth API
Expected Workflow
User is able to connect to a WalletConnect wallet supporting ckb blockchain from a dapp using the ckb provider.
User should be able:
These are the core user flows that is expected to support through WalletConnect protocol. Any other JSON-RPC methods should be able to be proxied either directly through the wallet or routed directly to a remote node.
Screen-2023-07-26-.124753.mp4
UX/UI
Screen-2023-10-11-095209.mp4
UX Design
https://vs0cjf.axshare.com/#id=psrijc&p=walletconnect-general&g=1
UI Design
TBD
Design Decisions
Namepaces
Namespaces for WalletConnect was created and can be read (and reviewed) .
Here is an example of a session approval message, passing the namespace.
Roadmap
The text was updated successfully, but these errors were encountered: