Create/Restore Wallet

This article describes how to create/restore a wallet.

Create Wallet

Creating Wallet

If you don't have a wallet, you can create a new one with the parameters 'wallet name' and 'wallet password'.

  • Wallet password can only be a "6-digit string of integers".

  • A user can only create one wallet.

val result = fncyWallet.makeWallet(
walletName = "wallet name",
pin = "wallet password", // A 6-digit string of integers
)

See Also

makeWallet

Setting Wallet Restore Questions/Answers

If a user loses the password to the wallet, the assets in that wallet are lost forever.

However, if a user has registered a wallet restore question/answer, users can recover their wallet using that answer as a recovery key.

Requesting List of Wallet Restore Questions

The recovery key for restoring your wallet is a pair of selected questions and answers.

First, select a restore question by requesting for a list of questions to choose from.

val result = fncyWallet.getQuestionList()

See Also

getQuestionList

FncyQuestion

Registering Wallet Restore Questions/Answers

You can register a wallet restore question/answer using the number of the question (questionSeq), the content of the answer, and the wallet's password.

val result = fncyWallet.postRegisterRestorationKey(
wid = wid, //If makeWallet() succeeds, wid is returned in the result.
questionSeq = questionSeq, //user-selected seq from the list of questions returned by getQuesetionList()
answer = "Backup Question's Answers",
pinNumber = "Wallet Password"
)

See Also

postRegisterRestorationKey

FncyQuestion

Restoring Wallet

If a user forgets their wallet password, they can change their wallet password and recover their wallet if they have a registered wallet recovery question/answer pair.

Calling User's Registered Questions

If you have a registered wallet restore question/answer pair, you can request a registered wallet restore questions.

val result = fncyWallet.getResetQuestion()

See Also

getResetQuestion

FncyQuestion

Entering Question's Answers and New Password

You can change the wallet password and recover the wallet by using the restore wallet answer and the new wallet password.

val result = fncyWallet.postResetQuestion(
answer = "Backup Question's Answers",
newPinNumber = "New Wallet Password"
)

See Also

postResetQuestion

Change Wallet Password

You can change your wallet password using the current wallet password and the new wallet password.

Changing Wallet Password

val result = fncyWallet.resetWalletPin(
oldPinNumber = "Current Wallet Password", 
newPinNumber = "New Wallet Password"
)

See Also

resetWalletPin

Last updated