signature

package
v0.0.0-...-491cd9a Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ZeroHash string = "0x0000000000000000000000000000000000000000000000000000000000000000"

ZeroHash represents a hash code of zeros.

Variables

This section is empty.

Functions

func FromAddress

func FromAddress(value any, v, r, s *big.Int) (string, error)

FromAddress extracts the address for the account that signed the transaction.

func Hash

func Hash(value any) string

Hash returns a unique string for the value.

func Sign

func Sign(value any, privateKey *ecdsa.PrivateKey) (v, r, s *big.Int, err error)

Sign uses the specified private key to sign the transaction.

func String

func String(v, r, s *big.Int) string

String returns the signature as a string. as SignatureString.

func ToSignatureBytes

func ToSignatureBytes(v, r, s *big.Int) []byte

ToSignatureBytes converts the r, s, v values into a slice of bytes with the removal of the sophiaID.

func ToSignatureBytesWithSophiaID

func ToSignatureBytesWithSophiaID(v, r, s *big.Int) []byte

ToSignatureBytesWithSophiaID converts the r, s, v values into a slice of bytes keeping the Sophia id.

func VerifySignature

func VerifySignature(value any, v, r, s *big.Int) error

VerifySignature verifies the signature confirms to our standards and is associated with the data claimed to be signed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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