1.1.0 • Published 1 year ago

litecoin-core v1.1.0

Weekly downloads
52
License
MIT
Repository
github
Last release
1 year ago

Litecoin-Core

Installation

Install the package via yarn:

yarn add litecoin-core

or via npm:

Install the package via npm:

npm install litecoin-core --save

Usage

Client(...args)

Arguments

  1. [host=localhost] (string): The host to connect to.
  2. [port=[network]] (string): The RPC server port.
  3. [network=mainnet] (string): The network
  4. [username] (string): The RPC server user name.
  5. [password] (string): The RPC server user password.
  6. [timeout=30000] (number): How long until the request times out (ms).

Examples

Using network mode

The network will automatically determine the port to connect to, just like the litecoind and litecoin-cli commands.

const Client = require('litecoin-core');
const client = new Client({ network: 'regtest' });
Setting a custom port
const client = new Client({ port: 32777 });