feat: add GET /grantees/:address/users endpoint#730
Open
raymondjacobson wants to merge 2 commits intomainfrom
Open
feat: add GET /grantees/:address/users endpoint#730raymondjacobson wants to merge 2 commits intomainfrom
raymondjacobson wants to merge 2 commits intomainfrom
Conversation
Returns paginated full user models for all users who have authorized a given grantee wallet address via the grants table. Supports is_approved and is_revoked filters, and limit/offset pagination. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Allows callers to pass the address with or without the 0x prefix. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
rickyrombo
reviewed
Mar 19, 2026
| AND (@is_approved::boolean IS NULL OR g.is_approved = @is_approved) | ||
| ORDER BY g.created_at DESC | ||
| LIMIT @limit | ||
| OFFSET @offset |
Contributor
There was a problem hiding this comment.
@copilot what indexes do we have on this table? is this fast?
Contributor
|
@rickyrombo I've opened a new pull request, #731, to work on those changes. Once the pull request is ready, I'll request review from you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /v1/grantees/:address/usersendpoint that returns all users who have authorized a given grantee wallet address via the grants tableis_approved(optional) andis_revoked(defaultfalse) query filterslimit/offsetpagination; returns the full user modelTest plan
TestGetGranteeUsersNoParams— default params return non-revoked grants across all approval statusesTestGetGranteeUsersApproved—is_approved=truefilters to only approved grantsTestGetGranteeUsersNotApproved—is_approved=falsefilters to only unapproved grantsTestGetGranteeUsersRevoked—is_revoked=truereturns revoked grantsTestGetGranteeUsersNotFound— unknown address returns empty list with 200TestGetGranteeUsersPagination—limit=1returns a single resultTestGetGranteeUsersInvalidParams— invalid param values return 400🤖 Generated with Claude Code