Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.getEndpointForDid = async function (did) {
let getAttrRequest = await sdk.buildGetAttribRequest(await indy.did.getEndpointDid(), did, 'endpoint', null, null);
let res = await waitUntilApplied(pool, getAttrRequest, data => data['result']['data'] != null);
return JSON.parse(res.result.data).endpoint.ha;
};
exports.getEndpointForDid = async function (did) {
let getAttrRequest = await sdk.buildGetAttribRequest(await indy.did.getEndpointDid(), did, 'endpoint', null, null);
let res = await waitUntilApplied(pool, getAttrRequest, data => data['result']['data'] != null);
return JSON.parse(res.result.data).endpoint.ha;
};