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