Elevate Your Blockchain Experience
Microwallets
Crafting exceptional digital experiences through innovative design and cutting-edge technology.
Introduction
MicroWallets is a secure and efficient solution for managing digital wallets and transactions. This guide will walk you through the implementation and usage of MicroWallets in your application.
Getting Your API Key
- 1Create an organization account
- 2Log in with your email address
- 3Find your API key in the dashboard
Important Notes
- 1After completing OTP verification, wallet ID, user ID and other details will be provided as query parameters in the response.
- 2API key authentication is mandatory for all API requests.
- 3Username and password are optional, but required for users who need wallet mnemonic functionality.
- 4For security purposes, only password hashes are stored - never the actual passwords.
- 5For support, bug reports, or feature requests, please contact: sunil.kapadia@growthaxl.com
Authentication
Learn how to authenticate users and manage sessions
Login Implementation
signin.tsx1// Example login implementation 2 3 const Login = async () => { 4 try { 5 const response = await axios.post( 6 "https://beta-microauth-backend-staging-bfgqbbcefvb3csfx.centralindia-01.azurewebsites.net/auth/email-otp", 7 { 8 email, 9 username, //optional 10 password, //optional 11 provider: "OTP", 12 redirectUrl: "http://localhost:3000/signin", 13 }, 14 { 15 headers: { 16 "Content-Type": "application/json", 17 Authorization: "Bearer <YOUR API KEY>", 18 }, 19 } 20 ); 21 // Use router.push instead of window.location for better Next.js integration 22 23 // You will receive a OTP URL screen which will be used for authentication 24 window.location.replace(response.data.message); 25 // router.push(response.data.message); 26 } catch (error) { 27 console.error("Login error:", error); 28 } 29 }; 30};
User Details
Create and manage digital wallets
Creating a New Wallet
signin.tsx1// You will get "userid" , "walletid" , "orgid" and "LoginSucess" in the query params of your redirect URL 2 // Store then in cookies, DB or browser storage as you wish. 3 const getWalletDetails = async () => { 4 try { 5 if (localStorage.getItem("LoginSucess") === "true") { 6 // First API call to get wallet details 7 const wallet = await axios.get( 8 "https://beta-microauth-backend-staging-bfgqbbcefvb3csfx.centralindia-01.azurewebsites.net/wallet/<Wallet Id>", 9 { 10 headers: { 11 "Content-Type": "application/json", 12 Authorization: "Bearer <YOUR API KEY>", 13 }, 14 } 15 ); 16 localStorage.setItem("LoginSucess", "LoggedIn") 17 router.push("<post authentication route>"); 18 } 19 } catch (error: any) { 20 console.log("error", error); 21 } 22 };
Transactions
Process and manage transactions
Making a Transaction
signin.tsx1async function getSecrets() { 2 const responseMicro = await axios.get( 3 "https://beta-microauth-backend-staging-bfgqbbcefvb3csfx.centralindia-01.azurewebsites.net/wallet/private/<Wallet ID>", 4 { 5 headers: { 6 "Content-Type": "application/json", 7 Authorization: "Bearer <YOUR API KEY>", 8 }, 9 } 10 ); 11 12 const secretKey = responseMicro.data.secretKey; 13 const mnemonic = responseMicro.data.mnemonic; 14 15 return { secretKey, mnemonic }; 16 }