Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggsenderInterface ¶
type AggsenderInterface interface {
Info() types.AggsenderInfo
}
type AggsenderRPC ¶
type AggsenderRPC struct {
// contains filtered or unexported fields
}
AggsenderRPC is the RPC interface for the aggsender
func NewAggsenderRPC ¶
func NewAggsenderRPC( logger *log.Logger, storage AggsenderStorer, aggsender AggsenderInterface, ) *AggsenderRPC
func (*AggsenderRPC) GetCertificateHeaderPerHeight ¶
func (b *AggsenderRPC) GetCertificateHeaderPerHeight(height *uint64) (interface{}, rpc.Error)
GetCertificateHeaderPerHeight returns the certificate header for the given height if param is `nil` it returns the last sent certificate latest:
curl -X POST http://localhost:5576/ -H "Content-Type: application/json" \
-d '{"method":"aggsender_getCertificateHeaderPerHeight", "params":[], "id":1}'
specific height:
curl -X POST http://localhost:5576/ -H "Content-Type: application/json" \ -d '{"method":"aggsender_getCertificateHeaderPerHeight", "params":[$height], "id":1}'
func (*AggsenderRPC) Status ¶
func (b *AggsenderRPC) Status() (interface{}, rpc.Error)
Status returns the status of the aggsender curl -X POST http://localhost:5576/ "Content-Type: application/json" \ -d '{"method":"aggsender_status", "params":[], "id":1}'
type AggsenderStorer ¶
type AggsenderStorer interface {
GetCertificateByHeight(height uint64) (*types.CertificateInfo, error)
GetLastSentCertificate() (*types.CertificateInfo, error)
}
Click to show internal directories.
Click to hide internal directories.