Ejemplo n.º 1
0
def xwallet(event_loop, xwallet_cleanup, path_home, wallet_config, credentials):
    logger = logging.getLogger(__name__)
    logger.debug("xwallet: >>> xwallet_cleanup: %r, path_home: %r, wallet_config: %r, credentials: %r",
                 xwallet_cleanup,
                 path_home,
                 wallet_config,
                 credentials)

    logger.debug("xwallet: Creating wallet")
    event_loop.run_until_complete(wallet.create_wallet(wallet_config, credentials))

    logger.debug("xwallet: yield")
    yield

    logger.debug("xwallet: Deleting wallet")
    event_loop.run_until_complete(wallet.delete_wallet(wallet_config, credentials)) if xwallet_cleanup else None

    logger.debug("xwallet: <<<")
Ejemplo n.º 2
0
def xwallet(event_loop, pool_name, wallet_name, wallet_type, xwallet_cleanup, path_home):
    logger = logging.getLogger(__name__)
    logger.debug("xwallet: >>> pool_name: %r, wallet_type: %r, xwallet_cleanup: %r, path_home: %r",
                 pool_name,
                 wallet_type,
                 xwallet,
                 path_home)

    logger.debug("xwallet: Creating wallet")
    event_loop.run_until_complete(wallet.create_wallet(pool_name, wallet_name, wallet_type, None, None))

    logger.debug("xwallet: yield")
    yield

    logger.debug("xwallet: Deleting wallet")
    event_loop.run_until_complete(wallet.delete_wallet(wallet_name, None)) if xwallet_cleanup else None

    logger.debug("xwallet: <<<")
Ejemplo n.º 3
0
def xwallet(event_loop, xwallet_cleanup, path_home, wallet_config, credentials):
    logger = logging.getLogger(__name__)
    logger.debug("xwallet: >>> xwallet_cleanup: %r, path_home: %r, wallet_config: %r, credentials: %r",
                 xwallet_cleanup,
                 path_home,
                 wallet_config,
                 credentials)

    logger.debug("xwallet: Creating wallet")
    event_loop.run_until_complete(wallet.create_wallet(wallet_config, credentials))

    logger.debug("xwallet: yield")
    yield

    logger.debug("xwallet: Deleting wallet")
    event_loop.run_until_complete(wallet.delete_wallet(wallet_config, credentials)) if xwallet_cleanup else None

    logger.debug("xwallet: <<<")
Ejemplo n.º 4
0
def wallet(looper):
    wallet_name = randomString()

    create_wallet_future = create_wallet(json.dumps({"id": wallet_name}),
                                         json.dumps({"key": "1"}))
    looper.loop.run_until_complete(create_wallet_future)

    open_wallet_future = open_wallet(json.dumps({"id": wallet_name}),
                                     json.dumps({"key": "1"}))
    wallet_handle = looper.loop.run_until_complete(open_wallet_future)

    yield wallet_handle

    close_wallet_future = close_wallet(wallet_handle)
    looper.loop.run_until_complete(close_wallet_future)

    delete_wallet_future = delete_wallet(json.dumps({"id": wallet_name}),
                                         json.dumps({"key": "1"}))
    looper.loop.run_until_complete(delete_wallet_future)
Ejemplo n.º 5
0
def wallet_created(base_dir_created, pool_ledger_created, pool_name,
                   wallet_name, event_loop):
    event_loop.run_until_complete(
        wallet.create_wallet(pool_name, wallet_name, 'default', None, None))
    yield
    event_loop.run_until_complete(wallet.delete_wallet(wallet_name, None))
Ejemplo n.º 6
0
def wallet_created(base_dir_created, pool_ledger_created,
                   pool_name, wallet_name, event_loop):
    event_loop.run_until_complete(
        wallet.create_wallet(pool_name, wallet_name, 'default', None, None))
    yield
    event_loop.run_until_complete(wallet.delete_wallet(wallet_name, None))