Classify Http & Ws providers (#120)

* Class-ify HttpProvider

* Class-ify WsProvider (tests still WIP)

* Rework tests

* rx-api usage
This commit is contained in:
Jaco Greeff
2018-08-07 16:59:40 +02:00
committed by GitHub
parent f74fd9e01d
commit fe4c34defe
38 changed files with 342 additions and 531 deletions
+2 -2
View File
@@ -25,11 +25,11 @@ npm install --save @polkadot/api
Initialisation -
```js
import Api from '@polkadot/api';
import createApi from '@polkadot/api';
import HttpProvider from '@polkadot/api-provider/http';
const provider = new HttpProvider('http://127.0.0.1:9933');
const api = new Api(provider);
const api = createApi(provider);
```
Making calls -