import { exportWaasPrivateKey, isWaasWalletAccount } from '@dynamic-labs-sdk/client/waas'; import { client } from './client'; const exportPrivateKey = async () => { const walletAccounts = client.wallets.getWalletAccounts(); const walletAccount = walletAccounts[0]; if (!isWaasWalletAccount(walletAccount)) { return; } await exportWaasPrivateKey({ walletAccount, displayContainer: document.getElementById('display-container'), }); }; // Add a container in your UI to inject the iframe // E.g: <div id="display-container"></div>
NotWaasWalletAccountError
Was this page helpful?