Generate Addresses
For a profile to receive digital assets they need a receiving address. every profile has the ability to get millions of receiving addresses.
Here are the properties for generateAddress
function:
property
description
required
type
reference
specify which user
required
string
network
The type of network.
required
tBTC
| BTC
| tETH
| ETH
clientShare
The client share that generated in the registration.
required
string
Each address has metadata such as balance.
Here are the properties for generateAddress
function:
import { Oumla } from "@oumla/sdk";
const client = new Oumla({
apiKey: process.env.API_KEY,
// Additional options...
});
const address = await client.addresses.generate({
network: 'BTC',
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f',
clientShare: 'Your client share'
});
console.log(address);
The expected output
{
message: 'bitcoin mainnet address created',
data: 'tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw'
}
Last updated