How to use the indy-sdk.buildCredDefRequest function in indy-sdk

To help you get started, we’ve selected a few indy-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hyperledger / indy-agent / nodejs / indy / common.js View on Github external
exports.sendCredDef = async function (poolHandle, walletHandle, did, credDef) {
    let credDefRequest = await indy.buildCredDefRequest(did, credDef);
    await indy.signAndSubmitRequest(poolHandle, walletHandle, did, credDefRequest);
};
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
exports.sendCredDef = async function (poolHandle, walletHandle, did, credDef) {
    let credDefRequest = await sdk.buildCredDefRequest(did, credDef);
    await sdk.signAndSubmitRequest(poolHandle, walletHandle, did, credDefRequest);
};
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
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);
};