ocr

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMnemonicRequired is returned when the OCR mnemonic is not set
	ErrMnemonicRequired = errors.New("xsigners or xproposers required")
)

Functions

func NewBIP39Mnemonic

func NewBIP39Mnemonic(entropySize int) (string, error)

NewBIP39Mnemonic generates a new BIP39 mnemonic phrase with the specified entropy size.

Types

type OCRSecrets added in v0.42.0

type OCRSecrets struct {
	SharedSecret [16]byte
	EphemeralSk  [32]byte
}

OCRSecrets are used to disseminate a shared secret to OCR nodes through the blockchain where OCR configuration is stored. Its a low value secret used to derive transmission order etc. They are extracted here such that they can common across signers when multiple signers are signing the same OCR config.

func GenerateSharedSecrets added in v0.42.0

func GenerateSharedSecrets(xSigners, xProposers string) (OCRSecrets, error)

SharedSecrets generates shared secrets from the BIP39 mnemonic phrases for the OCR signers and proposers.

Lifted from here https://github.com/smartcontractkit/offchain-reporting/blob/14a57d70e50474a2104aa413214e464d6bc69e16/lib/offchainreporting/internal/config/shared_secret_test.go#L32 Historically signers (fixed secret) and proposers (ephemeral secret) were combined in this manner. We simply leave that as is.

func XXXGenerateTestOCRSecrets added in v0.42.0

func XXXGenerateTestOCRSecrets() OCRSecrets

func (OCRSecrets) IsEmpty added in v0.42.0

func (s OCRSecrets) IsEmpty() bool

Jump to

Keyboard shortcuts

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