WalletsApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| listWallets | GET /wallets | Fetch associated wallet addresses for the user |
| syncWallet | POST /wallets | Associate new wallet address with user |
listWallets#
/*** @returns [Wallet]**/async function listWallets()Fetch associated wallet addresses for the user
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
try { let res = await api.wallets().listWallets(); // res is of type [Wallet] console.log('API called successfully. Result: ', res);} catch (error) { console.error(error);}
Parameters#
This endpoint does not have any parameters.
Return type#
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: /
syncWallet#
/*** @returns null**/async function syncWallet(body: WalletSyncRequest)Associate new wallet address with user
Example#
const yat = require('yatjs');const api = new yat.YatJs();
await api.login("[email protected]", "your_password");
let body = new YatJs.WalletSyncRequest(); // WalletSyncRequest // populate body...
try { await api.wallets().syncWallet(body); console.log('API called successfully.');} catch (error) { console.error(error);}
Parameters#
| Name | Type | Description | Notes |
|---|---|---|---|
| body | WalletSyncRequest | ||
Return type#
null (empty response body)
Authorization#
HTTP request headers#
- Content-Type: Not defined
- Accept: Not defined