For a profile to receive digital assets they need a receiving address. every profile has the ability to get millions of receiving addresses.
Each address has metadata such as balance.
import { Oumla } from "@oumla/sdk";
const client = new Oumla({
apiKey: process.env.API_KEY,
// Additional options...
});
const address = await client.addresses.get();
console.log(address);
{
addresses: [
{
address: 'tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw',
date: '2024-01-17T18:35:42.663Z',
label: null,
sub: '4bcc74c3-dc5c-4bfd-aaf3-6881a1b28809',
network: 'BTC',
balance: 0,
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f'
},
{
address: 'tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw',
date: '2024-01-17T09:10:17.944Z',
label: null,
sub: '4bcc74c3-dc5c-4bfd-aaf3-6881a1b28809',
network: 'BTC',
balance: 0,
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f'
},
// and the other addresses ...
],
totalElements: 2,
totalPages: 1,
skip: 0,
take: 10
}
const client = new Oumla({
apiKey: process.env.API_KEY,
// Additional options...
});
const address = await client.addresses.get({
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f',
});
console.log(address);
{
addresses: [
{
address: 'tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw',
date: '2024-03-10T13:07:56.936Z',
label: null,
network: 'BTC',
balance: 0,
reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f'
}
// and the other addresses ...
],
skip: 0,
take: 10,
totalElements: 1,
totalPages: 1
}
]