helius_get_assets_by_owner
Retrieve all assets owned by a specific Solana wallet address, including tokens and NFTs, using Helius blockchain data.
Instructions
Get assets owned by a specific address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| page | No | ||
| limit | No |
Implementation Reference
- src/handlers/helius.ts:372-385 (handler)Implements the core logic for retrieving assets owned by a given Solana address using the Helius RPC getAssetsByOwner method.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)Defines the input schema and metadata for the helius_get_assets_by_owner tool.{ 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)Maps the tool name to its handler function in the exported handlers dictionary."helius_get_assets_by_owner": helius.getAssetsByOwnerHandler,