there is currently no way to close existing grpc subscriptions. this is problematic if ie wanting to repeatedly subscribe to new accounts on geyser. after a while without closing the old subscription the library would reach grpcs maxConcurrentStreams limit.
this changes the return type of the onUpdate functions in geyser and searcher libs from void to () => void, which is a function to close the stream.
while at it added proper ts doc to the functions in searcher and geyser.
there is currently no way to close existing grpc subscriptions. this is problematic if ie wanting to repeatedly subscribe to new accounts on geyser. after a while without closing the old subscription the library would reach grpcs maxConcurrentStreams limit.
this changes the return type of the onUpdate functions in geyser and searcher libs from void to () => void, which is a function to close the stream.
while at it added proper ts doc to the functions in searcher and geyser.