LimePay Wallets

Managing LimePay Wallets

The following functions, described under this Managing LimePay Wallets section can be performed only for shoppers that use LimePay Wallets. More information about the LimePay Wallets can be found in the Wallets guide.

Get Shopper's LimePay Wallet

LimePay.Wallet.get(walletToken) // returns new Promise<>
.then(encryptedWallet => {})
.catch(error => {});

Where walletToken is the token returned after performing Get Wallet Token request through the SDK or a direct call to LimePay's API.

Returns the JSON Encrypted wallet of a shopper (a.k.a keystore file) once the promise is resolved.

Create LimePay Wallet for a Shopper

LimePay.Wallet.create(walletToken, password) // return new Promise<>
.then(mnemonic => {})
.catch(error => {});

Where walletToken is the token returned after performing Get Wallet Token request through the SDK or a direct call to LimePay's API and password is the passphrase that is going to be used for the encryption of the JSON keystore.

Returns the mnemonic of the newly created wallet once the promise is resolved.

You MUST enforce your users to save/store the mnemonic, as it is required when your users forget or want to change the password for their wallet!

Change Wallet's password

You can effectively provide "forgotten password" feature for your users so that they can change the password of their LimePay Wallets. In order to do that you must execute the following function:

LimePay.Wallet.changePassword(walletToken, mnemonic, newPassword) // returns Promise<>
.catch(error => {});

Where walletToken is the token returned after performing Get Wallet Token request through the SDK or a direct call to LimePay's API.

mnemonic is the mnemonic that was returned after creating the original wallet and newPassword is the new passphrase that will be used for encryption of the wallet.

Related Resources