def channel(ctx, csv, monthsago, max, min): """ Payment channel """ ctx.sort = None ctx.csv = csv ctx.max = max ctx.min = min if ctx.max or ctx.min: if ctx.min and ctx.min.lower() in ['num_channels_with_peer', 'last_update', 'pending_htlcs',\ 'channel_id', 'alias']: raise click.BadParameter('Sorting for these COLUMNS are not implemented yet.') if ctx.max and ctx.max.lower() in ['num_channels_with_peer', 'last_update', 'pending_htlcs',\ 'channel_id', 'alias']: raise click.BadParameter('Sorting for these COLUMNS are not implemented yet.') ctx.sort = True if ctx.max and ctx.min: raise click.BadParameter("max and min options are mutually exclusive.") ctx.stub, ctx.macaroon = utils.create_stub(ctx) if monthsago: ctx.monthsago = monthsago elif 'MonthsAgo' in ctx.find_root().config['LNT'].keys(): ctx.monthsago = ctx.find_root().config['LNT']['MonthsAgo'] else: ctx.monthsago = DEFAULT_MONTHS_AGO ctx.monthsago = int(ctx.monthsago) cmd_view.channel(ctx) return
def channel(ctx, id, f, streaming, target_conf, sat_per_byte): ctx.channel_id = id ctx.force = f ctx.streaming = streaming ctx.target_conf = target_conf ctx.sat_per_byte = sat_per_byte ctx.stub, ctx.macaroon = utils.create_stub(ctx) cmd_kill.channel(ctx)
def node(ctx, node_key): """ Lnd node """ ctx.node_key = node_key ctx.stub, ctx.macaroon = utils.create_stub(ctx) cmd_view.node(ctx)