Documentation ¶
Index ¶
- type CreateDAppRequestPayload
- type GmpPublicResponse
- type Handler
- func (h *Handler) CreateCustodial(request *http.Request) (*Result, *types.Error)
- func (h *Handler) CreateCustodialGroup(request *http.Request) (*Result, *types.Error)
- func (h *Handler) CreateDApp(request *http.Request) (*Result, *types.Error)
- func (h *Handler) CreateStakingPsbt(request *http.Request) (*Result, *types.Error)
- func (h *Handler) CreateUnstakingPsbt(request *http.Request) (*Result, *types.Error)
- func (h *Handler) DeleteDApp(request *http.Request) (*Result, *types.Error)
- func (h *Handler) EstimateTimeSpent(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPChart(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPCumulativeVolume(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPSearch(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPStats(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPStatsAVGTimes(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPTopITSAssets(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPTopUsers(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPTotalActiveUsers(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPTotalFee(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GMPTotalVolume(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetCovenantParams(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetCustodialByName(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetCustodialGroupByName(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetCustodialGroups(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetCustodials(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetDApp(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetGMPDataMapping(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetScalarGlobalParams(request *http.Request) (*Result, *types.Error)
- func (h *Handler) GetShortenCustodialGroups(request *http.Request) (*Result, *types.Error)
- func (h *Handler) HealthCheck(request *http.Request) (*Result, *types.Error)
- func (h *Handler) SearchVault(request *http.Request) (*Result, *types.Error)
- func (h *Handler) ToggleDApp(request *http.Request) (*Result, *types.Error)
- func (h *Handler) UpdateDApp(request *http.Request) (*Result, *types.Error)
- type IdRequestPayload
- type PublicResponse
- type Result
- type UpdateDAppRequestPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDAppRequestPayload ¶
type CreateDAppRequestPayload struct { ChainName string `json:"chain_name"` BTCAddressHex string `json:"btc_address_hex"` PublicKeyHex string `json:"public_key_hex"` SmartContractAddress string `json:"smart_contract_address"` //UPDATE: New field ChainID string `json:"chain_id"` ChainEndpoint string `json:"chain_endpoint"` RPCUrl string `json:"rpc_url"` AccessToken string `json:"access_token"` TokenContractAddress string `json:"token_contract_address"` CustodialGroupID uint `json:"custodial_group_id"` }
type GmpPublicResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) CreateCustodial ¶
func (*Handler) CreateCustodialGroup ¶
func (*Handler) CreateDApp ¶
CreateDApp godoc @Summary Create dApp @Description Creates a new dApp @Tags dApp @Accept json @Produce json @Success 200 {object} PublicResponse[CreateDAppRequestPayload] "Created dApp" @Router /v1/dApp [post]
func (*Handler) CreateStakingPsbt ¶
func (*Handler) CreateUnstakingPsbt ¶
func (*Handler) DeleteDApp ¶
DeleteDApp godoc @Summary Delete dApp @Description Deletes a dApp @Tags dApp @Produce json @Success 200 {string} string "Delete successfully" @Router /v1/dApp [delete]
func (*Handler) EstimateTimeSpent ¶
func (*Handler) GMPCumulativeVolume ¶
func (*Handler) GMPSearch ¶
GMPSearch godoc @Summary Search GMP transactions @Description Search for GMP transactions with filters @Tags gmp @Accept json @Produce json @Success 200 {object} GmpPublicResponse[[]gmp.GMPDocument] "List of GMP" @Router /v1/gmp/searchGMP [post]
func (*Handler) GMPStatsAVGTimes ¶
func (*Handler) GMPTopITSAssets ¶
func (*Handler) GMPTopUsers ¶
func (*Handler) GMPTotalActiveUsers ¶
func (*Handler) GMPTotalFee ¶
func (*Handler) GMPTotalVolume ¶
func (*Handler) GetCovenantParams ¶
func (*Handler) GetCustodialByName ¶
func (*Handler) GetCustodialGroupByName ¶
func (*Handler) GetCustodialGroups ¶
func (*Handler) GetCustodials ¶
func (*Handler) GetDApp ¶
GetDApp godoc @Summary Get dApps @Description Retrieves all dApps @Tags dApp @Produce json @Success 200 {object} PublicResponse[[]models.DApp] "List of dApps" @Router /v1/dApp [get]
func (*Handler) GetGMPDataMapping ¶
func (*Handler) GetScalarGlobalParams ¶
GetScalarGlobalParams godoc @Summary Get Scalar global parameters @Description Retrieves the global parameters for Scalar, including finality provider details. @Produce json @Success 200 {object} PublicResponse[services.GlobalParamsPublic] "Global parameters" @Router /v1/global-params [get]
func (*Handler) GetShortenCustodialGroups ¶
func (*Handler) HealthCheck ¶
HealthCheck godoc @Summary Health check endpoint @Description Health check the service, including ping database connection @Produce json @Success 200 {string} PublicResponse[string] "Server is up and running" @Router /healthcheck [get]
func (*Handler) SearchVault ¶
SearchVault godoc @Summary Search vaults @Description Searches for vaults based on the provided payload @Tags vault @Accept json @Produce json @Success 200 {object} PublicResponse[[]vault.VaultDocument] "List of vaults" @Router /v1/vault/searchVault [post]
func (*Handler) ToggleDApp ¶
ToggleDApp godoc @Summary Toggle dApp @Description Toggles a dApp @Tags dApp @Produce json @Success 200 {object} PublicResponse[IdRequestPayload] "Toggled dApp" @Router /v1/dApp [patch]
type IdRequestPayload ¶
type IdRequestPayload struct {
ID string `json:"id"`
}
type PublicResponse ¶
type PublicResponse[T any] struct { Data T `json:"data"` Pagination *paginationResponse `json:"pagination,omitempty"` }
type Result ¶
type Result struct { Data interface{} Status int }
func NewGmpResult ¶
func NewResultWithPagination ¶
NewResult returns a successful result, with default status code 200
type UpdateDAppRequestPayload ¶
type UpdateDAppRequestPayload struct { ID string `json:"id"` ChainName string `json:"chain_name"` BTCAddressHex string `json:"btc_address_hex"` PublicKeyHex string `json:"public_key_hex"` SmartContractAddress string `json:"smart_contract_address"` //UPDATE: New field ChainID string `json:"chain_id"` ChainEndpoint string `json:"chain_endpoint"` RPCUrl string `json:"rpc_url"` AccessToken string `json:"access_token"` TokenContractAddress string `json:"token_contract_address"` CustodialGroupID uint `json:"custodial_group_id"` }