Intellitoken v. 1.0 BETA released

in utopian-io •  4 months ago  (edited)

BEST.jpg

Intellitoken v. 1.0 (beta)

Click here to Intellitoken Whitepaper

System requirements:

  • Ubuntu 16.04 or above
  • 4GB RAM
  • 20GB SATA or SSD
  • 2 core processor
  • Python 2.7

First you need to clone the repo:

# git clone https://github.com/menkarbit/intellitoken.git

And set the Python files to be executable:

# chmod +x *.py

Before starting your Intellitoken, you need to install some library requirements:

  • libssl-dev:
    # apt-get install libssl-dev
  • Python requirements:
    # pip install -r requirements.txt
    or install these libraries: beem steem flask flask_cors

After installed, you need to create the first block before initializing the main server. The following file is creategenesisblock.py.

Start editing the file and set the parameters:

POSTING_KEY - your STEEM token POSTING KEY
account_token - your STEEM token username
token_netname - the name of the network token. You can set as "testnet" or "mainnet" if you want
message - the first message to be used as the first hash
token_id - the token symbol. Ex.: " CRZ" (the space is required)
supply - the token supply. You can set any value as you want

After changing these settings, you open the Linux terminal and execute the command:

# ./creategenesisblock.py

If appears a message containing a JSON with the hash and the all values (except the message, because it was encrypted) appear, congratulations! You had an Intellitoken.

Now you edit the file intellitoken.py and intellitoken_api.py and set the following values:

ACTIVE_KEY - you STEEM token ACTIVE KEY (only in intellitoken.py file)
account_token - your STEEM token username
token_id - the token symbol. Ex.: " CRZ" (the space is required)
token_netname - the name of the network token. You can set as "testnet" or "mainnet" if you want
host - you must set your server IP (only in intellitoken_api file)
port - you must set your server port (only in intellitoken_api file)

Starting the main server

Now you can start the main server:

# ./intellitoken.py

These server listen all the transfers sent to your STEEM token account and convert to commands. To send the command to your server you must send a 0.001 STEEM with the command in the memo.

These commands are listed below:

send

The send command send a token to the determined account.
Example: send 1 menkarbit
The value can be float.
Example: send 0.777 menkarbit

buy

With the buy command you can buy the token. You must send a STEEM value (min 0.001 STEEM) with the memo buy

sell

The sell command you can sell a determined token or all tokens in your wallet.
Example: sell 1 or sell all
You receive a STEEM value based on price calculated by token

The other commands you can see in the API server.

Starting the API server

The API server is responsible to communicate to your token website. You can use the curl command to retrieve these values or get the JSON values directly using JavaScript in your website.

Command to start: # ./intellitoken_api.py

/price

Return the token price.
Example output:
{"buy": 0.003, "sell": 0.001}

/price/<supply_percent>/<rc_percent>

Emulate the price based on the supply remaining percent and the resource credits remaining percent.
Example output:
{"emulator": {"buy": 0.006, "sell": 0.003}}

/balance/

Return the user balance.
Example output:
{"balance": "169.04672863 CRZ"}

/supply

Return the total supply and the supply remaining.
Example output:
{"supply_remaining": "47999827.6668 CRZ", "supply_total": "48000000.0 CRZ"}

/supply/total

Return the total supply.
Example output:
{"supply_total": "48000000.0 CRZ"}

/supply/remaining

Return the supply remaining and the remaining percent.
Example output:
{"supply_remaining": "47999827.6668 CRZ", "supply_remaining_perc": "100.0%"}

/rc

Return the resource credits remaining percent.
Example output:
{"resource_credits_perc": "100.0%"}

/blockchain

Return the entire token blockchain.

/blockchain/latest

Return the last 10 blocks.

/blockchain/explore/

Return the block based on the hash or the username. You can use it in your block explorer.

Site example and block explorer

I've created two html pages that can communicate to the API server using JS and JQuery.

index.html

In the main page, you can buy/sell the token and transfer it using JS. And you can see the token price and the last 10 blocks created.

To configure you must set the api_server and token_account variables.

explorer.html

These page you can find in the blockchain all blocks information: using the block hash or using the username. Both information returns one or more blocks with all information needed.

To configure you must set the api_server variable.

Conclusion

Thats all about Intellitoken.

It is still in beta version, if you find any bug and want to improve the code, please send a pull request to the repository.

You are free to fork and improve the code!

If you like it, please vote me as witness and help me to make better our community!!

https://app.steemconnect.com/sign/account-witness-vote?witness=menkarbit&approve=true


Click here to see the Intellitoken GitHub repository

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

@puncakbukit reblogged your post to thousand followers.. Thank you so much to choose @puncakbukit as your witness.

Thank you my friend. We can make together a better community!

Esperar estar disponível para Windows 😁 Bom trabalho, sorte e sucesso!

Posted using Partiko Android

Infelizmente por algumas limitações da biblioteca steem o Intellitoken roda somente em Linux. Como o recomendável é ter um VPS dedicado a ele, a instalação não se torna difícil, só requer conhecimento em Linux.

Se usares o windows 10, podes fazer download da app ubuntu na windows store e rodar o servidor em 2o plano

Posted using Partiko Android

Nesse caso sim. Instala o aplicativo Ubuntu e depois instala o WSL. Eu desenvolvo todos os meus scripts assim.

Agora pra rodar o Intellitoken diretamente pelo Windows não é recomendável pois algumas bibliotecas relacionadas a biblioteca steem não funcionam corretamente no Windows.

Posted using Partiko Android

Parabens!, @menkarbit. Seu post recebeu um upvote de 5% por usar a tag pt

Excelente trabalho @menkarbit !!

Posted using Partiko Android

Obrigado!

Posted using Partiko Android