Integrate Gosuto Mobile into your app
This page describes how to integrate Gosuto Mobile wallet into a dApp on Casper that all users with Gosuto Mobile wallet can interact with the dApp through Gosuto's built-in dApp browser
Check whether Gosuto wallet provider is enabled or loaded
if (window.gosuto && window.gosuto.isGosuto) {
// gosuto provider is enabled
} else {
// gosuto provider not loaded yet
} Request to connect to Gosuto Wallet user account
if (window.gosuto && window.gosuto.isGosuto) {
window.gosuto.requestConnection();
}Disconnect from the wallet
window.gosuto.disconnectFromSite();Get connected account information
const isConnected = await window.gosuto.isConnected()
if (isConnected){
const accountHex = await window.gosuto.getActivePublicKey();
// do something with user account hex
}Listen to wallet connection
Sign and send a deploy
Sign a message
Last updated