aggsenderrpc

package
v0.2.0-beta7-bridge-tmp Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0, MIT Imports: 4 Imported by: 0

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL