Skip to content

xdr2json: add the JSON-to-XDR direction for getEvents v2 xdrInputFormat #940

Description

@urvisavla

The getEvents v2 request carries xdrInputFormat. The json value selects the JSON encoding for topic values inside filters. We cannot serve it today.

The term index keys each topic term on the canonical XDR byte encoding of the ScVal, so a JSON topic value must convert to those exact bytes. The repository has no converter for that direction. internal/xdr2json is cgo over a Rust staticlib that exposes only xdr_to_json, and the Go SDK's xdr.ScVal has no UnmarshalJSON.

Requirement: a JSON-to-XDR converter for ScVal, so getEvents v2 accepts xdrInputFormat: "json".

Parent issue: #774
Spec: https://github.com/orgs/stellar/discussions/1872

Metadata

Metadata

Assignees

Type

No type

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions