Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.sendCredDef = async function (poolHandle, walletHandle, did, credDef) {
let credDefRequest = await indy.buildCredDefRequest(did, credDef);
await indy.signAndSubmitRequest(poolHandle, walletHandle, did, credDefRequest);
};
exports.sendCredDef = async function (poolHandle, walletHandle, did, credDef) {
let credDefRequest = await sdk.buildCredDefRequest(did, credDef);
await sdk.signAndSubmitRequest(poolHandle, walletHandle, did, credDefRequest);
};
exports.createCredDef = async function (schemaId, tag) {
let schema = await exports.getSchema(schemaId);
let [credDefId, credDefJson] = await sdk.issuerCreateAndStoreCredentialDef(await indy.wallet.get(), await indy.did.getEndpointDid(), schema, tag, 'CL', '{"support_revocation": false}');
let credDefRequest = await sdk.buildCredDefRequest(await indy.did.getEndpointDid(), credDefJson);
await sdk.signAndSubmitRequest(await indy.pool.get(), await indy.wallet.get(), await indy.did.getEndpointDid(), credDefRequest);
credDefJson.schemaId_long = schemaId;
await indy.did.pushEndpointDidAttribute('credential_definitions', credDefJson);
};