Utopian Registration: Backend - Account Creation

in #utopian-io7 years ago (edited)

image.png

This Contribution is part of the Utopian Registration-Project.

The goal for the Utopian Registration is, to allow People who are new to STEEM to create an Utopian ( STEEM ) - Account through Utopian itself (and not how it is currently handled, through STEEMIT).

The most important step for this is the actual Account Creation on STEEM - and that is exactly what I've implemented.

In this Contribution-Post I'll take you through the changes I've made to the backend.

If you are interested to see how it actually looks, then you can read this post: Account Creation - Frontend

The Pull-Request

image.png

You can find the pull-request here: Pull Request

Account Creation

While I already showed you how it looks when an Account is created through Utopian - what I haven't talked about is, how this actually works.

image.png

First of all, the code saves all params from req.body into variables and then checks if the User actually exists. If he doesn't, the Client will receive an error message.

image.png

After that, data is fetched from the steem API and the amount of liquid STEEM and delegation Vests for the Account Creation are calculated. (big thanks to @almost-digital for his guide on doing that via dsteem)

image.png

Since we are using the testnet (and not the main-net) for testing-purposes, the keys have to be edited. This code-snippet right here might not be the most beautiful but it gets the job done by replacing STM with STX.

image.png

After that, the account_create_with_delegation-operation is getting created from all the previous generated data and broadcasted to the test-/main-net.

image.png

If everything goes alright, a User is also getting created in the database. If an error happens, the try-catch should catch it and report it to the Frontend.

image.png

This is the function which creates the actual User from the previous pending-User Object in the Database.

What is next?

There are a few things which will be added to this process in future Pull Requests. However, the next step is to create a TOS and Privacy Agreement incl. the use of Cookies to store data. (Which is actually already done and just needs to be pushed to the server)

Afterwards, I will update everything on signup.utopian.io to let you guys play with it :)



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved. Great Work, bdw what's the estimate for this to be fully completed.

You can contact us on Discord.
[utopian-moderator]

As soon as the latest Pull Request is merged, then I'll update the frontend and people can test :)

Hey @codingdefined, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

I think this type of article is very much helpful for some ppl. but lyk me.... Its Jam my head while watching the Coding. :-)

i think it is very helpful post for every steemit worker, and allso thanks you...

Why need an alternative to login to steemit mate? That's what you are trying to accomplish yea...we can actually sign in to utopian via steemit, soo? I mean i dont totally get it.

@amreshchandra When somebody who has heard nothing from Steem yet, but wants to earn via Utopian - he shouldn't go to Steemit, which has nothing to do with Utopian to create an account.

Doesn't look professional enough.

Great initiative to do that especially if you want to cater to more developers. open source contributors, coders and bug hunters.

When you talk to a tech guy and you show him posts that usually art. photography and other stuff. He might not be necessarily put off if he likes those stuff but by showing what Utopian is and its interface and account creation then they are more at home and will know what they can do for the platform.

O yes this will definitely help some people but when it comes to the code thing I don't know nothing about it, I've been trying to learn it for awhile I just can't understand it i still upvoted it for you

Hey @therealwolf I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thanks for the input.