5.1.0 • Published 2 years ago

pchain-client-js v5.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

ParallelChain Mainnet Javascript Client Library

Introduction

ParallelChain Mainnet Javascript Client Library (pchain-client-js) is a package providing a HTTP client for interacting with the Parallelchain Mainnet Protocol RPC API.


Installation

The library is built with npm (8.x) and compatible to node (v16.x). pchain-client-js is available as an npm package

// Using NPM
npm install pchain-client-js

// Yarn
yarn add pchain-client-js

Importing

// Lexical/ ESM/ TypeScript
import { Client } from "pchain-client-js";
// Non-lexical/ CommonJS
const Client = require("pchain-client-js").Client;

Usage

const client = new Client('https://pchain-test-rpc02.parallelchain.io');
const blockResponse: BlockResponse = client.block({
  block_hash,
})
console.log(blockResponse);
// Output
BlockResponse {
  block: Option {
    value: Block {
      blockHeader: ...,
      transactions: [...],
      receipts: [...]
    }
  }
}
5.1.0

2 years ago

4.1.0

2 years ago

5.0.0

2 years ago

2.0.0

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago