helius_get_assets_by_owner
Retrieve assets owned by a specific wallet address on Solana. Supports pagination to navigate large collections.
Instructions
Get assets owned by a specific address
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| page | No | ||
| limit | No |
Implementation Reference
- src/handlers/helius.ts:372-385 (handler)The handler function that executes the 'helius_get_assets_by_owner' tool logic. It validates the owner address via schema, maps 'owner' to 'ownerAddress' parameter, calls the Helius SDK's getAssetsByOwner RPC method, and returns the result.
export const getAssetsByOwnerHandler = async (input: { owner: string, page?: number, limit?: number }): Promise<ToolResultSchema> => { try { // Fix the parameter name mismatch const params = { ownerAddress: input.owner, // Change owner to ownerAddress page: input.page || 1, limit: input.limit || 10 }; const assets = await (helius as any as Helius).rpc.getAssetsByOwner(params); return createSuccessResponse(`Assets by owner: ${JSON.stringify(assets, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting assets by owner: ${error instanceof Error ? error.message : String(error)}`); } } - src/tools.ts:333-345 (schema)The tool definition and input schema for 'helius_get_assets_by_owner', specifying 'owner' (required), 'page', and 'limit' as input properties.
{ name: 'helius_get_assets_by_owner', description: 'Get assets owned by a specific address', inputSchema: { type: 'object', properties: { owner: { type: 'string' }, page: { type: 'number' }, limit: { type: 'number' } }, required: ['owner'] } }, - src/tools.ts:577-577 (registration)The registration of 'helius_get_assets_by_owner' mapping the tool name to its handler function 'helius.getAssetsByOwnerHandler' in the handlers dictionary.
"helius_get_assets_by_owner": helius.getAssetsByOwnerHandler,