API refrence
Methods
rabet.connect()
To interact with the user's account in Rabet, you must first connect to it.
For connecting to the user account, you must send a connection request to the user. If the user confirms, you will receive the user account public key; otherwise, you will receive a rejected error.
rabet.sign()
To send an XDR to the connected account and let users sign it, you need to use this method.
rabet.disconnect()
This method removes the connection between the extension and the client. In order to interact with the extension, you need to call rabet.connect()
again.
rabet.isUnlocked()
This method returns a Promise
that resolves to a boolean
indicating if Rabet is unlocked by the user. Rabet must be unlocked in order to perform any operation involving user accounts. Note that this method does not indicate if the user has exposed any accounts to the caller.
rabet.close()
When calling rabet.connect()
or rabet.sign()
a new window shows up that lasts for 30 seconds, but use this method if you want to close that window manually.
Events
accountChanged
This event triggers whenever the user changes the active account in the extension wallet.
networkChanged
This event triggers whenever the user changes the network in the extension wallet.
Last updated