Notify
instance with:
environment
- Use debug
environment for debug builds and release
for release and TestFlight builds.
crypto
- CryptoProvider is a protocol, you are required to provide an implementation of recoverPubKey
and keccak256
methods.
isRegistered()
function. If the account is not registered, developers should call prepareRegistration()
and then register()
function to register the account.
To login to manage notifications, you must request message to sign with prepareRegistration()
method and register signature with register()
method. Once logged in, cross-device syncing will be enabled.
account
- An CAIP-10 account that the identity key will be issued fordomain
- A domain of your wallet, you should use your bundle IDappDomain
- dapp domain fetched from WalletConnect explorer
account
- an account you want to associate a subscription with
getActiveSubscriptions()
.
Method will return an array of NotifySubscription objects that indicates actual subscriptions state
account
- subscriptions owner account
getNotificationHistory()
.
Method will return an array of NotifyMessageRecord objects that indicates current notify messages state. This do not include old messages that aren’t loaded yet. Useful for displaying initial notifications view state. For more info about pagination, check fetchHistory
method.
Use this method together with:
messagesPublisher(topic: String)
fetchHistory
topic
- unique subscription’s topic
topic
- topic of the subscription to update
scope
- The new space delimited list of scopes
topic
- subscription’s topic
unregister()
. This will remove all subscriptions and messages for this account from the client’s storage.
account
- account ot unregister
messagesPublisher(topic: String)
will send the event with actual Notify messages for the specified topic.
subscription
- subscription for which notification history is requested
after?
- id of last notification loaded. Recent notifications will be loaded if provided nil
limit
- notifications to load count
Returns
- Returns True if there are still not fetched notifications