signature

package
v0.0.0-...-32bdbe6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoginMessage = func(ethAddress string, nonce string) string {
	return fmt.Sprintf(`address:[%s] Nonce:[%s]`, ethAddress, nonce)
}

Functions

func AliYunPolicy

func AliYunPolicy(encodedPolicy, accessKeySecret string) string

使用给定的访问密钥密钥部分(accessKeySecret)对经过编码的策略(encodedPolicy)进行HMAC-SHA1签名,并返回签名结果的base64编码字符串

func GenerateLogin

func GenerateLogin(PrivateECDSA *ecdsa.PrivateKey, ethAddress string, nonce string) (typedDataHex, hashHex, signatureHex string, err error)

func GetPrivateKeyFromMnemonic

func GetPrivateKeyFromMnemonic(mnemonic string) *ecdsa.PrivateKey

func GetPrivateKeyFromPrivateHex

func GetPrivateKeyFromPrivateHex(hex hexutil.Hex) *ecdsa.PrivateKey

func MelonLoginWithEip712

func MelonLoginWithEip712(typedDataStr, hashHex, signatureHex string, f func(ethAddress string) string) (ethAddress string, err error)

func RSV

func RSV(sign hexutil.Hex) (r, s *big.Int, v uint)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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