feat!: redenominate Dash/Duff and Percent/Permille for CLI, fix incorrect accept...
[crowdnode.js/.git] / cli / README.md
1 # CrowdNode CLI
2
3 CrowdNode allows you to become a partial MNO - staking Dash to earn interest,
4 participate in voting, etc.
5
6 This cross-platform CrowdNode CLI enables you to privately manage your stake via
7 their KYC-free Blockchain CLI.
8
9 # Install
10
11 ## Node.js
12
13 You must have [node.js](https://webinstall.dev/node) installed:
14
15 ### Mac & Linux
16
17 ```bash
18 curl https://webinstall.dev/node | bash
19 export PATH="${HOME}/.local/opt/node:$PATH"
20 ```
21
22 ### Windows
23
24 ```pwsh
25 curl.exe -A MS https://webinstall.dev/node | powershell
26 PATH %USERPROFILE%\.local\opt\node;%PATH%
27 ```
28
29 ## CrowdNode CLI
30
31 ```bash
32 # Install to system, globally
33 npm install --location=global crowdnode-cli@v1
34 ```
35
36 Or
37
38 ```bash
39 # Run without installing
40 npx crowdnode-cli@v1
41 ```
42
43 # CLI Usage
44
45 CrowdNode staking is managed with a **permanent staking key**.
46
47 The Dash you stake **can NOT be retrieved** without this key!
48
49 ## QuickStart
50
51 You can use an existing key, or generate a new one just for CrowdNode. \
52 (I recommend printing a Paper Wallet (WIF QR) and sticking it in your safe)
53
54 You can preload your staking key with the amount you wish to stake, or deposit
55 when prompted via
56
57 - QR Code
58 - Dash URL
59 - or Payment Address
60
61 You will be given these options whenever the existing balance is low.
62
63 0. Generate a **permanent** staking key (just one):
64    ```bash
65    crowdnode generate ./privkey.wif
66    ```
67    (and put a backup in a safe place)
68 1. Send a (tiny) Sign Up payment (Đ0.00151072)
69    ```bash
70    crowdnode signup ./privkey.wif
71    ```
72 2. Accept the Terms of Use via payment (Đ0.00085536)
73    ```bash
74    crowdnode accept ./privkey.wif
75    ```
76 3. Deposit your stake (in Dash)
77    ```bash
78    crowdnode deposit ./privkey.wif 10.0
79    ```
80
81 ## All Commmands
82
83 ```bash
84 Usage:
85     crowdnode help
86     crowdnode status ./privkey.wif
87     crowdnode signup ./privkey.wif
88     crowdnode accept ./privkey.wif
89     crowdnode deposit ./privkey.wif [dash-amount] [--no-reserve]
90     crowdnode withdrawal ./privkey.wif <percent> # 1.0-100.0 (steps by 0.1)
91
92 Helpful Extras:
93     crowdnode generate [./privkey.wif]
94     crowdnode balance ./privkey.wif
95     crowdnode transfer ./source.wif <key-file-or-pub-addr> [dash-amount]
96
97 CrowdNode HTTP RPC:
98     crowdnode http FundsOpen <addr>
99     crowdnode http VotingOpen <addr>
100     crowdnode http GetFunds <addr>
101     crowdnode http GetFundsFrom <addr> <seconds-since-epoch>
102     crowdnode http GetBalance <addr>
103     crowdnode http GetMessages <addr>
104     crowdnode http IsAddressInUse <addr>
105     crowdnode http SetEmail ./privkey.wif <email> <signature>
106     crowdnode http Vote ./privkey.wif <gobject-hash>
107         <Yes|No|Abstain|Delegate|DoNothing> <signature>
108     crowdnode http SetReferral ./privkey.wif <referral-id> <signature>
109 ```
110
111 ## Glossary
112
113 | Term          | Description                                                          |
114 | ------------- | -------------------------------------------------------------------- |
115 | addr          | your Dash address (Base58Check-encoded Pay-to-PubKey Address)        |
116 | ./privkey.wif | the file path to your staking key in WIF (Base58Check) format        |
117 | signature     | generated with [dashmsg](https://webinstall.dev/dashmsg) or dash-cli |
118
119 # JS API Documentation
120
121 See <https://github.com/dashhive/crowdnode.js>.
122
123 # Official CrowdNode Docs
124
125 <https://knowledge.crowdnode.io/en/articles/5963880-blockchain-api-guide>