hl_ranger (Hyperliquid Rust SDK Fork)
This is a fork of the official hyperliquid-rust-sdk with added support for unsigned transaction generation.
SDK for Hyperliquid API trading with Rust, enhanced with the ability to generate unsigned transactions for external signing.
Key Features
- All original hyperliquid-rust-sdk functionality - Complete compatibility with the upstream SDK
- Unsigned Transaction Support - Generate transaction components without requiring a private key
- External Signing - Perfect for hardware wallets, multi-sig setups, or air-gapped signing
- Zero Merge Conflicts - Isolated implementation that won't conflict with upstream updates
New: Unsigned Transaction Generation
This fork introduces the UnsignedTransactionBuilder which allows you to:
- Generate all necessary transaction components (action payload, nonce, digest to sign)
- Sign the digest externally with your preferred method
- Construct and submit the final signed transaction
Example Usage
use Result;
use ;
async
Supported Unsigned Operations
prepare_unsigned_order- Place ordersprepare_unsigned_cancel- Cancel ordersprepare_unsigned_usdc_transfer- Transfer USDCprepare_unsigned_withdraw- Withdraw fundsprepare_unsigned_update_leverage- Update leverageprepare_unsigned_spot_transfer- Spot transfersprepare_unsigned_vault_transfer- Vault transfers
Usage Examples
See src/bin for examples. You can run any example with cargo run --bin [EXAMPLE].
For unsigned transaction examples, see:
cargo run --bin unsigned_transaction_example
Installation
cargo add hl_ranger
Original SDK Documentation
This fork maintains full compatibility with the original hyperliquid-rust-sdk. All original functionality remains unchanged.
License
This project is licensed under the terms of the MIT license. See LICENSE for more details.