df-hyperliquid-core 0.2.3

Hyperliquid SDK for Rust with full API parity: info, exchange, websockets, HIP-3, HIP-4, HyperEVM and CoreWriter. Exact decimals, the fastest order signing and websocket parsing of the SDKs benchmarked, native and wasm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! A live answer cut short of its struct.

use crate::client::evm::precompiles::support::{SHORT, a, live};
use crate::client::evm::precompiles::{bbo, position};

#[test]
fn an_answer_shorter_than_its_struct_is_refused() {
    let (_, _, answer) = live("bbo");
    assert!(bbo(0).decode(&answer[..40]).is_err());
    assert!(position(a(SHORT), 0).decode(&[]).is_err());
}