Skip to content

Update getEvents to take topics as &[TopicFilter] instead of &[String] - #57

Merged
elizabethengelman merged 3 commits into
mainfrom
fix/events-for-base64-topics
Nov 21, 2025
Merged

Update getEvents to take topics as &[TopicFilter] instead of &[String]#57
elizabethengelman merged 3 commits into
mainfrom
fix/events-for-base64-topics

Conversation

@elizabethengelman

@elizabethengelman elizabethengelman commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

The rpc endpoint expects the topics to be passed an array of topic filters - which are arrays of segment filters instead of arrays of the topic string directly

https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getEvents

What

closes stellar/stellar-cli#2021
related CLI pr: stellar/stellar-cli#2292

Why

to support the cli pr: stellar/stellar-cli#2292

Known limitations

n/a

The rpc endpoint expects the topics to be passed an array of topic
filters - which are arrays of segment filters instead of arrays of the
topic string directly

https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getEvents
@elizabethengelman
elizabethengelman marked this pull request as ready for review November 19, 2025 15:02
Comment thread src/lib.rs Outdated
@elizabethengelman
elizabethengelman merged commit 6557f13 into main Nov 21, 2025
9 checks passed
@elizabethengelman
elizabethengelman deleted the fix/events-for-base64-topics branch November 21, 2025 14:39
elizabethengelman added a commit to stellar/stellar-cli that referenced this pull request Nov 24, 2025
…2292)

### What

closes #2021

related rpc-client pr:
stellar/rs-stellar-rpc-client#57

Updates the topic filter structure that is being passed to the rpc
server `getEvents` method, to align with it's expected API.

The GetEventsRequest, from the rpc server, is expecting the topics to be
an array of TopicFilters, and a TopicFilter is an array of
SegmentFilters. So it is expecting an array of arrays.

### Why
We are currently just passing in a segment filter, without nesting it in
an array of arrays, and are seeing an error when doing so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

events command fails with invalid parameters when using Base64 topic

2 participants