Overview
Privy’s signers enable you to add additional signers to wallets, allowing you to. Combined with policies, you can define granular controls over which Hyperliquid actions are allowed or denied.High-Level Steps
- Create policies - Define which Hyperliquid actions are allowed or denied for your authorization keys
- Create authorization keys - Generate signers that will be used to sign transactions on behalf of wallets
- Update wallet - Attach the authorization key as a signer with your policies applied
How It Works
Policies enforce security controls on wallet operations by evaluating each transaction against a set of conditions. When a transaction is attempted with an authorization key:- The transaction is analyzed against all policies attached to that signer
- If any DENY policy matches, the transaction is rejected
- If an ALLOW policy matches and no DENY policies match, the transaction proceeds
- Operations that don’t match any policies follow the default behavior
User Signed Actions vs L1 Actions
Hyperliquid operations are divided into two categories:User Signed Actions
These are sensitive operations that require the master account’s signature. Policies can be applied to control any User Signed Action, including:- Withdrawals - Transferring funds out of Hyperliquid to external addresses
- Approving Agents - Registering or managing agent wallets
- Account Transfers - Moving funds between master account and subaccounts using
sendAsset - Approving Builder Fees - Authorizing builder code fee arrangements
L1 Actions
Other operations are L1 Actions that can be performed by any registered agent wallet without requiring master account approval. These include:- Placing orders
- Canceling orders
- Modifying orders
- Setting leverage
- Other trading operations
Prerequisites
Before implementing policies for Hyperliquid operations, you’ll need to set up signers and create policies:Signers
Learn how to create additional signers for your wallets
Policies
Learn how to define and create policies for wallet operations
Creating Policies
Policies determine which Hyperliquid operations are allowed or denied. Here are common policy examples for controlling User Signed Actions:DENY Withdrawal Attempts
Only the master account for a Hyperliquid account can initiate withdrawal attempts. You can setup policies to DENY the additional signer on the master account from being able to withdraw funds without user consent. This is critical for protecting user funds - even if an authorization key is compromised, withdrawals cannot be executed without explicit user approval.DENY Account Transfers
The master account can transfer funds between subaccounts using thesendAsset action. You can setup policies to DENY the additional signer on the master account from transferring funds between subaccounts without user authorization.
This ensures that subaccount balances remain isolated and protected - an important security measure when managing multiple trading strategies or client accounts.
ALLOW Approve Agent
Permit the master account to register new agent wallets. This allows the additional signer to approve agent registrations on behalf of the user. By explicitly allowing agent approval, you can enable operational flexibility while still denying other sensitive operations like withdrawals and account transfers.Creating Authorization Keys
Authorization keys are signers that allow you to execute actions on wallets within the constraints defined by your policies. These keys can be controlled by your server, stored securely, and used to sign transactions on behalf of wallets. To create an authorization key, you can use either the Privy Dashboard or the REST API. The process generates a keypair where:- The private key is generated on your device and only known to you (Privy never sees it)
- The public key is registered with Privy’s secure enclave to verify signatures
Save your authorization private key securely - Privy does not store it and cannot help you recover
it later. You’ll need this key to sign transactions with your policies applied.
Applying Policies to Wallets
Once you’ve created policies, you can apply them to wallets by adding additional signers with policy overrides:The authorization private key (
wallet-auth:...) allows the additional signer to sign
transactions. Any operations attempted will be evaluated against the policies you’ve defined. If a
policy denies an action (like withdrawal), the transaction will fail before execution.Best Practices
Use separate keys for different functions
Use separate keys for different functions
Create dedicated authorization keys for trading operations vs. administrative functions.
Start with restrictive policies
Start with restrictive policies
Begin with strict policies and gradually relax them as needed, rather than starting permissive.
Test policies in testnet
Test policies in testnet
Always validate your policy configuration on Hyperliquid testnet before deploying to production.
Regular policy reviews
Regular policy reviews
Periodically review and update policies to match current risk management needs.

