package Ġio . blo co . circ les . domain Ċ Ċ import Ġcom . google . gson . Gson Ċ import Ġio . blo co . circ les . data . network . models . Registrar Request Ċ import Ġio . blo co . circ les . data . network . models . Registrar Response Ċ import Ġio . blo co . circ les . data . network . services . Registrar Service Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠRegist rar Profile Ċ @ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġregist rar Service : ĠRegist rar Service , ĊĠĠĠ Ġprivate Ġval Ġgson : ĠGson Ċ ) Ġ{ ĊĠĠĠ Ġsuspend Ġfun Ġregister ( username : ĠString , Ġbtc Address : ĠString , Ġst x Address : ĠString ): ĠRegist rar Response Ġ= ĊĠĠĠĠĠĠĠ Ġregist rar Service . register ( gson . toJson ( build Request ( username , Ġbtc Address , Ġst x Address ))) ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Request ( name : ĠString , Ġbtc Address : ĠString , Ġst x Address : ĠString ): ĠRegist rar Request Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomplete Zone File Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"\ $ ORIGIN Ġ$ name . id . st x \ n " Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"\ $ TTL Ġ 3 6 0 0 " Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"\ n _ http ._ tcp \ t IN \ t URI \ t 1 0 \ t 1 \ t " Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"\" https :// ga ia . block stack . org / hub /$ btc Address / profile . json \"\ n \ n " ĊĠĠĠĠĠĠĠ Ġreturn ĠRegist rar Request ( name , Ġst x Address , Ġcomplete Zone File ) ĊĠĠĠ Ġ} Ċ } Ċ