{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "The Babylon Staking API offers information about the state of the Babylon BTC Staking system.\nYour access and use is governed by the API Access License linked to below.",
        "title": "Babylon Staking API",
        "contact": {
            "email": "contact@babylonlabs.io"
        },
        "license": {
            "name": "API Access License",
            "url": "https://docs.babylonlabs.io/assets/files/api-access-license.pdf"
        },
        "version": "2.0"
    },
    "host": "",
    "basePath": "",
    "paths": {
        "/healthcheck": {
            "get": {
                "description": "Health check the service, including ping database connection",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "shared"
                ],
                "summary": "Health check endpoint",
                "responses": {
                    "200": {
                        "description": "Server is up and running",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/v1/delegation": {
            "get": {
                "description": "[DEPRECATED] Retrieves a delegation by a given transaction hash. Please use /v2/delegation instead.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "deprecated": true,
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staking transaction hash in hex format",
                        "name": "staking_tx_hash_hex",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Delegation",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v1service_DelegationPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/finality-providers": {
            "get": {
                "description": "[DEPRECATED] Fetches details of all active finality providers sorted by their active total value locked (ActiveTvl) in descending order. Please use /v2/finality-providers instead.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "summary": "Get Active Finality Providers (Deprecated)",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "string",
                        "description": "Public key of the finality provider to fetch",
                        "name": "fp_btc_pk",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Pagination key to fetch the next page of finality providers",
                        "name": "pagination_key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of finality providers sorted by ActiveTvl in descending order",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-array_v1service_FpDetailsPublic"
                        }
                    }
                }
            }
        },
        "/v1/global-params": {
            "get": {
                "description": "[DEPRECATED] Retrieves the global parameters for Babylon, including finality provider details. Please use /v2/network-info instead.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "deprecated": true,
                "responses": {
                    "200": {
                        "description": "Global parameters",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v1service_GlobalParamsPublic"
                        }
                    }
                }
            }
        },
        "/v1/staker/delegation/check": {
            "get": {
                "description": "Check if a staker has an active delegation by the staker BTC address (Taproot or Native Segwit).\nOptionally, you can provide a timeframe to check if the delegation is active within the provided timeframe\nThe available timeframe is \"today\" which checks after UTC 12AM of the current day",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "shared"
                ],
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staker BTC address in Taproot/Native Segwit format",
                        "name": "address",
                        "in": "query",
                        "required": true
                    },
                    {
                        "enum": [
                            "today"
                        ],
                        "type": "string",
                        "description": "Check if the delegation is active within the provided timeframe",
                        "name": "timeframe",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Delegation check result",
                        "schema": {
                            "$ref": "#/definitions/v1handlers.DelegationCheckPublicResponse"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/staker/delegations": {
            "get": {
                "description": "Retrieves phase-1 delegations for a given staker. This endpoint will be deprecated once all phase-1 delegations are either withdrawn or registered into phase-2.\nThis endpoint is only used to show legacy phase-1 delegations for the purpose of unbonding or registering into phase-2.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staker BTC Public Key",
                        "name": "staker_btc_pk",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Only return delegations with pending actions which include active, unbonding, unbonding_requested, unbonded",
                        "name": "pending_action",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Pagination key to fetch the next page of delegations",
                        "name": "pagination_key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of delegations and pagination token",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-array_v1service_DelegationPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/staker/pubkey-lookup": {
            "get": {
                "description": "Retrieves public keys for the given BTC addresses. This endpoint\nonly returns public keys for addresses that have associated delegations in\nthe system. If an address has no associated delegation, it will not be\nincluded in the response. Supports both Taproot and Native Segwit addresses.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "shared"
                ],
                "summary": "Get stakers' public keys",
                "parameters": [
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "List of BTC addresses to look up (up to 10), currently only supports Taproot and Native Segwit addresses",
                        "name": "address",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A map of BTC addresses to their corresponding public keys (only addresses with delegations are returned)",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-map_string_string"
                        }
                    },
                    "400": {
                        "description": "Bad Request: Invalid input parameters",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/stats": {
            "get": {
                "description": "[DEPRECATED] Fetches overall stats for babylon staking including tvl, total delegations, active tvl, active delegations and total stakers. Please use /v2/stats instead.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "summary": "Get Overall Stats (Deprecated)",
                "deprecated": true,
                "responses": {
                    "200": {
                        "description": "Overall stats for babylon staking",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v1service_OverallStatsPublic"
                        }
                    }
                }
            }
        },
        "/v1/stats/staker": {
            "get": {
                "description": "[DEPRECATED] Fetches staker stats for babylon staking including tvl, total delegations, active tvl and active delegations. Please use /v2/staker/stats instead.\nIf staker_btc_pk query parameter is provided, it will return stats for the specific staker.\nOtherwise, it will return the top stakers ranked by active tvl.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "summary": "Get Staker Stats (Deprecated)",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "string",
                        "description": "Public key of the staker to fetch",
                        "name": "staker_btc_pk",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Pagination key to fetch the next page of top stakers",
                        "name": "pagination_key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of top stakers by active tvl",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-array_v1service_StakerStatsPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/unbonding": {
            "post": {
                "description": "Unbonds a phase-1 delegation by processing the provided transaction details. This endpoint will be deprecated once all phase-1 delegations are either withdrawn or registered into phase-2.\nThis is an async operation.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "summary": "Unbond phase-1 delegation",
                "parameters": [
                    {
                        "description": "Unbonding Request Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/v1handlers.UnbondDelegationRequestPayload"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Request accepted and will be processed asynchronously"
                    },
                    "400": {
                        "description": "Invalid request payload",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v1/unbonding/eligibility": {
            "get": {
                "description": "Checks if a delegation identified by its staking transaction hash is eligible for unbonding. This endpoint will be deprecated once all phase-1 delegations are either withdrawn or registered into phase-2.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v1"
                ],
                "summary": "Check unbonding eligibility",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staking Transaction Hash Hex",
                        "name": "staking_tx_hash_hex",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The delegation is eligible for unbonding"
                    },
                    "400": {
                        "description": "Missing or invalid 'staking_tx_hash_hex' query parameter",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/apr": {
            "get": {
                "description": "Get personalized staking APR based on user's BTC and BABY stake amounts",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "summary": "Get personalized staking APR",
                "parameters": [
                    {
                        "type": "integer",
                        "default": 0,
                        "description": "Total satoshis staked (confirmed + pending)",
                        "name": "satoshis_staked",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 0,
                        "description": "Total ubbn staked (confirmed + pending)",
                        "name": "ubbn_staked",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v2service_StakingAPRPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/delegation": {
            "get": {
                "description": "Retrieves a delegation by a given transaction hash",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "summary": "Get a delegation",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staking transaction hash in hex format",
                        "name": "staking_tx_hash_hex",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Staker delegation",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v2service_DelegationPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "404": {
                        "description": "Error: Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "500": {
                        "description": "Error: Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/delegations": {
            "get": {
                "description": "Fetches delegations for babylon staking including tvl, total delegations, active tvl, active delegations and total stakers.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "summary": "Get Delegations",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Staker public key in hex format. If omitted, babylon_address is used as the main query parameter and state is required.",
                        "name": "staker_pk_hex",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Babylon address. Required if staker_pk_hex is omitted.",
                        "name": "babylon_address",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "State of delegations (only 'active' is supported). Required if staker_pk_hex is omitted.",
                        "name": "state",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Pagination key to fetch the next page of delegations",
                        "name": "pagination_key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of staker delegations and pagination token",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-array_v2service_DelegationPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "404": {
                        "description": "Error: Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "500": {
                        "description": "Error: Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/finality-providers": {
            "get": {
                "description": "Fetches finality providers with its stats with pagination support",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "summary": "List Finality Providers",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Pagination key to fetch the next page of finality providers",
                        "name": "pagination_key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of finality providers with its stats",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-array_v2service_FinalityProviderPublic"
                        }
                    },
                    "400": {
                        "description": "Invalid pagination token",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "404": {
                        "description": "No finality providers found",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error occurred",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/network-info": {
            "get": {
                "description": "Get network info, including params",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "responses": {
                    "200": {
                        "description": "Network info",
                        "schema": {
                            "$ref": "#/definitions/v2service.NetworkInfoPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/prices": {
            "get": {
                "description": "Get latest prices for all available symbols",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-map_string_float64"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/staker/stats": {
            "get": {
                "description": "Fetches staker stats for babylon staking including active tvl,",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "summary": "Get Staker Stats",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Public key of the staker to fetch",
                        "name": "staker_pk_hex",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Babylon address of the staker to fetch",
                        "name": "babylon_address",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Staker stats",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v2service_StakerStatsPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "404": {
                        "description": "Error: Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    },
                    "500": {
                        "description": "Error: Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        },
        "/v2/stats": {
            "get": {
                "description": "Overall system stats including max staking APR (BTC + co-staking)",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "v2"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.PublicResponse-v2service_OverallStatsPublic"
                        }
                    },
                    "400": {
                        "description": "Error: Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "github_com_babylonlabs-io_staking-api-service_internal_shared_types.Error": {
            "type": "object",
            "properties": {
                "err": {},
                "errorCode": {
                    "$ref": "#/definitions/types.ErrorCode"
                },
                "statusCode": {
                    "type": "integer"
                }
            }
        },
        "handler.PublicResponse-array_v1service_DelegationPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v1service.DelegationPublic"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-array_v1service_FpDetailsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v1service.FpDetailsPublic"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-array_v1service_StakerStatsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v1service.StakerStatsPublic"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-array_v2service_DelegationPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v2service.DelegationPublic"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-array_v2service_FinalityProviderPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v2service.FinalityProviderPublic"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-map_string_float64": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/map_string_float64"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-map_string_string": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/map_string_string"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v1service_DelegationPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v1service.DelegationPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v1service_GlobalParamsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v1service.GlobalParamsPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v1service_OverallStatsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v1service.OverallStatsPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v2service_DelegationPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v2service.DelegationPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v2service_OverallStatsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v2service.OverallStatsPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v2service_StakerStatsPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v2service.StakerStatsPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.PublicResponse-v2service_StakingAPRPublic": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/v2service.StakingAPRPublic"
                },
                "pagination": {
                    "$ref": "#/definitions/handler.paginationResponse"
                }
            }
        },
        "handler.paginationResponse": {
            "type": "object",
            "properties": {
                "next_key": {
                    "type": "string"
                }
            }
        },
        "indexertypes.BbnStakingParams": {
            "type": "object",
            "properties": {
                "allow_list_expiration_height": {
                    "type": "integer"
                },
                "btc_activation_height": {
                    "type": "integer"
                },
                "covenant_pks": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "covenant_quorum": {
                    "type": "integer"
                },
                "delegation_creation_base_gas_fee": {
                    "type": "integer"
                },
                "max_staking_time_blocks": {
                    "type": "integer"
                },
                "max_staking_value_sat": {
                    "type": "integer"
                },
                "min_commission_rate": {
                    "type": "string"
                },
                "min_slashing_tx_fee_sat": {
                    "type": "integer"
                },
                "min_staking_time_blocks": {
                    "type": "integer"
                },
                "min_staking_value_sat": {
                    "type": "integer"
                },
                "slashing_pk_script": {
                    "type": "string"
                },
                "slashing_rate": {
                    "type": "string"
                },
                "unbonding_fee_sat": {
                    "type": "integer"
                },
                "unbonding_time_blocks": {
                    "type": "integer"
                },
                "version": {
                    "type": "integer"
                }
            }
        },
        "indexertypes.BtcCheckpointParams": {
            "type": "object",
            "properties": {
                "btc_confirmation_depth": {
                    "type": "integer"
                },
                "checkpoint_finalization_timeout": {
                    "type": "integer"
                },
                "version": {
                    "type": "integer"
                }
            }
        },
        "map_string_float64": {
            "type": "object",
            "additionalProperties": {
                "type": "number",
                "format": "float64"
            }
        },
        "map_string_string": {
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "types.DelegationState": {
            "type": "string",
            "enum": [
                "active",
                "unbonding_requested",
                "unbonding",
                "unbonded",
                "withdrawable",
                "withdrawn",
                "transitioned",
                "slashed"
            ],
            "x-enum-varnames": [
                "Active",
                "UnbondingRequested",
                "Unbonding",
                "Unbonded",
                "Withdrawable",
                "Withdrawn",
                "Transitioned",
                "Slashed"
            ]
        },
        "types.ErrorCode": {
            "type": "string",
            "enum": [
                "INTERNAL_SERVICE_ERROR",
                "VALIDATION_ERROR",
                "NOT_FOUND",
                "BAD_REQUEST",
                "FORBIDDEN",
                "UNPROCESSABLE_ENTITY",
                "REQUEST_TIMEOUT"
            ],
            "x-enum-varnames": [
                "InternalServiceError",
                "ValidationError",
                "NotFound",
                "BadRequest",
                "Forbidden",
                "UnprocessableEntity",
                "RequestTimeout"
            ]
        },
        "types.FinalityProviderDescription": {
            "type": "object",
            "properties": {
                "details": {
                    "type": "string"
                },
                "identity": {
                    "type": "string"
                },
                "moniker": {
                    "type": "string"
                },
                "security_contact": {
                    "type": "string"
                },
                "website": {
                    "type": "string"
                }
            }
        },
        "types.FinalityProviderQueryingState": {
            "type": "string",
            "enum": [
                "active",
                "standby"
            ],
            "x-enum-varnames": [
                "FinalityProviderStateActive",
                "FinalityProviderStateStandby"
            ]
        },
        "v1handlers.DelegationCheckPublicResponse": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer"
                },
                "data": {
                    "type": "boolean"
                }
            }
        },
        "v1handlers.UnbondDelegationRequestPayload": {
            "type": "object",
            "properties": {
                "staker_signed_signature_hex": {
                    "type": "string"
                },
                "staking_tx_hash_hex": {
                    "type": "string"
                },
                "unbonding_tx_hash_hex": {
                    "type": "string"
                },
                "unbonding_tx_hex": {
                    "type": "string"
                }
            }
        },
        "v1service.DelegationPublic": {
            "type": "object",
            "properties": {
                "finality_provider_pk_hex": {
                    "type": "string"
                },
                "is_eligible_for_transition": {
                    "type": "boolean"
                },
                "is_overflow": {
                    "type": "boolean"
                },
                "is_slashed": {
                    "type": "boolean"
                },
                "staker_pk_hex": {
                    "type": "string"
                },
                "staking_tx": {
                    "$ref": "#/definitions/v1service.TransactionPublic"
                },
                "staking_tx_hash_hex": {
                    "type": "string"
                },
                "staking_value": {
                    "type": "integer"
                },
                "state": {
                    "$ref": "#/definitions/types.DelegationState"
                },
                "unbonding_tx": {
                    "$ref": "#/definitions/v1service.TransactionPublic"
                }
            }
        },
        "v1service.FpDescriptionPublic": {
            "type": "object",
            "properties": {
                "details": {
                    "type": "string"
                },
                "identity": {
                    "type": "string"
                },
                "moniker": {
                    "type": "string"
                },
                "security_contact": {
                    "type": "string"
                },
                "website": {
                    "type": "string"
                }
            }
        },
        "v1service.FpDetailsPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "btc_pk": {
                    "type": "string"
                },
                "commission": {
                    "type": "string"
                },
                "description": {
                    "$ref": "#/definitions/v1service.FpDescriptionPublic"
                },
                "total_delegations": {
                    "type": "integer"
                },
                "total_tvl": {
                    "type": "integer"
                }
            }
        },
        "v1service.GlobalParamsPublic": {
            "type": "object",
            "properties": {
                "versions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v1service.VersionedGlobalParamsPublic"
                    }
                }
            }
        },
        "v1service.OverallStatsPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "btc_price_usd": {
                    "description": "Optional field",
                    "type": "number"
                },
                "pending_tvl": {
                    "type": "integer"
                },
                "total_delegations": {
                    "type": "integer"
                },
                "total_stakers": {
                    "type": "integer"
                },
                "total_tvl": {
                    "type": "integer"
                },
                "unconfirmed_tvl": {
                    "type": "integer"
                }
            }
        },
        "v1service.StakerStatsPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "staker_pk_hex": {
                    "type": "string"
                },
                "total_delegations": {
                    "type": "integer"
                },
                "total_tvl": {
                    "type": "integer"
                }
            }
        },
        "v1service.TransactionPublic": {
            "type": "object",
            "properties": {
                "output_index": {
                    "type": "integer"
                },
                "start_height": {
                    "type": "integer"
                },
                "start_timestamp": {
                    "type": "string"
                },
                "timelock": {
                    "type": "integer"
                },
                "tx_hex": {
                    "type": "string"
                }
            }
        },
        "v1service.VersionedGlobalParamsPublic": {
            "type": "object",
            "properties": {
                "activation_height": {
                    "type": "integer"
                },
                "cap_height": {
                    "type": "integer"
                },
                "confirmation_depth": {
                    "type": "integer"
                },
                "covenant_pks": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "covenant_quorum": {
                    "type": "integer"
                },
                "max_staking_amount": {
                    "type": "integer"
                },
                "max_staking_time": {
                    "type": "integer"
                },
                "min_staking_amount": {
                    "type": "integer"
                },
                "min_staking_time": {
                    "type": "integer"
                },
                "staking_cap": {
                    "type": "integer"
                },
                "tag": {
                    "type": "string"
                },
                "unbonding_fee": {
                    "type": "integer"
                },
                "unbonding_time": {
                    "type": "integer"
                },
                "version": {
                    "type": "integer"
                }
            }
        },
        "v2service.CovenantSignature": {
            "type": "object",
            "properties": {
                "covenant_btc_pk_hex": {
                    "type": "string"
                },
                "signature_hex": {
                    "type": "string"
                },
                "stake_expansion_signature_hex": {
                    "type": "string"
                }
            }
        },
        "v2service.DelegationPublic": {
            "type": "object",
            "properties": {
                "delegation_staking": {
                    "$ref": "#/definitions/v2service.DelegationStaking"
                },
                "delegation_unbonding": {
                    "$ref": "#/definitions/v2service.DelegationUnbonding"
                },
                "finality_provider_btc_pks_hex": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "params_version": {
                    "type": "integer"
                },
                "previous_staking_tx_hash_hex": {
                    "type": "string"
                },
                "staker_btc_pk_hex": {
                    "type": "string"
                },
                "state": {
                    "$ref": "#/definitions/v2types.DelegationState"
                },
                "withdrawal_info": {
                    "$ref": "#/definitions/v2service.WithdrawalInfo"
                }
            }
        },
        "v2service.DelegationStaking": {
            "type": "object",
            "properties": {
                "bbn_inception_height": {
                    "type": "integer"
                },
                "bbn_inception_time": {
                    "type": "string"
                },
                "end_height": {
                    "type": "integer"
                },
                "slashing": {
                    "$ref": "#/definitions/v2service.StakingSlashing"
                },
                "staking_amount": {
                    "type": "integer"
                },
                "staking_output_idx": {
                    "type": "integer"
                },
                "staking_timelock": {
                    "type": "integer"
                },
                "staking_tx_hash_hex": {
                    "type": "string"
                },
                "staking_tx_hex": {
                    "type": "string"
                },
                "start_height": {
                    "type": "integer"
                }
            }
        },
        "v2service.DelegationUnbonding": {
            "type": "object",
            "properties": {
                "covenant_unbonding_signatures": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v2service.CovenantSignature"
                    }
                },
                "slashing": {
                    "$ref": "#/definitions/v2service.UnbondingSlashing"
                },
                "unbonding_timelock": {
                    "type": "integer"
                },
                "unbonding_tx": {
                    "type": "string"
                }
            }
        },
        "v2service.FinalityProviderPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "btc_pk": {
                    "type": "string"
                },
                "commission": {
                    "type": "string"
                },
                "description": {
                    "$ref": "#/definitions/types.FinalityProviderDescription"
                },
                "logo_url": {
                    "type": "string"
                },
                "state": {
                    "$ref": "#/definitions/types.FinalityProviderQueryingState"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "v2service.NetworkInfoPublic": {
            "type": "object",
            "properties": {
                "network_upgrade": {
                    "$ref": "#/definitions/v2service.NetworkUpgradePublic"
                },
                "params": {
                    "$ref": "#/definitions/v2service.ParamsPublic"
                }
            }
        },
        "v2service.NetworkUpgradePublic": {
            "type": "object",
            "properties": {
                "pop": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/v2service.POPUpgradePublic"
                    }
                }
            }
        },
        "v2service.OverallStatsPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_finality_providers": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "btc_staking_apr": {
                    "description": "Represents the APR for BTC staking as a decimal (e.g., 0.035 = 3.5%)",
                    "type": "number"
                },
                "max_staking_apr": {
                    "description": "Represents the max staking APR (BTC + Co-staking) as a decimal",
                    "type": "number"
                },
                "total_active_delegations": {
                    "description": "This represents the total active delegations on BTC chain which includes\nboth phase-1 and phase-2 active delegations",
                    "type": "integer"
                },
                "total_active_tvl": {
                    "description": "This represents the total active tvl on BTC chain which includes\nboth phase-1 and phase-2 active tvl",
                    "type": "integer"
                },
                "total_finality_providers": {
                    "type": "integer"
                }
            }
        },
        "v2service.POPUpgradePublic": {
            "type": "object",
            "properties": {
                "height": {
                    "type": "integer"
                },
                "version": {
                    "type": "integer"
                }
            }
        },
        "v2service.ParamsPublic": {
            "type": "object",
            "properties": {
                "bbn": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/indexertypes.BbnStakingParams"
                    }
                },
                "btc": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/indexertypes.BtcCheckpointParams"
                    }
                }
            }
        },
        "v2service.StakerStatsPublic": {
            "type": "object",
            "properties": {
                "active_delegations": {
                    "type": "integer"
                },
                "active_tvl": {
                    "type": "integer"
                },
                "slashed_delegations": {
                    "type": "integer"
                },
                "slashed_tvl": {
                    "type": "integer"
                },
                "unbonding_delegations": {
                    "type": "integer"
                },
                "unbonding_tvl": {
                    "type": "integer"
                },
                "withdrawable_delegations": {
                    "type": "integer"
                },
                "withdrawable_tvl": {
                    "type": "integer"
                }
            }
        },
        "v2service.StakingAPRPublic": {
            "type": "object",
            "properties": {
                "additional_baby_needed_for_boost": {
                    "type": "number"
                },
                "boost": {
                    "$ref": "#/definitions/v2service.apr"
                },
                "current": {
                    "$ref": "#/definitions/v2service.apr"
                }
            }
        },
        "v2service.StakingSlashing": {
            "type": "object",
            "properties": {
                "slashing_tx_hex": {
                    "type": "string"
                },
                "spending_height": {
                    "type": "integer"
                }
            }
        },
        "v2service.UnbondingSlashing": {
            "type": "object",
            "properties": {
                "spending_height": {
                    "type": "integer"
                },
                "unbonding_slashing_tx_hex": {
                    "type": "string"
                }
            }
        },
        "v2service.WithdrawalInfo": {
            "type": "object",
            "properties": {
                "tx_hash": {
                    "type": "string"
                }
            }
        },
        "v2service.apr": {
            "type": "object",
            "properties": {
                "baby_staking_apr": {
                    "type": "number"
                },
                "btc_staking_apr": {
                    "type": "number"
                },
                "co_staking_apr": {
                    "type": "number"
                },
                "total_apr": {
                    "type": "number"
                }
            }
        },
        "v2types.DelegationState": {
            "type": "string",
            "enum": [
                "PENDING",
                "VERIFIED",
                "ACTIVE",
                "TIMELOCK_UNBONDING",
                "EARLY_UNBONDING",
                "TIMELOCK_WITHDRAWABLE",
                "EARLY_UNBONDING_WITHDRAWABLE",
                "TIMELOCK_SLASHING_WITHDRAWABLE",
                "EARLY_UNBONDING_SLASHING_WITHDRAWABLE",
                "TIMELOCK_WITHDRAWN",
                "EARLY_UNBONDING_WITHDRAWN",
                "TIMELOCK_SLASHING_WITHDRAWN",
                "EARLY_UNBONDING_SLASHING_WITHDRAWN",
                "SLASHED",
                "EXPANDED"
            ],
            "x-enum-varnames": [
                "StatePending",
                "StateVerified",
                "StateActive",
                "StateTimelockUnbonding",
                "StateEarlyUnbonding",
                "StateTimelockWithdrawable",
                "StateEarlyUnbondingWithdrawable",
                "StateTimelockSlashingWithdrawable",
                "StateEarlyUnbondingSlashingWithdrawable",
                "StateTimelockWithdrawn",
                "StateEarlyUnbondingWithdrawn",
                "StateTimelockSlashingWithdrawn",
                "StateEarlyUnbondingSlashingWithdrawn",
                "StateSlashed",
                "StateExpanded"
            ]
        }
    },
    "tags": [
        {
            "description": "Shared API endpoints",
            "name": "shared"
        },
        {
            "description": "Babylon Phase-2 API endpoints",
            "name": "v2"
        },
        {
            "description": "Babylon Phase-1 API endpoints (Deprecated)",
            "name": "v1"
        }
    ]
}