Import account, or simply import, is a unique feature provided by Lyra blockchain that is used for several important use cases: send by email, reward redemption, and account consolidation.
Send by email
Send by mail feature can be used to make a transfer to a user that does not have a Lyra account - by using his/her email address instead. The sender transfers funds (loyalty reward points, gift cards, LYR tokens, or other customer tokens) to a new, randomly generated temporary account (wallet address). The private key of this temporary account is sent to the recipient via email. To claim the received funds, the recipient imports the temporary account into his newly created or existing wallet account. No one can use the private key of the temporary account anymore as it is linked on the blockchain to the main recipient’s account. The sender can continue sending funds to the same temporary account, but only the recipient now can spend them.
Note that the sender can still use the private key to spend the balance before the temporary account is imported - this way “send by email” can be “cancelled” so the balance on lost or unclaimed transfer can be “returned” by the sender to the sender’s account. So it’s important to note that “send by email” transfer is complete (settled) only after the temporary account has been imported.
Merchant gets a new customer and starts issuing loyalty rewards tokens for each new purchase, even though the customer does not have a Lyra account. At some point, the customer realizes he/she has accumulated reward points and decides to use the rewards, so he/she installs Lyra wallet and creates a new account. He’s now prompted to import the account generated by the merchant - using the private key that’s being emailed by the merchant for each reward transaction. After the key is imported into the new customer account, the wallet can receive all reward transfers previously sent by the merchant to the customer. The merchant can continue sending rewards to the “old”, imported account id, while the customer will be receiving them on his main wallet account.
Thus, the customer can receive rewards from multiple merchants (sent to different imported accounts) on his single wallet account, although merchants don’t know the address of his main account.
CLI wallet and current version of mobile wallets does not support multiple accounts. You need to run multiple instances of CLI wallet (one per account) or switch between accounts in a mobile wallet (backup a private key, remove account, and enter a new private key). Even though Lyra accounts support multiple token balances (any number of different token types can be managed on a single account), there are situations when a user might have multiple accounts. If one of the accounts is only used for receiving incoming transfers, it can be merged with a “main” wallet account using the import feature. All the balances will be transferred from the imported account to the “main” account. After the merge, the imported account’s id (address) can still be used to receive transfers but they will be added to the balance of the main account.
How to use Import Account feature
Reward Redemption scenario
LoyalShopper app already uses temporary accounts to automatically issue rewards to Shopify merchants’ customers. There is no action required from the merchant.
The customers can claim their reward tokens by using the import command in CLI or Import button in mobile wallet (coming soon).
Send by email scenario
CLI wallet commands:
sendbyemail command - coming soon.
import command - development complete, will be available in the next release.
Send button with email address option - coming soon.