wc_new_connection
The wc_new_connection
method returns a connection string which can be scanned as a QR code.
A list of EIP155 chain IDs can be viewed at https://chainid.network/. For more detailed technical information, check out the Walletconnect documentation.
Structure | Type | Description |
---|---|---|
required_namespaces | object | Contains two WcConnNs objects under the keys eip155 and cosmos , which contain details of approved chains, methods and events while connected. |
Structure | Type | Description |
---|---|---|
url | string | A WalletConnect URI address (EIP-1328) used to send a connection request to the bridge server. |
Generally, this WalletConnect URI will be converted into a scanable QR code in front end user interfaces, so mobile dapps can easily request a connection.
POST
wc_new_connection{
"method": "wc_new_connection",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"params": {
"required_namespaces": {
"eip155": {
"chains": [
"eip155:1",
"eip155:56",
"eip155:137",
"eip155:43114"
],
"methods": [
"eth_sendTransaction",
"eth_signTransaction",
"personal_sign"
],
"events": [
"accountsChanged",
"chainChanged"
]
},
"cosmos": {
"chains": [
"cosmos:cosmoshub-4"
],
"methods": [
"cosmos_signDirect",
"cosmos_signAmino",
"cosmos_getAccounts"
],
"events": []
}
}
}
}