Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@uprtcl/connections

0.0.2-alpha3 • Public • Published

@uprtcl/connections

_Prtcl resources: Overview, Spec, Dev guide, API reference

This node package includes basic connections services to help connect to different backend platforms. These services include standard funcionality like a retry mechanism, or a ready() function to wait for them to be ready.

List of supported connections:

  • Ethereum: small wrapper around Web3
  • Ipfs: small wrapper around ipfs-http-client
  • Holochain: small wrapper around @holochain/hc-web-client
  • Web server (via http or websockets)

Dependencies

This package depends on @uprtcl/micro-orchestrator and @uprtcl/cortex to import basic types, but doesn't import funcionality from them.

Install

npm install @uprtcl/connections

Usage

Import the appropriate connection you would like to use, and make a new instance of it by passing its configuration:

import { EthereumConnection } from '@uprtcl/connections';
 
const ethConnection = new EthereumConnection({
  provider: provider,
  contractAbi: myContractAbi
});
 
await ethConnection.ready();

Install

npm i @uprtcl/connections

DownloadsWeekly Downloads

18

Version

0.0.2-alpha3

License

MIT

Unpacked Size

186 kB

Total Files

46

Homepage

uprtcl.io

Last publish

Collaborators

  • avatar
  • avatar