From eac694b9896334586de76d8c29244a0d85a9bbb9 Mon Sep 17 00:00:00 2001 From: Cloakd Date: Mon, 13 Apr 2026 11:05:39 +0100 Subject: [PATCH 1/2] Add changedSinceSlot arg for gPA --- rpc/getProgramAccounts.go | 3 +++ rpc/types.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/rpc/getProgramAccounts.go b/rpc/getProgramAccounts.go index 6451c768..c0f4a013 100644 --- a/rpc/getProgramAccounts.go +++ b/rpc/getProgramAccounts.go @@ -59,6 +59,9 @@ func (cl *Client) GetProgramAccountsWithOpts( "length": opts.DataSlice.Length, } } + if opts.ChangedSinceSlot != nil { + obj["changedSinceSlot"] = *opts.ChangedSinceSlot + } } params := []any{publicKey, obj} diff --git a/rpc/types.go b/rpc/types.go index d1c39647..d6dd8fc7 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -406,6 +406,9 @@ type GetProgramAccountsOpts struct { // Filter results using various filter objects; // account must meet all filter criteria to be included in results. Filters []RPCFilter `json:"filters,omitempty"` + + // Return only the accounts that have changed since this slot + ChangedSinceSlot *uint64 `json:"changedSinceSlot,omitempty"` } type GetProgramAccountsResult []*KeyedAccount From 889b6bc93b9833103679ccd5405a8683303eb9ba Mon Sep 17 00:00:00 2001 From: Cloakd Date: Mon, 13 Apr 2026 11:07:39 +0100 Subject: [PATCH 2/2] Add changedSinceSlot arg for gAI/gMA --- rpc/getAccountInfo.go | 6 ++++++ rpc/getMultipleAccounts.go | 3 +++ 2 files changed, 9 insertions(+) diff --git a/rpc/getAccountInfo.go b/rpc/getAccountInfo.go index 00784aa5..95c4fa5f 100644 --- a/rpc/getAccountInfo.go +++ b/rpc/getAccountInfo.go @@ -85,6 +85,9 @@ type GetAccountInfoOpts struct { // The minimum slot that the request can be evaluated at. // This parameter is optional. MinContextSlot *uint64 + + // Return only if the account(s) have changed since this slot + ChangedSinceSlot *uint64 `json:"changedSinceSlot,omitempty"` } // GetAccountInfoWithOpts returns all information associated with the account of provided publicKey. @@ -135,6 +138,9 @@ func (cl *Client) getAccountInfoWithOpts( if opts.MinContextSlot != nil { obj["minContextSlot"] = *opts.MinContextSlot } + if opts.ChangedSinceSlot != nil { + obj["changedSinceSlot"] = *opts.ChangedSinceSlot + } } params := []any{account} diff --git a/rpc/getMultipleAccounts.go b/rpc/getMultipleAccounts.go index 99f21157..01c8fe17 100644 --- a/rpc/getMultipleAccounts.go +++ b/rpc/getMultipleAccounts.go @@ -68,6 +68,9 @@ func (cl *Client) GetMultipleAccountsWithOpts( if opts.MinContextSlot != nil { obj["minContextSlot"] = *opts.MinContextSlot } + if opts.ChangedSinceSlot != nil { + obj["changedSinceSlot"] = *opts.ChangedSinceSlot + } if len(obj) > 0 { params = append(params, obj) }