# fit-block-store

> FitBlock's store component。

Latest version **1.0.1** (published 2020-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install fit-block-store
pnpm add fit-block-store
yarn add fit-block-store
bun add fit-block-store
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-01-16 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zy445566 |
| Maintainers | zy445566 |
| Keywords | fit, block, fit-block, bitcoin, btc, store |

## Links

- npm: https://www.npmjs.com/package/fit-block-store
- Repository: https://github.com/FitBlock/fit-block-store
- Homepage: https://github.com/FitBlock/fit-block-store#readme
- Issues: https://github.com/FitBlock/fit-block-store/issues
- npm.io page: https://npm.io/package/fit-block-store

## Dependencies (3)

- [grpc](https://npm.io/package/grpc.md) ^1.24.2
- [level](https://npm.io/package/level.md) ^6.0.0
- [@grpc/proto-loader](https://npm.io/package/@grpc/proto-loader.md) ^0.5.3

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-01-16
- 1.0.0 — 2020-01-15

## README

# fit-block-store
FitBlock‘s store component

# exmaple
```js
// const level = require('./index.js').default;
import level from './index';
const server = level.getServer();
const client = level.getClient();
async function run () {
    await server.listen('127.0.0.1',5657);
    await client.conect('127.0.0.1',5657,'test');
    await client.ping();
    await client.put('test','test');
    console.log(await client.get('test'));
    await client.del('test');
    await server.close()
}

```
# api
## client
#### FunctionName  conect
* Return  Promise\<boolean\>
* Description  conect to server
* Param

  name        | type |require |default    |Description
  ------------|------|--------|-----------|------------
  host   |string|must  |'127.0.0.1'   | host
  port |number|must  |5657         | port
  dbName |string|must  |'test'         | dbName

#### FunctionName  put
* Return  Promise\<boolean\>
* Description  insert or update data
* Param

  name        | type |require |default    |Description
  ------------|------|--------|-----------|------------
  key   |string|must  |'testKey'   | key
  value |string|must  |'testValue'         | value

#### FunctionName  get
* Return  Promise\<string\>
* Description  get data by key
* Param

  name        | type |require |default    |Description
  ------------|------|--------|-----------|------------
  key   |string|must  |'testKey'   | key

#### FunctionName  del
* Return  Promise\<boolean\>
* Description  del data by key
* Param

  name        | type |require |default    |Description
  ------------|------|--------|-----------|------------
  key   |string|must  |'testKey'   | key

## server
#### FunctionName  listen
* Return  Promise\<boolean\>
* Description  run server
* Param

  name        | type |require |default    |Description
  ------------|------|--------|-----------|------------
  host   |string|must  |'127.0.0.1'   | host
  port |number|must  |5657         | port

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