Documentation
¶
Overview ¶
Package warp provides warp message signing and aggregation utilities.
Index ¶
Constants ¶
View Source
const ( SignatureAggregatorRequestTimeout = 30 * time.Second DefaultQuorumPercentage = 67 MaxRetries = 3 InitialBackoff = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func SignMessage ¶
func SignMessage(logger luxlog.Logger, signatureAggregatorEndpoint string, message, justification, signingChainID string, quorumPercentage uint64) (*warp.Message, error)
SignMessage sends a request to the signature aggregator to sign a message. It returns the signed warp message or an error if the operation fails.
Types ¶
type AggregateSignatureRequest ¶
type AggregateSignatureRequest struct {
Message string
SigningChainID string
QuorumPercentage uint64
Justification string
}
AggregateSignatureRequest defines the request structure for signature aggregation
type AggregateSignatureResponse ¶
type AggregateSignatureResponse struct {
SignedMessage string
}
AggregateSignatureResponse defines the response structure for signature aggregation
type Client
deprecated
added in
v1.16.45
type Client interface {
// PublishBlockchain requests the node to begin publishing consensus and decision events
PublishBlockchain(ctx context.Context, chainID string, options ...rpc.Option) (*apiwarp.PublishBlockchainReply, error)
// UnpublishBlockchain requests the node to stop publishing consensus and decision events
UnpublishBlockchain(ctx context.Context, chainID string, options ...rpc.Option) error
// GetPublishedBlockchains requests the node to get blockchains being published
GetPublishedBlockchains(ctx context.Context, options ...rpc.Option) ([]ids.ID, error)
}
Client interface for interacting with the IPCS endpoint
Deprecated: The IPCs API is deprecated. The Index API should be used instead.
Click to show internal directories.
Click to hide internal directories.