-
Notifications
You must be signed in to change notification settings - Fork 76
feat(exchange/approveAgent): remove 17-char limit from agentName #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(exchange/approveAgent): remove 17-char limit from agentName #106
Conversation
The official Hyperliquid API docs don't mention this limit, and it prevents using expiration timestamps in agent names. - Remove v.maxLength(17) validation from agentName - Add test for expiration timestamp pattern in agentName - Update JSDoc example showing expiration usage
|
Hyperliquid has a limit on the number of characters in the Agent Wallet name, otherwise the error I think it would be better to ignore the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for agent name expiration timestamps by removing the strict 17-character limit and allowing longer names when they include a valid_until <timestamp> suffix. The change enables time-limited agent approvals while maintaining the base name length constraint for backward compatibility.
Changes:
- Modified validation logic in
approveAgent.tsto extract and validate the base name separately from thevalid_untiltimestamp suffix - Added test coverage for the new expiration timestamp feature
- Updated JSDoc examples to demonstrate the new functionality with expiration timestamps
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/api/exchange/_methods/approveAgent.ts | Updated validation to check base name length (excluding valid_until suffix) and added documentation examples showing the new feature |
| tests/api/exchange/approveAgent.test.ts | Added test case validating agent approval with expiration timestamp in the agent name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes #105