pub async fn approve_builder_fee(
private_key: &str,
is_testnet: bool,
) -> Result<BuilderFeeApprovalResult>Expand description
Approves the Nautilus builder fee for a wallet.
This signs an EIP-712 ApproveBuilderFee action and submits it to Hyperliquid.
The approval allows NautilusTrader to include builder fees on orders for this wallet.
§Arguments
private_key- The EVM private key (hex string with or without 0x prefix)is_testnet- Whether to use testnet or mainnet
§Returns
The result of the approval request.
§Errors
Returns an error if the private key is invalid, signing fails, or the HTTP request fails.
§Panics
Panics if the JSON response structure is unexpected.