Documentation
¶
Index ¶
- func ReportToSigData(reportCtx types.ReportContext, report types.Report) (*big.Int, error)
- func ToEncryptedJSON(key Key, password string, scryptParams commonkeystore.ScryptParams) (export []byte, err error)
- type Key
- type OCR2Key
- func (sk *OCR2Key) Marshal() ([]byte, error)
- func (sk *OCR2Key) MaxSignatureLength() int
- func (sk *OCR2Key) PublicKey() types.OnchainPublicKey
- func (sk *OCR2Key) Sign(reportCtx types.ReportContext, report types.Report) ([]byte, error)
- func (sk *OCR2Key) Sign3(digest types.ConfigDigest, seqNr uint64, r types.Report) (signature []byte, err error)
- func (sk *OCR2Key) SignBlob(b []byte) ([]byte, error)
- func (sk *OCR2Key) Unmarshal(in []byte) error
- func (sk *OCR2Key) Verify(publicKey types.OnchainPublicKey, reportCtx types.ReportContext, ...) bool
- func (sk *OCR2Key) Verify3(publicKey types.OnchainPublicKey, cd types.ConfigDigest, seqNr uint64, ...) bool
- func (sk *OCR2Key) VerifyBlob(pubkey types.OnchainPublicKey, b, sig []byte) bool
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportToSigData ¶
func ToEncryptedJSON ¶
func ToEncryptedJSON(key Key, password string, scryptParams commonkeystore.ScryptParams) (export []byte, err error)
ToEncryptedJSON returns encrypted JSON representing key
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key represents Starknet key
func FromEncryptedJSON ¶
FromEncryptedJSON gets key from json and password
func GenerateKey ¶
reimplements parts of https://github.com/NethermindEth/starknet.go/blob/0bdaab716ce24a521304744a8fbd8e01800c241d/curve/curve.go#L702 generate the PK as a pseudo-random number in the interval [1, CurveOrder - 1] using io.Reader, and Key struct
func MustNewInsecure ¶
MustNewInsecure return Key if no error
func (Key) StarkKeyStr ¶
StarkKeyStr is the starknet public key associated to the private key it is the X component of the ECDSA pubkey and used in the deployment of the account contract this func is used in exporting it via CLI and API
type OCR2Key ¶
type OCR2Key struct {
Key
}
func (*OCR2Key) MaxSignatureLength ¶
func (*OCR2Key) PublicKey ¶
func (sk *OCR2Key) PublicKey() types.OnchainPublicKey
func (*OCR2Key) Verify ¶
func (sk *OCR2Key) Verify(publicKey types.OnchainPublicKey, reportCtx types.ReportContext, report types.Report, signature []byte) bool
func (*OCR2Key) Verify3 ¶
func (sk *OCR2Key) Verify3(publicKey types.OnchainPublicKey, cd types.ConfigDigest, seqNr uint64, r types.Report, signature []byte) bool
func (*OCR2Key) VerifyBlob ¶
func (sk *OCR2Key) VerifyBlob(pubkey types.OnchainPublicKey, b, sig []byte) bool
Click to show internal directories.
Click to hide internal directories.