The Universal WAX Wallet Adapter
Experience the seamless integration directly in your browser.
Integrate WaxConnect into your project in less than 2 minutes.
Add the script to your HTML <head>. No NPM required.
<script src="https://api.waxconnect.io/static/sdk.js"></script>
Call the login function anywhere in your app.
// type: 'cloud' | 'anchor' | 'wombat'
const user = await window.WaxConnect.login('cloud');
console.log("Logged in as:", user.account);
Use the exposed session object to sign actions.
// Example: Transfer 1 WAX
const action = {
account: 'eosio.token',
name: 'transfer',
authorization: [{ actor: user.account, permission: 'active' }],
data: { from: user.account, to: 'target', quantity: '1.00000000 WAX', memo: '' }
};
// Handle different wallet types automatically
if (user.type === 'cloud') {
await user.session.api.transact({ actions: [action] }, { blocksBehind: 3, expireSeconds: 30 });
} else {
await user.session.transact({ action });
}
await window.WaxConnect.logout();