Extended publishing of libraries to npm (#3786)
* Extended publishing of libraries to npm * Update source links * Add some tests before publishing NPM library * Fix Shapeshift tests
This commit is contained in:
34
js/npm/shapeshift/README.md
Normal file
34
js/npm/shapeshift/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# @parity/ShapeShift
|
||||
|
||||
A thin ES6 promise wrapper around the shapeshift.io APIs as documented at https://shapeshift.io/api
|
||||
|
||||
[https://github.com/ethcore/parity/tree/master/js/src/3rdparty/shapeshift](https://github.com/ethcore/parity/tree/master/js/src/3rdparty/shapeshift)
|
||||
|
||||
## usage
|
||||
|
||||
installation -
|
||||
|
||||
```
|
||||
npm install --save @parity/ShapeShift
|
||||
```
|
||||
|
||||
Usage -
|
||||
|
||||
```
|
||||
const APIKEY = 'private affiliate key or undefined';
|
||||
const shapeshift = require('@parity/ShapeShift')(APIKEY);
|
||||
|
||||
// api calls goes here
|
||||
```
|
||||
|
||||
## api
|
||||
|
||||
queries -
|
||||
|
||||
- `getCoins()` [https://shapeshift.io/api#api-104](https://shapeshift.io/api#api-104)
|
||||
- `getMarketInfo(pair)` [https://shapeshift.io/api#api-103](https://shapeshift.io/api#api-103)
|
||||
- `getStatus(depositAddress)` [https://shapeshift.io/api#api-5](https://shapeshift.io/api#api-5)
|
||||
|
||||
transactions -
|
||||
|
||||
- `shift(toAddress, returnAddress, pair)` [https://shapeshift.io/api#api-7](https://shapeshift.io/api#api-7)
|
||||
31
js/npm/shapeshift/package.json
Normal file
31
js/npm/shapeshift/package.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "@parity/ShapeShift",
|
||||
"description": "The Parity Promise-based library for interfacing with ShapeShift over HTTP",
|
||||
"version": "0.0.0",
|
||||
"main": "library.js",
|
||||
"author": "Parity Team <admin@parity.io>",
|
||||
"maintainers": [
|
||||
"Jaco Greeff"
|
||||
],
|
||||
"contributors": [],
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ethcore/parity.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Ethereum",
|
||||
"ABI",
|
||||
"API",
|
||||
"RPC",
|
||||
"Parity",
|
||||
"Promise"
|
||||
],
|
||||
"scripts": {
|
||||
},
|
||||
"devDependencies": {
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": "~1.6.3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user