notary

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package notary attests to updates

Index

Constants

This section is empty.

Variables

View Source
var RefreshInterval = 1 * time.Second

RefreshInterval is how long to wait before refreshing. TODO: This should be done in config.

Functions

func HashAttestation

func HashAttestation(attestation types.Attestation) ([32]byte, error)

HashAttestation hashes an attestation.

Types

type AttestationProducer

type AttestationProducer struct {
	// contains filtered or unexported fields
}

AttestationProducer updates a producer. TODO: this needs to become an interface.

func NewAttestationProducer

func NewAttestationProducer(domain domains.DomainClient, db db.SynapseDB, signer signer.Signer, interval time.Duration) AttestationProducer

NewAttestationProducer creates an attestation producer.

func (AttestationProducer) FindLatestNonce

func (a AttestationProducer) FindLatestNonce(ctx context.Context) (nonce uint32, err error)

FindLatestNonce fetches the latest nonce for a given chain.

func (AttestationProducer) Start

Start starts the update producer.

type AttestationSubmitter

type AttestationSubmitter struct {
	// contains filtered or unexported fields
}

AttestationSubmitter submits updates continuously.

func NewAttestationSubmitter

func NewAttestationSubmitter(domain domains.DomainClient, db db.SynapseDB, signer signer.Signer, interval time.Duration) AttestationSubmitter

NewAttestationSubmitter creates an update producer.

func (AttestationSubmitter) Start

Start runs the update submitter.

type Notary

type Notary struct {
	// contains filtered or unexported fields
}

Notary updates the origin contract.

func NewNotary

func NewNotary(ctx context.Context, cfg config.Config) (_ Notary, err error)

NewNotary creates a new notary.

func (Notary) Start

func (u Notary) Start(ctx context.Context) error

Start starts the notary.{.

Jump to

Keyboard shortcuts

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