Class: Subscription
A convenience API for managing an individual subscription.
Extends
Properties
deliveryOptions
readonlydeliveryOptions:undefined|StreamPartDeliveryOptions
erc1271ContractAddress
readonlyerc1271ContractAddress:undefined|EthereumAddress
streamPartId
readonlystreamPartId:StreamPartID
Methods
[asyncIterator]()
[asyncIterator]():
AsyncIterator<Message>
Returns
AsyncIterator<Message>
Inherited from
off()
off<
E>(eventName,listener):void
Removes an event listener from the subscription.
Type Parameters
• E extends keyof SubscriptionEvents
Parameters
eventName
E
event name, see SubscriptionEvents for options
listener
the callback function to remove
Returns
void
on()
on<
E>(eventName,listener):void
Adds an event listener to the subscription.
Type Parameters
• E extends keyof SubscriptionEvents
Parameters
eventName
E
event name, see SubscriptionEvents for options
listener
the callback function
Returns
void
once()
once<
E>(eventName,listener):void
Adds an event listener to the subscription that is invoked only once.
Type Parameters
• E extends keyof SubscriptionEvents
Parameters
eventName
E
event name, see SubscriptionEvents for options
listener
the callback function
Returns
void
unsubscribe()
unsubscribe():
Promise<void>
Unsubscribes this subscription.
Returns
Promise<void>
Remarks
The instance should not be used after calling this.