wallet

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//MagicValueHex bytes4(keccak256("isValidSignature(bytes32,bytes)")
	MagicValueHex = "0x1626ba7e"
)

Variables

View Source
var (
	ErrInvalidWalletAddress       = errors.New("invalid wallet address")      // bad request error code 400
	ErrInvalidSignature           = errors.New("invalid signature")           // bad request error code 400
	ErrPubKeyRecovery             = errors.New("public key recovery failed")  // bad request error code 400
	ErrVerifySigner               = errors.New("failed to verify signer")     // bad request error code 400
	ErrFailedToGetRelayAuthSigner = errors.New("relay auth signer not found") // bad request error code 400
	ErrNilValue                   = errors.New("value is nil")                // bad request error code 400
	ErrFailedToVerifySignature    = errors.New("failed to verify signature")  // bad request error code 400

)

Functions

func GetSafeMessageDigest added in v0.9.0

func GetSafeMessageDigest(
	message common.Hash,
	chainID int64,
	safeAddress common.Address,
) (*common.Hash, error)

func SignSafeTxnData

func SignSafeTxnData(signer keyManager, tx *types.SafeTx) ([]byte, error)

func VerifyPersonalSignSignature

func VerifyPersonalSignSignature(eoa, sigHex, message string) error

func VerifyPersonalSignatureWithEIP1271 added in v0.9.0

func VerifyPersonalSignatureWithEIP1271(
	ctx context.Context,
	caller bind.ContractCaller,
	signer common.Address,
	message string,
	signature []byte,
) error

func VerifySignedSafeTxnData

func VerifySignedSafeTxnData(signer *ecdsa.PublicKey, sig string, tx *types.SafeTx) error

func VerifyTypedDataSignature

func VerifyTypedDataSignature(eoa, sigHex string, request apitypes.TypedData) error

func VerifyTypedDataSignatureWithEIP1271 added in v0.9.0

func VerifyTypedDataSignatureWithEIP1271(
	ctx context.Context,
	caller bind.ContractCaller,
	signer common.Address,
	request apitypes.TypedData,
	signature []byte,
) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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