Skip to main content

Module crypto

Module crypto 

Source

Functionsยง

derive_eth_address
Derive the Ethereum address (0x-prefixed, lowercase) from a secp256k1 secret key.
format_timestamp_nanos
RFC3339 with nanoseconds and Z suffix.
load_secp256k1_privhex
Load a secp256k1 private key from lowercase hex (optionally 0x-prefixed).
secp256k1_pubkey_uncompressed_hex
Derive the uncompressed public key (0x04 || X || Y) as lowercase hex.
sign_compact_hex
Sign arbitrary message bytes using RFC6979 deterministic ECDSA over SHA-256. Returns the compact 64-byte signature as lowercase hex (r||s).
sign_eip191_recoverable_hex
Sign using Ethereum EIP-191 message prefix and return 65-byte (r||s||v) hex with 0x prefix.
sign_recoverable_keccak_hex
Sign using Ethereum-style Keccak-256 digest and return 65-byte (r||s||v) hex.