Retrieve user wallets
How to retrieve a user's wallets
To fetch the wallet for a certain user you need to call the function getWallets, which will return an array of wallets with additional details for each wallet.
πŸ§™ If you only want to retrieve a user's wallet thengetWallets is the perfect function, but if you also need to authenticate the user and maybe get his email address or first name, then it is recommended to retrieve the user account.

Function

1
venlyConnect.api.getWallets();
Copied!

Example

1
const venlyConnect = new VenlyConnect('YOUR_CLIENT_ID');
2
venlyConnect.api.getWallets().then((wallets)=>{
3
console.log(`The address of the first wallet is: ${wallets[0].address}`);
4
});
Copied!

Returns

1
[ {
2
"id" : "1",
3
"address" : "0xdc72b72db54e227e65a45004ab2798d31e8934c2",
4
"walletType" : "THREEWAY_SHARED",
5
"secretType" : "ETHEREUM",
6
"createdAt" : [ 2019, 11, 23, 22, 46, 32 ],
7
"archived" : false,
8
"alias" : "aliasEth",
9
"description" : "descriptionEth",
10
"primary" : false,
11
"hasCustomPin" : false,
12
"balance" : {
13
"available" : false,
14
"secretType" : "ETHEREUM",
15
"balance" : 1.0,
16
"gasBalance" : 1.0,
17
"symbol" : "ETH",
18
"gasSymbol" : "ETH",
19
"rawBalance" : "1000000000000000000",
20
"rawGasBalance" : "1000000000000000000",
21
"decimals" : 18
22
}
23
}, {
24
"id" : "3",
25
"address" : "0xae52b72db54e137a65a42434ab2543d31f8454c3",
26
"walletType" : "THREEWAY_SHARED",
27
"secretType" : "VECHAIN",
28
"createdAt" : [ 2019, 11, 23, 22, 46, 32 ],
29
"archived" : false,
30
"alias" : "aliasVechain",
31
"description" : "descriptionVechain",
32
"primary" : false,
33
"hasCustomPin" : false,
34
"balance" : {
35
"available" : false,
36
"secretType" : "VECHAIN",
37
"balance" : 1.0,
38
"gasBalance" : 1.0,
39
"symbol" : "VET",
40
"gasSymbol" : "VTHO",
41
"rawBalance" : "1000000000000000000",
42
"rawGasBalance" : "1000000000000000000",
43
"decimals" : 18
44
}
45
} ]
46
​
Copied!

Function Reference

The function reference describes the different functions that are available in the Widget. For each function you can find the signature, it's parameters, and possible options documented.
Last modified 7d ago