The message is hashed with double SHA-256 before signing (Bitcoin standard).
Security Note: The private key must be kept secret. ECDSA requires
cryptographically secure random nonces internally; this is handled by
the underlying library using RFC 6979 deterministic nonces.
Parameters
privateKey: Uint8Array
32-byte secp256k1 private key
message: Uint8Array
Message to sign (any length, will be double-SHA256 hashed)
Sign a message using ECDSA with secp256k1.
The message is hashed with double SHA-256 before signing (Bitcoin standard).
Security Note: The private key must be kept secret. ECDSA requires cryptographically secure random nonces internally; this is handled by the underlying library using RFC 6979 deterministic nonces.