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.
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/answerpair, you can request a registered wallet restore questions.
let isSuccess: Bool = try await 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"
)
let result: FncyQuestion = try await fncyWallet.getResetQuestion()
let isSuccess: Bool = try await fncyWallet.postResetQuestion(
answer: "Backup Question's Answers",
newPinNumber: "New Wallet Password"
)
let isSuccess: Bool = try await fncyWallet.resetWalletPin(
oldPinNumber: "Current Wallet Password",
newPinNumber: "New Wallet Password"
)