@mutopad/connex-driver
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Connex Driver

npm version

This library implement Connex.Driver, which drives Connex Framework.

Installation

# install driver along with framework
npm i @mutopad/connex-framework @mutopad/connex-driver

Usage

The REPL playground is a good start.

import { Framework } from '@mutopad/connex-framework'
import { Driver, SimpleNet, SimpleWallet } from '@mutopad/connex-driver'

const wallet = new SimpleWallet()
// add account by importing private key
wallet.import('<private key>')

const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
// here get connex object ready to use
...

// config tx parameters, e.g. expiration, gasPriceCoef
driver.txParams.expiration = 18
driver.txParams.gasPriceCoef = 128

// watch committed tx
driver.onTxCommit = txObj => {
    // 
}

License

This package is licensed under the GNU Lesser General Public License v3.0, also included in LICENSE file in the repository.

Readme

Keywords

Package Sidebar

Install

npm i @mutopad/connex-driver

Weekly Downloads

0

Version

0.0.2

License

LGPL-3.0

Unpacked Size

159 kB

Total Files

36

Last publish

Collaborators

  • mutopad