This method is intended to send your user's information to SimpleID. This can be as simple as a wallet address or as complex as wallet address, email, and web3 provider.
You should only call this method when a user is signing into your application. Calling it frequently won't hurt the SimpleID data stored, but it could cause performance issues in your application.
const userData = {email: "myfakeemail@email.com",address: "0x9485e457c9cb2775f6AfFd0Bd66E53E85755c31C",provider: "Metamask"}
Parameter | Required |
false | |
address | true |
provider | false |
if successful, response is simply:​"success"
This method will log a user out of your app and remove the information in local storage that tells SimpleID that the user is already logged in. If you already have a signOut method in your app, you should chain this method on.
This method will return the available in-app notifications for your user.
Here is an example response:
[{name: "Notification Example",active: true,id: "8dab85f7-2b99-403c-a8c5-d38ada819b25",content: "<p>This is my notification</p>",segmentId: "eda97b9d-bcc8-42e5-a773-b923597e814c"}]
This method allows you to store arbitrary data associated with the activity of a user on your application. This method may be used for tracking clicks of certain elements on a page, time on the page, and so much more. The method requires a single object as an argument and that object should include the following:
page - String: the name of the page the user is currently on (i.e. Home, wallet, buy, etc) - REQUIRED
event - String: the name of the event you'd like to store (i.e. Button Clicked) - REQUIRED
properties - Object: any properties associated with that event - OPTIONAL
Example:
simple.storeEvent({page: 'Home',event: 'Buy button clicked',properties: {pageLocation: 'header',timeOfClick: Date.now()}})
​