Skip to content

Commit

Permalink
Add endLedger in getEvents request
Browse files Browse the repository at this point in the history
  • Loading branch information
psheth9 committed Sep 19, 2024
1 parent 99cf4cc commit bb156a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export namespace Server {
export interface GetEventsRequest {
filters: Api.EventFilter[];
startLedger?: number; // either this or cursor
endLedger?: number; // either this or cursor
cursor?: string; // either this or startLedger
limit?: number;
}
Expand Down Expand Up @@ -525,6 +526,7 @@ export class Server {
* @example
* server.getEvents({
* startLedger: 1000,
* endLedger: 2000,
* filters: [
* {
* type: "contract",
Expand Down Expand Up @@ -564,6 +566,9 @@ export class Server {
},
...(request.startLedger && {
startLedger: request.startLedger
}),
...(request.endLedger && {
endLedger: request.endLedger
})
});
}
Expand Down

0 comments on commit bb156a5

Please sign in to comment.