Relay Server API Reference
// Request (Client -> Server)
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"method" : "waku_subscribe" ,
"params" : {
"topic" : "<TOPIC_ID>" ,
"ttl" : 604800
}
}
// Response (Server -> Client)
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : "<SUBSCRIPTION_ID>"
}
// Request (Client -> Server)
{
"id" : 2 ,
"jsonrpc" : "2.0" ,
"method" : "waku_publish" ,
"params" : {
"topic" : "<TOPIC_ID>" ,
"message" : "<MESSAGE_PAYLOAD>" ,
"ttl" : 86400
}
}
// Response (Server -> Client)
{
"id" : 2 ,
"jsonrpc" : "2.0" ,
"result" : true
}
// Request (Server -> Client)
{
"id" : 3 ,
"jsonrpc" : "2.0" ,
"method" : "waku_subscription" ,
"params" : {
"id" : "<SUBSCRIPTION_ID>" ,
"data" : {
"topic" : "<TOPIC_ID>" ,
"message" : "<MESSAGE_PAYLOAD>" ,
}
}
}
// Response (Client -> Server)
{
"id" : 3 ,
"jsonrpc" : "2.0" ,
"result" : true
}
// Request (Client -> Server)
{
"id" : 4 ,
"jsonrpc" : "2.0" ,
"method" : "waku_unsubscribe" ,
"params" : {
"id" : "<SUBSCRIPTION_ID>" ,
}
}
// Response (Server -> Client)
{
"id" : 4 ,
"jsonrpc" : "2.0" ,
"result" : true
}
GET https://relay.walletconnect.org/hello
Response:
Status: 200
Content-Type: text/plain; charset=utf-8
Body: Hello World, this is WalletConnect v2.0
Subscribe Push Notification Webhook
POST https://relay.walletconnect.org/subscribe
Content-Type: application/json
Body:
{
" topic" : < client_id> ,
" webhook" : < push_notification_webhook>
}
Response:
Status: 200
Content-Type: application/json; charset=utf-8
Body:
{
" success" : true
}