pub fn generate_signature(
nonce: u64,
secret: &str,
endpoint: &str,
encoded_data: String,
) -> Signature
Expand description
Generates the signature for an arbitrary request when provided with a nonce, API secret key, the endpoint, and the encoded data being sent.
This is HMAC-SHA512(uri + sha256(nonce + post_data)), but the exact details are given by
Kraken's documentation
.
Errors can occur due to formatting, url-encoding (or not) of specific data, and other details,
but this implementation does not specify that encoded_data
is anything but a String.