Any questions or issues? Join our community server

1

Installation

Choose your favorite package manager

  • npm

  • yarn

  • pnpm

npm i @lumx-protocol/embedded-wallet@latest
2

Second step

Once the provider is placed at the root of your application, you should be able to call the wallet anywhere in your application.

For more information on styling go to our customization section

App.tsx
import {
    Wallet,
    WalletContextProvider,
} from '@lumx-protocol/embedded-wallet';

function App() {
return (
<WalletContextProvider
        clientId='YOUR_CLIENT_ID'
        onFinishAuth={() => {
            console.log('finish');
        }}>
        <Wallet />
</WalletContextProvider>
)}

export default App
3

Third step

After the authentication, the user will be available on your localStorage under the key wallet.user and its token under wallet.token.

wallet.user
{
    id: string
    walletAddress: string
    name: string
    email: string
    phone: string
}
4

Fourth step

Congratulations! It’s quite straightforward, isn’t it? Now, you have the opportunity to utilize our token to enhance and leverage your application. For more development information and guidelines, please refer to the API Reference section. We’re excited to see the innovative ways you’ll integrate our tools into your application!