github.com/status-im/status-go@v1.1.0/services/wakuext/api.go (about)

     1  package wakuext
     2  
     3  import (
     4  	"github.com/ethereum/go-ethereum/log"
     5  	"github.com/status-im/status-go/eth-node/types"
     6  	"github.com/status-im/status-go/services/ext"
     7  )
     8  
     9  // PublicAPI extends waku public API.
    10  type PublicAPI struct {
    11  	*ext.PublicAPI
    12  	service   *Service
    13  	publicAPI types.PublicWakuAPI
    14  	log       log.Logger
    15  }
    16  
    17  // NewPublicAPI returns instance of the public API.
    18  func NewPublicAPI(s *Service) *PublicAPI {
    19  	return &PublicAPI{
    20  		PublicAPI: ext.NewPublicAPI(s.Service, s.w),
    21  		service:   s,
    22  		publicAPI: s.w.PublicWakuAPI(),
    23  		log:       log.New("package", "status-go/services/wakuext.PublicAPI"),
    24  	}
    25  }