Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFunc ¶
type ClientFunc func(cfg *config.ChainConfig) IClient
type CollectorResponse ¶
type CollectorResponse struct {
Message string `json:"message"`
}
CollectorResponse is a struct that represent the response sent by collector on ok
type HashFunc ¶
type HashFunc func(sp *ScreenedPacket) string
type IClient ¶
type IClient interface {
// Name gives the name of the client
Name() string
// FeedPacket fetches the packet from the source chain and sends it to the channel `ch`
FeedPacket(ctx context.Context, ch chan<- *Packet)
// GetMissedPacket queries the db-service for information about the packet the attestor
// node has to reverify and resign
GetMissedPacket(
ctx context.Context, missedPkt *MissedPacket) (
*Packet, error)
SetMetrics(metrics *metrics.PrometheusMetrics)
}
type Message ¶
type MissedPacket ¶
type MissedPacket struct {
TargetChainID *big.Int `json:"destChainId"`
SourceChainID *big.Int `json:"sourceChainId"`
SeqNum uint64 `json:"sequence"`
Height uint64 `json:"height"`
TxnID string `json:"transactionHash"`
}
MissedPacket denotes the information about a packet that db-service administrator has requested for the attestors to re-process
func (*MissedPacket) UnmarshalJSON ¶
func (packet *MissedPacket) UnmarshalJSON(data []byte) error
Custom unmarshal function to convert a JSON string into a *big.Int
type MissedPacketDetails ¶
type MissedPacketDetails struct {
Data []*MissedPacket `json:"data"`
Message string `json:"message"`
}
MissedPacketDetails represents the structure sent by the db-service during polling.
type NetworkAddress ¶
func (NetworkAddress) String ¶
func (n NetworkAddress) String() string
type Packet ¶
type Packet struct {
Version uint8 `json:"version"`
Source NetworkAddress `json:"source"`
Destination NetworkAddress `json:"destination"`
Sequence uint64 `json:"sequence"`
Message Message `json:"message"`
Height uint64 `json:"height"`
// contains filtered or unexported fields
}
Packet denotes the common structure for all the Outgoing and Incoming packets in the bridge
func (*Packet) GetSha256Hash ¶
type ScreenedPacket ¶
ScreenedPacket is a struct to denote if a packet has been flagged by the wallet screening service; IsWhite: true denotes the packet has been white flagged
Click to show internal directories.
Click to hide internal directories.