How to use the indy-sdk.buildSchemaRequest 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.sendSchema = async function(poolHandle, walletHandle, Did, schema) {
    // schema = JSON.stringify(schema); // FIXME: Check JSON parsing
    let schemaRequest = await indy.buildSchemaRequest(Did, schema);
    await indy.signAndSubmitRequest(poolHandle, walletHandle, Did, schemaRequest)
};
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.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);
};