1.0.9 • Published 1 year ago

allchain v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Logo

Develop, Deploy, and Innovate - seamlessly.

[NPM Version]

[NPM Install Size]

A package that helps a developer to use any blockchain network in their project and create decentralised application.

A JavaScript API to connect with the JSON-RPC of Ethereum and Solana network.

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install allchain

Once the package is installed, you can import the library using require approach:

const allchain = require('allchain')

console.log(new allchain.Eth());

You will notice this output on the terminal if everything works well.

You are connected to Ethereum Chain.
Eth {}

You have connected to the Ethereum chain. To connect to solana type this on the terminal.

const allchain = require('allchain')

console.log(new allchain.Sol());

Output

You are connected to Solana Chain.
Sol {}

Documentation

This package allows to make dapps on multiple chains using allchain.

Following are the features of allchain.

  • createAccount
  • currentProvider
  • getGasPrice
  • sendTransaction
  • getBlock
  • getBlockNumber
  • getBalance
  • createWallet
  • addAccount

Usage/Examples

The following code demonstrates the working of allchain's feature.

  1. To create an account on either of the chain use the following functions.
allchain = require('allchain');

function eth_createAccount()
{
    return allchain.Eth.createAccount();
}

function sol_createAccount()
{
    return allchain.Sol.createAccount();
}
  1. To get the wallet balance of your account using account address.
allchain = require('allchain');

function eth_balance(account_address)
{
    return allchain.Eth.getBalance(account_address);
}

function sol_balance(account_address)
{
    return allchain.Sol.getBalance(account_address);
}

The above functions return the balance of the provided address.

Support

For support, email mail us at venkatash.sv@gmail.com and kshitijlm10@gmail.com.

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago