Documentation ¶
Index ¶
- func NewKeyBundleFromOCR1Key(v1key ocrkey.KeyV2) (evmKeyBundle, error)
- func ToEncryptedJSON(key KeyBundle, password string, scryptParams utils.ScryptParams) (export []byte, err error)
- type EncryptedOCRKeyExport
- type KeyBundle
- type OffchainKeyring
- func (ok *OffchainKeyring) ConfigDiffieHellman(point [curve25519.PointSize]byte) ([curve25519.PointSize]byte, error)
- func (ok *OffchainKeyring) ConfigEncryptionPublicKey() ocrtypes.ConfigEncryptionPublicKey
- func (ok *OffchainKeyring) OffchainPublicKey() ocrtypes.OffchainPublicKey
- func (ok *OffchainKeyring) OffchainSign(msg []byte) (signature []byte, err error)
- type Raw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyBundleFromOCR1Key ¶
NewKeyBundleFromOCR1Key gets the key bundle from an OCR1 key
func ToEncryptedJSON ¶
func ToEncryptedJSON(key KeyBundle, password string, scryptParams utils.ScryptParams) (export []byte, err error)
ToEncryptedJSON returns encrypted JSON representing key
Types ¶
type EncryptedOCRKeyExport ¶
type EncryptedOCRKeyExport struct { KeyType string `json:"keyType"` ChainType chaintype.ChainType `json:"chainType"` ID string `json:"id"` OnchainPublicKey string `json:"onchainPublicKey"` OffChainPublicKey string `json:"offchainPublicKey"` ConfigPublicKey string `json:"configPublicKey"` Crypto keystore.CryptoJSON `json:"crypto"` }
EncryptedOCRKeyExport represents encrypted OCR key export
type KeyBundle ¶
type KeyBundle interface { // OnchainKeyring is used for signing reports (groups of observations, verified onchain) ocrtypes.OnchainKeyring // OffchainKeyring is used for signing observations ocrtypes.OffchainKeyring ID() string ChainType() chaintype.ChainType Marshal() ([]byte, error) Unmarshal(b []byte) (err error) Raw() Raw OnChainPublicKey() string }
nolint
func FromEncryptedJSON ¶
FromEncryptedJSON returns key from encrypted json
func MustNewInsecure ¶
MustNewInsecure returns key bundle based on the chain type or panics
type OffchainKeyring ¶
type OffchainKeyring struct {
// contains filtered or unexported fields
}
OffchainKeyring contains the secret keys needed for the OCR nodes to share secrets and perform aggregation.
This is currently an ed25519 signing key and a separate encryption key.
All its functions should be thread-safe.
func (*OffchainKeyring) ConfigDiffieHellman ¶
func (ok *OffchainKeyring) ConfigDiffieHellman(point [curve25519.PointSize]byte) ([curve25519.PointSize]byte, error)
ConfigDiffieHellman returns the shared point obtained by multiplying someone's public key by a secret scalar ( in this case, the offchain key ring's encryption key.)
func (*OffchainKeyring) ConfigEncryptionPublicKey ¶
func (ok *OffchainKeyring) ConfigEncryptionPublicKey() ocrtypes.ConfigEncryptionPublicKey
ConfigEncryptionPublicKey returns config public key
func (*OffchainKeyring) OffchainPublicKey ¶
func (ok *OffchainKeyring) OffchainPublicKey() ocrtypes.OffchainPublicKey
OffchainPublicKey returns the public component of this offchain keyring.
func (*OffchainKeyring) OffchainSign ¶
func (ok *OffchainKeyring) OffchainSign(msg []byte) (signature []byte, err error)
OffchainSign signs message using private key