def main(ctx, json):
"""Manage payment channels.
The `21 channels` command is used for creating, opening, closing, and conducting
diagnostics for the payment channel micropayments protocol. After opening
a channel with a merchant, making a payment returns a token, which the
merchant will accept as proof of payment within the 402 payments protocol.
Example of opening a channel, making payments, and closing the channel:
$ channels open https://mkt.21.co/21dotco/payments/channel 100000 120\n
$ channels pay https://mkt.21.co/21dotco/payments/channel 100\n
$ channels pay https://mkt.21.co/21dotco/payments/channel 100\n
$ channels pay https://mkt.21.co/21dotco/payments/channel 100\n
$ channels info https://mkt.21.co/21dotco/payments/channel\n
$ channels close https://mkt.21.co/21dotco/payments/channel\n
"""
client = PaymentChannelClient(Wallet(WALLET_PATH), CHANNELS_DB_PATH)
ctx.obj = {'client': client, 'json': json}
评论列表
文章目录