Rust SDK
Thelegend-client crate is a typed HTTP client for the Legend API. It’s the same SDK that powers the legend-cli binary.
Installation
Client Setup
Accounts
Plans
earn, withdraw, swap, transfer, borrow, repay, claim_rewards, loop_long, unloop_long, add_backing, withdraw_backing, migrate, swap_and_supply, reinvest_rewards.
Portfolio and Activities
Reference Data
Error Handling
Signing with legend-signer
The companion legend-signer crate handles P256 key management and Turnkey signing:
KeychainSigner for Keychain-stored keys: