README
BitSong is a new music streaming platform based on Tendermint consensus BFT, the Cosmos SDK toolkits and the IPFS distribuited filesystem. Please make sure you study these projects as well if you are not already familiar.
BitSong is a project dedicated to musicians and their fans, which aims to overcome the bureaucratic and economic obstacles within this industry and reward artists and users for simply using the platform.
Artists need no longer to wait several months before a record label sends various reports, they can check the progress in real time directly within the Wallet.
NOTE: This is alpha software. Please contact us if you aim to run it in production.
Note: Requires Go 1.13.6+

Install BitSong Blockchain (mpeg21 test)

There are many ways you can install BitSong Blockchain Testnet node on your machine.

From Source

    1.
    Install Go by following the official docs. Remember to set your $GOPATH and $PATH environment variables, for example:
    1
    wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
    2
    sudo tar -xvzf go1.13.6.linux-amd64.tar.gz
    3
    sudo mv go /usr/local
    4
    5
    cat <<EOF >> ~/.profile
    6
    export GOPATH=$HOME/go
    7
    export GO111MODULE=on
    8
    export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
    9
    EOF
    Copied!
    2.
    Clone BitSong source code to your machine
    1
    mkdir -p $GOPATH/src/github.com/BitSongOfficial
    2
    cd $GOPATH/src/github.com/BitSongOfficial
    3
    git clone https://github.com/BitSongOfficial/go-bitsong.git
    4
    cd go-bitsong
    5
    git checkout mpeg21
    Copied!
      1.
      Compile
      1
      # Install the app into your $GOBIN
      2
      make install
      3
      # Now you should be able to run the following commands:
      4
      bitsongd help
      5
      bitsongcli help
      Copied!
      The latest go-bitsong version is now installed.
    3.
    Run BitSong
    1
    bitsongd start
    Copied!

Running the test network and using the commands

To initialize configuration and a genesis.json file for your application and an account for the transactions, start by running:
NOTE: In the below commands addresses are are pulled using terminal utilities. You can also just input the raw strings saved from creating keys, shown below. The commands require jq to be installed on your machine.
NOTE: If you have run the tutorial before, you can start from scratch with a bitsongd unsafe-reset-all or by deleting both of the home folders rm -rf ~/.bitsong*
NOTE: If you have the Cosmos app for ledger and you want to use it, when you create the key with bitsongcli keys add jack just add --ledger at the end. That's all you need. When you sign, jack will be recognized as a Ledger key and will require a device.
1
# Initialize configuration files and genesis file
2
bitsongd init MyValidator --chain-id bitsong-localnet
3
4
# Configure your CLI to eliminate need for chain-id flag
5
bitsongcli config chain-id bitsong-localnet
6
bitsongcli config output json
7
bitsongcli config indent true
8
bitsongcli config trust-node true
9
bitsongcli config keyring-backend test
10
11
# Copy the `Address` output here and save it for later use
12
# [optional] add "--ledger" at the end to use a Ledger Nano S
13
bitsongcli keys add jack
14
15
# Copy the `Address` output here and save it for later use
16
bitsongcli keys add alice
17
18
# Add both accounts, with coins to the genesis file
19
bitsongd add-genesis-account jack 100000000000ubtsg --keyring-backend test
20
bitsongd add-genesis-account alice 100000000000ubtsg --keyring-backend test
21
22
# Generate the transaction that creates your validator
23
bitsongd gentx --name jack --amount=10000000ubtsg --keyring-backend test
24
25
# Add the generated bonding transaction to the genesis file
26
bitsongd collect-gentxs
27
bitsongd validate-genesis
28
29
# Now its safe to start `bitsongd`
30
bitsongd start
Copied!
You can now start bitsongd by calling bitsongd start. You will see logs begin streaming that represent blocks being produced, this will take a couple of seconds.
Open another terminal to run commands against the network you have just created:
1
# First check the accounts to ensure they have funds
2
bitsongcli query account $(bitsongcli keys show jack -a)
3
bitsongcli query account $(bitsongcli keys show alice -a)
Copied!

Transactions

You can now start the first transaction
1
bitsongcli tx send jack $(bitsongcli keys show alice -a) 10ubtsg --from jack -b block
Copied!

Query

Query an account

1
bitsongcli query account $(bitsongcli keys show jack -a)
Copied!

Query total supply

1
bitsongcli query supply total
Copied!

Module MPEG21

Store MPEG21 MCO Contract

1
bitsongcli tx mpeg21 store-mco ./testdata/mpeg21/download-no-label.json \
2
--from jack \
3
--gas 400000 \
4
-b block
Copied!

Query MPEG21 MCO Contract by ID

1
bitsongcli query mpeg21 mco-id contract6
2
```t
3
4
## Query all MPEG21 MCO Contracts
5
```bash
6
bitsongcli query mpeg21 mco-all
Copied!

Resources

Buy/Sell BTSG ERC20

Community

License

MIT License

Versioning

SemVer

BitSong uses SemVer to determine when and how the version changes. According to SemVer, anything in the public API can change at any time before version 1.0.0
To provide some stability to BitSong users in these 0.X.X days, the MINOR version is used to signal breaking changes across a subset of the total public API. This subset includes all interfaces exposed to other processes, but does not include the in-process Go APIs.
Last modified 1yr ago