These data types generate standard
bitcoin: and ethereum: scheme URIs.
They are compatible with wallets including MetaMask, Trust Wallet, Coinbase
Wallet, BlueWallet, Muun, and any other app that implements BIP-21 (Bitcoin)
or EIP-681 (Ethereum).Bitcoin (BTC)
QrCode::BTC() produces a BIP-21 bitcoin: payment URI. Pass the recipient address and amount, with optional label, message, and return URL.
Signature
The amount in BTC. Must be a positive numeric value. Pass as a string (e.g.
'0.005') to avoid floating-point precision issues with very small values.A human-readable label for the payment destination, shown in the wallet UI
(maps to the
label query parameter).A URL the wallet should redirect to after the transaction is broadcast (maps
to the
r query parameter).Examples
Ethereum
QrCode::Ethereum() produces an EIP-681 ethereum: payment URI. Pass the wallet address and an optional amount denominated in ETH.
Signature
The recipient Ethereum address. Must be a non-empty string (e.g. an EIP-55
checksummed address).
The requested amount in ETH. Omit or pass
null to create an address-only QR
code with no fixed amount.