Skip to content

v4.7.2

Compare
Choose a tag to compare
@0xFirekeeper 0xFirekeeper released this 01 Mar 03:23
56e567e

What's Changed

  • [General] Offline transaction - or more importantly UserOp (Smart Wallet Transaction) - signing is now supported by using the Transaction.Sign API. This will return a signed transaction or signed UserOperation respectively. These results can be forwarded to thirdweb Engine for later broadcasting. This is specially useful for cases where you may want to create a session key for new users, while not necessarily broadcasting it (and potentially paying for it) instantly; you might want to wait a few minutes to make sure they want to actually interact with your app before committing to the sponsorship, at which point you can broadcast the op first before handling further transactions. In this case, deployment of the smart wallet would also be bundled with the session key creation. Niche use case, but extremely powerful.
  • [General] Added an example of the above use case in Prefab_SmartWallet.cs in the ridiculously-named method PreSignSessionKeyTxAsUserOpForLaterBroadcastingThroughThirdwebEngine
  • [General] Wallet.SignTypedData no longer forcefully deploys your smart wallet, saving your users an unwanted extra signature.
  • [WebGL] Wallet.SignTypedData is now supported in WebGL.
  • [WebGL] Array arguments passed to custom contract calls are now treated as IEnumerable and any byte[] types are automatically hexified. This was the case for non array arguments only previously.