Skip to content

Commit fe22080

Browse files
committed
cmd: add start_timestamp and end_timestamp to addrs receives
1 parent f4a94c3 commit fe22080

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cmd/commands/addrs.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ var receivesAddrCommand = cli.Command{
283283
Name: addrName,
284284
Usage: "show transfers of a single address only",
285285
},
286+
cli.Uint64Flag{
287+
Name: "start_timestamp",
288+
Usage: "filter transfers created after this unix timestamp (seconds)",
289+
},
290+
cli.Uint64Flag{
291+
Name: "end_timestamp",
292+
Usage: "filter transfers created before this unix timestamp (seconds)",
293+
},
286294
},
287295
Action: addrReceives,
288296
}
@@ -302,7 +310,9 @@ func addrReceives(ctx *cli.Context) error {
302310
}
303311

304312
resp, err := client.AddrReceives(ctxc, &taprpc.AddrReceivesRequest{
305-
FilterAddr: addr,
313+
FilterAddr: addr,
314+
StartTimestamp: ctx.Uint64("start_timestamp"),
315+
EndTimestamp: ctx.Uint64("end_timestamp"),
306316
})
307317
if err != nil {
308318
return fmt.Errorf("unable to query addr receives: %w", err)

0 commit comments

Comments
 (0)