github.com/koko1123/flow-go-1@v0.29.6/engine/access/rest/network.go (about)

     1  package rest
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/access"
     5  	"github.com/koko1123/flow-go-1/engine/access/rest/models"
     6  	"github.com/koko1123/flow-go-1/engine/access/rest/request"
     7  )
     8  
     9  // GetNetworkParameters returns network-wide parameters of the blockchain
    10  func GetNetworkParameters(r *request.Request, backend access.API, link models.LinkGenerator) (interface{}, error) {
    11  	params := backend.GetNetworkParameters(r.Context())
    12  
    13  	var response models.NetworkParameters
    14  	response.Build(&params)
    15  	return response, nil
    16  }