Create a wallet

How to create a wallet and select it.

There are multiple options to create and import a wallet in Lucid. In this section we are using the private key method.

In case you do not have private key yet, you can generate one with Lucid:

const privateKey = lucid.utils.generatePrivateKey(); // Bech32 encoded private key

Now we select a private key wallet with our Lucid instance:

Note: In almost all cases you want to select a wallet. It's necessary to build and submit transactions.