This guide is designed to help you swiftly integrate wallet functionalities into your application. Follow the steps below to set up and start using the Wallet class.
Good to know: A quick start guide is handy to get you swiftly integrated with the Wallet SDK, allowing you to leverage wallet functionalities in your application. Whether you're a meticulous documentation reader or a dive-right-in developer, this guide is designed to give you the basics and get you up and running!
Install Wallet SDK
The best way to interact with our API is to use one of our official libraries:
# Install via NPMnpminstalldidpass-wallet-sdk
Importing Classes
Start by importing the necessary classes from the SDK in your JavaScript file:
Create a new instance of the Wallet class using the create static method. Provide the authServerBaseUrl and a storage instance implementing the IStorage interface:
constauthServerBaseUrl:string="YOUR_AUTH_SERVER_BASE_URL";conststorage:IStorage=// Your implementation of the IStorage interfaceconstwallet:Wallet=Wallet.create(authServerBaseUrl,storage);
Here is an example implementation of IStorage written in React Native
Wallet Creation
Creates a new ethereum wallet.
Wallet Import
Handle to bring your wallet you already have.
Wallet Recovery
Handle to recover your lost a wallet by recovering it.
Wallet Deletion
Handle deletion of your existing wallet.
Utilizing the Wallet Instance
With the Wallet instance created, you have access to various functionalities:
Wallet Management: Facilitate the creation of new wallets with the walletManagement property.
Wallet Login: Manage user login into wallets using the walletLogin property.
User Info: Manage user info of wallet using the userInfo property.
Storage: Access the storage instance implementing the IStorage interface through the storage property.
SIWE Services: Manage Sign In With Ethereum services using the siweServiceClient property.
ZkPass Client: Manage Generate ZkPass Proof Token services using the zkPassClient property.
Authentication: This is an advanced feature. Utilize authentication methods via the authServerClient property of the Wallet instance.
Note: The Authentication feature is intended for advanced users who are familiar with deeper integrations and configurations. Ensure you understand its implications before implementing.
Exploring Further
Explore the SDK documentation to learn about the detailed functionalities of each class and method, discover additional features, and understand how to customize the SDK for your needs.