Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWrongSourceChainID = errors.New("wrong SourceChainID") ErrWrongNetworkID = errors.New("wrong networkID") )
Functions ¶
This section is empty.
Types ¶
type BasicSigner ¶
type BasicSigner struct {
// contains filtered or unexported fields
}
BasicSigner implements Signer for basic warp message signing
type Message ¶
type Message interface {
// SourceChainID returns the ID of the chain that sent this message
SourceChainID() ids.ID
// ID returns the unique ID of this message
ID() ids.ID
// Bytes returns the binary representation of this message
Bytes() []byte
// Signature returns the signature interface
Signature() interface{ NumSigners() (int, error) }
}
Message represents a parsed warp message. This is a minimal interface to avoid import cycles.
type Signer ¶
type Signer interface {
// Sign returns this node's BLS signature over an unsigned message. If the caller
// does not have the authority to sign the message, an error will be returned.
//
// The message must contain the correct NetworkID and SourceChainID.
Sign(networkID uint32, sourceChainID ids.ID, payloadBytes []byte) ([]byte, error)
}
Signer defines the interface for signing warp messages. This interface is placed in utils/warp to avoid import cycles.
Click to show internal directories.
Click to hide internal directories.