radicle-dev / radicle-registry

An experimental Substrate implementation of the Radicle Registry 📒
https://registry.radicle.xyz
GNU General Public License v3.0
33 stars 4 forks source link

client: Provide call to check id availability #578

Closed NunoAlexandre closed 4 years ago

NunoAlexandre commented 4 years ago

In https://github.com/radicle-dev/radicle-registry/pull/550, before my commit was modified and force-pushed against, I had introduced a type to describe the state of an Id: Available, Taken, or Unclaimable Retired. The goal of this type and the function returning it was to offer a client call to check the availability of given id.

We want to call client.get_id_availability(an_id) and get one of those 3 possible variants and provide the appropriate validation messages in the upstream.