df4948001d1d86f3be6d83127d97211a776f25cb
[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 [keyfile-or-addr]
87     crowdnode signup [keyfile-or-addr]
88     crowdnode accept [keyfile-or-addr]
89     crowdnode deposit [keyfile-or-addr] [dash-amount] [--no-reserve]
90     crowdnode withdrawal [keyfile-or-addr] <percent> # 1.0-100.0 (steps by 0.1)
91
92 Helpful Extras:
93     crowdnode generate [./privkey.wif]
94     crowdnode list
95     crowdnode encrypt # TODO
96     crowdnode decrypt # TODO
97     crowdnode use <addr>
98     crowdnode load [keyfile-or-addr] [dash-amount]
99     crowdnode balance [keyfile-or-addr]
100     crowdnode transfer <from-keyfile-or-addr> <to-keyfile-or-addr> [dash-amount]
101     crowdnode rm <keyfile-or-addr>
102
103 CrowdNode HTTP RPC:
104     crowdnode http FundsOpen <addr>
105     crowdnode http VotingOpen <addr>
106     crowdnode http GetFunds <addr>
107     crowdnode http GetFundsFrom <addr> <seconds-since-epoch>
108     crowdnode http GetBalance <addr>
109     crowdnode http GetMessages <addr>
110     crowdnode http IsAddressInUse <addr>
111     crowdnode http SetEmail ./privkey.wif <email> <signature>
112     crowdnode http Vote ./privkey.wif <gobject-hash>
113         <Yes|No|Abstain|Delegate|DoNothing> <signature>
114     crowdnode http SetReferral ./privkey.wif <referral-id> <signature>
115 ```
116
117 ## Glossary
118
119 | Term          | Description                                                          |
120 | ------------- | -------------------------------------------------------------------- |
121 | addr          | your Dash address (Base58Check-encoded Pay-to-PubKey Address)        |
122 | ./privkey.wif | the file path to your staking key in WIF (Base58Check) format        |
123 | signature     | generated with [dashmsg](https://webinstall.dev/dashmsg) or dash-cli |
124
125 # JS API Documentation
126
127 See <https://github.com/dashhive/crowdnode.js>.
128
129 # Official CrowdNode Docs
130
131 <https://knowledge.crowdnode.io/en/articles/5963880-blockchain-api-guide>