Skip to content

Commit

Permalink
move package under @wyre
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Luyke committed Sep 21, 2018
1 parent 9449674 commit c498f24
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ Install
-------

```
npm install wyre-api
npm install @wyre/api
```

Usage
-----

*An important note on decimals*:

Some currencies, like ETH, have many decimal places. This can cause problems with the
Some currencies, like ETH, have many decimal places. This can cause problems with the
many JSON implementations that fail to offer support arbitrary precision numbers. Moreover, IEEE 754 floating point
is not in general a good representation for money - it does not necessarily preserve precision.

In the examples below, we have supplied the `format` parameter as `"json_numberstring"`. This encodes all
numbers returned from our API as strings. If you need to perform arithmetic on these numbers, you ***must***
numbers returned from our API as strings. If you need to perform arithmetic on these numbers, you ***must***
use an arbitrary-precision library:

- [BigDecimal.js](https://github.com/iriscouch/bigdecimal.js): a literal port of Java's BigInteger and BigDecimal classes.
Expand All @@ -29,8 +29,8 @@ use an arbitrary-precision library:
Alternatively, instead supply the (default) `"format":"json"` and the API will encode numbers directly in JSON.

```js
const WyreClient = require('wyre-api').WyreClient
// import {WyreClient} from 'wyre-api'
const WyreClient = require('@wyre/api').WyreClient
// import {WyreClient} from '@wyre/api'

let wyre = new WyreClient({
format: "json_numberstring",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "wyre-api",
"name": "@wyre/api",
"version": "1.0.3",
"description": "Node.js client library for the Wyre API.",
"main": "./dist/wyre.js",
Expand Down

0 comments on commit c498f24

Please sign in to comment.