Files
lndhub.go/controllers/getbtc.ctrl.go
Michael Bumann 585a8504e5 Add /getbtc endpoint
We do not support on chain transactions but for backwards compatibility we still implement these endpoints.
Here we return an empty array.
This is consumed by: a28a2b96bc/class/wallets/lightning-custodian-wallet.js (L327)
2022-01-19 17:18:50 +01:00

25 lines
564 B
Go

package controllers
import (
"net/http"
"github.com/getAlby/lndhub.go/lib/service"
"github.com/labstack/echo/v4"
)
// GetBtcController : GetBtcController struct
type GetBtcController struct{}
func NewGetBtcController(svc *service.LndhubService) *GetBtcController {
return &GetBtcController{}
}
// GetBtc : Get Btc handler
//
// We do NOT support onchain transactions thus we only return an empty array for backwards compatibility
func (GetBtcController) GetBtc(c echo.Context) error {
addresses := []string{}
return c.JSON(http.StatusOK, &addresses)
}