How to use the indy-sdk.createPoolLedgerConfig 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.setup = async function () {
    // see PlenumProtocolVersion or indy-plenum.common.constans.CURRENT_PROTOCOL_VERSION
    await sdk.setProtocolVersion(2);

    let poolGenesisTxnPath = await exports.getPoolGenesisTxnPath(config.poolName);
    let poolConfig = {
        "genesis_txn": poolGenesisTxnPath
    };
    try {
        await sdk.createPoolLedgerConfig(config.poolName, poolConfig);
    } catch (e) {
        if (e.message !== "PoolLedgerConfigAlreadyExistsError") {
            throw e;
        }
    } finally {
        pool = await sdk.openPoolLedger(config.poolName);
    }
};
github hyperledger / indy-agent / nodejs / indy / src / pool / index.js View on Github external
exports.setup = async function () {
    // see PlenumProtocolVersion or indy-plenum.common.constans.CURRENT_PROTOCOL_VERSION
    await sdk.setProtocolVersion(2);

    let poolGenesisTxnPath = await exports.getPoolGenesisTxnPath(config.poolName);
    let poolConfig = {
        "genesis_txn": poolGenesisTxnPath
    };
    try {
        await sdk.createPoolLedgerConfig(config.poolName, poolConfig);
    } catch (e) {
        if (e.message !== "PoolLedgerConfigAlreadyExistsError") {
            throw e;
        }
    } finally {
        pool = await sdk.openPoolLedger(config.poolName);
    }
};