Skip to content

Averer Wallet

The Averer Wallet is the foundational layer of the Averer Web SDK. It is an embedded identity and blockchain wallet that is automatically created and managed for each user when they authenticate through the SDK.

Every feature in the SDK (verification, proof generation, on-chain interactions) is built on top of this wallet layer.

What the wallet provides

  • Embedded wallet creation: when a user logs in via email or social account, the SDK creates a blockchain wallet on their behalf. No browser extension, seed phrase, or manual setup required.
  • Gas abstraction: the Averer Issuer funds the user's embedded wallet address so they never need to hold native tokens to pay for transaction fees. Blockchain interactions are invisible to the user.
  • Account abstraction: smart wallet capabilities simplify transaction flows and enable features like batched transactions.
  • Blockchain read and write access: the wallet exposes standard Viem clients (Public Client and Wallet Client) for reading blockchain data and sending transactions.
  • Message signing: users can sign arbitrary messages with their embedded wallet's private key.

Accessing the wallet

The SDK exports a useAvererWallet hook that gives you access to the wallet instance within any component rendered inside AvererSdkProvider.

import { useAvererWallet } from '@averer/averer-websdk';

const MyComponent = () => {
  const wallet = useAvererWallet();

  if (!wallet) {
    return <p>Wallet not connected</p>;
  }

  return <p>Wallet address: {wallet.address}</p>;
};

The wallet object provides:

  • address: the user's blockchain address
  • getPublicClient(): returns a Viem Public Client for read-only blockchain operations
  • getWalletClient(): returns a Viem Wallet Client for signing transactions
  • getBalance(): returns the wallet's token balance
  • signMessage(message): signs an arbitrary message string

For code examples covering each of these, see Usage.