diff --git a/docs/docs.go b/docs/docs.go index f44ec4a9..8229e804 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -209,7 +209,7 @@ const docTemplate = `{ }, "/v1/staker/pubkey-lookup": { "get": { - "description": "Retrieves public keys for the given BTC addresses. This endpoint", + "description": "Retrieves public keys for the given BTC addresses.\nThis endpoint only returns public keys for addresses that have associated delegations in the system.\nIf an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.", "produces": [ "application/json" ], diff --git a/docs/swagger.json b/docs/swagger.json index b903030b..7c1eb99c 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -201,7 +201,7 @@ }, "/v1/staker/pubkey-lookup": { "get": { - "description": "Retrieves public keys for the given BTC addresses. This endpoint", + "description": "Retrieves public keys for the given BTC addresses.\nThis endpoint only returns public keys for addresses that have associated delegations in the system.\nIf an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.", "produces": [ "application/json" ], diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8ec56d27..2a542cfa 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -376,7 +376,10 @@ paths: $ref: '#/definitions/github_com_babylonlabs-io_staking-api-service_internal_types.Error' /v1/staker/pubkey-lookup: get: - description: Retrieves public keys for the given BTC addresses. This endpoint + description: |- + Retrieves public keys for the given BTC addresses. + This endpoint only returns public keys for addresses that have associated delegations in the system. + If an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses. parameters: - collectionFormat: multi description: List of BTC addresses to look up (up to 10), currently only supports diff --git a/internal/api/handlers/pubkey.go b/internal/api/handlers/pubkey.go index 94278281..d9b6ca58 100644 --- a/internal/api/handlers/pubkey.go +++ b/internal/api/handlers/pubkey.go @@ -18,10 +18,9 @@ const ( ) // GetPubKeys @Summary Get stakers' public keys -// @Description Retrieves public keys for the given BTC addresses. This endpoint -// only returns public keys for addresses that have associated delegations in -// the system. If an address has no associated delegation, it will not be -// included in the response. Supports both Taproot and Native Segwit addresses. +// @Description Retrieves public keys for the given BTC addresses. +// @Description This endpoint only returns public keys for addresses that have associated delegations in the system. +// @Description If an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses. // @Produce json // @Param address query []string true "List of BTC addresses to look up (up to 10), currently only supports Taproot and Native Segwit addresses" collectionFormat(multi) // @Success 200 {object} Result[map[string]string] "A map of BTC addresses to their corresponding public keys (only addresses with delegations are returned)"