wallet_scanQRCode
Requests that the user scan a QR code using their device camera. Introduced by EIP-945.
Parameters
Regex(string)A regular expression (regex) string for matching arbitrary QR code strings.
Returns
A string corresponding to the scanned QR code. If a regex string is provided, the resulting string matches it. If no regex string is provided, the resulting string matches an Ethereum address. If neither condition is met, the method returns an error.
Example request
await provider.request({
method: "wallet_scanQRCode",
params: []
});
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}