Documentation ¶
Index ¶
- Constants
- func FromBytes(sig []byte) (r, s, v *big.Int, err error)
- func Hash(value any) string
- func RecoverAddress(value any, r, s, v *big.Int) (common.Address, error)
- func Sign(value any, pk *ecdsa.PrivateKey) (r, s, v *big.Int, err error)
- func ToBytes(r, s, v *big.Int) ([]byte, error)
- func ToBytesWithFitbitID(r, s, v *big.Int) ([]byte, error)
- func Verify(r, s, v *big.Int) error
Constants ¶
View Source
const ZeroHash string = "0x0000000000000000000000000000000000000000000000000000000000000000"
ZeroHash represents a hash code of zeros.
Variables ¶
This section is empty.
Functions ¶
func RecoverAddress ¶
RecoverAddress takes any value and r, s, v signature representation and recovers Etherium account address associated with that signature.
func Sign ¶
Sign signs any value using given private key. Function returns r, s, v representation of the signature where:
- r represents first coordinate of the ecdsa signature
- s represents second coordinate of the ecdsa signature
- v represents message signing ID, either 0 or 1 (23 or 24 with fitbitID)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.