3.5.0 • Published 11 months ago

@zilliqa-js/zilliqa v3.5.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
11 months ago

@zilliqa-js/zilliqa

JavaScript library for interacting with the Zilliqa blockchain.

Table of Contents

Installation

npm install @zilliqa-js/zilliqa --save

or

yarn add @zilliqa-js/zilliqa

Usage

First, you need to import the library:

const { Zilliqa } = require("@zilliqa-js/zilliqa");

or using ES6 imports:

import { Zilliqa } from "@zilliqa-js/zilliqa";

Then, create an instance:

const zilliqa = new Zilliqa("https://api.zilliqa.com");

Examples

Sending a Transaction

const myAddress = "Your Zilliqa Address";
const recipient = "Recipient Zilliqa Address";
const amount = Zilliqa.utils.units.toQa("1", Zilliqa.utils.units.Units.Zil);

const tx = await zilliqa.blockchain.createTransaction({
  toAddr: recipient,
  amount: amount,
  gasPrice: "2000",
  gasLimit: "1",
});

console.log(`Transaction ID: ${tx.id}`);
console.log(
  `After sending, your new balance is: ${await zilliqa.blockchain.getBalance(
    myAddress
  )}`
);

Fetching Account Balance

const myAddress = "Your Zilliqa Address";
const balance = await zilliqa.blockchain.getBalance(myAddress);
console.log(`Your balance is: ${balance}`);

Documentation

For in-depth documentation, please refer to Zilliqa Official Documentation.

License

This project is licensed under the GPL License. See LICENSE for details.

3.5.0

11 months ago

3.4.4

1 year ago

3.4.0

1 year ago

3.4.3-rc.0

1 year ago

3.4.3

1 year ago

3.4.2

1 year ago

3.4.1

1 year ago

3.4.2-rc.0

1 year ago

3.4.0-rc.3

1 year ago

3.4.0-rc.1

1 year ago

3.4.0-rc.2

1 year ago

3.4.0-rc.0

1 year ago

3.3.1

3 years ago

3.3.4

3 years ago

3.3.3

3 years ago

3.3.2

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.3.0-alpha.0

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.0

4 years ago

1.0.0

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.9

5 years ago

0.8.8

5 years ago

0.8.7

5 years ago

0.8.6

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.1

5 years ago

0.8.1-alpha.2

5 years ago

0.8.1-alpha.0

5 years ago

0.8.0-alpha.0

5 years ago

0.7.5

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago