crypto-bonds / transaction-processor

🏦 The blockchain transaction processor for the CryptoBonds HackIllinois Project
Apache License 2.0
0 stars 0 forks source link

Write a POST request that communicates with sawtooth #2

Open benthayer opened 5 years ago

benthayer commented 5 years ago

This is the first step in testing all the blockchain code.

The files of interest are https://github.com/crypto-bonds/crypto-bonds/blob/master/processor-python/processor/handler.py https://github.com/crypto-bonds/crypto-bonds/blob/master/processor-python/processor/actions.py and those in https://github.com/crypto-bonds/crypto-bonds/tree/master/client/src

{
"method_name": "add_crypto_type",

 "message_dict": {

"name": "BTC",

 "link": "https://bitcoin.org/",

"crypto_type_uuid":"e7663ad2a7a04ea88c069864ab1ca0e5" }

}

The above is the simplest message content that we can have. It is JSON format. Sending it in the payload of a transaction will allow us to reference BTC in the merkle tree and verify that the code in actions.py works as expected.

Start by looking at submit in api.js and getSubmitFn and MessageInput in main.js

benthayer commented 5 years ago

http://localhost:8080/api/state?address=b04d