Introduction
WalletConnect is an open protocol to communicate securely between Wallets and Dapps (Web3 Apps). The protocol establishes a remote connection between two apps and/or devices using a Bridge server to relay payloads. These payloads are symmetrically encrypted through a shared key between the two peers.
The connection is initiated by one peer displaying a QR Code or deep link with a standard WalletConnect URI and is established when the counter-party approves this connection request.
It also includes an optional Push server to allow Native applications to notify the user of incoming payloads for established connections.
The plugin helps you to connect your existing wallet to the Web3 Apps in order to send transactions in the currently opened sessions.
Demo to preview the settings
How to set up
Place the plugin element on the page in order to use all possible actions.
Actions
1. Connection - Connecting Dapps to Wallets.
2. Sign Transaction - Signs a transaction that can be submitted to the network at a later time.
- From: DATA, 20 Bytes - The address the transaction is sent from.
- To: DATA, 20 Bytes - (optional when creating a new contract) The address the transaction is directed to.
- Data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI.
- Gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
- Gas Price: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas
- Value: QUANTITY - (optional) Integer of the value sent with this transaction
- Nonce: QUANTITY - (optional) Integer of a nonce. This allows overwriting your own pending transactions that use the same nonce.
3. Send Transaction - Creates a new message called transaction or a contract creation, if the data field contains code.
- From: DATA, 20 Bytes - The address the transaction is sent from.
- To: DATA, 20 Bytes - (optional when creating a new contract) The address the transaction is directed to.
- Data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI.
- Gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
- Gas Price: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas
- Value: QUANTITY - (optional) Integer of the value sent with this transaction
- Nonce: QUANTITY - (optional) Integer of a nonce. This allows overwriting your own pending transactions that use the same nonce.
4. Sign Personal Message - The sign method calculates an Ethereum specific signature with:sign(keccack256("\x19Ethereum Signed Message:\n" + len(message) + message))).
Adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.
- Account, 20 Bytes - address.
- Message, N Bytes - message to sign.
5. Sign Message - The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))).
Adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.
- Account, 20 Bytes - address.
- Message, N Bytes - message to sign.
6. Send Custom Request - Creates a custom request using the sign transaction method
- From: DATA, 20 Bytes - The address the transaction is sent from.
- To: DATA, 20 Bytes - (optional when creating a new contract) The address the transaction is directed to.
- Data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI.
- Gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
- Gas Price: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas
- Value: QUANTITY - (optional) Integer of the value sent with this transaction
- Nonce: QUANTITY - (optional) Integer of a nonce. This allows overwriting your own pending transactions that use the same nonce.
Exposed states
Name | Description | Type |
Account | Provided account | Text (list) |
Chain ID | The chain ID is a property of the chain managed by the node | Number |
Send transaction hash | Returns the hash of the transaction if the transaction was successful. | Text |
Signed Transaction | Returns the transaction signature if the transaction was successful. | Text |
Personal message signature | Returns the signature of the signed personal message. | Text |
Message signature | Returns the signature of the signed message. | Text |
Custom request result | Returns: JSON-RPC Response | Text |
Events
Name | Description |
Connected | Triggered when the user is connected. |
Disconnect | Triggered when the user is disconnected. |
Send transaction success | Triggered when a transaction has been committed. |
Send transaction error | Triggered when a transaction has been rejected. |
Sign transaction success | Triggered when signing a transaction has been committed. |
Sign transaction error | Triggered when signing a transaction has been rejected. |
Sign personal message of success | Triggered when signing personal message has been committed. |
Sign a personal message reject | Triggered when signing personal message has rejected. |
Sign message success | Triggered when signing message has been committed. |
Sign message rejected | Triggered when signing message has rejected. |
Custom request success | Triggered when the custom request has been committed. |
Custom request error | Triggered when the custom request has been rejected. |