How to use the indy-sdk.signAndSubmitRequest 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 / education / LFS171x / indy-material / nodejs / indy / src / pool / index.js View on Github external
exports.setEndpointForDid = async function (did, endpoint) {
    let attributeRequest = await sdk.buildAttribRequest(await indy.did.getEndpointDid(), did, null, {endpoint: {ha: endpoint}}, null);
    await sdk.signAndSubmitRequest(await indy.pool.get(), await indy.wallet.get(), await indy.did.getEndpointDid(), attributeRequest);
};
github hyperledger / indy-agent / nodejs / indy / src / pool / index.js View on Github external
exports.sendNym = async function(poolHandle, walletHandle, Did, newDid, newKey, role) {
    let nymRequest = await sdk.buildNymRequest(Did, newDid, newKey, null, role);
    await sdk.signAndSubmitRequest(poolHandle, walletHandle, Did, nymRequest);
};
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
exports.sendSchema = async function(poolHandle, walletHandle, Did, schema) {
    let schemaRequest = await sdk.buildSchemaRequest(Did, schema);
    await sdk.signAndSubmitRequest(poolHandle, walletHandle, Did, schemaRequest)
};
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);
};
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
exports.createSchema = async function (name, version, attributes) {
    let [id, schema] = await sdk.issuerCreateSchema(await indy.did.getEndpointDid(), name, version, attributes);
    let schemaRequest = await sdk.buildSchemaRequest(await indy.did.getEndpointDid(), schema);
    await sdk.signAndSubmitRequest(await indy.pool.get(), await indy.wallet.get(), await indy.did.getEndpointDid(), schemaRequest);
    await indy.did.pushEndpointDidAttribute('schemas', id);
};
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 / education / LFS171x / indy-material / nodejs / indy / src / pool / index.js View on Github external
exports.sendNym = async function(poolHandle, walletHandle, Did, newDid, newKey, role) {
    let nymRequest = await sdk.buildNymRequest(Did, newDid, newKey, null, role);
    await sdk.signAndSubmitRequest(poolHandle, walletHandle, Did, nymRequest);
};
github hyperledger / indy-agent / nodejs / indy / src / pool / index.js View on Github external
exports.setEndpointForDid = async function (did, endpoint) {
    let attributeRequest = await sdk.buildAttribRequest(await indy.did.getEndpointDid(), did, null, {endpoint: {ha: endpoint}}, null);
    await sdk.signAndSubmitRequest(await indy.pool.get(), await indy.wallet.get(), await indy.did.getEndpointDid(), attributeRequest);
};
github hyperledger / indy-agent / nodejs / indy / common.js View on Github external
exports.sendNym = async function(poolHandle, walletHandle, Did, newDid, newKey, role) {
    let nymRequest = await indy.buildNymRequest(Did, newDid, newKey, null, role);
    await indy.signAndSubmitRequest(poolHandle, walletHandle, Did, nymRequest);
};