StreamPay is a dApp that's built on the Stream Pay Testnet (which utilizes the streampay
module. This sovereign chain is powered by the token uspay
or SPAY
.
While users need to pay the fee to start a payment stream in SPAY tokens, any token (native or IBC tokens) can be streamed between accounts.
Try the app on - https://sp.OmniFlix.network
streampay is a module built using Cosmos SDK, Tendermint and ignite/cli to stream payments from on address to the other, using delayed
and continuous
payments types inspired by the vesting model in the auth
module of the Cosmos SDK.
Requirement | Notes |
---|---|
Go version | Go1.21 |
Cosmos SDK | v0.47.5 |
git clone https://github.com/OmniFlix/streampay.git
cd streampay
go mod tidy
make install
check installation
streampayd version
# Delete previous data
rm -rf ~/.streampay/config/*
#Init node
streampayd tendermint unsafe-reset-all
streampayd init "sp-node" --chain-id "sp-test-1"
# Add keys
streampayd keys add validator --keyring-backend test
streampayd keys add user1 --keyring-backend test
streampayd keys add user2 --keyring-backend test
# Add genesis accounts
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 genesis gentx validator 10000000stake --moniker "validator-1" --chain-id "sp-test-1" --keyring-backend test
# Collect Gentxs
streampayd genesis collect-gentxs
streampayd genesis validate-genesis
# Start Chain with default config
streampayd start
stream-send - to start a payment stream
$ streampayd tx streampay stream-send -h
creates a stream payment
Usage:
streampayd tx streampay stream-send [flags]
Examples:
$ streampayd tx streampay stream-send [recipient] [amount] --end-time <end-timestamp>
example:
streampayd tx streampay stream-send streampay16qg7gpgt6hv9hqwrrk82r0f4kutqpy5zf03yx7 10000stake --end-time 1638786850 --chain-id sp-test-1 --from user1 --keyring-backend test
Note: Use --delayed flag to create delayed stream payment
streampayd q streampay stream-payments -h
Query stream payments.
Usage:
streampayd query streampay stream-payments [flags]
Examples:
$ streampayd query streampay stream-payments <id>
To Start a stream payment
cmd :
streampayd tx streampay stream-send [recipient] [amount] --duration <stream-duration> --delayed --chain-id <chain-id> --from <key>
To start a continuous payment stream
streampayd tx streampay stream-send streampay1vnlgxmzh8mr5e43ku38f9470p2q0jfscksa98g 10000stake --duration 86400s --chain-id streampay --from bob
Use --delayed flag for delayed payments.