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. It must ensure that the application url (peerMeta.url) matches https://starname.me

  2. Given that (1) is satisfied, to send all the desired addresses your wallet has to send a json with the following structure

{
  "type": "starname",
  "addresses": [{
    "ticker": TICKER1,
    "address": address1
  }, {
    "ticker": [TICKER2],
    "address": address2
  },
	.
	.
	.
  {
    "ticker": [TICKERn],
    "address": addressN
  }],
}

For example your wallet can send:

{
 "type": "starname",
 "addresses": [{
    "ticker": "ETH",
    "address": "0x795997519227f64879977d1a53625707f29b25b2"
  }, {
    "ticker": "BTC",
    "address": "14AcAvkYz9eUP226NpGvTf62uP4Du2NnZJ"
  }]
}

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 updated