import { WalletService, Crypto } from '@handcash/sdk'; const walletService = new WalletService({ appId: '<YOUR-APP-ID>', appSecret: '<YOUR-APP-SECRET>', }); // Request email verification code const email = 'user@example.com'; const requestId = await walletService.requestSignInEmailCode(email); // Verify email code const verificationCode = '01234567'; // Code entered by user const keyPair = Crypto.generateAuthenticationKeyPair(); await walletService.verifyEmailCode(requestId, verificationCode, keyPair.publicKey); // Activate access for existing user await walletService.activateAccessKey(keyPair.publicKey, email); // Store the authentication key securely await storeAuthenticationKey(keyPair.privateKey); // Get access to the wallet const account = walletService.getWalletAccountFromAuthToken(keyPair.privateKey);
activateAccessKey()
createWalletAccount()