auth.v1.ResolveService
ResolveAccount
Resolve an account by username, account ID, or smart-account address. Use this before sharing or transferring so the caller can confirm the target.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/auth.v1.ResolveService/ResolveAccount' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"hint": "USERNAME",
"includeSubaccounts": false,
"query": "trader_alpha"
}'Responses
{
"matches": [
{
"accountId": "7563897446546",
"kind": "ROOT",
"rootUsername": "trader_alpha",
"smartAccountAddress": "0x2222222222222222222222222222222222222222",
"subaccountLabel": "Market Making"
}
]
}auth.v1.ResolveAccountRequestauth.v1.ResolveAccountResponseFree-form query typed by the user. Can be: - a username, 3 to 64 characters using letters, digits, underscore, dot, or hyphen - an opaque root account or sub-account ID - an EVM smart-account address formatted as 0x plus 40 hex characters Maximum length is 128 characters.
Optional hint for how to parse query. When unspecified, the service auto-detects by query shape.
When true, allow matches on sub-accounts as well as root accounts. Use this for internal transfer flows where the caller may want to resolve a specific sub-account by its ID or smart-account address. Username lookups remain root-only regardless of this flag.
Smart-account address that would receive funds. This is the address that will receive the transfer, whether it belongs to a root account or a sub-account.
Category of account that owns this address.
Root account username for the result. For sub-account results, this is the parent root account username. Empty means the root account has no username.
Optional sub-account label when kind is SUB.
Target account identifier (opaque ID). For root results this is an account ID; for sub-account results this is a sub-account ID.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |