Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else if (privateKey) {
const kp = secp256k1.keyFromPrivate(privateKey)
const address = toEthereumAddress(kp.getPublic('hex'))
this.did = `did:ethr:${address}`
}
this.signJWT = (payload, expiresIn) =>
createJWT(payload, {
issuer: this.did,
signer: this.signer,
alg: this.did.match('^did:uport:') || isMNID(this.did) ? 'ES256K' : 'ES256K-R',
expiresIn,
})
UportDIDResolver(registry || UportLite({ networks: networks ? configNetworks(networks) : {} }))
EthrDIDResolver(ethrConfig || {})
HttpsDIDResolver()
}