acp118

package
v1.11.12-rc.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: BSD-3-Clause Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	p2p.NoOpHandler
	// contains filtered or unexported fields
}

Handler signs warp messages

func NewCachedHandler

func NewCachedHandler(
	cacher cache.Cacher[ids.ID, []byte],
	verifier Verifier,
	signer warp.Signer,
) *Handler

NewCachedHandler returns an instance of Handler that caches successful requests.

func NewHandler

func NewHandler(verifier Verifier, signer warp.Signer) *Handler

NewHandler returns an instance of Handler

func (*Handler) AppRequest

func (h *Handler) AppRequest(
	ctx context.Context,
	_ ids.NodeID,
	_ time.Time,
	requestBytes []byte,
) ([]byte, *common.AppError)

type Verifier

type Verifier interface {
	Verify(
		ctx context.Context,
		message *warp.UnsignedMessage,
		justification []byte,
	) *common.AppError
}

Verifier verifies that a warp message should be signed

Jump to

Keyboard shortcuts

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