registry.authenticate(vaultedKeyProvider, {derivationPath: JolocomLib.KeyTypes.jolocomIdentityKey, encryptionPass: password})
.then(identityWallet => {
configureRoutes(app, {setAsync, getAsync, delAsync}, identityWallet, password)
configureSockets(server, identityWallet, password, new DbWatcher(getAsync), {getAsync, setAsync, delAsync})
})
Demo service started, listening on port 9010
(node:329398) UnhandledPromiseRejectionWarning: Error: Could not retrieve DID Document. Returned error: project ID is required
at JolocomRegistry.resolve (/opt/js/jolocom/demo-sso/node_modules/jolocom-lib/ts/registries/jolocomRegistry.ts:175:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:329398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:329398) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Where is your service deployed. E.g. https://demo-sso.jolocom.com
IResolver
, IRegistrar
interfaces)
sdk.didMethods.get('jolo').registrar.updatePublicProfile
// @ts-ignore
that line, the .didMethods
object will not show the full type
Hi @chunningham , In the creating an Identity section of the documentation, the sdk.createNewAgent method for creating agent with a new random identity does not exists in the SDK.
I assumed it must me sdk.createAgent , but upon calling this one I am getting the error: insufficient funds for intrinsic transaction cost, Is there some initial SDK configuration that I am missing ? can you please clarify this.
also, the example in the same section of docs mention loadIdentity method, which again does not exists in sdk.
you can extract the eth public key using this line:
const {publicKeyHex} = await agent.keyProvider.getPubKeyByController(password, `${keyProvider.id}#keys-2`)
if you prepend 0x
to publicKeyHex
you have the eth address and can fuel it here: https://faucet.rinkeby.io/
Hi @chunningham , fueling did work, but i still cannot create an agent, I think there is some restrictions on infura API that is configured in the sdk. here is the new error generated by await sdk.createAgentFromMnemonic(mnemonic)
:
{
reason: 'bad response',
code: 'SERVER_ERROR',
status: 403,
headers: {
date: 'Wed, 25 Nov 2020 10:16:32 GMT',
'content-type': 'application/json',
'content-length': '97',
connection: 'close',
vary: 'Origin'
},
body: '{"jsonrpc":"2.0","id":48,"error":{"code":-32002,"message":"rejected due to project ID settings"}}',
requestBody: '{"method":"eth_getTransactionReceipt","params":["0xf01c2e205f069579ae03ec16324b159c69828ac8639ab81f6972976d8fcea7f9"],"id":48,"jsonrpc":"2.0"}',
requestMethod: 'POST',
url: 'https://rinkeby.infura.io/v3/64fa85ca0b28483ea90919a83630d5d8'
}
Do I need to configure my own infura API?