# cbase-shell

> General purpose command line tools for interacting with CBaseChain

Latest version **0.0.1** (published 2020-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install cbase-shell
pnpm add cbase-shell
yarn add cbase-shell
bun add cbase-shell
```

Provides the command `cbase`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-05-12 |
| First published | 2020-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10 |
| Dependencies | 18 |
| Unpacked size | 80.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jane Degtiareva |
| Maintainers | rooat |
| Keywords | blockchain, crypto, dapps, distributed, applications, distributed applications |

## Links

- npm: https://www.npmjs.com/package/cbase-shell
- Repository: https://github.com/CBase-Official/CBase-shell
- Homepage: https://github.com/CBase-Official/CBase-shell#readme
- Issues: https://github.com/CBase-Official/CBase-shell/issues
- npm.io page: https://npm.io/package/cbase-shell

## Dependencies (18)

- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [bs58](https://npm.io/package/bs58.md) ^4.0.1
- [open](https://npm.io/package/open.md) ^7.0.1
- [uuid](https://npm.io/package/uuid.md) ^8.0.0
- [bn.js](https://npm.io/package/bn.js.md) ^5.1.1
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [is-ci](https://npm.io/package/is-ci.md) ^2.0.0
- [yargs](https://npm.io/package/yargs.md) ^15.0.1
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.0
- [v8flags](https://npm.io/package/v8flags.md) ^3.1.3
- [mixpanel](https://npm.io/package/mixpanel.md) ^0.11.0
- [stoppable](https://npm.io/package/stoppable.md) ^1.1.0
- [ascii-table](https://npm.io/package/ascii-table.md) 0.0.9
- [near-api-js](https://npm.io/package/near-api-js.md) ^0.24.0
- [tcp-port-used](https://npm.io/package/tcp-port-used.md) ^1.0.1
- [flagged-respawn](https://npm.io/package/flagged-respawn.md) ^1.0.1
- [update-notifier](https://npm.io/package/update-notifier.md) ^4.0.0
- [jest-environment-node](https://npm.io/package/jest-environment-node.md) ^26.0.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-05-12
- 0.23.0 — 2020-05-12

## README

# cbase Shell command line interface


CBase Shell is a Node.js application that  to generate secure keys, connect to the cbase platform and send transactions to the network on your behalf.

> note that **Node.js version 10+** is required to run CBase Shell

## Installation

```bash
npm install -g cbase-shell
```

## Usage

In command line, from directory with your project:

```bash
cbase <command>
```

### Commands

#### For account:
```bash
  cbase login                                       # logging in through cbase protocol wallet
  cbase create_account <accountId>                  # create a developer account with --masterAccount(required), publicKey and initialBalance
  cbase state <accountId>                           # view account state
  cbase keys <accountId>                            # view account public keys
  cbase send <sender> <receiver> <amount>           # send tokens to given receiver
  cbase stake <accountId> <stakingKey> <amount>     # create staking transaction (stakingKey is base58 encoded)
  cbase delete <accountId> <beneficiaryId>          # delete an account and transfer funds to beneficiary account
```

#### For smart contract:
```bash
  cbase build                                       # build your smart contract
  cbase deploy                                      # deploy your smart contract
  cbase call <contractName> <methodName> [args]     # schedule smart contract call which can modify state
  cbase view <contractName> <methodName> [args]     # make smart contract call which can view state
  cbase clean                                       # clean the smart contract build locally (remove ./out )
```

#### For transactions:
```bash
  cbase tx-status <hash>                            # lookup transaction status by hash
```

#### Misc:

```bash
  cbase repl                                        # launch interactive Node.js shell with cbase connection available to use
  cbase generate-key <account-id>                   # generate key
```

### Options

| Option                    | Description                                   | Type      | Default               |
| --------------------------|:----------------------------------------------| :---------|:----------------------|
| --help                    | Show help                                     | [boolean] |                       |
| --version                 | Show version number                           | [boolean] |                       |
| --nodeUrl                 | cbase node URL                                 | [string]  |"http://localhost:3030"|
| --networkId               | cbase network ID for different keys by network | [string]  |"default"              |
| --helperUrl               | cbase contract helper URL                      | [string]  |                       |
| --keyPath                 | Path to master account key                    | [string]  |                       |
| --accountId               | Unique identifier for the account             | [string]  [required]|             |
| --masterAccount           | Account used to create requested account.     | [string]  [required]|             |
| --publicKey               | Public key to initialize the account with     | [string]  [required]|             |
| --initialBalance          | Number of tokens to transfer to newly account | [string]  [required]|             |

## License
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See [LICENSE](LICENSE) and [LICENSE-APACHE](LICENSE-APACHE) for details.

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