Integration with Wallet Connect and the Starname Manager

Wallet Connect Integration

Wallet Connect lets us grab someones address from a mobile wallet into the starname manager for ease of use and to help avoid errors, it also greatly simplifies the process of editing starnames.
Your wallet needs to do one change to allow a multichain wallet to send all the addresses to the manager. (Same kind of change than for Binance chain)
In order to do so, the wallet has to comply with 2 things.
  1. 1.
    It must ensure that the application url (peerMeta.url) matches https://starname.me
  2. 2.
    Given that (1) is satisfied, to send all the desired addresses your wallet has to send a json with the following structure
1
{
2
"type": "starname",
3
"addresses": [{
4
"ticker": TICKER1,
5
"address": address1
6
}, {
7
"ticker": [TICKER2],
8
"address": address2
9
},
10
.
11
.
12
.
13
{
14
"ticker": [TICKERn],
15
"address": addressN
16
}],
17
}
Copied!
For example your wallet can send:
1
{
2
"type": "starname",
3
"addresses": [{
4
"ticker": "ETH",
5
"address": "0x795997519227f64879977d1a53625707f29b25b2"
6
}, {
7
"ticker": "BTC",
8
"address": "14AcAvkYz9eUP226NpGvTf62uP4Du2NnZJ"
9
}]
10
}
Copied!
This json must be sent:
  • as the first element of the array that makes the standard payload of a Wallet Connect session message.
  • It also needs to be converted to a string as with JSON.stringify() for example.
This is required because Wallet Connect actually shares an array of strings.
You can also send regular Wallet Connect payloads.
Last modified 1yr ago
Copy link