# unicalwallet-cli

> CLI wallet for the Symbol SDK from NEM Blockchain

Latest version **1.0.1** (published 2020-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install unicalwallet-cli
pnpm add unicalwallet-cli
yarn add unicalwallet-cli
bun add unicalwallet-cli
```

Provides the command `unical`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-05-14 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 81 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Enrico Zanardo |
| Maintainers | enrynewton |
| Keywords | CLI, Symbol, NEM, Blockchain, Wallet, Enrico, Zanardo, enrynewton |

## Links

- npm: https://www.npmjs.com/package/unicalwallet-cli
- npm.io page: https://npm.io/package/unicalwallet-cli

## Dependencies (7)

- [clear](https://npm.io/package/clear.md) ^0.1.0
- [hasha](https://npm.io/package/hasha.md) ^5.2.0
- [mngen](https://npm.io/package/mngen.md) ^1.1.0
- [cfonts](https://npm.io/package/cfonts.md) ^2.8.2
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [symbol-sdk](https://npm.io/package/symbol-sdk.md) ^0.18.0
- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.10

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-05-14
- 1.0.0 — 2020-05-13

## README

# Symbol CLI wallet 🎉

A Command Line Interface with mnemonic private key generator for the Symbol Blockchain provided by NEM. 🙌

This project is connected with the course provided on [Blockchain Course](https://blockchain-cryptocurrency.thinkific.com/)

![cli](./img/cli.png)

You will find a step by step video course in how to build it on that course [link](https://blockchain-cryptocurrency.thinkific.com/)

If you want to test the app and receive some UnicalCoins 💰 just send [me](mailto:ezanardo@onezerobinary.com) an email with your ADDRESS ;)

### Mnemonic Private Key Generator

The following code show the builded function used to create a mnemonic private key starting from 4 random english words, hashing them like a mini markle tree and giving back a private key of 64 bit (sha256).

```ts
var mnGen = require('mngen');
import hasha from 'hasha';
var colors = require('colors/safe');

function sha256(word: string): string {
  return hasha(word, { algorithm: 'sha256', encoding: 'hex' });
}

export function generateMnemonicPrivateKey(): string {
  const mnemonic: string[] = mnGen.list(4); // [provide,crimson,float,carrot]

  console.log(
    `Write down those mnemonic worlds that are used to generate your private key:`
  );
  console.log(colors.yellow(`\n${mnemonic}`));

  let hashes: string[] = [];
  mnemonic.map((world) => {
    hashes.push(sha256(world));
  });

  // Pseudo Merkle Tree
  let tmp_result_1 = sha256(hashes[0] + hashes[1]);
  let tmp_result_2 = sha256(hashes[2] + hashes[3]);

  let privateKey = sha256(tmp_result_1 + tmp_result_2);

  return privateKey;
}
```

### Run the project:

#### 1. Clone the repo:

```
git clone https://github.com/onezerobinary/symbol-cli-wallet.git
```

#### 2. Install Dependencies

```
cd symbol-cli-wallet
```

```
yarn
```

#### 3. Compile the project

```
yarn build
```

#### 4. Run the Blockchain CLI UnicalCoin App

```
yarn start
```

Happy hacking! 🤙🏼

---
_Source: https://npm.io/package/unicalwallet-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
