Skip to content

Commit

Permalink
update cli instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
harish551 committed Jan 4, 2024
1 parent 455853f commit 578513a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ streampayd version
rm -rf ~/.streampay/config/*
#Init node
streampayd unsafe-reset-all
streampayd tendermint unsafe-reset-all
streampayd init "sp-node" --chain-id "sp-test-1"
# Add keys
Expand All @@ -47,15 +47,15 @@ streampayd keys add user1 --keyring-backend test
streampayd keys add user2 --keyring-backend test
# Add genesis accounts
streampayd add-genesis-account $(streampayd keys show validator -a --keyring-backend test) 1000000000stake
streampayd add-genesis-account $(streampayd keys show user1 -a --keyring-backend test) 1000000000000stake
streampayd genesis add-genesis-account $(streampayd keys show validator -a --keyring-backend test) 1000000000stake
streampayd genesis add-genesis-account $(streampayd keys show user1 -a --keyring-backend test) 1000000000000stake
# Create gentx
streampayd gentx validator 10000000stake --moniker "validator-1" --chain-id "sp-test-1" --keyring-backend test
streampayd genesis gentx validator 10000000stake --moniker "validator-1" --chain-id "sp-test-1" --keyring-backend test
# Collect Gentxs
streampayd collect-gentxs
streampayd validate-genesis
streampayd genesis collect-gentxs
streampayd genesis validate-genesis
# Start Chain with default config
streampayd start
Expand Down Expand Up @@ -105,11 +105,11 @@ To Start a stream payment

cmd :

`streampayd tx streampay stream-send [recipient] [amount] --end-time <unix-timestamp> --delayed --chain-id <chain-id> --from <key>`
`streampayd tx streampay stream-send [recipient] [amount] --duration <stream-duration> --delayed --chain-id <chain-id> --from <key>`

To start a continuous payment stream
```bash=
streampayd tx streampay stream-send streampay1vnlgxmzh8mr5e43ku38f9470p2q0jfscksa98g 10000stake --end-time 1638786850 --chain-id streampay --from bob
streampayd tx streampay stream-send streampay1vnlgxmzh8mr5e43ku38f9470p2q0jfscksa98g 10000stake --duration 86400s --chain-id streampay --from bob
```
Use --delayed flag for delayed payments.

Expand Down
6 changes: 3 additions & 3 deletions x/streampay/client/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const (
var FsStreamSend = flag.NewFlagSet("", flag.ContinueOnError)

func init() {
FsStreamSend.String(FlagDuration, "", "duration of stream")
FsStreamSend.Bool(FlagDelayed, false, "use to set delayed stream")
FsStreamSend.String(FlagDuration, "", "to set duration of stream payment")
FsStreamSend.Bool(FlagDelayed, false, "to create a delayed stream payment")
FsStreamSend.String(FlagStreamPeriodsFile, "", "stream periods json file")
FsStreamSend.Bool(FlagCancellable, false, "use to set cancellable stream")
FsStreamSend.Bool(FlagCancellable, false, "to create cancellable stream payment")
}
6 changes: 3 additions & 3 deletions x/streampay/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ func GetCmdStreamSend() *cobra.Command {
"cancellation of stream payments:\n" +
"using --cancellable flag, you can create a cancellable stream payment\n",
Example: fmt.Sprintf(
"$ %s tx streampay stream-send [recipient] [amount] --end-time <end-timestamp>"+
"$ %s tx streampay stream-send [recipient] [amount] --duration <duration>"+
" --chain-id <chain-id> --from <sender> --fees <fees>\n\n"+
"delayed payment:\n"+
"$ %s tx streampay stream-send [recipient] [amount] --end-time <end-timestamp> --delayed"+
"$ %s tx streampay stream-send [recipient] [amount] --duration <stream-duration> --delayed"+
" --chain-id <chain-id> --from <sender> --fees <fees>\n\n"+
"periodic payment:\n"+
"$ %s tx streampay stream-send [recipient] [amount] --end-time <end-timestamp> --stream-periods-file <stream-periods-file>"+
"$ %s tx streampay stream-send [recipient] [amount] --stream-periods-file <stream-periods-file>"+
" --chain-id <chain-id> --from <sender> --fees <fees>\n\n",
version.AppName, version.AppName, version.AppName,
),
Expand Down

0 comments on commit 578513a

Please sign in to comment.