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.
Here are the properties for generateWallet
function:
property
description
required
type
network
specify which blockchain
required
networkType
reference
specify which user
required
string
For Example,
import { Oumla } from "@oumla/sdk";
const client = new Oumla({
apiKey: process.env.API_KEY,
// Additional options...
});
const wallet = await client.wallets.generate({
network: "BTC",
reference: "dba1fea5-2004-4ea8-a06d-a7c7c5559b8f",
});
// you can print
console.log(wallet);
// return type is Wallet
The expected output
{
message: 'Wallet created',
data: {
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f',
network: 'BTC',
type: 'User',
date: '2024-08-27T20:28:45.222Z'
}
}
Last updated