@depay/widgets 9.3.1 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1843,6 +1843,17 @@ DePayWidgets.Login({ message, recover: ({ message, signature })=>{
1843
1843
  })
1844
1844
  ```
1845
1845
 
1846
+ ### Sign message containing the account address
1847
+
1848
+ In case you want to include the wallet account identifier in the to be signed message, pass a callback function returning a string to `message`:
1849
+
1850
+ ```javascript
1851
+ let account = await DePayWidgets.Login({
1852
+ message: (account)=>`Click to log in to DePay and to accept DePay's Terms of Service: https://depay.com/legal/terms\n${dateTime}\n${account}`
1853
+ })
1854
+ console.log("Logged in via signature", account)
1855
+ ```
1856
+
1846
1857
  ### Rejections
1847
1858
 
1848
1859
  1. Rejects if user just closes the dialog without connecting any wallet: