Add getProgramAccounts(...) with memcmp filter support #14

Closed
opened 2026-06-25 19:26:26 +02:00 by minimons · 0 comments
Owner

Description:

Add generic Solana API support for fetching program-owned accounts using server-side filters.

This is needed so higher-level APIs can find relevant accounts without downloading all accounts owned by a program.

Suggested API shape:

Set<SolanaAccountInfo> getProgramAccounts(
        ΩSolanaProgramIdΩ programId,
        Set<SolanaProgramAccountFilter> filters
) throws IOException, InterruptedException;

Initial filter support:

  • memcmp filter
  • offset
  • bytes/base58 value to match

Non-goals:

  • No local filtering of program accounts
  • No decoding of program account data
  • No support for every Solana RPC filter type yet

Acceptance criteria:

  • SolanaBlockChain exposes a generic getProgramAccounts(...) method with filter support.
  • Implementation supports Solana RPC memcmp filters.
  • Returned accounts are represented as SolanaAccountInfo.
  • Existing getAccountInfo(...) behavior is unchanged.
### Description: Add generic Solana API support for fetching program-owned accounts using server-side filters. This is needed so higher-level APIs can find relevant accounts without downloading all accounts owned by a program. ### Suggested API shape: ```java Set<SolanaAccountInfo> getProgramAccounts( ΩSolanaProgramIdΩ programId, Set<SolanaProgramAccountFilter> filters ) throws IOException, InterruptedException; ``` ### Initial filter support: * `memcmp` filter * offset * bytes/base58 value to match ### Non-goals: * No local filtering of program accounts * No decoding of program account data * No support for every Solana RPC filter type yet ### Acceptance criteria: * `SolanaBlockChain` exposes a generic `getProgramAccounts(...)` method with filter support. * Implementation supports Solana RPC `memcmp` filters. * Returned accounts are represented as `SolanaAccountInfo`. * Existing `getAccountInfo(...)` behavior is unchanged.
minimons added the enhancement label 2026-06-25 19:26:26 +02:00
minimons self-assigned this 2026-06-25 19:26:26 +02:00
minimons added this to the AssetAZ project 2026-06-25 19:26:26 +02:00
minimons moved this to Done in AssetAZ on 2026-06-26 14:13:09 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#14