{"modulePath":"github.com/goplugin/plugin-libocr","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package offchainreporting2plus\n\n## Functions\n\n```go\nfunc SanityCheckLocalConfig(c types.LocalConfig) (err error)\n```\n\n## Types\n\n```go\ntype Bootstrapper struct {\n\t// contains filtered or unexported fields\n}\n```\nBootstrapper connects to a particular feed and listens for config changes, but does not participate in the protocol. It merely acts as a bootstrap node for peer discovery.\n\n```go\nfunc NewBootstrapper(args BootstrapperArgs) (*Bootstrapper, error)\n```\n\n```go\nfunc (b *Bootstrapper) Close() error\n```\nClose shuts down a Bootstrapper. Can safely be called multiple times.\n\n```go\nfunc (b *Bootstrapper) Start() error\n```\nStart spins up a Bootstrapper.\n\n```go\ntype BootstrapperArgs struct {\n\tBootstrapperFactory    types.BootstrapperFactory\n\tV2Bootstrappers        []commontypes.BootstrapperLocator\n\tContractConfigTracker  types.ContractConfigTracker\n\tDatabase               types.ConfigDatabase\n\tLocalConfig            types.LocalConfig\n\tLogger                 commontypes.Logger\n\tMonitoringEndpoint     commontypes.MonitoringEndpoint\n\tOffchainConfigDigester types.OffchainConfigDigester\n}\n```\n\n```go\ntype MercuryOracleArgs struct {\n\t// A factory for producing network endpoints. A network endpoints consists of\n\t// networking methods a consumer must implement to allow a node to\n\t// communicate with other participating nodes.\n\tBinaryNetworkEndpointFactory types.BinaryNetworkEndpointFactory\n\n\t// V2Bootstrappers is the list of bootstrap node addresses and IDs for the v2 stack.\n\tV2Bootstrappers []commontypes.BootstrapperLocator\n\n\t// Tracks configuration changes.\n\tContractConfigTracker types.ContractConfigTracker\n\n\t// Interfaces with the OCR2Aggregator smart contract's transmission related logic.\n\tContractTransmitter types.ContractTransmitter\n\n\t// Database provides persistent storage.\n\tDatabase ocr3types.Database\n\n\t// LocalConfig contains oracle-specific configuration details which are not\n\t// mandated by the on-chain configuration specification via OffchainAggregatoo.SetConfig.\n\tLocalConfig types.LocalConfig\n\n\t// Logger logs stuff.\n\tLogger commontypes.Logger\n\n\t// Enables adding metrics to track. This may be nil.\n\tMetricsRegisterer prometheus.Registerer\n\n\t// Used to send logs to a monitor.\n\tMonitoringEndpoint commontypes.MonitoringEndpoint\n\n\t// Computes a config digest using purely offchain logic.\n\tOffchainConfigDigester types.OffchainConfigDigester\n\n\t// OffchainKeyring contains the secret keys needed for the OCR protocol, and methods\n\t// which use those keys without exposing them to the rest of the application.\n\tOffchainKeyring types.OffchainKeyring\n\n\t// OnchainKeyring is used to sign reports that can be validated\n\t// offchain and by the target contract.\n\tOnchainKeyring types.OnchainKeyring\n\n\t// ReportingPluginFactory creates ReportingPlugins that determine the\n\t// \"application logic\" used in an OCR protocol instance.\n\tMercuryPluginFactory ocr3types.MercuryPluginFactory\n}\n```\nMercuryOracleArgs is used for OCR3 protocol instances that only use the Mercury-specific subset of OCR3 features.\n\n```go\ntype OCR2OracleArgs struct {\n\t// A factory for producing network endpoints. A network endpoints consists of\n\t// networking methods a consumer must implement to allow a node to\n\t// communicate with other participating nodes.\n\tBinaryNetworkEndpointFactory types.BinaryNetworkEndpointFactory\n\n\t// V2Bootstrappers is the list of bootstrap node addresses and IDs for the v2 stack.\n\tV2Bootstrappers []commontypes.BootstrapperLocator\n\n\t// Tracks configuration changes.\n\tContractConfigTracker types.ContractConfigTracker\n\n\t// Interfaces with the OCR2Aggregator smart contract's transmission related logic.\n\tContractTransmitter types.ContractTransmitter\n\n\t// Database provides persistent storage.\n\tDatabase types.Database\n\n\t// LocalConfig contains oracle-specific configuration details which are not\n\t// mandated by the on-chain configuration specification via OffchainAggregatoo.SetConfig.\n\tLocalConfig types.LocalConfig\n\n\t// Logger logs stuff.\n\tLogger commontypes.Logger\n\n\t// Used to send logs to a monitor.\n\tMonitoringEndpoint commontypes.MonitoringEndpoint\n\n\t// Enables adding metrics to track. This may be nil.\n\tMetricsRegisterer prometheus.Registerer\n\n\t// Computes a config digest using purely offchain logic.\n\tOffchainConfigDigester types.OffchainConfigDigester\n\n\t// OffchainKeyring contains the secret keys needed for the OCR protocol, and methods\n\t// which use those keys without exposing them to the rest of the application.\n\tOffchainKeyring types.OffchainKeyring\n\n\t// OnchainKeyring is used to sign reports that can be validated\n\t// offchain and by the target contract.\n\tOnchainKeyring types.OnchainKeyring\n\n\t// ReportingPluginFactory creates ReportingPlugins that determine the\n\t// \"application logic\" used in a OCR2 protocol instance.\n\tReportingPluginFactory types.ReportingPluginFactory\n}\n```\nOCR2OracleArgs contains the configuration and services a caller must provide, in order to run the offchainreporting protocol.\n\n```go\ntype OCR3OracleArgs[RI any] struct {\n\t// A factory for producing network endpoints. A network endpoints consists of\n\t// networking methods a consumer must implement to allow a node to\n\t// communicate with other participating nodes.\n\tBinaryNetworkEndpointFactory types.BinaryNetworkEndpointFactory\n\n\t// V2Bootstrappers is the list of bootstrap node addresses and IDs for the v2 stack.\n\tV2Bootstrappers []commontypes.BootstrapperLocator\n\n\t// Tracks configuration changes.\n\tContractConfigTracker types.ContractConfigTracker\n\n\t// Transmit reports to the targeted system (e.g. a blockchain)\n\tContractTransmitter ocr3types.ContractTransmitter[RI]\n\n\t// Database provides persistent storage.\n\tDatabase ocr3types.Database\n\n\t// LocalConfig contains oracle-specific configuration details which are not\n\t// mandated by the on-chain configuration specification via OffchainAggregatoo.SetConfig.\n\tLocalConfig types.LocalConfig\n\n\t// Logger logs stuff.\n\tLogger commontypes.Logger\n\n\t// Enables adding metrics to track. This may be nil.\n\tMetricsRegisterer prometheus.Registerer\n\n\t// Used to send logs to a monitor.\n\tMonitoringEndpoint commontypes.MonitoringEndpoint\n\n\t// Computes a config digest using purely offchain logic.\n\tOffchainConfigDigester types.OffchainConfigDigester\n\n\t// OffchainKeyring contains the secret keys needed for the OCR protocol, and methods\n\t// which use those keys without exposing them to the rest of the application.\n\tOffchainKeyring types.OffchainKeyring\n\n\t// OnchainKeyring is used to sign reports that can be validated\n\t// offchain and by the target contract.\n\tOnchainKeyring ocr3types.OnchainKeyring[RI]\n\n\t// PluginFactory creates Plugins that determine the \"application logic\" used\n\t// in a protocol instance.\n\tReportingPluginFactory ocr3types.ReportingPluginFactory[RI]\n}\n```\n\n```go\ntype Oracle interface {\n\tStart() error\n\tClose() error\n}\n```\n\n```go\nfunc NewOracle(args OracleArgs) (Oracle, error)\n```\nNewOracle returns a newly initialized Oracle using the provided services and configuration.\n\n```go\ntype OracleArgs interface {\n\t// contains filtered or unexported methods\n}\n```\n\n","path":"github.com/goplugin/plugin-libocr/offchainreporting2plus","name":"offchainreporting2plus","synopsis":"","isRedistributable":true}
