To connect to Rarepepewallet:
-
Provide an endpoint (
apiUrl)- The endpoint must accept a
POSTrequest from https://rarepepewallet.wtf with:{ "address": "wallet address" } - It should return:
{ "message": "a message to sign" }
- The endpoint must accept a
-
Provide a callback page (
siteUrl) which rarepepewallet will redirect to with the following URL parameters:addressmsgsig
You must then verify the signature yourself using available libraries (such as
bitcoinjs-lib). -
Add a "Connect to Rarepepewallet" link to your page with the following URL and parameters:
https://rarepepewallet.wtf/connectapiUrlparametersiteUrlparameter
Suppose your API endpoint is:
https://example.com/api/auth
and your destination page is:
https://example.com/wallet-connect
Your Connect to Rarepepewallet URL would be:
https://rarepepewallet.wtf/connect?apiUrl=https%3A%2F%2Fexample.com%2Fapi%2Fauth&siteUrl=https%3A%2F%2Fexample.com%2Fwallet-connect
After the wallet signs the message from your apiUrl endpoint, it will redirect to:
https://example.com/wallet-connect?address=1abc123...&msg=someMessage&sig=signatureString