Interface Stream<T, K, I, State> interface Stream < T extends object , K , I extends string , State > { close () : void ; off ( type : "live" , listener : ( state : State ) => void ) : void ; off ( type : "change" , listener : ( state : State , events : readonly Event < T , K , I > [] ) => void , ) : void ; off ( type : "close" , listener : ( closeEvent : StreamCloseEvent ) => void ) : void ; on ( type : "live" , listener : ( state : State ) => void ) : void ; on ( type : "change" , listener : ( state : State , events : readonly Event < T , K , I > [] ) => void , ) : void ; on ( type : "close" , listener : ( closeEvent : StreamCloseEvent ) => void ) : void ; } Type Parameters T extends object K I extends string State Methodsoff off ( type : "live" , listener : ( state : State ) => void ) : void Parameters type : "live" listener : ( state : State ) => void Returns void off ( type : "change" , listener : ( state : State , events : readonly Event < T , K , I > [] ) => void , ) : void Parameters type : "change" listener : ( state : State , events : readonly Event < T , K , I > [] ) => void Returns void on on ( type : "live" , listener : ( state : State ) => void ) : void Parameters type : "live" listener : ( state : State ) => void Returns void on ( type : "change" , listener : ( state : State , events : readonly Event < T , K , I > [] ) => void , ) : void Parameters type : "change" listener : ( state : State , events : readonly Event < T , K , I > [] ) => void Returns void
Interface for streams returned by the streaming methods of the
Ledger
class. Each'change'
event contains accumulated state of typeState
as well as the ledger events that triggered the current state change.Typeparam
T The contract template type.
Typeparam
K The contract key type.
Typeparam
I The contract id type.
Typeparam
State The accumulated state.