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
completion
Callback 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
nameOrId
Name or id of the account for which the subscription will be changed
delegate
The class that will receive account notifications
-
Removing a listener to the account change
Declaration
Swift
func unsubscribeToAccount(nameOrId: String, delegate: SubscribeAccountDelegate)
Parameters
nameOrId
Name or id of the account for which the subscription will be changed
delegate
The 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
delegate
The 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
delegate
The 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
contractsIds
Ids of the contracts for subscribe
delegate
The class that will receive notifications
-
Removing a listener to the contracts changes
Declaration
Swift
func unsubscribeToContracts(contractIds: [String], delegate: SubscribeContractsDelegate)
Parameters
contractIds
Ids of the contracts for unsubscribe
delegate
The 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
contractId
Id of the contract for which the logs will create
delegate
The class that will receive contract logs notifications
-
Removing a listener to the new contract logs
Declaration
Swift
func unsubscribeToContractLogs(contractId: String, delegate: SubscribeContractLogsDelegate)
Parameters
contractId
Id of the contract for which the logs will create
delegate
The class that will receive contract logs notifications
-
Removing all listeners to the account change
Declaration
Swift
func unsubscribeAll()