Skip to main content

build_auth_token_unchecked

Function build_auth_token_unchecked 

Source
pub fn build_auth_token_unchecked(
    deadline_unix_secs: i64,
    account_index: i64,
    api_key_index: u8,
    sk: &PrivateKey,
    k: Scalar,
) -> Result<String, AuthTokenError>
Expand description

Sign the auth-token message without TTL validation.

Public so tests and oracle round-trips can produce tokens whose deadline would otherwise trip the venue cap. Production callers should use build_auth_token or build_auth_token_at.

ยงErrors

Returns AuthTokenError::MessageEncoding if the rendered message contains an 8-byte chunk that does not decode as a canonical Goldilocks element. The auth-token format keeps every byte ASCII, so this case is unreachable for the production callers.