Open naman20sharma opened 3 years ago
@naman20sharma,
EdgeClientService.CreateBackupAsync
)AgentContext.Wallet.ExportAsync
)From Cloud Backup
EdgeClientService.RetrieveBackupAsync
)EdgeClientService.RestoreFromBackupAsync
)From File Backup
Attachment.Data.Base64
)EdgeClientService.RestoreFromBackupAsync
)Below are the answers to your questions, with reference to Mobile Edge Agents
Are these methods capable of creating and restoring wallet backups if I reinstall the application on different phone? A. The backups can be restored on the same device or onto another device (iOS and Android). The same backup can be restored on multiple devices
Does Mediator's Inbox(in .IndyClient folder ) contains a backup or copy of the wallet? If 'yes' than can we access that for restoring wallet? A. Not sure about this. This needs to be explored further
Should I be looking into Hyperledger.Indy.WalletApi's ExportAsync & ImportAsync methods? A. Refer to the steps above to backup and restore a wallet onto the same or a different device
Hi @sahil-khanna thanks for your reply.
I've been using Aries .NET sdk for over a year now. I've tried using the apis mentioned above. But, my concern was that (EdgeClientService.RetrieveBackupAsync)
requires agentContext as an argument, and context is available post-provision (includes Creation) of the Wallet.
So, do we need to create a new wallet first and only then can we retrieve the backup stored with the mediator agent ?
If yes then attributes of the wallet like WalletCredentials.Key
and connection with the mediator-agent will be new. So, does this restoration of the wallet replaces these attributes and connectionID
(with the mediator) with the older one ?
Hi @sahil-khanna thanks for your reply. I've been using Aries .NET sdk for over a year now. I've tried using the apis mentioned above. But, my concern was that
(EdgeClientService.RetrieveBackupAsync)
requires agentContext as an argument, and context is available post-provision (includes Creation) of the Wallet. So, do we need to create a new wallet first and only then can we retrieve the backup stored with the mediator agent ? If yes then attributes of the wallet likeWalletCredentials.Key
and connection with the mediator-agent will be new. So, does this restoration of the wallet replaces these attributes andconnectionID
(with the mediator) with the older one ?
From what I have seen so far
AgentOptions
. These need to be used henceforth
AgentOptions agentOptions = await EdgeClientService.RestoreFromBackupAsync(AgentContext, seed)
Note: I haven't checked if the connectionId
of the MediatorAgent will change after restoration. However, I believe the connectionId
of the MediatorAgent will be of the restored (old) one.
Hi @sahil-khanna,
I try to use the RestoreFromBackupAsync function, but I have a problem.
I don't know what to do with the AgentOptions
: when i try to use it in _edgeProvisioningService.ProvisionAsync(agentOptions)
it return The wallet already exists
but the restore works.
Everything is alright until I restart my Wallet :
_agentContextProvider.GetContextAsync() return
Hyperledger.Indy.WalletApi.WalletNotFoundException: The wallet does not exist.
Even if I store the AgentOption
and try to ProvisionAsync
when the app start, it doesn't work : GetContextAsync
return the same Exception
Am I forgetting to do something?
Hi @sahil-khanna,
I try to use the RestoreFromBackupAsync function, but I have a problem. I don't know what to do with the
AgentOptions
: when i try to use it in_edgeProvisioningService.ProvisionAsync(agentOptions)
it returnThe wallet already exists
but the restore works.Everything is alright until I restart my Wallet : _agentContextProvider.GetContextAsync() return
Hyperledger.Indy.WalletApi.WalletNotFoundException: The wallet does not exist.
Even if I store the
AgentOption
and try toProvisionAsync
when the app start, it doesn't work :GetContextAsync
return the same ExceptionAm I forgetting to do something?
Hi @Acarcan, did you get any success ?
CreateBackupAsync and RetrieveBackupAsync(or RestorFromBackupAsync) in Hyperledger.Aries.Routing.IEdgeClientService
I have few questions regarding Wallet Backups:
Are these methods capable of creating and restoring wallet backups if I reinstall the application on different phone? Well I tried it myself, but as these methods have Context as an argument, which doesn't have an instance before the wallet is created. So, the backup was restored, but only in the case where app wasn't uninstalled. eg. I just deleted the credential and connection after creating the backup and restored it(using same seed), but didn't work if I uninstalled the app.
Does Mediator's Inbox(in .IndyClient folder ) contains a backup or copy of the wallet? If 'yes' than can we access that for restoring wallet?
Should I be looking into Hyperledger.Indy.WalletApi's ExportAsync & ImportAsync methods? As it seems to fix the problem of restoration of backups after reinstalling the application.