package
0.0.0-20231115015846-c50c23169437
Repository: https://github.com/mysgate/go-fundamental.git
Documentation: pkg.go.dev

# Functions

CopyBytes is used to copy slice.
EcRecover returns the address for the account that was used to create the signature, Note, this function is compatible with eth_sign and personal_sign.
EcRecoverEx is an extension to EcRecover that supports more signature formats, such as ledger signatures.
Has0xPrefix validates str begins with '0x' or '0X'.
HashTypedData is used to calculate the hash of EIP-712 conformant typed data hash = keccak256("\x19${byteVersion}${domainSeparator}${hashStruct(message)}").
HexDecode returns the bytes represented by the hexadecimal string s.
RecoveryAddress returns the address for the account that was used to create the signature, this function is almost a fork of EcRecover However, EcRecover in go-ethereum will automatically perform accounts.TextHash for data in EcRecover, which makes EIP712 unable to reuse this function This design makes the function lose versatility, so this behavior is changed here.
RecoveryAddressEx is an extension to RecoveryAddress that supports more signature formats, such as ledger signatures.
RecoveryTypedDataAddressEx is used to recover the signer address of the TypedData signature.
VerifyEllipticCurveHexSignatureEx is used to verify elliptic curve signatures It calls the EcRecoverEx function to verify the signature.
VerifyEllipticCurveSignature is used to verify the elliptic curve signature It calls the native ecrecover function to verify the signature.
VerifyEllipticCurveSignatureEx is used to verify elliptic curve signatures It calls the EcRecoverEx function to verify the signature.
VerifyTypedDataHexSignatureEx is used to verify the signer address of the TypedData signature.
VerifyTypedDataSignatureEx is used to verify the signer address of the TypedData signature.