Wallet Actions
Porto provides a set of Wallet Actions for Application Developers. These Actions are designed to be used with a Viem Client that is connected to a Porto's EIP-1193 Provider.
import { createClient, custom } from 'viem'
import { Porto } from 'porto'
import { WalletActions } from 'porto/viem'
// Instantiate a Porto instance.
const porto = Porto.create()
// Instantiate a Viem Client with Porto's EIP-1193 provider.
const client = createClient({
transport: custom(porto.provider),
})
const { accounts } = await WalletActions.connect(client)
Action | Description | Standard |
---|---|---|
connect | Connect to a Porto Account. | ERC-7846 |
disconnect | Disconnect an account. | ERC-7846 |
grantPermissions | Grant permissions to an application. | Experimental |
getPermissions | Get permissions attached to an account. | Experimental |
revokePermissions | Revoke a permission attached to an account. | Experimental |