2022-11-23 04:06:29 -08:00
|
|
|
// Package observations handle the request of observations data from governor endpoint defined in the api.
|
2022-11-17 07:37:29 -08:00
|
|
|
package observations
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
2022-11-23 04:06:29 -08:00
|
|
|
|
|
|
|
"github.com/certusone/wormhole/node/pkg/vaa"
|
2022-11-17 07:37:29 -08:00
|
|
|
)
|
|
|
|
|
2022-11-23 04:06:29 -08:00
|
|
|
// ObservationDoc represent an observation document.
|
2022-11-17 07:37:29 -08:00
|
|
|
type ObservationDoc struct {
|
|
|
|
ID string `bson:"_id" json:"id"`
|
|
|
|
Version uint8 `bson:"version" json:"version"`
|
|
|
|
EmitterChain vaa.ChainID `bson:"emitterChain" json:"emitterChain"`
|
|
|
|
EmitterAddr string `bson:"emitterAddr" json:"emitterAddr"`
|
|
|
|
Sequence uint64 `bson:"sequence" json:"sequence"`
|
|
|
|
Hash []byte `bson:"SetHash" json:"SetHash"`
|
|
|
|
TxHash []byte `bson:"txHash" json:"txHash"`
|
|
|
|
GuardianAddr string `bson:"guardianAddr" json:"guardianAddr"`
|
|
|
|
Signature []byte `bson:"signature" json:"signature"`
|
2022-11-23 04:06:29 -08:00
|
|
|
UpdatedAt *time.Time `bson:"updatedAt" json:"updatedAt"`
|
|
|
|
IndexedAt *time.Time `bson:"indexedAt" json:"indexedAt"`
|
2022-11-17 07:37:29 -08:00
|
|
|
}
|