EIP-5345 Silent signing JSON-RPC extension (Silent Signing Extension for JSON-RPC)

No call decision · Other · EIP status Stagnant · created 2022-07-26

Adds JSON-RPC methods that let a wallet automatically sign and send transactions, within a time period, contract, and function scope the user has pre-approved, without requesting user confirmation for every transaction.

Why it is needed

Apps that interact frequently with the blockchain, such as games or metaverse apps, must switch to the wallet screen to get approval every time they send a transaction. When this switching happens repeatedly, the app's usage flow keeps getting interrupted and the user experience suffers. The problem is especially severe for games using their own sidechain, where transaction frequency is very high. This proposal aims to reduce the number of these switches by letting the wallet sign and send transactions without user intervention, for a set period of time and only for a set contract address and function, once the user has given consent. The existing standard signing method (e.g. eth_signTransaction) remains in place, and if the user does not consent or the wallet does not support this feature, the app falls back to the usual method of getting approval every time.

What changes

Today

After EIP-5345

Who is affected

In depth

wallet_requestSilentSign

This is the method by which an app requests automatic signing permission. The parameters are until (the end time of the permission, as a unix timestamp), chainId, contractAddress, allowedFunctions (an array of allowed function signature strings, e.g. equip(address,uint256)), and description (an explanation the wallet shows to the user). The wallet shows this information to the user and asks for consent, and upon consent it generates and returns a 20-byte permissionSecret. Standard methods such as eth_signTransaction remain unaffected by this feature.

wallet_silentSignTransaction

This method receives a permissionSecret and a transaction object (from, to, gas, gasPrice, value, data, nonce), and has the wallet perform only the signing in the background. It does not interrupt any other task the user is in the middle of. The return value is the signed transaction data, which the app then sends directly to the blockchain using a library's sendRawTransaction, such as Nethereum's.

wallet_silentSendTransaction

This method receives a permissionSecret and a transaction object, and has the wallet perform not only signing but also sending to the blockchain. The parameter structure is the same as wallet_silentSignTransaction. The return value is a 32-byte transaction hash, and if it has not yet been processed, it returns a hash filled with zeros.

Mobile wallet and WalletConnect communication

Browser extensions or hardware wallets can exchange RPC requests as usual, but mobile wallets are often not connected to a WalletConnect bridge server while the app is inactive. To address this, when a wallet receives a push notification, it connects to the bridge server to check pending requests, and if there is a wallet_silentSignTransaction or wallet_silentSendTransaction request with valid consent for that time period, it processes it without user intervention. Therefore, this feature can only be implemented in wallets that support push notifications.

Security restriction scope

The automatic signing permission is restricted in scope in three ways. First, it is valid only for the specified period. Second, it applies only to a specific contract address on a specific chain. Third, it is limited only to the functions specified in allowedFunctions. This feature is activated only with user consent, and the user can continue using the app in the usual way at any time.

Compatibility with the existing method

These new RPC methods do not conflict with existing methods, and the behavior of wallets or apps that do not support them is unchanged. Push notification handling for mobile wallets is addressed as part of the WalletConnect specification.

Current status

This proposal's status is Stagnant, meaning it is no longer being actively discussed. Since it has not been adopted as a standard, one should not assume that these methods can be used as is in real wallets or apps.

Original EIP · ← EIPs