How to use the indy-sdk.submitRequest 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.

github hyperledger / indy-agent / nodejs / indy / common.js View on Github external
exports.getCredDef = async function(poolHandle, did, schemaId) {
    let getCredDefRequest = await indy.buildGetCredDefRequest(did, schemaId);
    let getCredDefResponse = await indy.submitRequest(poolHandle, getCredDefRequest);
    return await indy.parseGetCredDefResponse(getCredDefResponse);
};
github hyperledger / education / LFS171x / indy-material / nodejs / indy / src / pool / index.js View on Github external
async function waitUntilApplied(ph, req, cond) {
    for (let i = 0; i < 3; i++) {
        let res = await sdk.submitRequest(ph, req);

        if (cond(res)) {
            return res;
        }

        await indy.utils.sleep(5 * 1000);
    }
}
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
exports.getCredDef = async function(poolHandle, did, credDefId) {
    let getCredDefRequest = await sdk.buildGetCredDefRequest(did, credDefId);
    let getCredDefResponse = await sdk.submitRequest(poolHandle, getCredDefRequest);
    return await sdk.parseGetCredDefResponse(getCredDefResponse);
};
github hyperledger / indy-agent / nodejs / indy / src / pool / index.js View on Github external
async function waitUntilApplied(ph, req, cond) {
    for (let i = 0; i < 3; i++) {
        let res = await sdk.submitRequest(ph, req);

        if (cond(res)) {
            return res;
        }

        await indy.utils.sleep(5 * 1000);
    }
}
github hyperledger / indy-agent / nodejs / indy / src / issuer / index.js View on Github external
exports.getSchema = async function(schemaId) {
    let getSchemaRequest = await sdk.buildGetSchemaRequest(await indy.did.getEndpointDid(), schemaId);
    let getSchemaResponse = await sdk.submitRequest(await indy.pool.get(), getSchemaRequest);
    let [, schema] = await sdk.parseGetSchemaResponse(getSchemaResponse);
    return schema;
};
github hyperledger / indy-agent / nodejs / indy / common.js View on Github external
exports.getSchema = async function(poolHandle, did, schemaId) {
    let getSchemaRequest = await indy.buildGetSchemaRequest(did, schemaId);
    let getSchemaResponse = await indy.submitRequest(poolHandle, getSchemaRequest);
    return await indy.parseGetSchemaResponse(getSchemaResponse);
};