Generate a Wallet

Generate a wallet for a user

A wallet comprises a private key, a public key, and many addresses. To enable a user to accept tokens or digital assets, create a wallet for them using our SDK.

You can create one wallet per blockchain.

Bitcoin wallets are automatically created when creating a profile.

Here are the properties for generateWallet function:

Example: To generate a Bitcoin wallet for a user, follow these steps:

You only need to initialize the client once at the start of the application

import { Oumla } from "@oumla/sdk";

const client = new Oumla({
   apiKey: process.env.API_KEY,
   // Additional options...
});

const wallet =  await client.generateWallet({
    network: "BTC",
    reference: "dba1fea5-2004-4ea8-a06d-a7c7c5559b8f",
});

// you can print 
   console.log(wallet);
// return type is Wallet

Last updated