Documentation ¶
Index ¶
- type CreateCustodialGroupServiceParams
- type CreateCustodialServiceParams
- type DAppServiceParams
- type GlobalParamsPublic
- type Services
- func (s *Services) CreateCustodial(ctx context.Context, params CreateCustodialServiceParams) *types.Error
- func (s *Services) CreateCustodialGroup(ctx context.Context, params CreateCustodialGroupServiceParams) *types.Error
- func (s *Services) CreateDApp(ctx context.Context, params DAppServiceParams) *types.Error
- func (s *Services) DeleteDApp(ctx context.Context, ID string) *types.Error
- func (s *Services) GMPSearch(ctx context.Context, payload *types.GmpPayload) ([]*gmp.GMPDocument, int, *types.Error)
- func (s *Services) GetCustodialByName(ctx context.Context, name string) (*models.Custodial, *types.Error)
- func (s *Services) GetCustodialGroupByName(ctx context.Context, name string) (*models.CustodialGroup, *types.Error)
- func (s *Services) GetCustodialGroups(ctx context.Context) ([]*models.CustodialGroup, *types.Error)
- func (s *Services) GetCustodials(ctx context.Context) ([]*models.Custodial, *types.Error)
- func (s *Services) GetDApp(ctx context.Context) ([]*models.DApp, *types.Error)
- func (s *Services) GetGlobalParamsPublic() *GlobalParamsPublic
- func (s *Services) GetShortenCustodialGroups(ctx context.Context) ([]*models.ShortenCustodialGroup, *types.Error)
- func (s *Services) GetVersionedGlobalParamsByHeight(height uint64) *types.VersionedGlobalParams
- func (s *Services) ToggleDApp(ctx context.Context, ID string) *types.Error
- func (s *Services) UpdateDApp(ctx context.Context, params DAppServiceParams) *types.Error
- func (s *Services) VaultSearch(ctx context.Context, payload *types.VaultPayload) ([]*vault.VaultDocument, *types.Error)
- type VersionedGlobalParamsPublic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAppServiceParams ¶
type GlobalParamsPublic ¶
type GlobalParamsPublic struct {
Versions []VersionedGlobalParamsPublic `json:"versions"`
}
type Services ¶
type Services struct { GmpClient gmp.GmpClient VaultClient vault.VaultClient ScalarClient postgres.ScalarClient // contains filtered or unexported fields }
Service layer contains the business logic and is used to interact with the database and other external clients (if any).
func New ¶
func New( ctx context.Context, cfg *config.Config, globalParams *types.GlobalParams, finalityProviders []types.FinalityProviderDetails, ) (*Services, error)
func (*Services) CreateCustodial ¶
func (*Services) CreateCustodialGroup ¶
func (*Services) CreateDApp ¶
func (*Services) DeleteDApp ¶
func (*Services) GMPSearch ¶
func (s *Services) GMPSearch(ctx context.Context, payload *types.GmpPayload) ([]*gmp.GMPDocument, int, *types.Error)
func (*Services) GetCustodialByName ¶
func (*Services) GetCustodialGroupByName ¶
func (*Services) GetCustodialGroups ¶
func (*Services) GetCustodials ¶
func (*Services) GetGlobalParamsPublic ¶
func (s *Services) GetGlobalParamsPublic() *GlobalParamsPublic
func (*Services) GetShortenCustodialGroups ¶
func (*Services) GetVersionedGlobalParamsByHeight ¶
func (s *Services) GetVersionedGlobalParamsByHeight(height uint64) *types.VersionedGlobalParams
GetVersionedGlobalParamsByHeight returns the versioned global params for a particular bitcoin height
func (*Services) ToggleDApp ¶
func (*Services) UpdateDApp ¶
func (*Services) VaultSearch ¶
func (s *Services) VaultSearch(ctx context.Context, payload *types.VaultPayload) ([]*vault.VaultDocument, *types.Error)
type VersionedGlobalParamsPublic ¶
type VersionedGlobalParamsPublic struct { Version uint64 `json:"version"` ActivationHeight uint64 `json:"activation_height"` StakingCap uint64 `json:"staking_cap"` CapHeight uint64 `json:"cap_height"` Tag string `json:"tag"` CovenantPks []string `json:"covenant_pks"` CovenantQuorum uint64 `json:"covenant_quorum"` UnbondingTime uint64 `json:"unbonding_time"` UnbondingFee uint64 `json:"unbonding_fee"` MaxStakingAmount uint64 `json:"max_staking_amount"` MinStakingAmount uint64 `json:"min_staking_amount"` MaxStakingTime uint64 `json:"max_staking_time"` MinStakingTime uint64 `json:"min_staking_time"` ConfirmationDepth uint64 `json:"confirmation_depth"` }
Click to show internal directories.
Click to hide internal directories.