2378d7280616a3a58993c03bf85668e884f5548b
[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 load [./privkey.wif] [dash-amount]
95     crowdnode balance ./privkey.wif
96     crowdnode transfer ./source.wif <key-file-or-pub-addr> [dash-amount]
97
98 CrowdNode HTTP RPC:
99     crowdnode http FundsOpen <addr>
100     crowdnode http VotingOpen <addr>
101     crowdnode http GetFunds <addr>
102     crowdnode http GetFundsFrom <addr> <seconds-since-epoch>
103     crowdnode http GetBalance <addr>
104     crowdnode http GetMessages <addr>
105     crowdnode http IsAddressInUse <addr>
106     crowdnode http SetEmail ./privkey.wif <email> <signature>
107     crowdnode http Vote ./privkey.wif <gobject-hash>
108         <Yes|No|Abstain|Delegate|DoNothing> <signature>
109     crowdnode http SetReferral ./privkey.wif <referral-id> <signature>
110 ```
111
112 ## Glossary
113
114 | Term          | Description                                                          |
115 | ------------- | -------------------------------------------------------------------- |
116 | addr          | your Dash address (Base58Check-encoded Pay-to-PubKey Address)        |
117 | ./privkey.wif | the file path to your staking key in WIF (Base58Check) format        |
118 | signature     | generated with [dashmsg](https://webinstall.dev/dashmsg) or dash-cli |
119
120 # JS API Documentation
121
122 See <https://github.com/dashhive/crowdnode.js>.
123
124 # Official CrowdNode Docs
125
126 <https://knowledge.crowdnode.io/en/articles/5963880-blockchain-api-guide>