From 393a3a38b317d14a6379fb7af13df579a40aef1322fab2fb88e46ec8460c7d43 Mon Sep 17 00:00:00 2001 From: Minimons Date: Thu, 25 Jun 2026 19:33:25 +0200 Subject: [PATCH] 14: Add getProgramAccounts(...) with memcmp filter support --- .../SolanaProgramAccountMemcmpFilter.tjava | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/tjava/com/r35157/libs/solana/SolanaProgramAccountMemcmpFilter.tjava diff --git a/src/main/tjava/com/r35157/libs/solana/SolanaProgramAccountMemcmpFilter.tjava b/src/main/tjava/com/r35157/libs/solana/SolanaProgramAccountMemcmpFilter.tjava new file mode 100644 index 0000000..eb523be --- /dev/null +++ b/src/main/tjava/com/r35157/libs/solana/SolanaProgramAccountMemcmpFilter.tjava @@ -0,0 +1,17 @@ +package com.r35157.libs.solana; + +/** + * Filter used when fetching accounts owned by a Solana program. + * + *

The initial supported filter type is {@code memcmp}, which asks the + * Solana RPC node to only return accounts where the account data at a specific + * byte offset matches a base58 encoded value.

+ * + * @param offset the byte offset in the account data where comparison starts + * @param bytes the base58 encoded bytes to match + */ +public record SolanaProgramAccountMemcmpFilter( + int offset, + String bytes +) { +} \ No newline at end of file