You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling IdentityManager - > exportIdentity and then IdentityManager - > importIdentity(...) on the same machine (having the same sqlite file and running nodejs) the method works. But when calling at on another machine with React Native it throws Method importKey not implemented.
Note: this issue emerged when trying to implement Identity export/import according to #202
I tried to manually import the Key first bust after successfully importing and exporting them, before the Identity import, and then importing the Identities, the same exception came.
I double-checked that the providers are set correctly. Actually, everything else other than this function works well.
However, bellow is the providers' setup code:
let KeyManagementSystem, SecretBox;
if (isNode) { // For NodeJS (the test-cases run within Node)
// Note: having the following block without 'eval' will cause the react native app to crash!
// Unclear why, even when the 'if' condition is false, react-native crash if there is no 'eval'!
eval('const libsodium = require("daf-libsodium");\
KeyManagementSystem = libsodium.KeyManagementSystem;\
SecretBox = libsodium.SecretBox;');
}
else { // For react-native
const libsodium = require("daf-react-native-libsodium");
KeyManagementSystem = libsodium.KeyManagementSystem;
SecretBox = libsodium.SecretBox;
}
...
const kms = new KeyManagementSystem(keyStore)
...
const identityProviders = [
new EthrDid.IdentityProvider({
identityStore: new IdentityStore('rinkeby-ethr', dbConnection),
kms,
network: 'rinkeby',
rpcUrl: 'https://rinkeby.infura.io/v3/' + infuraProjectId,
}),
]
...
// Initializing the agent
export const agent = new Agent({
dbConnection,
didResolver,
serviceControllers,
identityProviders,
actionHandler,
messageHandler,
})
...
DAF version 5.6.5
What do you suggest?
Thanks,
The text was updated successfully, but these errors were encountered:
[Edited]
Hello,
When calling IdentityManager - > exportIdentity and then IdentityManager - > importIdentity(...) on the same machine (having the same sqlite file and running nodejs) the method works. But when calling at on another machine with React Native it throws
Method importKey not implemented
.Note: this issue emerged when trying to implement Identity export/import according to #202
I tried to manually import the Key first bust after successfully importing and exporting them, before the Identity import, and then importing the Identities, the same exception came.
I double-checked that the providers are set correctly. Actually, everything else other than this function works well.
However, bellow is the providers' setup code:
DAF version
5.6.5
What do you suggest?
Thanks,
The text was updated successfully, but these errors were encountered: