Documentation ¶
Index ¶
Constants ¶
const RpcTimeout = time.Second * 5
RpcTimeout is the context timeout on RPC calls.
Variables ¶
var SpyCmd = &cobra.Command{
Use: "spy",
Short: "Run gossip spy client",
Run: runSpy,
}
SpyCmd represents the node command
Functions ¶
Types ¶
type VaaVerifier ¶
type VaaVerifier struct {
// contains filtered or unexported fields
}
VaaVerifier is an object that can be used to validate VAA signatures. It reads the guardian set on chain whenever a new guardian set index is detected.
func NewVaaVerifier ¶
func NewVaaVerifier(logger *zap.Logger, rpcUrl string, coreAddr string) *VaaVerifier
NewVaaVerifier creates a VaaVerifier.
func (*VaaVerifier) GetInitialGuardianSet ¶
func (v *VaaVerifier) GetInitialGuardianSet() error
GetInitialGuardianSet gets the current guardian set and adds it to the map. It is not necessary to call this function, but doing so will allow you to verify that the RPC endpoint works on start up, rather than having it fail the first VAA is received.
func (*VaaVerifier) VerifySignatures ¶
func (v *VaaVerifier) VerifySignatures(vv *vaa.VAA) (bool, error)
VerifySignatures verifies that the signature on a VAA is valid, based on the guardian set contained in the VAA. If the guardian set is not currently in our map, it queries that guardian set and adds it.