Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montyanderson/zcash
:dollar: Minimal Zcash library for Node.js
https://github.com/montyanderson/zcash
bitcoin node rpc zcash
Last synced: about 6 hours ago
JSON representation
:dollar: Minimal Zcash library for Node.js
- Host: GitHub
- URL: https://github.com/montyanderson/zcash
- Owner: montyanderson
- License: mit
- Created: 2016-10-31T16:24:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T14:02:34.000Z (over 1 year ago)
- Last Synced: 2024-11-01T06:45:12.145Z (16 days ago)
- Topics: bitcoin, node, rpc, zcash
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/zcash
- Size: 687 KB
- Stars: 19
- Watchers: 5
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zcash
:dollar: Minimal [Zcash](https://z.cash/) library for Node.js
> Note: This library has been succeeded by the isomorphic library [stdrpc](https://github.com/montyanderson/stdrpc).
```
npm install zcash --save
```## Features
* A fast, concise codebase, with zero dependencies.
* Supports all commands listed in the [zcash Payment API](https://github.com/zcash/zcash/blob/master/doc/payment-api.md).
* Test suite!## To Do
* Write a more full test suite.
## API
### Zcash.auto()
Returns a new `Zcash` instance, after reading the username and password from `HOME/.zcash/zcash.conf`. You can then use all the RPC commands as normal.
``` javascript
const rpc = Zcash.auto();rpc.z_listaddresses().then(addresses => {
console.log(addresses);
});
```### new Zcash(options)
Returns a new `Zcash` instances, with the specified options.
#### options
Type: `object`
###### username
The RPC username.
Type: `string`
###### password
The RPC password.
Type: `string`
###### host
The RPC host.
Type: `string`
###### port
The RPC port.
Type: `number`
``` javascript
const Zcash = require("zcash");const rpc = new Zcash({
username: "__username__",
password: "__password__"
});rpc.z_listaddresses().then(addresses => {
console.log(addresses);
});
`````` javascript
[ 'zcW36oxxUKViWZsFUb6SUDLr61b3N6EaY9oRt8zPYhxFAUGRwUNCLuGFfd2yxYrDgM5ouLkTDHMRdGNgVqJgriHncbjRedN' ]
```