Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
};
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);
};