From 760c9954cacb7e8f6c5215327c2e82185f9a92d3 Mon Sep 17 00:00:00 2001 From: SKP Date: Thu, 17 Oct 2019 17:58:37 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index adeda9c..224a5f0 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Currently used to make sure callbacks have been called for missed transactions. * Created and maintained by www.satoshiportal.com * Dedicated full-time developer @kexkey * Project manager @FrancisPouliot +* Contributor: @\_\_escapee\_\_ * Disclaimer: as of release on Sept. 23 2018 the project is still it its early stages (Alpha) and many of the features have yet to be implemented. The core architecture and basic wallet operations and blockchain query functions are fully functional. # How to use cyphernode? From 694764f76675387d964587aace9c6d9c98eee65e Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:18:54 -0500 Subject: [PATCH 2/7] Update walletoperations.sh --- proxy_docker/app/script/walletoperations.sh | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/proxy_docker/app/script/walletoperations.sh b/proxy_docker/app/script/walletoperations.sh index e5051d6..4427fa6 100644 --- a/proxy_docker/app/script/walletoperations.sh +++ b/proxy_docker/app/script/walletoperations.sh @@ -126,6 +126,32 @@ getbalance() { return ${returncode} } +getbalances() { + trace "Entering getbalances()..." + + local response + local data='{"method":"getbalances"}' + response=$(send_to_spender_node "${data}") + local returncode=$? + trace_rc ${returncode} + trace "[getbalances] response=${response}" + + if [ "${returncode}" -eq 0 ]; then + local balances=$(echo ${response} | jq ".result") + trace "[getbalances] balances=${balances}" + + data="{\"balances\":${balances}}" + else + trace "[getbalances] Coudn't get balances!" + data="" + fi + + trace "[getbalances] responding=${data}" + echo "${data}" + + return ${returncode} +} + getbalancebyxpublabel() { trace "Entering getbalancebyxpublabel()..." From e45d3faae69e4af2969003f4c1fe475e16765487 Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:21:07 -0500 Subject: [PATCH 3/7] Update requesthandler.sh --- proxy_docker/app/script/requesthandler.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proxy_docker/app/script/requesthandler.sh b/proxy_docker/app/script/requesthandler.sh index dad4ca2..182564e 100644 --- a/proxy_docker/app/script/requesthandler.sh +++ b/proxy_docker/app/script/requesthandler.sh @@ -232,6 +232,13 @@ main() { response_to_client "${response}" ${?} break ;; + getbalance) + # curl (GET) http://192.168.111.152:8080/getbalances + + response=$(getbalances) + response_to_client "${response}" ${?} + break + ;; getbalancebyxpub) # curl (GET) http://192.168.111.152:8080/getbalancebyxpub/upub5GtUcgGed1aGH4HKQ3vMYrsmLXwmHhS1AeX33ZvDgZiyvkGhNTvGd2TA5Lr4v239Fzjj4ZY48t6wTtXUy2yRgapf37QHgt6KWEZ6bgsCLpb From 60d9bb5b6d52c654835ad5afcd9541f53d827262 Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:21:45 -0500 Subject: [PATCH 4/7] Update requesthandler.sh --- proxy_docker/app/script/requesthandler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy_docker/app/script/requesthandler.sh b/proxy_docker/app/script/requesthandler.sh index 182564e..948bf11 100644 --- a/proxy_docker/app/script/requesthandler.sh +++ b/proxy_docker/app/script/requesthandler.sh @@ -232,7 +232,7 @@ main() { response_to_client "${response}" ${?} break ;; - getbalance) + getbalances) # curl (GET) http://192.168.111.152:8080/getbalances response=$(getbalances) From a83a04360cf3ca028af6c00ca052fa85dcaad3d6 Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:31:33 -0500 Subject: [PATCH 5/7] Update api-sample.properties --- api_auth_docker/api-sample.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/api_auth_docker/api-sample.properties b/api_auth_docker/api-sample.properties index 4d59d81..083fce3 100644 --- a/api_auth_docker/api-sample.properties +++ b/api_auth_docker/api-sample.properties @@ -29,6 +29,7 @@ action_ln_decodebolt11=watcher # Spender can do what the watcher can do, plus: action_getbalance=spender +action_getbalances=spender action_getbalancebyxpub=spender action_getbalancebyxpublabel=spender action_getnewaddress=spender From f876ed87daf8e6b755938c02ca5cfa83bed40584 Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:33:00 -0500 Subject: [PATCH 6/7] Update api.properties --- cyphernodeconf_docker/templates/gatekeeper/api.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cyphernodeconf_docker/templates/gatekeeper/api.properties b/cyphernodeconf_docker/templates/gatekeeper/api.properties index f2f4739..fdbb2a6 100644 --- a/cyphernodeconf_docker/templates/gatekeeper/api.properties +++ b/cyphernodeconf_docker/templates/gatekeeper/api.properties @@ -33,6 +33,7 @@ action_ln_decodebolt11=watcher # Spender can do what the watcher can do, plus: action_getbalance=spender +action_getbalances=spender action_getbalancebyxpub=spender action_getbalancebyxpublabel=spender action_getnewaddress=spender @@ -57,4 +58,4 @@ action_ln_connectfund=spender action_conf=internal action_newblock=internal action_executecallbacks=internal -action_ots_backoffice=internal \ No newline at end of file +action_ots_backoffice=internal From 6b857cdeb483fff7912538e3d024e108fb135d95 Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Fri, 17 Jan 2020 11:56:48 -0500 Subject: [PATCH 7/7] Update walletoperations.sh --- proxy_docker/app/script/walletoperations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy_docker/app/script/walletoperations.sh b/proxy_docker/app/script/walletoperations.sh index 4427fa6..8cd9d7d 100644 --- a/proxy_docker/app/script/walletoperations.sh +++ b/proxy_docker/app/script/walletoperations.sh @@ -142,7 +142,7 @@ getbalances() { data="{\"balances\":${balances}}" else - trace "[getbalances] Coudn't get balances!" + trace "[getbalances] Couldn't get balances!" data="" fi