Giter Club home page Giter Club logo

Comments (4)

agazso avatar agazso commented on May 31, 2024

I was thinking that the actual commands could be the following:

cashout peer <peer-id> [min-amount]: cashes out cheques from a single peer
cashout all <min-amount>: cashes out all the cheques that reaches a minimum amount
cashout list: list all uncashed cheques

However when thinking further about adding deposit and withdraw commands then maybe it's better to structure it otherwise. I thought about calling the command chequebook but we have proof that it's hard to write correctly, although it could be also possible to use cb as a shorter form. Then the command names could change back to cashout-peer, cashout and list-uncashed.

Another idea was using bzz for this command name because we are ultimately dealing with BZZ but that may be also confusing because it's also an overloaded concept since it's used in the endpoint and a future protocol as well.

What do you think?
@Cafe137 @nugaon @vojtechsimetka @AuHau

from swarm-cli.

nugaon avatar nugaon commented on May 31, 2024

Another idea was using bzz for this command name because we are ultimately dealing with BZZ but that may be also confusing because it's also an overloaded concept since it's used in the endpoint and a future protocol as well.

I aggree with this we shouldn't use bzz for this too.

However when thinking further about adding deposit and withdraw commands then maybe it's better to structure it otherwise. I thought about calling the command chequebook but we have proof that it's hard to write correctly, although it could be also possible to use cb as a shorter form.

Good consideration, I think we definitely should group these commands under the corresponding phrases that Swarm termonology use, thereby also make these terms familiar and friendly for the users.
But even more important can be these operations have common properties like using blockchain. If the commands have the same parent command then the neccessary options and base functions can be defined there.

Then the command names could change back to cashout-peer, cashout and list-uncashed.

I guess you want to change it because the command call tree would be too long, but I would not afraid from this too much and it also keeps the concept of the above mentioned principle, so we should leave it as it is, just put an other level cb before cashout.

from swarm-cli.

AuHau avatar AuHau commented on May 31, 2024

Hmm, is there an issue for the deposit and withdraw commands? I am not completely sure about the functionality.

I agree with following of the terminology that is used across the whole ecosystem, so I would go with chequebook root command. Btw. yargs supports recommendCommands() (see how it is used here), that might also help with the bad spelling.

Honestly, I don't think we need three separate sub-commands for these tasks. I think one subcommand cashout with multiple flags would be sufficient. I imagine following schema:

chequebook cashout [--dry-run] [--peer ADDRESS] [--min AMOUNT]

Where by default it cash out all the cheques that exceed default min. value. If specified --peer then only for given address the cheque is cashed out. If --dry-run (or --list if you would like) is specified then it would show what cheques would be cashed out without cashing them.

Then we could have later on also the subcommand chequebook withdraw and chequebook deposit. (I believe they are related right?)

from swarm-cli.

Cafe137 avatar Cafe137 commented on May 31, 2024

With the swarm-cli 0.6.0 release we have added these commands:

cheque cashout --all
cheque cashout --peer <peer>
cheque list
cheque deposit <amount>
cheque withdraw <amount>

from swarm-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.