Web3 Provider Integration - Ethereum / Arbitrum / Optimism / Polygon / BSC / Avalanche
Getting Encrypted User IDs From your Web App
Register Push Notification
let web3 = new Web3(window.ethereum) // or window.tangerine or window.bloctoProvider
if (web3.currentProvider.isBlocto) {
try {
let encryptedUserId = await web3.currentProvider.request({
method: 'blocto_registerPushNotification',
params: ["{appId}"]
})
// send encryptedUserId to your backend
} catch(e) {
// error handling
// e.mesage: see the below
}
}Last updated
Was this helpful?