# mvs-rpc

> ## 如何获取 ``` npm install --save mvs-rpc

Latest version **1.0.1** (published 2017-08-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install mvs-rpc
pnpm add mvs-rpc
yarn add mvs-rpc
bun add mvs-rpc
```

## 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 | 2017-08-28 |
| First published | 2017-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | baiting |
| Maintainers | baiting |

## Links

- npm: https://www.npmjs.com/package/mvs-rpc
- Repository: https://github.com/feliving/mvs-rpc
- Homepage: https://github.com/feliving/mvs-rpc#readme
- Issues: https://github.com/feliving/mvs-rpc/issues
- npm.io page: https://npm.io/package/mvs-rpc

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.81.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.4

## Recent versions

- 1.0.1 (latest) — 2017-08-28
- 1.0.0 — 2017-08-24

## README

# 元界钱包rpc调用库

## 如何获取
```
npm install --save mvs-rpc

```

## 如何使用

```js
const Mvs = require('mvs-client');

const client = new Mvs('http://localhost:8820/rpc');

client.height().then(val => console.log(val));

```

使用await
```js
const res = await client.callMethod('fetch-balance', ['MUiW2CViWLQBg2TQDsRt1Pcj7KyrdqFPj7']);
console.log(res)

```

## API

### callMethod(name, args)
- `name` mvsd命令名称
- `args` 参数列表

```js
client.callMethod('fetch-header', ['-t', 500657])
```

## 便捷方法

- heightHeader(num)
- hashHeader(hash)
- seed
- balance(address)
- height()
- history(address)
- tx(hash)
- txIndex(hash)
- utxo(satoshi, address)
- block(hash)
- transaction(hash)
- addressAsset(hash)

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