Skip to content

farFromShallow101/SawtoothIntKeyJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SawtoothIntKeyJS

IntKey Transaction Processor with an added "transfer" and "register" verb and functional client side application

STEPS TO RUN THE APPLICATION

  1. On one terminal, run yaml up command:
    docker-compose -f modified-sawtooth.yaml up
  2. Open another terminal (preferably in split mode), change directory to client side and transaction processor side (sawtooth-sdk-js) respectively, and do the following:
  3. On one terminal, run : nvm install 12
  4. On both the terminals: nvm use 12
  5. On the transaction processor side, run
    npm install
    After this, run the following:
    npm run start tcp://localhost:4004
  6. On the client side, run the following:
    npm install
    node index.js set var1 25 --url http://rest-api:8008
    to increment: node index.js inc var1 5 --url http://rest-api:8008
    to decrement: node index.js dec var1 5 --url http://rest-api:8008
    to transfer: node index.js transfer var1 var2 5 --url http://rest-api:8008

TO CHECK THE STATE DATA:

From a new terminal, use this command:
docker exec -it sawtooth-shell-default bash
sawtooth state list --url http://rest-api:8008

After using the application, abort the existing process on the transaction processor terminal. After this, close the client, transaction processor and state data terminal.

In the yaml terminal, abort the existing process, and after successful abortion, run the following command:
docker-compose -f modified-sawtooth.yaml down


Here, your sawtooth application has finally "gracefully" stopped ;-)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published