Skip to main content
Control how actions are signed per provider.
// Set to agent-based signing (no wallet popups after setup)
await perps.setSigningMode(userAddress, 'hyperliquid', 'USER_AGENT');

// Check current mode
const mode = perps.getSigningMode(userAddress, 'hyperliquid');
console.log(mode); // 'USER_AGENT'

// Load from storage (async)
const stored = await perps.loadSigningMode(userAddress, 'hyperliquid');

// Get agent wallet address
const agentAddr = await perps.getAgentAddress(userAddress, 'hyperliquid');

Methods

MethodDescription
setSigningMode(address, provider, mode)Set 'USER' or 'USER_AGENT' (creates agent if needed)
getSigningMode(address, provider)Get current mode (synchronous)
loadSigningMode(address, provider)Load mode from storage (async)
getAgentAddress(address, provider)Get the agent wallet address
hasAgent(address, provider)Check if an agent exists
removeAgent(address, provider)Delete the agent
See Signing Modes for a detailed explanation of USER vs USER_AGENT modes.