Files
api/packages/api-provider
Luke Schoen d4990f8381 fix: Fixes #204. Adds coloured syntax highlighting to TypeDoc code examples (#207)
* fix: Fixes #204. Adds coloured syntax highlighting to TypeDoc code examples

* Add Gitbook plugin Sunlight Highlighter https://www.npmjs.com/package/gitbook-plugin-sunlight-highlighter

* Still requires use of <BR> HTML element to shift code onto a new line

* Example use of Sunlight Highlighter from their README `javascript+theme:gitbook+lineNumbers:true+lineNumberStart:100` (in this example it uses their gitbook theme with line numbers shown and line numbers starting from 100)

* Updated book.json to add the Sunlight Highlighter plugin, and explicitely configured it to use the gitbook theme by default

* Enable showing line numbers only on TypeDoc example code that is longer (i.e. 8 lines long)

* fix: Remove unnecessary inline config for no line numbers since is default

* fix: Remove use of line numbers so consistent with the rest
2018-10-05 17:34:32 +02:00
..
2018-10-01 14:11:43 +02:00
2018-06-13 22:27:29 +02:00
2018-10-05 13:48:33 +00:00
2018-08-28 14:51:16 +02:00

polkadotjs isc style npm travis maintainability coverage dependency devDependency

@polkadot/api-provider

Generic transport providers to handle the transport of method calls to and from Polkadot clients from applications interacting with it. Generally, unless you are operating at a low-level and taking care of encoding and decoding of parameters/results, it won't be directly used. API interfaces building on top these providers can support various transports with the same underlying interfaces.

Usage

Installation -

npm install --save @polkadot/api-provider

Initialisation -

import WsProvider from '@polkadot/api-provider/ws';

const provider = new WsProvider('http://127.0.0.1:9944');
const version = await provider.send('client_version', []);

console.log('clientVersion', version);