diff --git a/README.md b/README.md index a239a04..71422c6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ --- -A [battle-tested](__tests__) toolkit for the Nano cryptocurrency, allowing you to derive keys, generate seeds, hashes, signatures, proofs of work and state blocks. +A [battle-tested](__tests__) toolkit for the Nano cryptocurrency. If you are looking for legacy blocks, you will want the `^1.0.0` versions. @@ -17,13 +17,43 @@ The documentation is available locally in [docs/](docs/) or online at [https://m --- +## Features + +- Generate seeds +- Derive secret keys, public keys and addresses +- Hash blocks +- Sign and verify blocks +- Compute and test proofs of work +- Check the format of seeds, secret keys, public keys, addresses, amounts, etc. +- Convert Nano units +- **CLI doing all of the above** + +--- + ## Usage +To install the library: + ``` npm install nanocurrency # or yarn add nanocurrency ``` +```js +import * as nanocurrency from 'nanocurrency'; +``` + +To install the CLI: + +``` +npm install -g nanocurrency +# or yarn global add nanocurrency +``` + +```bash +nanocurrency --help +``` + --- ## Performance @@ -39,21 +69,15 @@ Considering you can pre-compute and cache the work prior to an actual transactio Contributions are very welcome. To develop, make use of the following commands (using [Yarn](https://yarnpkg.com)): -* `yarn build:dev`: build the C++ code to WebAssembly and bundle the files into the `dist` directory, without optimization so that it is fast while developing. Note that you'll need to have Docker installed +- `yarn build:dev`: build the C++ code to WebAssembly and bundle the files into the `dist` directory, without optimization so that it is fast while developing. Note that you'll need to have Docker installed -* `yarn test`: test the code +- `yarn test`: test the code -* `yarn lint`: lint the code against [JavaScript Standard Style](https://standardjs.com) +- `yarn lint`: lint the code against [JavaScript Standard Style](https://standardjs.com) -* `yarn format`: format the code with [Prettier](https://prettier.io) +- `yarn format`: format the code with [Prettier](https://prettier.io) -* `yarn generate-docs`: generate the `DOCUMENTATION.md` file from the [JSDoc](http://usejsdoc.org) annotations - ---- - -## Helpful materials - -* Article about seed / secret key / public key / address generation: https://medium.com/@benkray/raiblocks-deterministic-keys-8cb869cc6046 +- `yarn generate-docs`: generate the `DOCUMENTATION.md` file from the [JSDoc](http://usejsdoc.org) annotations --- diff --git a/docs/enums/unit.html b/docs/enums/unit.html index ecdc9d0..b992d47 100644 --- a/docs/enums/unit.html +++ b/docs/enums/unit.html @@ -1055,7 +1055,7 @@ img { max-width: 100%; }
checkAddress
-- check
Address(address: any): boolean
+ - check
Address(address: string): boolean
Parameters
address: any
+address: string
The address to check
checkAmount
-- check
Amount(amount: any): boolean
+ - check
Amount(amount: string): boolean
Parameters
amount: any
+amount: string
The amount to check
checkHash
-- check
Hash(hash: any): boolean
+ - check
Hash(hash: string): boolean
Parameters
hash: any
+hash: string
The hash to check
checkKey
-- check
Key(key: any): boolean
+ - check
Key(key: string): boolean
Parameters
key: any
+key: string
The key to check
checkSeed
-- check
Seed(seed: any): boolean
+ - check
Seed(seed: string): boolean
Parameters
seed: any
+seed: string
The seed to check
checkSignature
-- check
Signature(signature: any): boolean
+ - check
Signature(signature: string): boolean
Parameters
signature: any
+signature: string
The signature to check
checkWork
-- check
Work(work: any): boolean
+ - check
Work(work: string): boolean
Parameters
work: any
+work: string
The work to check