warp

package
v0.5.0-fuji-1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: GPL-3.0, LGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WarpAPI

type WarpAPI struct {
	Backend WarpBackend
}

WarpAPI introduces snowman specific functionality to the evm

func (*WarpAPI) GetSignature

func (api *WarpAPI) GetSignature(ctx context.Context, messageID ids.ID) (hexutil.Bytes, error)

GetSignature returns the BLS signature associated with a messageID.

type WarpBackend

type WarpBackend interface {
	// AddMessage signs [unsignedMessage] and adds it to the warp backend database
	AddMessage(unsignedMessage *avalancheWarp.UnsignedMessage) error

	// GetSignature returns the signature of the requested message hash.
	GetSignature(messageHash ids.ID) ([bls.SignatureLen]byte, error)
}

WarpBackend tracks signature eligible warp messages and provides an interface to fetch them. The backend is also used to query for warp message signatures by the signature request handler.

func NewWarpBackend

func NewWarpBackend(snowCtx *snow.Context, db database.Database, signatureCacheSize int) WarpBackend

NewWarpBackend creates a new WarpBackend, and initializes the signature cache and message tracking database.

type WarpClient

type WarpClient interface {
	GetSignature(ctx context.Context, messageID ids.ID) ([]byte, error)
}

func NewWarpClient

func NewWarpClient(uri, chain string) (WarpClient, error)

NewWarpClient returns a WarpClient for interacting with EVM [chain]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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