.linkedWallets
Offers functionalities for linking external wallets, adding or removing them as needed, which is vital for expanding financial management options outside the platform.
listLinkedWallets()**:
Lists all wallets linked to the user's account.
const {body:linkedWallets} = await api.linkedWallets.listLinkedWallets()
for (const wallet of linkedWallets){
console.log(`${wallet.walletType} wallet: ${wallet.walletAddress}`)
}
addLinkedWallet(walletAddress, currency)**:
Adds a new wallet to the user's account.
const {body:newWallet} = await api.linkedWallets.addLinkedWallet({
walletAddress: '0x1234567890abcdef1234567890abcdef12345678',
walletType: 'ETH',
walletName: 'My Wallet'
})
console.log(newWallet)
deleteLinkedWallet(walletAddress)**:
Removes a linked wallet from the user's account.
const deletedWallet = await api.linkedWallets.deleteLinkedWallet(
'0x1234567890abcdef1234567890abcdef12345678', 'ETH
)
if (deletedWallet.status === 204) {
console.log('Wallet deleted succesfully')
else {
console.log('something went wrong') }
Updated 7 months ago