pec-providers-http
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

pec-providers-http

[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]

This is a HTTP provider sub-package for [pec.js][repo].

Please read the [documentation][docs] for more.

Installation

Node.js

npm install pec-providers-http

Usage

const http = require('http');
const Web3HttpProvider = require('pec-providers-http');

const options = {
    keepAlive: true,
    timeout: 20000, // milliseconds,
    headers: [{name: 'Access-Control-Allow-Origin', value: '*'},{...}],
    withCredentials: false,
    agent: {http: http.Agent(...), baseUrl: ''}
};

const provider = new Web3HttpProvider('http://localhost:8545', options);

Types

All the TypeScript typings are placed in the types folder. s

Readme

Keywords

none

Package Sidebar

Install

npm i pec-providers-http

Weekly Downloads

25

Version

1.0.5

License

LGPL-3.0

Unpacked Size

14.4 kB

Total Files

9

Last publish

Collaborators

  • peex.cc