X-Git-Url: https://git.josue.xyz/?p=crowdnode.js%2F.git;a=blobdiff_plain;f=README.md;h=9a7240152ea2b06c1d456eb27cdd3e182d862b05;hp=e9db85cf7c52c246accefd2fce94aef15ace9871;hb=852b5e0e70a0c048cdd419b85795bc3d65cd523c;hpb=9f3545f8b248eca1c440ca117f0d99c07281b427 diff --git a/README.md b/README.md index e9db85c..9a72401 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,16 @@ Blockchain API. You must have [node.js](https://webinstall.dev/node) installed: +### Mac & Linux + ```bash -# Mac, Linux curl https://webinstall.dev/node | bash export PATH="${HOME}/.local/opt/node:$PATH" ``` +### Windows + ```pwsh -# Windows curl.exe -A MS https://webinstall.dev/node | powershell PATH %USERPROFILE%\.local\opt\node;%PATH% ``` @@ -36,6 +38,16 @@ npm install --save crowdnode@v1 The SDK also provides Type Hinting via JSDoc (compatible with TypeScript / tsc without any transpiling). +## IMPORTANT + +The CLI is denominated in **Dash** and **Percent** because those are the units +most customers are familiar with and can easily calculate in their heads without +making "careless" mistakes. + +HOWEVER, the SDK and CrowdNode API are denominated in **Duffs** (Satoshis) and +**Permil** (Permille) because those are the whole units that are easiest to +compute. + ## QuickStart The CrowdNode SDK uses Dashcore to create raw transactions and broadcasts them @@ -53,7 +65,7 @@ let CrowdNode = require("crowdnode"); async function main() { let keyfile = process.argv[2]; - // a wallet pre-loaded with about Đ0.001 + // a wallet pre-loaded with about Đ0.01 let wif = await Fs.readFile(keyfile, "utf8"); wif = wif.trim(); @@ -146,6 +158,7 @@ await CrowdNode.accept(wif, hotwallet); * } */ +// amount given in DUFFs await CrowdNode.deposit(wif, hotwallet, (amount = 0)); /** @type SocketPayment * { @@ -157,6 +170,7 @@ await CrowdNode.deposit(wif, hotwallet, (amount = 0)); * } */ +// permil is 1/10 percent, 500 permil = 50.0 percent await CrowdNode.withdrawal(wif, hotwallet, permil); /** @type SocketPayment * { @@ -233,6 +247,15 @@ await CrowdNode.http.VotingOpen(pub); /* ${baseUrl}/VotingOpen/${pub} */ ``` +## Glossary + +| Term | Description | +| ------------- | ------------------------------------------------------------- | +| addr | your Dash address (Base58Check-encoded Pay-to-PubKey Address) | +| amount | the integer value of "Duffs" (Đ/100000000) | +| permil | 1/1000, 1‰, or 0.1% - between 1 and 1000 (0.1% to 100.0%) | +| ./privkey.wif | the file path to your staking key in WIF (Base58Check) format | + # CLI Documentation See .