Documentation
Core Concepts
Wallet Management

Wallet Management

This section covers everything you need to know about creating, selecting, and querying wallets using the Evolution library:

Create

You are provided with different methods to create a wallet:

Generate a new private key.

import { generatePrivateKey } from "@lucid-evolution/lucid";
 
const privateKey = generatePrivateKey(); // Bech32 encoded private key
console.log(privateKey);

Select

Use any suitable method to select a wallet and interact with the blockchain through it:

Select a wallet using a private key.

lucid.selectWallet.fromPrivateKey(privateKey);
⚠️

Transactions built with an address-only wallet will need to be signed by a wallet with the actual private keys before they can be submitted.

Query

You can fetch data associated with the selected wallet using these methods:

const address = await lucid.wallet().address(); // Bech32 encodedaddress