dhive-sl
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-prerelease.11 • Public • Published

dhive-sl

Client library for the Hive blockchain & Hive Engine layer2.


Installation

npm install dhive-sl

Usage

import { Client } from 'dhive-sl';

const main = async () => {
    // Client
    const client = new Client()
    // (Optional) const client = new Client({ nodes: ['api.hive.blog', 'api.deathwing.me', 'anyx.io'] })

    // Getting data from Hive
    const account = await client.database.getAccount('splinterlands')

    // Encoding & decoding memos
    const encoded = await client.memo.encode('test', 'pub-key-B', 'private-key-A')
    const decoded = await client.memo.decode(encoded, 'private-key-B')

    // Getting data from Hive Engine (layer2 of Hive)
    const block = await client.engine.blockchain.getLatestBlock()
};

main();

Note

This version is a fork of dhive, which was originally created by Johan Nordberg in 2017 and maintained since 2021 by the Hive community.

dhive-sl was forked to improve dhive as well as merge the functionality of & improve upon hive-js, sscjs and hive-interface.

Readme

Keywords

none

Package Sidebar

Install

Weekly Downloads

8

Version

2.0.0-prerelease.11

License

BSD-3

Unpacked Size

1.07 MB

Total Files

8

Last publish

Collaborators

  • reichert-sl