Qtum Wallet Snap
A MetaMask Snap that adds first-class Qtum blockchain support to your existing MetaMask wallet. Hold QTUM, manage QRC20 tokens, sign transactions, bridge USDC, and call Qtum smart contracts — all from the same wallet you already use for Ethereum.
What Is the Qtum Wallet Snap?
The Qtum Wallet Snap is an extension that lives inside MetaMask and acts as an RPC
proxy between your dApp and the Qtum blockchain. From a developer's perspective, it
looks just like calling MetaMask — you use window.ethereum.request
with wallet_invokeSnap, and the Snap forwards the request to a Qtum node
using the Qtum ethers adapter.
From a user's perspective, it means you don't need a separate wallet to interact with
Qtum. Your Qtum private key is derived from the same MetaMask seed phrase you already
have, using the standard BIP32 path m/44'/88' — the registered Qtum
coin type. The Snap or the Qtum team never see your keys.
MetaMask Snaps are sandboxed JavaScript modules that extend MetaMask's functionality
beyond Ethereum. Snaps are reviewed and listed in the
MetaMask Snaps Directory
after passing an audit by a Consensys-approved firm. The Qtum Wallet Snap was
audited by Sayfer and is published as
npm:qtum-wallet.
What You Can Do With It
Hold & Send QTUM
Generate a Qtum address derived from your MetaMask seed, view your balance, and send QTUM to any address.
Manage QRC20 Tokens
Track and transfer QRC20 tokens (Qtum's equivalent of ERC20) directly from the Snap's home page.
Bridge USDC
Move bridged USDC between Sepolia and Qtum using the Qtum Bridge, with the Snap orchestrating the multi-chain handshake.
Sign & Send Transactions
Sign typed data, sign personal messages, send transactions, and call any Qtum smart contract through standard eth_* methods.
Multi-Network
Switch between Qtum mainnet, testnet, and any custom RPC endpoint you add via wallet_addEthereumChain.
Build dApps
Drop the Snap into any web app and use the same JSON-RPC patterns you already know from MetaMask — with the Qtum chain underneath.
How It Works
The Snap sits between your dApp and the Qtum network. Calls go through MetaMask, are handled by the Snap's sandboxed JavaScript code, and are forwarded to a Qtum RPC node using the Qtum ethers adapter. Transactions are signed locally inside the Snap and never leave MetaMask in plaintext.
The connect flow
Request the Snap
The dApp calls wallet_requestSnaps with npm:qtum-wallet. MetaMask prompts the user to install the Snap if they don't have it, showing the permissions it needs.
Get the Qtum address
The dApp invokes wallet_getAddress. The Snap derives a Qtum key from the user's MetaMask entropy and returns a base58 address (e.g. qHefBTey9EtDo87fPc5eqdxapCzt9ovBz5).
Read & write to Qtum
Use familiar JSON-RPC methods (eth_getBalance, eth_call, eth_sendTransaction, personal_sign, ...) routed through the Snap. Smart-contract calls behave the same as on Ethereum.
User confirms in MetaMask
For any signing or send action the Snap shows a MetaMask confirmation dialog with the transaction details. The user explicitly approves before anything is signed or broadcast.
Install & Use
For users
Visit any dApp that integrates the Snap (such as the Qtum Dice or Lucky Spin demos), click Connect Wallet, and approve the Snap install prompt in MetaMask. You can also install it directly from the MetaMask Snaps Directory.
For developers
The Snap is published on npm as qtum-wallet. To request it from a dApp:
const SNAP_ID = 'npm:qtum-wallet';
// 1. Ask MetaMask to install / enable the Snap
await window.ethereum.request({
method: 'wallet_requestSnaps',
params: { [SNAP_ID]: {} },
});
// 2. Get the user's Qtum address
const address = await window.ethereum.request({
method: 'wallet_invokeSnap',
params: {
snapId: SNAP_ID,
request: { method: 'wallet_getAddress' },
},
});
// 3. Read the balance
const balanceHex = await window.ethereum.request({
method: 'wallet_invokeSnap',
params: {
snapId: SNAP_ID,
request: {
method: 'eth_getBalance',
params: [address, 'latest'],
},
},
});
A complete React integration — including QTUM-specific gotchas like base58 ↔ hex address conversion, satoshi-based unit math (Qtum uses 8 decimals, not 18), and ABI encoding for contract calls — is documented in the Snap Integration Guide.
Supported RPC Methods
The Snap implements the MetaMask JSON-RPC API surface that makes sense for Qtum, plus
a few wallet-management helpers. All of these are invoked through
wallet_invokeSnap.
Wallet management
| Method | Purpose |
|---|---|
wallet_getAddress | Returns the user's Qtum base58 address |
wallet_createRandom | Create a brand-new wallet (with confirmation dialog) |
wallet_fromMnemonic | Derive a wallet from MetaMask mnemonic entropy |
wallet_fromPrivateKey | Import a wallet from a raw private key |
wallet_exportPrivateKey | Reveal the active private key (with confirmation) |
wallet_addEthereumChain | Register a custom Qtum-compatible network |
wallet_switchEthereumChain | Switch the active network |
wallet_removeChain | Remove a previously added network |
wallet_getAllSupportedChains | List all configured networks |
Reading from the chain
| Method | Purpose |
|---|---|
eth_accounts / eth_requestAccounts | Active account address (hex form) |
eth_getBalance | QTUM balance for an address |
eth_blockNumber | Latest block height |
eth_chainId | Current network chain ID |
eth_call | Read-only smart contract call |
eth_estimateGas | Estimate gas for a transaction |
eth_getCode | Bytecode at an address |
eth_getLogs | Filtered event logs |
eth_getTransactionByHash | Transaction lookup |
eth_getTransactionReceipt | Receipt & logs for a confirmed tx |
eth_feeHistory | Historical fee data |
Signing & sending
| Method | Purpose |
|---|---|
eth_sendTransaction | Sign and broadcast a Qtum transaction (returns tx hash) |
personal_sign | Sign a UTF-8 message after user confirmation |
eth_signTypedData_v4 | Sign EIP-712 structured data |
QTUM uses 8 decimal places (satoshis), not Ethereum's 18 (wei) — use
ethers.parseUnits(amount, 8) when constructing transaction values.
Maximum gas price is 0.000001 QTUM per gas unit; 0.0000004
is a safe default. Transaction hashes from the Snap are 0x-prefixed,
but the Qtum block explorer expects them without the prefix.
Security & Trust Model
Audited
The Qtum Wallet Snap was audited by Sayfer, a Consensys-approved auditor, and went through Consensys' Snap review process before being listed in the MetaMask Snaps Directory.
Non-custodial & sandboxed
The Snap runs inside MetaMask's secure sandbox, communicates only through MetaMask's
JSON-RPC bridge, and never exposes your private key to dApps or to the network. Keys
are derived from your MetaMask seed phrase using BIP32 path
m/44'/88', so the same recovery phrase that backs up your Ethereum
accounts also backs up your Qtum account. Neither the Qtum team nor MetaMask can
access your wallet.
Permissions requested
| Permission | What it's used for |
|---|---|
snap_dialog | Show transaction confirmations and result dialogs |
snap_getBip32Entropy (m/44'/88') | Derive the Qtum private key from MetaMask's seed |
snap_manageState | Persist user-added networks & settings |
endowment:network-access | Talk to Qtum RPC and bridge validator endpoints |
endowment:ethereum-provider | Coordinate with MetaMask for Ethereum-side bridge transactions |
endowment:page-home | Render the Snap's home page inside MetaMask |
endowment:webassembly | Run cryptographic primitives required for signing |
endowment:rpc | Accept JSON-RPC requests from dApps |
Because the Qtum key is derived from your MetaMask mnemonic entropy, recovering your MetaMask seed also recovers your Qtum account. Treat that seed phrase the same way you would for any wallet — never share it, never paste it into a website, and never enter it into anything that isn't the official MetaMask extension.
See It in Action
Two reference dApps demonstrate end-to-end use of the Snap, with full source and documentation:
Qtum Dice
A provably fair dice betting game built on Qtum. Includes a complete walkthrough of Snap integration, ABI encoding, and the commit-reveal smart contract.
Lucky Spin
A wheel-spin prize game with eight segments and on-chain settlement. Demonstrates fixed-cost contract calls and event-driven payouts via the Snap.
Resources
- npm package: npmjs.com/package/@qtumproject/qtum-wallet
- MetaMask Directory: snaps.metamask.io — Qtum Wallet
- Source code: github.com/qtumproject/qtum-extension-wallet
- Qtum docs: docs.qtum.site
- Community: Qtum Discord · [email protected]