Documentation
¶
Overview ¶
Package stark implements utilities for generating signers.L2Signer
Index ¶
Constants ¶
View Source
const (
SeedStarkMessage = "Only sign this request if you’ve initiated an action with Immutable X."
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StarkSigner ¶
type StarkSigner struct {
// contains filtered or unexported fields
}
StarkSigner implements L2Signer interface.
func GenerateStarkSigner ¶
func GenerateStarkSigner(signer signers.L1Signer) (*StarkSigner, error)
GenerateStarkSigner factory method to create StarkSigner.
func NewStarkSigner ¶
func NewStarkSigner(privateKey, publicKey *big.Int, curve *caigo.StarkCurve) *StarkSigner
func (*StarkSigner) GetAddress ¶
func (base *StarkSigner) GetAddress() string
GetAddress returns the stark public key of the StarkSigner as a 64 digit hex string prefixed with 0x.
func (*StarkSigner) SignMessage ¶
func (base *StarkSigner) SignMessage(message string) (string, error)
func (*StarkSigner) VerifySignature ¶
func (base *StarkSigner) VerifySignature(hash *big.Int, signature, requiredSigner string) error
VerifySignature validates the given signature is signed by the requiredSigner or not.
Click to show internal directories.
Click to hide internal directories.