CreateWallet (React SDK)


Provide the user's email address and success callback handler to the <CreateWallet> component. When this component is rendered, an email is sent to the user prompting them to verify it. Once verified, a Paper Wallet address on the chain specified in PaperSDKProvider is returned.

The same email address will always resolve to the same wallet address on a given blockchain so it is safe to verify email addresses that already have a Paper Wallet.

Code example

<PaperSDKProvider chainName="Polygon">
        emailAddress="[email protected]"
        onSuccess={(user) => { ... }}
        onError={(error) => { ... }}


stringThe user's email address that needs to be verified.
(user: { emailAddress: string; walletAddress: string; }) => voidA callback called when the email is verified and wallet address is created.

The user's email address and wallet address are returned.
redirectUrlstringA URL to redirect the user once they click the link in their email.

If not provided, the email link prompts the user to close the tab and return to your app.
clientIdstringIf provided, an accessCode is provided in the onSuccess callback. This accessCode is used to query the user's wallet information later.
onEmailVerificationInitiated() => voidA callback called after Paper sends an email for the user to verify.

If not provided, Paper provides a UI to tell the user to check their inbox.
onError(error: PaperSDKError) => voidA callback called if there is an error sending the email or creating a wallet address.



If no child element is passed in, a default button is rendered.

`CreateWallet` default button`CreateWallet` default button

CreateWallet default button

Provide your own button by passing a child element into the React component.

  <button class='my-button'>Sign In</button>

Email verification prompt

By default, Paper shows a modal prompting the user to check their email.

To provide your own UX, provide the onEmailVerificationInitiated callback to provide your own instructions prompting the user to check their inbox.