WAXPBLOCKCHAIN WIKI
SDK guide

Wallet integration with WharfKit

A wallet connection is a session between an application, a WAX account and a signing provider. WharfKit gives modern Antelope applications a structured way to create, restore and use that session.

Updated 29 November 2026 · Independent guide

In plain English WharfKit helps website builders connect an app to a wallet so visitors can approve actions. Start collecting · Browse collections

Separate sessions, wallets and chain data

WharfKit is the recommended starting point in current WAX documentation for browser and app-side wallet integration. Its session tooling coordinates supported wallet plugins, account selection, persistence and transaction signing.

A session identifies an account and permission on a particular chain. The wallet plugin handles communication with the external signer. RPC endpoints provide chain data and accept signed transactions. These are separate responsibilities: a restored session does not prove that an endpoint is healthy, and a readable account page does not prove that a wallet can sign.

Connection is not blanket consent

Login can identify the account. Every state-changing transaction should still present understandable actions for approval through the wallet.

Login, account choice and restoration

A good login flow lets the user choose an available wallet, select an account when the wallet supports several and understand which network the application expects. Save only the session information required for restoration; never store private keys in application storage.

On reload, restoration should be treated as a recoverable attempt. The wallet may have been removed, the selected account may have changed or stored state may refer to the wrong chain. When restoration fails, clear only the application’s stale session data and return to explicit login rather than trapping the user in a loop.

Always display the active account prominently. Applications that allow multiple sessions should label them clearly and scope cached data by chain, account and permission. A balance cached for one account must never appear under another after a quick switch.

Build readable signing requests

A transaction contains one or more actions. Construct each with the exact contract account, action name, authorisation and data. Use WharfKit’s session transaction path to request the wallet signature, then retain the returned transaction ID and surface a useful result.

The interface should explain the human intent before opening the signer, but the wallet view remains the independent check. Avoid generic labels such as “verify” for actions that transfer assets, change permissions or invoke a contract. If multiple actions are bundled, explain why they belong together.

Handle denial as a normal outcome, not an exception that damages the session. Distinguish user cancellation, invalid authority, resource exhaustion, endpoint failure and contract rejection. Blind automatic retries can create duplicate value transfers if the first result was merely delayed.

Configure chain and endpoints deliberately

The session must target the correct WAX chain ID and suitable RPC endpoint. Testnet and mainnet can have accounts with similar names but completely different state. Validate chain information at startup and fail clearly when the wallet or endpoint is on another environment.

Do not couple wallet integration to one free endpoint. Use health checks and fallback providers for reads and transaction submission, while tracking the exact transaction being retried. History and AtomicAssets queries should use their dedicated APIs rather than overloading the chain RPC.

Wallet availability varies by browser, device and embedded webview. Detect supported options and provide an honest fallback. Do not show a wallet button that cannot operate in the current environment.

Integration security checklist

  • Use current WharfKit and supported wallet plugins from trusted package sources.
  • Never request, transmit or store a user’s private key.
  • Show active chain, account and permission.
  • Describe contract actions and asset quantities before signing.
  • Expire or clear stale sessions without deleting unrelated wallet data.
  • Protect front-end dependencies and content delivery from tampering.
  • Verify important identity claims server-side with a purpose-built signature flow.
  • Log transaction IDs and structured error categories, not secrets.

Server-side authentication should validate wallet-driven identity without turning the backend into a custodian. Use a nonce or challenge design with expiration and replay protection rather than treating a client-supplied account name as proof.

Primary sources