diff --git a/transports/http_admin.go b/transports/http_admin.go index 9942c64..ecfd0cd 100644 --- a/transports/http_admin.go +++ b/transports/http_admin.go @@ -304,3 +304,15 @@ func (h *TransportHTTP) AdminRecordTransaction(ctx context.Context, hex string) return &transaction, nil } + +// AdminGetSharedConfig gets the shared config +func (h *TransportHTTP) AdminGetSharedConfig(ctx context.Context) (*models.SharedConfig, ResponseError) { + var model *models.SharedConfig + if err := h.doHTTPRequest( + ctx, http.MethodGet, "/admin/shared-config", nil, h.xPriv, true, &model, + ); err != nil { + return nil, err + } + + return model, nil +} diff --git a/transports/interface.go b/transports/interface.go index c3127a2..4add341 100644 --- a/transports/interface.go +++ b/transports/interface.go @@ -72,6 +72,7 @@ type AdminService interface { AdminGetXPubs(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata, queryParams *QueryParams) ([]*models.Xpub, ResponseError) AdminGetXPubsCount(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata) (int64, ResponseError) AdminRecordTransaction(ctx context.Context, hex string) (*models.Transaction, ResponseError) + AdminGetSharedConfig(ctx context.Context) (*models.SharedConfig, ResponseError) } // TransportService the transport service interface