Getting Wallets

Getting all the wallets and addresses for a user

Suppose you want to view all of the addresses that a certain user generated. You can use the SDK to get back all of their addresses and check the balances.

A wallet is a collection of addresses that the user created. users could generate an infinite number of addresses if they wish but typically the user generates one to two addresses.

Here are the properties for getWallets function:

property description requiredtype

network

specify which blockchin

required

networkType

reference

specify which user

optional

string

for example,

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

const client = new Oumla({
   apiKey: process.env.API_KEY,

   // Additional options...
});

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

console.log(wallets)

// return type is Wallet[]

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

Last updated