SubscriptionFacade
public protocol SubscriptionFacade
A class interface that allows you to track the change to an account
-
Subscribes to listening chain objects
Declaration
Swift
func setSubscribeCallback(completion: @escaping Completion<Bool>)Parameters
completionCallback which returns status of subscription
-
Adding a listener to the account change
Remark
Delegate must be a class
Declaration
Swift
func subscribeToAccount(nameOrId: String, delegate: SubscribeAccountDelegate)Parameters
nameOrIdName or id of the account for which the subscription will be changed
delegateThe class that will receive account notifications
-
Removing a listener to the account change
Declaration
Swift
func unsubscribeToAccount(nameOrId: String, delegate: SubscribeAccountDelegate)Parameters
nameOrIdName or id of the account for which the subscription will be changed
delegateThe class that receive account notifications
-
Adding a listener to the dynamic global properties change
Remark
Delegate must be a class
Declaration
Swift
func subscribeToDynamicGlobalProperties(delegate: SubscribeDynamicGlobalPropertiesDelegate)Parameters
delegateThe class that receive change notifications
-
Removing a listener to the dynamic global properties change
Declaration
Swift
func unsubscribeToDynamicGlobalProperties() -
Adding a listener to the block create
Remark
Delegate must be a class
Declaration
Swift
func subscribeToBlock(delegate: SubscribeBlockDelegate)Parameters
delegateThe class that receive create notifications
-
Removing a listener to the block create
Declaration
Swift
func unsubscribeToBlock() -
Adding a listener to contracts changes by contracts ids
Remark
Delegate must be a class
Declaration
Swift
func subscribeContracts(contractsIds: [String], delegate: SubscribeContractsDelegate)Parameters
contractsIdsIds of the contracts for subscribe
delegateThe class that will receive notifications
-
Removing a listener to the contracts changes
Declaration
Swift
func unsubscribeToContracts(contractIds: [String], delegate: SubscribeContractsDelegate)Parameters
contractIdsIds of the contracts for unsubscribe
delegateThe class that will receive contracts change notifications
-
Adding a listener to the new contract logs
Remark
Delegate must be a class
Declaration
Swift
func subscribeToContractLogs(contractId: String, delegate: SubscribeContractLogsDelegate)Parameters
contractIdId of the contract for which the logs will create
delegateThe class that will receive contract logs notifications
-
Removing a listener to the new contract logs
Declaration
Swift
func unsubscribeToContractLogs(contractId: String, delegate: SubscribeContractLogsDelegate)Parameters
contractIdId of the contract for which the logs will create
delegateThe class that will receive contract logs notifications
-
Removing all listeners to the account change
Declaration
Swift
func unsubscribeAll()
View on GitHub
SubscriptionFacade Protocol Reference