+import * as jsonld from 'jsonld'
import * as jsig from 'jsonld-signatures'
+jsig.use('jsonld', jsonld)
import {
PRIVATE_RSA_KEY_SIZE,
bcryptGenSaltPromise,
bcryptHashPromise,
createPrivateKey,
- getPublicKey,
- jsonldSignPromise,
- jsonldVerifyPromise
+ getPublicKey
} from './core-utils'
import { logger } from './logger'
import { AccountInstance } from '../models/account/account-interface'
publicKeyOwner: publicKeyOwnerObject
}
- return jsonldVerifyPromise(signedDocument, options)
+ return jsig.promises.verify(signedDocument, options)
.catch(err => {
logger.error('Cannot check signature.', err)
return false
creator: byAccount.url
}
- return jsonldSignPromise(data, options)
+ return jsig.promises.sign(data, options)
}
function comparePassword (plainPassword: string, hashPassword: string) {