ExchangeUnion / xud-docker-api

GNU Affero General Public License v3.0
0 stars 0 forks source link

feat: add endpoints for getting mnemonic and changing password #25

Closed krrprr closed 3 years ago

krrprr commented 3 years ago

This PR adds REST endpoints for xud RPC calls changepass and getmnemonic in order to implement https://github.com/ExchangeUnion/xud-ui/issues/39. xudrpc.proto is updated as well.

curl -k {proxy_url}/api/v1/xud/getmnemonic

curl -k -d '{"oldPassword": "old password", "newPassword": "new password"}' -H 'Content-Type: application/json' {proxy_url}/api/v1/xud/changepass

krrprr commented 3 years ago

i suggest to support cli naming like we did for getinfo and getbalance and change mnemonic to 'getmnemonic'

Agree, makes sense! Changed.

can we return something({'status':'success'} for example) instead of {} for sucessful request?

Honestly I don't see a point here as the HTTP response 200 already indicates success and the text does not add any value.