Skip to main content

Wallet Client

import { createWalletClient, custom } from 'viem';
import { aurum } from './aurum';

const walletClient = createWalletClient({
  transport: custom(aurum.rpcProvider),
});
Note: when creating a viem public client, use a dedicated node URL from providers like Alemchy, Infura, etc instead of using aurum.rpcProvider.

Personal Sign

const [address] = await walletClient.getAddresses();
const signature = await walletClient.signMessage({ 
	account: address, 
	message: 'Hello!' 
});

Send Transaction

const hash = await walletClient.sendTransaction({
  account: address,
  to: '0x...',
  value: parseEther('0.01'),
});