Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lockblock-dev/unmineable.js
A JavaScript library for interacting with the UnMineable API and WebSocket
https://github.com/lockblock-dev/unmineable.js
api crypto pool unmineable websocket
Last synced: about 1 month ago
JSON representation
A JavaScript library for interacting with the UnMineable API and WebSocket
- Host: GitHub
- URL: https://github.com/lockblock-dev/unmineable.js
- Owner: LockBlock-dev
- License: mit
- Created: 2021-06-19T10:50:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T16:45:14.000Z (over 1 year ago)
- Last Synced: 2024-11-22T15:40:55.849Z (about 1 month ago)
- Topics: api, crypto, pool, unmineable, websocket
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/unmineable.js
- Size: 28.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# UnMineable.js
[![axios](https://img.shields.io/github/package-json/dependency-version/LockBlock-dev/unmineable.js/axios)](https://www.npmjs.com/package/axios) [![socket.io-client](https://img.shields.io/github/package-json/dependency-version/LockBlock-dev/unmineable.js/socket.io-client)](https://www.npmjs.com/package/socket.io-client)
[![GitHub stars](https://img.shields.io/github/stars/LockBlock-dev/unmineable.js.svg)](https://github.com/LockBlock-dev/unmineable.js/stargazers) ![npm](https://img.shields.io/npm/dm/unmineable.js)
unmineable.js is a Node.js module that allows you to easily interact with the UnMineable API and WebSocket.
• Promise based
• Performant
• 100% coverage of the UnMineable API and WebSocket
## Installation
• Download [NPM](https://www.npmjs.com/get-npm) and [NodeJS](https://nodejs.org)
With GitHub :
• Download the project or clone it
• Go to the unmineable.js folder and do `npm install`
• Require the [client.js](/src/client.js)
With NPM :
• Download the project
• Do `npm install unmineable.js`
• Require the library
## Documentation
See the [API documentation](/API.md)
See the [WebSocket documentation](/WebSocket.md)
See the [changelog](/CHANGELOG.md)## Example usage
### Using the library - API
```js
const { Client } = require("unmineable.js");
//OR
import { Client } from "unmineable.js";const client = new Client();
client.stats().then((data) => {
console.log(data);
});//OR
const myFunc = async () => {
const data = await client.stats();
console.log(data);
};myFunc();
```The library is async, be sure to use [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function#syntax) or [.then()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then#syntax)
### Using the library - WebSocket
```js
const { Client } = require("unmineable.js");
//OR
import { Client } from "unmineable.js";const client = new Client();
client.on("event", (data) => {
console.log(data);
});client.start("UUID"); //uiid can be found in client.wallet function
```List of events available [here](/WebSocket.md)
## Credits
[UnMineable](https://unmineable.com)
## Copyright
See the [license](/LICENSE)