cli.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:two1-python 作者: 21dotco 项目源码 文件源码
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}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号