From bb156a5edd14e098f6cfb290858439b028fb8dd6 Mon Sep 17 00:00:00 2001 From: Prit Sheth Date: Thu, 19 Sep 2024 11:59:00 -0700 Subject: [PATCH] Add endLedger in getEvents request --- src/rpc/server.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rpc/server.ts b/src/rpc/server.ts index 3a0c32045..649873fbe 100644 --- a/src/rpc/server.ts +++ b/src/rpc/server.ts @@ -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; } @@ -525,6 +526,7 @@ export class Server { * @example * server.getEvents({ * startLedger: 1000, + * endLedger: 2000, * filters: [ * { * type: "contract", @@ -564,6 +566,9 @@ export class Server { }, ...(request.startLedger && { startLedger: request.startLedger + }), + ...(request.endLedger && { + endLedger: request.endLedger }) }); }