From f066db3142edcfac07ac617c9ecf6cc696971a9a Mon Sep 17 00:00:00 2001 From: morenabarboni Date: Sat, 20 Jan 2024 11:09:22 +0100 Subject: [PATCH] Readme --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 5b8a8d5..a024d08 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,48 @@ cd ./test-network ``` ./network.sh down ``` + +# Interacting with the application + +## Option 1 - Web-App + +- Move inside the *application* folder: +``` +cd ./application +``` + +- Open up *application/index.html* and add your codespace address at line 107 : +``` +xhr.open("POST", "https://your-codespace-ID-3000.app.github.dev/submitTX", true) +``` + +- Install the dependencies: +``` +npm install +``` + +- Start the server: +``` +npm start +``` + +The web form for executing the functions will be available at: +``` + https://your-codespace-ID-3000.app.github.dev/home.html +``` + +## Option 2 - CLI + +- Simply invoke the commands.js submit script: +``` +node commands.js submit [transactionParams..] +``` + + +- For example, to invoke a transaction with parameters: +``` +node commands.js submit agency.quotation.com q1channel quotation requestQuotation quotation2 item 20 +``` +``` +node commands.js submit suppliera.quotation.com q1channel quotation getQuotation quotation2 +``` \ No newline at end of file