The remote Keymanager API was not using the URLs indicated in the spec
This commit is contained in:
parent
3ffab01b07
commit
4c01b77773
|
@ -188,7 +188,7 @@ proc installKeymanagerHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||
return RestApiResponse.jsonResponsePlain(response)
|
||||
|
||||
# https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/ListRemoteKeys
|
||||
router.api(MethodGet, "/api/eth/v1/remotekey") do () -> RestApiResponse:
|
||||
router.api(MethodGet, "/api/eth/v1/remotekeys") do () -> RestApiResponse:
|
||||
let authStatus = checkAuthorization(request, node)
|
||||
if authStatus.isErr():
|
||||
return RestApiResponse.jsonError(Http401, InvalidAuthorization,
|
||||
|
@ -197,7 +197,7 @@ proc installKeymanagerHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||
return RestApiResponse.jsonResponsePlain(response)
|
||||
|
||||
# https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/ImportRemoteKeys
|
||||
router.api(MethodPost, "/api/eth/v1/remotekey") do (
|
||||
router.api(MethodPost, "/api/eth/v1/remotekeys") do (
|
||||
contentBody: Option[ContentBody]) -> RestApiResponse:
|
||||
let authStatus = checkAuthorization(request, node)
|
||||
if authStatus.isErr():
|
||||
|
@ -239,7 +239,7 @@ proc installKeymanagerHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||
return RestApiResponse.jsonResponsePlain(response)
|
||||
|
||||
# https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/DeleteRemoteKeys
|
||||
router.api(MethodDelete, "/api/eth/v1/remotekey") do (
|
||||
router.api(MethodDelete, "/api/eth/v1/remotekeys") do (
|
||||
contentBody: Option[ContentBody]) -> RestApiResponse:
|
||||
let authStatus = checkAuthorization(request, node)
|
||||
if authStatus.isErr():
|
||||
|
@ -294,15 +294,15 @@ proc installKeymanagerHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||
|
||||
router.redirect(
|
||||
MethodGet,
|
||||
"/eth/v1/remotekey",
|
||||
"/api/eth/v1/remotekey")
|
||||
"/eth/v1/remotekeys",
|
||||
"/api/eth/v1/remotekeys")
|
||||
|
||||
router.redirect(
|
||||
MethodPost,
|
||||
"/eth/v1/remotekey",
|
||||
"/api/eth/v1/remotekey")
|
||||
"/eth/v1/remotekeys",
|
||||
"/api/eth/v1/remotekeys")
|
||||
|
||||
router.redirect(
|
||||
MethodDelete,
|
||||
"/eth/v1/remotekey",
|
||||
"/api/eth/v1/remotekey")
|
||||
"/eth/v1/remotekeys",
|
||||
"/api/eth/v1/remotekeys")
|
||||
|
|
|
@ -54,18 +54,18 @@ proc listKeys*(client: RestClientRef,
|
|||
raiseUnknownStatusError(resp)
|
||||
|
||||
proc listRemoteKeysPlain*(): RestPlainResponse {.
|
||||
rest, endpoint: "/eth/v1/remotekey",
|
||||
rest, endpoint: "/eth/v1/remotekeys",
|
||||
meth: MethodGet.}
|
||||
## https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/ListRemoteKeys
|
||||
|
||||
proc importRemoteKeysPlain*(body: ImportRemoteKeystoresBody
|
||||
): RestPlainResponse {.
|
||||
rest, endpoint: "/eth/v1/remotekey",
|
||||
rest, endpoint: "/eth/v1/remotekeys",
|
||||
meth: MethodPost.}
|
||||
## https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/ImportRemoteKeys
|
||||
|
||||
proc deleteRemoteKeysPlain*(body: DeleteKeystoresBody): RestPlainResponse {.
|
||||
rest, endpoint: "/eth/v1/remotekey",
|
||||
rest, endpoint: "/eth/v1/remotekeys",
|
||||
meth: MethodDelete.}
|
||||
## https://ethereum.github.io/keymanager-APIs/#/Remote%20Key%20Manager/DeleteRemoteKeys
|
||||
|
||||
|
|
Loading…
Reference in New Issue