Wallet Setup Steps for ChainIT Users
For Users with an Existing Wallet:
- Request Access to Storage: Prompt the user to grant access to storage to load the encoded recovery file.
- Send File to Backend: Post the recovery file to the backend for decoding using the BIT password.
- Decrypt Private Key: Decrypt the private key using the user-provided PIN.
- Store Private Key:
- In-Memory Storage: Temporarily store the private key in the application’s memory.
- Local Storage: Save the private key in local storage with session encryption.
- Marketplace Access: Validate the user's identity via FaceID.
- Transaction Completion: Confirm that the transaction was successful.
For Users without an Existing Wallet:
- Create Non-Custodial Wallet: Generate a new private and public key pair.
- Set Up PIN: Prompt the user to create a PIN to encode the private key.
- Fetch BIT Password: Retrieve the BIT password and encode the generated private key and user ID.
- Send Encoded Strings to Backend:
- Post the encoded strings to the backend.
- The backend will wrap the key with a strong BIT password using AES encryption (e.g., BitUserId + BIT Salt).
- Encode the string with BIT and return the multi-encoded string to the frontend.
- Store Private Key:
- In-Memory Storage: Temporarily store the private key in the application’s memory.
- Local Storage: Save the private key in local storage with session encryption.
- Marketplace Access: Validate the user's identity via FaceID.
- Transaction Completion: Confirm that the transaction was successful.