Interfacing Server for c-lightning
- Run "sudo chmod a+x ./INSTALL.sh"
- Run "./INSTALL.sh"
- Follow the proceedure
- INSTALL.sh should exit with "Installation Done!"
- Open a Terminal
- Execute "/thor/THOR"
- As soon as it shows a QR Code you should be able to connect to it
- If QR Code is not shown please refer to the logfile in /thor directory
To use openssl are a Client
- Open a terminal
- Execute "openssl s_client -connect IP:PORT"
- You will get "auth,who" in the terminal
- Enter Credentials ( for now just send "auth,admin,admin")
- You will recieve "auth,ok,0" in the case of success or "auth,fail,-1" in case of failure
- Failure can only be due to invalid credentials
After you have "auth,ok,0" on login you will be able to run all allowed commands including rpc
To use RPC Command Line Interface use the following
RPC Command Compromises of
rpc-cmd,(process),(lat_long),(txId),[ (arguments to process) ] For Example you want to run "lightning-cli newaddr" the rpc varient will be
rpc-cmd,cli-node,12.321_-91.123,1,[ newaddr ]
- Please Note that there are no Spaces in Between ',' and ONE Space each between '[' args ']'
db,add,user,(userId),(userPw),(userMode)
db,del,user,(userId)
db,update,user,(userId),(key),(value)
Where keys are:
- userid
- userpass
- usermode
- userlogged
db,get-list,user
db,add,items,(upc),(quantity),(price),(name)
db,del,items,(upc)
db,update,items,(upc),(key),(value)
Where keys are:
- item-name
- item-quantity
- item-price
- item-upc
db,get-list,items
log-cmd,(process),(lat_long),(txId),(data)
db,add,images,(upc),(image)
db,del,images,(upc)
db,update,images,(upc),(key),(value)
Where keys are:
- item-upc
- images
db,get-list,images
db,get-image,images,(upc)
control,get-tax
control,list-peers
control,set-logging,(logging level)
control,get_logging
control,get-log-levels
IMPORTANT NOTE
- All Commands to the server must end with footer ",<$#EOT#$>"
- Any command not ending on this footer will cause the server to hang