@arianelabs/hweb3-providers-http
TypeScript icon, indicating that this package has built-in type declarations

1.0.33 • Public • Published

hweb3-providers-http

NPM Package Dependency Status Dev Dependency Status

This is a HTTP provider sub-package for hweb3.js.

Please read the documentation for more.

Installation

Node.js

npm install hweb3-providers-http

Usage

import { HttpProvider } from '@arianelabs/hweb3-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 HttpProvider(options);

Types

All the TypeScript typings are placed in the types folder.

Readme

Keywords

none

Package Sidebar

Install

npm i @arianelabs/hweb3-providers-http

Weekly Downloads

4

Version

1.0.33

License

LGPL-3.0

Unpacked Size

36 kB

Total Files

12

Last publish

Collaborators

  • arianelabs