Esempio n. 1
0
def main():
    base_dir = config.CLI_BASE_DIR
    if not os.path.exists(base_dir):
        os.makedirs(base_dir)
    loadPlugins(base_dir)

    pool = create_local_pool(base_dir)

    demo_start_agents(pool, pool, pool.base_dir)

    curDir = os.getcwd()
    logFilePath = os.path.join(curDir, config.logFilePath)

    cli = IndyCli(looper=pool,
                  basedirpath=pool.base_dir,
                  logFileName=logFilePath,
                  withNode=False)

    pool.run(cli.shell())
Esempio n. 2
0
def main():
    config = getConfig()
    base_dir = config.CLI_BASE_DIR
    if not os.path.exists(base_dir):
        os.makedirs(base_dir)
    loadPlugins(base_dir)

    pool = create_local_pool(base_dir)

    demo_start_agents(pool, pool, pool.base_dir)

    curDir = os.getcwd()
    logFilePath = os.path.join(curDir, config.logFilePath)

    cli = IndyCli(looper=pool,
                  basedirpath=pool.base_dir,
                  logFileName=logFilePath,
                  withNode=False)

    pool.run(cli.shell())
def test_showProofOnlyUsedAttributesAreHighlighted(
        claimsUsedForProof, proofRequestAttrs):
    actualConstructionToPrint = IndyCli._printClaimsUsedInProofConstruction(
        claimsUsedForProof, proofRequestAttrs
    )

    expectedPrint = '\nThe Proof is constructed from the following claims:\n' \
                    '\n    Claim [1] (TestClaim-1 v0.1 from Issuer 1)\n' \
                    '        * first_name: Alice\n' \
                    '        * last_name: Garcia\n' \
                    '          account_address_1: 321\n' \
                    '          date_of_birth: May 15, 1990\n' \
                    '\n    Claim [2] (TestClaim-2 v0.1 from Issuer 2)\n' \
                    '          first_name: Alice\n' \
                    '          last_name: Garcia\n' \
                    '        * account_status: active\n'

    assert expectedPrint == actualConstructionToPrint
Esempio n. 4
0
def getFileLines(path, caller_file=None):
    filePath = IndyCli._getFilePath(path, caller_file)
    with open(filePath, 'r') as fin:
        lines = fin.read().splitlines()
    return lines
Esempio n. 5
0
def getFileLines(path, caller_file=None):
    filePath = IndyCli._getFilePath(path, caller_file)
    with open(filePath, 'r') as fin:
        lines = fin.read().splitlines()
    return lines