Documentation ¶
Index ¶
- Constants
- type CosmosMedianReporter
- func (c *CosmosMedianReporter) LatestRoundRequested(ctx context.Context, lookback time.Duration) (configDigest types.ConfigDigest, epoch uint32, round uint8, err error)
- func (c *CosmosMedianReporter) LatestTransmissionDetails(ctx context.Context) (configDigest types.ConfigDigest, epoch uint32, round uint8, ...)
- type CosmosModuleConfigTracker
- func (c *CosmosModuleConfigTracker) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error)
- func (c *CosmosModuleConfigTracker) LatestConfig(ctx context.Context, changedInBlock uint64) (types.ContractConfig, error)
- func (c *CosmosModuleConfigTracker) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest types.ConfigDigest, err error)
- func (c *CosmosModuleConfigTracker) Notify() <-chan struct{}
- type CosmosModuleTransmitter
- func (c *CosmosModuleTransmitter) FromAccount() types.Account
- func (c *CosmosModuleTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) (configDigest types.ConfigDigest, epoch uint32, err error)
- func (c *CosmosModuleTransmitter) Transmit(ctx context.Context, reportCtx types.ReportContext, report types.Report, ...) error
- type CosmosOffchainConfigDigester
- type InjectiveModuleOnchainKeyring
- func (c *InjectiveModuleOnchainKeyring) MaxSignatureLength() int
- func (c *InjectiveModuleOnchainKeyring) PublicKey() types.OnchainPublicKey
- func (c *InjectiveModuleOnchainKeyring) Sign(reportCtx types.ReportContext, report types.Report) (signature []byte, err error)
- func (c *InjectiveModuleOnchainKeyring) Verify(acc types.OnchainPublicKey, reportCtx types.ReportContext, report types.Report, ...) bool
Constants ¶
const ConfigDigestPrefixCosmos types.ConfigDigestPrefix = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CosmosMedianReporter ¶
type CosmosMedianReporter struct { FeedId string QueryClient chaintypes.QueryClient }
func (*CosmosMedianReporter) LatestRoundRequested ¶
func (c *CosmosMedianReporter) LatestRoundRequested( ctx context.Context, lookback time.Duration, ) ( configDigest types.ConfigDigest, epoch uint32, round uint8, err error, )
func (*CosmosMedianReporter) LatestTransmissionDetails ¶
type CosmosModuleConfigTracker ¶
type CosmosModuleConfigTracker struct { FeedId string QueryClient chaintypes.QueryClient TendermintClient tmclient.TendermintClient }
func (*CosmosModuleConfigTracker) LatestBlockHeight ¶
func (c *CosmosModuleConfigTracker) LatestBlockHeight( ctx context.Context, ) ( blockHeight uint64, err error, )
LatestBlockHeight returns the height of the most recent block in the chain.
func (*CosmosModuleConfigTracker) LatestConfig ¶
func (c *CosmosModuleConfigTracker) LatestConfig( ctx context.Context, changedInBlock uint64, ) (types.ContractConfig, error)
LatestConfig returns the latest configuration.
func (*CosmosModuleConfigTracker) LatestConfigDetails ¶
func (c *CosmosModuleConfigTracker) LatestConfigDetails( ctx context.Context, ) ( changedInBlock uint64, configDigest types.ConfigDigest, err error, )
LatestConfigDetails returns information about the latest configuration, but not the configuration itself.
func (*CosmosModuleConfigTracker) Notify ¶
func (c *CosmosModuleConfigTracker) Notify() <-chan struct{}
Notify may optionally emit notification events when the contract's configuration changes. This is purely used as an optimization reducing the delay between a configuration change and its enactment. Implementors who don't care about this may simply return a nil channel.
The returned channel should never be closed.
type CosmosModuleTransmitter ¶
type CosmosModuleTransmitter struct { FeedId string QueryClient chaintypes.QueryClient CosmosClient chainclient.CosmosClient ReportCodec median_report.ReportCodec }
func (*CosmosModuleTransmitter) FromAccount ¶
func (c *CosmosModuleTransmitter) FromAccount() types.Account
func (*CosmosModuleTransmitter) LatestConfigDigestAndEpoch ¶
func (c *CosmosModuleTransmitter) LatestConfigDigestAndEpoch( ctx context.Context, ) ( configDigest types.ConfigDigest, epoch uint32, err error, )
func (*CosmosModuleTransmitter) Transmit ¶
func (c *CosmosModuleTransmitter) Transmit( ctx context.Context, reportCtx types.ReportContext, report types.Report, signatures []types.AttributedOnchainSignature, ) error
Transmit sends the report to the on-chain OCR2Aggregator smart contract's Transmit method
type CosmosOffchainConfigDigester ¶
func (CosmosOffchainConfigDigester) ConfigDigest ¶
func (d CosmosOffchainConfigDigester) ConfigDigest(cc types.ContractConfig) (types.ConfigDigest, error)
func (CosmosOffchainConfigDigester) ConfigDigestPrefix ¶
func (d CosmosOffchainConfigDigester) ConfigDigestPrefix() types.ConfigDigestPrefix
type InjectiveModuleOnchainKeyring ¶
type InjectiveModuleOnchainKeyring struct { Signer sdk.AccAddress Keyring keyring.Keyring }
func (*InjectiveModuleOnchainKeyring) MaxSignatureLength ¶
func (c *InjectiveModuleOnchainKeyring) MaxSignatureLength() int
Maximum length of a signature
func (*InjectiveModuleOnchainKeyring) PublicKey ¶
func (c *InjectiveModuleOnchainKeyring) PublicKey() types.OnchainPublicKey
PublicKey returns the acc address of the keypair used by Sign.
func (*InjectiveModuleOnchainKeyring) Sign ¶
func (c *InjectiveModuleOnchainKeyring) Sign( reportCtx types.ReportContext, report types.Report, ) (signature []byte, err error)
Sign returns a signature over ReportContext and Report.
func (*InjectiveModuleOnchainKeyring) Verify ¶
func (c *InjectiveModuleOnchainKeyring) Verify( acc types.OnchainPublicKey, reportCtx types.ReportContext, report types.Report, signature []byte, ) bool
Verify verifies a signature over ReportContext and Report allegedly created from OnchainPublicKey (acc address).