Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
};
exports.sendSchema = async function(poolHandle, walletHandle, Did, schema) {
let schemaRequest = await sdk.buildSchemaRequest(Did, schema);
await sdk.signAndSubmitRequest(poolHandle, walletHandle, Did, schemaRequest)
};
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);
};