Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api_auth_docker/api-sample.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ action_bitcoin_estimatesmartfee=watcher
action_bitcoin_gettxoutproof=watcher
action_validateaddress=watcher
action_elements_validateaddress=watcher
action_elements_getaddressinfo=watcher
action_elements_gettxoutproof=watcher
action_elements_watch=watcher
action_elements_unwatch=watcher
Expand Down
3 changes: 3 additions & 0 deletions api_auth_docker/tests/test-gatekeeper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ test_elements_watcher_functions() {

# action_elements_validateaddress=watcher
test_authorization "elements_validateaddress" "${token}" ${has_access} || return 230

# action_elements_getaddressinfo
test_authorization "elements_getaddressinfo" "${token}" ${has_access} || return 235
}

test_elements_spender_functions() {
Expand Down
1 change: 1 addition & 0 deletions cyphernodeconf_docker/templates/gatekeeper/api.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ action_bitcoin_gettxoutproof=watcher
action_bitcoin_getfeerate=watcher
action_validateaddress=watcher
action_elements_validateaddress=watcher
action_elements_getaddressinfo=watcher
action_elements_gettxoutproof=watcher
action_elements_watch=watcher
action_elements_unwatch=watcher
Expand Down
10 changes: 10 additions & 0 deletions proxy_docker/app/script/requesthandler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,16 @@ main() {
response=$(elements_validateaddress "$(echo "${line}" | cut -d ' ' -f2 | cut -d '/' -f3)")
returncode=$?
;;
elements_getaddressinfo)
# POST http://192.168.111.152:8080/elements_getaddressinfo
# BODY {"address": "ert1q4fk43wm80ndgal03lwaha2s9l3n6ft6fk5h4m0"}
# BODY {"address": "ert1q4fk43wm80ndgal03lwaha2s9l3n6ft6fk5h4m0", "wallet": "02"}

local address=$(echo "${line}" | jq -r ".address")
local wallet=$(echo "${line}" | jq -er ".wallet // empty")
response=$(elements_getaddressinfo "${address}" true "${wallet}")
returncode=$?
;;
elements_watch)
# POST http://192.168.111.152:8080/elements_watch
# BODY {"address":"AzpmavTHCTfJhUqoS28kg3aTmCzu9uqCdfkqmpCALetAoa3ERpZnHvhNzjMP3wo4XitKEMm62mjFk7B9","assetId":"bc5ac68d102a16069c68de127773473eee0a6bc760689ce76024a3cfbfec31cf","unconfirmedCallbackURL":"192.168.111.233:1111/callback0conf","confirmedCallbackURL":"192.168.111.233:1111/callback1conf"}
Expand Down