Comparing version 2.7.0 to 2.8.0
@@ -11,2 +11,3 @@ export * from './'; | ||
export * from './usdm-client'; | ||
export * from './util/proxy'; | ||
export * from './util/requestUtils'; | ||
@@ -13,0 +14,0 @@ export * from './util/typeGuards'; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__exportStar(require("./usdm-client"), exports); | ||
__exportStar(require("./util/proxy"), exports); | ||
__exportStar(require("./util/requestUtils"), exports); | ||
@@ -25,0 +26,0 @@ __exportStar(require("./util/typeGuards"), exports); |
@@ -520,3 +520,3 @@ import { WsKey } from '../websocket-client'; | ||
eventTime: number; | ||
transactionId: number; | ||
transactionTime: number; | ||
updateData: { | ||
@@ -523,0 +523,0 @@ updateEventType: AccountUpdateEventType; |
@@ -210,3 +210,3 @@ "use strict"; | ||
E: 'eventTime', | ||
T: 'transactionId', | ||
T: 'transactionTime', | ||
a: 'updateData', | ||
@@ -213,0 +213,0 @@ }, |
{ | ||
"name": "binance", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Complete & robust node.js SDK for Binance's REST APIs and WebSockets, with TypeScript & end-to-end tests.", | ||
@@ -54,2 +54,5 @@ "main": "lib/index.js", | ||
}, | ||
"optionalDependencies": { | ||
"https-proxy-agent": "^6.1.0" | ||
}, | ||
"keywords": [ | ||
@@ -56,0 +59,0 @@ "binance", |
@@ -8,3 +8,3 @@ # Node.js & Typescript Binance API SDK | ||
[![connector logo](https://github.com/tiagosiebler/binance/blob/master/docs/images/logo1.png?raw=true)][1] | ||
[![connector logo](https://github.com/tiagosiebler/binance/blob/master/docs/images/logo2.png?raw=true)][1] | ||
@@ -222,3 +222,3 @@ [1]: https://www.npmjs.com/package/binance | ||
}, | ||
logger | ||
logger, | ||
); | ||
@@ -313,4 +313,34 @@ | ||
## Browser Usage | ||
## Browser/Frontend Usage | ||
### Import | ||
This is the "modern" way, allowing the package to be directly imported into frontend projects with full typescript support. | ||
1. Install these dependencies | ||
```sh | ||
npm install crypto-browserify stream-browserify | ||
``` | ||
2. Add this to your `tsconfig.json` | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"paths": { | ||
"crypto": [ | ||
"./node_modules/crypto-browserify" | ||
], | ||
"stream": [ | ||
"./node_modules/stream-browserify" | ||
] | ||
} | ||
``` | ||
3. Declare this in the global context of your application (ex: in polyfills for angular) | ||
```js | ||
(window as any).global = window; | ||
``` | ||
### Webpack | ||
This is the "old" way of using this package on webpages. This will build a minified js bundle that can be pulled in using a script tag on a website. | ||
Build a bundle using webpack: | ||
@@ -347,2 +377,2 @@ | ||
[![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/ftx-api,tiagosiebler/bybit-api,tiagosiebler/binance,tiagosiebler/orderbooks,tiagosiebler/okx-api,tiagosiebler/awesome-crypto-examples&type=Date)](https://star-history.com/#tiagosiebler/ftx-api&tiagosiebler/bybit-api&tiagosiebler/binance&tiagosiebler/orderbooks&tiagosiebler/okx-api&tiagosiebler/awesome-crypto-examples&Date) | ||
[![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/bitget-api,tiagosiebler/ftx-api,tiagosiebler/bybit-api,tiagosiebler/binance,tiagosiebler/orderbooks,tiagosiebler/okx-api,tiagosiebler/awesome-crypto-examples&type=Date)](https://star-history.com/#tiagosiebler/ftx-api&tiagosiebler/bitget-api&tiagosiebler/bybit-api&tiagosiebler/binance&tiagosiebler/orderbooks&tiagosiebler/okx-api&tiagosiebler/awesome-crypto-examples&Date) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
463794
74
8828
375
5
1