<CreateWallet> is a React component that renders a button which initiates a flow to create a wallet tied to a user's email address. Paper does not have the ability to read the private keys of this wallet, and the user can choose to export the private keys of this wallet at any time by accessing a link that we can provide (please contact us for details of the export flow).
The flow works as follows:
1. Paper sends the user a verification email (to the address provided to the
emailAddressprop) to ensure that they own the email that is being passed in. This is the email address that the wallet will be tied to.
Optional event callback function
onEmailVerificationInitiated is called when the user clicks on the button. If nothing is passed in, we show default messages to prompt the user to check their email for verification.
2. Paper calls
onSuccess when email verification succeeds and passes through an object that contains the user's email address and wallet address. If verification failed,
onError is called with an error message.